├── .app.config.dev.yaml ├── .gitignore ├── LICENSE ├── Makefile ├── README.md ├── cmd └── app │ └── main.go ├── config ├── app_config.go └── common.go ├── coverage.html ├── docker └── Dockerfile ├── docs ├── docs.go ├── swagger.json └── swagger.yaml ├── embed.go ├── gen └── app │ └── db │ ├── books_query.sql.go │ ├── db.go │ └── models.go ├── go.mod ├── go.sum ├── internal ├── app │ ├── app.go │ └── migrate.go ├── controller │ └── http │ │ └── app.go ├── domain │ ├── books.go │ ├── common.go │ ├── errors.go │ └── schema.go └── usecase │ ├── books.go │ ├── interface.go │ └── repo │ └── books_postgres.go ├── migrations └── app │ ├── 000001_create_books_table.down.sql │ └── 000001_create_books_table.up.sql ├── pkg ├── migrator │ ├── migrator.go │ └── postgres_migrator.go └── postgres │ ├── postgres.go │ ├── qt.go │ └── sqlstate.go ├── queries └── app │ └── books_query.sql └── sqlc.yaml /.app.config.dev.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/.app.config.dev.yaml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/LICENSE -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/Makefile -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/README.md -------------------------------------------------------------------------------- /cmd/app/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/cmd/app/main.go -------------------------------------------------------------------------------- /config/app_config.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/config/app_config.go -------------------------------------------------------------------------------- /config/common.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/config/common.go -------------------------------------------------------------------------------- /coverage.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/coverage.html -------------------------------------------------------------------------------- /docker/Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/docker/Dockerfile -------------------------------------------------------------------------------- /docs/docs.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/docs/docs.go -------------------------------------------------------------------------------- /docs/swagger.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/docs/swagger.json -------------------------------------------------------------------------------- /docs/swagger.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/docs/swagger.yaml -------------------------------------------------------------------------------- /embed.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/embed.go -------------------------------------------------------------------------------- /gen/app/db/books_query.sql.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/gen/app/db/books_query.sql.go -------------------------------------------------------------------------------- /gen/app/db/db.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/gen/app/db/db.go -------------------------------------------------------------------------------- /gen/app/db/models.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/gen/app/db/models.go -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/go.mod -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/go.sum -------------------------------------------------------------------------------- /internal/app/app.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/internal/app/app.go -------------------------------------------------------------------------------- /internal/app/migrate.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/internal/app/migrate.go -------------------------------------------------------------------------------- /internal/controller/http/app.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/internal/controller/http/app.go -------------------------------------------------------------------------------- /internal/domain/books.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/internal/domain/books.go -------------------------------------------------------------------------------- /internal/domain/common.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/internal/domain/common.go -------------------------------------------------------------------------------- /internal/domain/errors.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/internal/domain/errors.go -------------------------------------------------------------------------------- /internal/domain/schema.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/internal/domain/schema.go -------------------------------------------------------------------------------- /internal/usecase/books.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/internal/usecase/books.go -------------------------------------------------------------------------------- /internal/usecase/interface.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/internal/usecase/interface.go -------------------------------------------------------------------------------- /internal/usecase/repo/books_postgres.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/internal/usecase/repo/books_postgres.go -------------------------------------------------------------------------------- /migrations/app/000001_create_books_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS books; -------------------------------------------------------------------------------- /migrations/app/000001_create_books_table.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/migrations/app/000001_create_books_table.up.sql -------------------------------------------------------------------------------- /pkg/migrator/migrator.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/pkg/migrator/migrator.go -------------------------------------------------------------------------------- /pkg/migrator/postgres_migrator.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/pkg/migrator/postgres_migrator.go -------------------------------------------------------------------------------- /pkg/postgres/postgres.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/pkg/postgres/postgres.go -------------------------------------------------------------------------------- /pkg/postgres/qt.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/pkg/postgres/qt.go -------------------------------------------------------------------------------- /pkg/postgres/sqlstate.go: -------------------------------------------------------------------------------- 1 | package postgres 2 | 3 | const ( 4 | ErrDuplicateKey = "23505" 5 | ) 6 | -------------------------------------------------------------------------------- /queries/app/books_query.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/queries/app/books_query.sql -------------------------------------------------------------------------------- /sqlc.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigunmd/go-app-template/HEAD/sqlc.yaml --------------------------------------------------------------------------------