{"id":38207165,"url":"https://github.com/harunnryd/skeltun","last_synced_at":"2026-01-17T00:37:06.958Z","repository":{"id":57569324,"uuid":"235770544","full_name":"harunnryd/skeltun","owner":"harunnryd","description":"an Golang skeleton template.","archived":false,"fork":false,"pushed_at":"2021-11-29T09:13:28.000Z","size":136,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-20T00:36:36.464Z","etag":null,"topics":["boilerplate","bootstrap","clean-architecture","clean-code","framework","go","golang","handler","skeleton","skeltun"],"latest_commit_sha":null,"homepage":"https://harunnryd.github.io/skeltun","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/harunnryd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2020-01-23T10:19:30.000Z","updated_at":"2024-06-20T00:36:36.465Z","dependencies_parsed_at":"2022-08-23T18:11:07.679Z","dependency_job_id":null,"html_url":"https://github.com/harunnryd/skeltun","commit_stats":null,"previous_names":[],"tags_count":2,"template":true,"template_full_name":null,"purl":"pkg:github/harunnryd/skeltun","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harunnryd%2Fskeltun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harunnryd%2Fskeltun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harunnryd%2Fskeltun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harunnryd%2Fskeltun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harunnryd","download_url":"https://codeload.github.com/harunnryd/skeltun/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harunnryd%2Fskeltun/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28490303,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T23:55:29.509Z","status":"ssl_error","status_checked_at":"2026-01-16T23:55:29.108Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boilerplate","bootstrap","clean-architecture","clean-code","framework","go","golang","handler","skeleton","skeltun"],"created_at":"2026-01-17T00:37:06.385Z","updated_at":"2026-01-17T00:37:06.940Z","avatar_url":"https://github.com/harunnryd.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg alt=\"skeltun\" src=\"https://i.imgur.com/62JGG0R.png\" width=\"220\"/\u003e\n\nThis is a skeleton build with GO for our development process.\n\n## Basic usage\n\n**CLI**\n\n```bash\nfoo@bar:~$ make docker-up\nfoo@bar:~$ make help\nfoo@bar:~$ make migration-sql create_users_table postgres\nfoo@bar:~$ make migrate-up postgres\nfoo@bar:~$ make migrate-down postgres\nfoo@bar:~$ make docker-down\n```\n\n**Migration files**\n\n```bash\n1481574547_create_users_table.up.sql\n1481574547_create_users_table.down.sql\n```\n\n\n**UseCase**\n\n\u003e options.go\n\n```go\npackage usecase\n\nimport (\n\t\"github.com/harunnryd/skeltun/config\"\n\t\"github.com/harunnryd/skeltun/internal/app/repo\"\n\t\"github.com/harunnryd/skeltun/internal/app/usecase/hcheck\"\n\t\"github.com/harunnryd/skeltun/internal/pkg\"\n\t\"github.com/harunnryd/skeltun/job\"\n\n\t\"github.com/gomodule/redigo/redis\"\n)\n\n// Option ...\ntype Option func(*UseCase)\n\n// WithDependency ...\nfunc WithDependency(config config.IConfig) Option {\n\tvar iRepo = repo.New(repo.WithDependency(config))\n\tvar iPkg = pkg.New(pkg.WithDependency(config))\n\tvar redisPool = \u0026redis.Pool{\n\t\tMaxActive: 5,\n\t\tMaxIdle:   5,\n\t\tWait:      true,\n\t\tDial: func() (redis.Conn, error) {\n\t\t\treturn redis.DialURL(config.GetString(\"database.redis.hosts\"))\n\t\t},\n\t}\n\tvar iJob = job.New(job.WithConfig(config), job.WithRedis(redisPool))\n\n\treturn func(usecase *UseCase) {\n\t\t// Inject all your UseCase's in here.\n\t\t// Example :\n\t\t// usecase.user = user.New(\n\t\t//    user.WithConfig(config),\n\t\t//    user.WithRepo(repo),\n\t\t// )\n\t\tusecase.hcheck = hcheck.New(\n\t\t\thcheck.WithConfig(config),\n\t\t\thcheck.WithRepo(iRepo),\n\t\t\thcheck.WithPkg(iPkg),\n\t\t\thcheck.WithJob(iJob),\n\t\t)\n\t}\n}\n\n```\n\u003e usecase.go\n\n```go\npackage usecase\n\nimport (\n\t\"github.com/harunnryd/skeltun/internal/app/usecase/hcheck\"\n)\n\n// IUseCase ...\ntype IUseCase interface {\n\t// GetHcheck it returns instance of Hcheck that implements IHcheck methods.\n\tGetHcheck() hcheck.IHcheck\n}\n\n// UseCase ...\ntype UseCase struct {\n\thcheck hcheck.IHcheck\n}\n\n// New ...\nfunc New(opts ...Option) IUseCase {\n\tusecase := new(UseCase)\n\tfor _, opt := range opts {\n\t\topt(usecase)\n\t}\n\treturn usecase\n}\n\n// GetHcheck it returns instance of Hcheck that implements IHcheck methods.\nfunc (usecase *UseCase) GetHcheck() hcheck.IHcheck {\n\treturn usecase.hcheck\n}\n\n```\n\n* **Repository**\n\n\u003e options.go\n\n```go\npackage repo\n\nimport (\n\t\"github.com/harunnryd/skeltun/config\"\n\t\"github.com/harunnryd/skeltun/internal/app/driver/db\"\n\t\"github.com/harunnryd/skeltun/internal/app/repo/hcheck\"\n)\n\n// Option ...\ntype Option func(*Repo)\n\n// WithDependency ...\nfunc WithDependency(config config.IConfig) Option {\n\tdbase := db.New(db.WithConfig(config))\n\tmysqlConn, _ := dbase.Manager(db.MysqlDialectParam)\n\tpgsqlConn, _ := dbase.Manager(db.PgsqlDialectParam)\n\t// onesignal := onesignal.New(onesignal.WithNetClient(\u0026http.Client{\n\t// \tTimeout: time.Second * 10,\n\t// \tTransport: \u0026http.Transport{\n\t// \t\tDial: (\u0026net.Dialer{\n\t// \t\t\tTimeout: 5 * time.Second,\n\t// \t\t}).Dial,\n\t// \t\tTLSHandshakeTimeout: 5 * time.Second,\n\t// \t},\n\t// }), onesignal.WithConfig(config))\n\n\treturn func(repo *Repo) {\n\t\t// Inject all your repo's in here.\n\t\t// Example :\n\t\t// repo.cache = cache.New(\n\t\t//     cache.WithConfig(config),\n\t\t//     cache.WithDatabase(driver.RedisDialectParam, redisConn),\n\t\t// )s\n\t\trepo.hcheck = hcheck.New(\n\t\t\thcheck.WithConfig(config),\n\t\t\thcheck.WithDatabase(db.PgsqlDialectParam, pgsqlConn),\n\t\t\thcheck.WithDatabase(db.MysqlDialectParam, mysqlConn),\n\t\t)\n\t}\n}\n\n```\n\u003e repo.go\n\n```go\npackage repo\n\nimport (\n\t\"github.com/harunnryd/skeltun/internal/app/repo/hcheck\"\n)\n\n// IRepo ...\ntype IRepo interface {\n\t// GetHcheck it returns instance of Hcheck that implements methods.\n\tGetHcheck() hcheck.IHcheck\n}\n\n// Repo ...\ntype Repo struct {\n\thcheck hcheck.IHcheck\n}\n\n// New ...\nfunc New(opts ...Option) IRepo {\n\trepo := new(Repo)\n\tfor _, opt := range opts {\n\t\topt(repo)\n\t}\n\treturn repo\n}\n\n// GetHcheck it returns instance of Hcheck that implements methods.\nfunc (repo *Repo) GetHcheck() hcheck.IHcheck {\n\treturn repo.hcheck\n}\n\n```\n\n* **Handler**\n\n\u003e options.go\n\n```go\npackage handler\n\nimport (\n\t\"github.com/harunnryd/skeltun/config\"\n\t\"github.com/harunnryd/skeltun/internal/app/handler/hcheck\"\n\t\"github.com/harunnryd/skeltun/internal/app/usecase\"\n)\n\n// Option ...\ntype Option func(*Handler)\n\n// WithHandler ...\nfunc WithHandler(config config.IConfig) Option {\n\tiUsecase := usecase.New(usecase.WithDependency(config))\n\treturn func(handler *Handler) {\n\t\t// Inject all your handler's in here.\n\t\t// Example :\n\t\t// handler.user = user.New(\n\t\t//     user.WithConfig(config),\n\t\t//     user.WithUseCase(iUsecase),\n\t\t// )\n\t\thandler.hcheck = hcheck.New(\n\t\t\thcheck.WithConfig(config),\n\t\t\thcheck.WithUseCase(iUsecase),\n\t\t)\n\t}\n}\n\n```\n\u003e handler.go\n\n```go\npackage handler\n\nimport (\n\t\"github.com/harunnryd/skeltun/internal/app/handler/hcheck\"\n)\n\n// IHandler ...\ntype IHandler interface {\n\t// GetHcheck it returns instance of Hcheck that implements IHcheck methods.\n\tGetHcheck() hcheck.IHcheck\n}\n\n// Handler ...\ntype Handler struct {\n\thcheck hcheck.IHcheck\n}\n\n// New ...\nfunc New(opts ...Option) IHandler {\n\thandler := new(Handler)\n\tfor _, opt := range opts {\n\t\topt(handler)\n\t}\n\treturn handler\n}\n\n// GetHcheck it returns instance of Hcheck that implements IHcheck methods.\nfunc (handler *Handler) GetHcheck() hcheck.IHcheck {\n\treturn handler.hcheck\n}\n\n```\n\n## Auxiliary packages\n\n|  Package | Description  |\n| ------------ | ------------ |\n| [go-chi](https://github.com/go-chi/chi)  | Router (lightweight, idiomatic and composable router for building Go HTTP services) |\n| [golang-migrate](https://github.com/golang-migrate/migrate)  | Database migrations  |\n| [viper](https://github.com/spf13/viper)  | Go configuration with fangs  |\n| [cobra](https://github.com/spf13/cobra)  | Go CLI  |\n| [gorm](https://github.com/go-gorm/gorm)  | The fantastic ORM library for Golang, aims to be developer friendly  |\n\n## Contributors\n1. [Harun Nur Rasyid](https://github.com/harunnryd)\n2. [Annahl Prayitno (Logo Design)](https://dribbble.com/AnboyStudio)\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## License\nCopyright (c) 2020-present [Harun Nur Rasyid](https://github.com/harunnryd)\n\nLicensed under [MIT License](./LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharunnryd%2Fskeltun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharunnryd%2Fskeltun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharunnryd%2Fskeltun/lists"}