├── .gitignore ├── .husky.toml ├── BACKLOG.md ├── Makefile ├── README.md ├── TODO.md ├── cmd └── main.go ├── docker-compose.yml ├── docs ├── docs.go ├── ebook_store_diagrams.drawio ├── infrastructure_diagrams2.png ├── swagger.json └── swagger.yaml ├── env-local.properties ├── env-test.properties ├── go.mod ├── go.sum ├── internal ├── container │ └── container.go ├── core │ ├── auth │ │ ├── auth.go │ │ ├── auth_test.go │ │ ├── credentials.go │ │ ├── errors.go │ │ ├── mock_email_client_test.go │ │ ├── mock_hash_handler_test.go │ │ ├── mock_id_generator_test.go │ │ ├── mock_password_generator_test.go │ │ ├── mock_repository_test.go │ │ ├── mock_token_handler_test.go │ │ ├── mock_validator_test.go │ │ ├── requests.go │ │ ├── requests_test.go │ │ ├── responses.go │ │ ├── responses_test.go │ │ ├── user.go │ │ └── user_test.go │ ├── catalog │ │ ├── book.go │ │ ├── book_test.go │ │ ├── catalog.go │ │ ├── catalog_test.go │ │ ├── errors.go │ │ ├── mock_id_generator_test.go │ │ ├── mock_repository_test.go │ │ ├── mock_storage_client_test.go │ │ ├── mock_validator_test.go │ │ ├── paginated_books.go │ │ ├── requests.go │ │ ├── requests_test.go │ │ ├── responses.go │ │ └── responses_test.go │ ├── query │ │ ├── page.go │ │ ├── page_test.go │ │ ├── query.go │ │ └── query_test.go │ └── shop │ │ ├── cart.go │ │ ├── cart_test.go │ │ ├── errors.go │ │ ├── item.go │ │ ├── mock_cart_repository_test.go │ │ ├── mock_catalog_service_test.go │ │ ├── mock_id_generator_test.go │ │ ├── mock_order_repository_test.go │ │ ├── mock_payment_client_test.go │ │ ├── mock_validator_test.go │ │ ├── order.go │ │ ├── order_test.go │ │ ├── paginated_orders.go │ │ ├── requests.go │ │ ├── requests_test.go │ │ ├── responses.go │ │ ├── responses_test.go │ │ ├── shop.go │ │ └── shop_test.go ├── log │ └── log.go └── platform │ ├── config │ ├── aws.go │ ├── email.go │ ├── jwt.go │ ├── migrator.go │ ├── postgres.go │ ├── redis.go │ ├── server.go │ ├── storage.go │ └── viper.go │ ├── email │ └── email.go │ ├── generator │ ├── password_generator.go │ ├── password_generator_test.go │ ├── uuid_generator.go │ └── uuid_generator_test.go │ ├── hash │ ├── bcrypt_wrapper.go │ └── bcrypt_wrapper_test.go │ ├── migrator │ └── migrator.go │ ├── payment │ └── stripe.go │ ├── persistence │ ├── book_repository.go │ ├── book_repository_test.go │ ├── cart_repository.go │ ├── cart_repository_test.go │ ├── errors.go │ ├── order_repository.go │ ├── order_repository_test.go │ ├── postgres_repository_test.go │ ├── query_parser.go │ ├── query_parser_test.go │ ├── user_repository.go │ └── user_repository_test.go │ ├── server │ ├── auth_middleware.go │ ├── auth_middleware_test.go │ ├── authentication_handler.go │ ├── authentication_handler_test.go │ ├── catalog_handler.go │ ├── catalog_handler_test.go │ ├── correlationid_middleware.go │ ├── error_middleware.go │ ├── errors.go │ ├── healthcheck_handler.go │ ├── logger_middleware.go │ ├── mock_authenticator_test.go │ ├── mock_catalog_test.go │ ├── mock_token_handler_test.go │ ├── rate_limit_middleware.go │ ├── rate_limit_middleware_test.go │ ├── route.go │ ├── route_test.go │ ├── server.go │ ├── server_test.go │ ├── shop_handler.go │ ├── shop_handler_test.go │ └── testdata │ │ ├── book1_content.pdf │ │ └── book1_image.jpg │ ├── storage │ ├── storage.go │ └── storage_test.go │ ├── token │ ├── jwt_wrapper.go │ └── jwt_wrapper_test.go │ └── validator │ ├── validator.go │ └── validator_test.go ├── migrations ├── 0001_create_users_table.down.sql ├── 0001_create_users_table.up.sql ├── 0002_index_users_table.down.sql ├── 0002_index_users_table.up.sql ├── 0003_create_books_table.down.sql ├── 0003_create_books_table.up.sql ├── 0004_create_orders_table.down.sql ├── 0004_create_orders_table.up.sql ├── 0005_create_images_table.down.sql ├── 0005_create_images_table.up.sql ├── 0006_drop_poster_image_bucket_key_col.down.sql ├── 0006_drop_poster_image_bucket_key_col.up.sql ├── 0007_rename_content_bucket_key.down.sql ├── 0007_rename_content_bucket_key.up.sql ├── 0008_update_orders_table.down.sql ├── 0008_update_orders_table.up.sql ├── 0009_create_items_table.down.sql └── 0009_create_items_table.up.sql ├── scripts ├── generate_seed_data │ ├── book1_content.pdf │ ├── book1_image.jpg │ ├── book2_content.pdf │ ├── book2_image.jpg │ └── main.go └── setup_localstack.sh └── test ├── localstack_container.go ├── postgres_container.go └── redis_container.go /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/.gitignore -------------------------------------------------------------------------------- /.husky.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/.husky.toml -------------------------------------------------------------------------------- /BACKLOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/BACKLOG.md -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/Makefile -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/README.md -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/TODO.md -------------------------------------------------------------------------------- /cmd/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/cmd/main.go -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/docker-compose.yml -------------------------------------------------------------------------------- /docs/docs.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/docs/docs.go -------------------------------------------------------------------------------- /docs/ebook_store_diagrams.drawio: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/docs/ebook_store_diagrams.drawio -------------------------------------------------------------------------------- /docs/infrastructure_diagrams2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/docs/infrastructure_diagrams2.png -------------------------------------------------------------------------------- /docs/swagger.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/docs/swagger.json -------------------------------------------------------------------------------- /docs/swagger.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/docs/swagger.yaml -------------------------------------------------------------------------------- /env-local.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/env-local.properties -------------------------------------------------------------------------------- /env-test.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/env-test.properties -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/go.mod -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/go.sum -------------------------------------------------------------------------------- /internal/container/container.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/container/container.go -------------------------------------------------------------------------------- /internal/core/auth/auth.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/auth/auth.go -------------------------------------------------------------------------------- /internal/core/auth/auth_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/auth/auth_test.go -------------------------------------------------------------------------------- /internal/core/auth/credentials.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/auth/credentials.go -------------------------------------------------------------------------------- /internal/core/auth/errors.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/auth/errors.go -------------------------------------------------------------------------------- /internal/core/auth/mock_email_client_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/auth/mock_email_client_test.go -------------------------------------------------------------------------------- /internal/core/auth/mock_hash_handler_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/auth/mock_hash_handler_test.go -------------------------------------------------------------------------------- /internal/core/auth/mock_id_generator_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/auth/mock_id_generator_test.go -------------------------------------------------------------------------------- /internal/core/auth/mock_password_generator_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/auth/mock_password_generator_test.go -------------------------------------------------------------------------------- /internal/core/auth/mock_repository_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/auth/mock_repository_test.go -------------------------------------------------------------------------------- /internal/core/auth/mock_token_handler_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/auth/mock_token_handler_test.go -------------------------------------------------------------------------------- /internal/core/auth/mock_validator_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/auth/mock_validator_test.go -------------------------------------------------------------------------------- /internal/core/auth/requests.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/auth/requests.go -------------------------------------------------------------------------------- /internal/core/auth/requests_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/auth/requests_test.go -------------------------------------------------------------------------------- /internal/core/auth/responses.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/auth/responses.go -------------------------------------------------------------------------------- /internal/core/auth/responses_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/auth/responses_test.go -------------------------------------------------------------------------------- /internal/core/auth/user.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/auth/user.go -------------------------------------------------------------------------------- /internal/core/auth/user_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/auth/user_test.go -------------------------------------------------------------------------------- /internal/core/catalog/book.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/catalog/book.go -------------------------------------------------------------------------------- /internal/core/catalog/book_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/catalog/book_test.go -------------------------------------------------------------------------------- /internal/core/catalog/catalog.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/catalog/catalog.go -------------------------------------------------------------------------------- /internal/core/catalog/catalog_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/catalog/catalog_test.go -------------------------------------------------------------------------------- /internal/core/catalog/errors.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/catalog/errors.go -------------------------------------------------------------------------------- /internal/core/catalog/mock_id_generator_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/catalog/mock_id_generator_test.go -------------------------------------------------------------------------------- /internal/core/catalog/mock_repository_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/catalog/mock_repository_test.go -------------------------------------------------------------------------------- /internal/core/catalog/mock_storage_client_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/catalog/mock_storage_client_test.go -------------------------------------------------------------------------------- /internal/core/catalog/mock_validator_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/catalog/mock_validator_test.go -------------------------------------------------------------------------------- /internal/core/catalog/paginated_books.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/catalog/paginated_books.go -------------------------------------------------------------------------------- /internal/core/catalog/requests.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/catalog/requests.go -------------------------------------------------------------------------------- /internal/core/catalog/requests_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/catalog/requests_test.go -------------------------------------------------------------------------------- /internal/core/catalog/responses.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/catalog/responses.go -------------------------------------------------------------------------------- /internal/core/catalog/responses_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/catalog/responses_test.go -------------------------------------------------------------------------------- /internal/core/query/page.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/query/page.go -------------------------------------------------------------------------------- /internal/core/query/page_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/query/page_test.go -------------------------------------------------------------------------------- /internal/core/query/query.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/query/query.go -------------------------------------------------------------------------------- /internal/core/query/query_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/query/query_test.go -------------------------------------------------------------------------------- /internal/core/shop/cart.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/shop/cart.go -------------------------------------------------------------------------------- /internal/core/shop/cart_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/shop/cart_test.go -------------------------------------------------------------------------------- /internal/core/shop/errors.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/shop/errors.go -------------------------------------------------------------------------------- /internal/core/shop/item.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/shop/item.go -------------------------------------------------------------------------------- /internal/core/shop/mock_cart_repository_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/shop/mock_cart_repository_test.go -------------------------------------------------------------------------------- /internal/core/shop/mock_catalog_service_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/shop/mock_catalog_service_test.go -------------------------------------------------------------------------------- /internal/core/shop/mock_id_generator_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/shop/mock_id_generator_test.go -------------------------------------------------------------------------------- /internal/core/shop/mock_order_repository_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/shop/mock_order_repository_test.go -------------------------------------------------------------------------------- /internal/core/shop/mock_payment_client_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/shop/mock_payment_client_test.go -------------------------------------------------------------------------------- /internal/core/shop/mock_validator_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/shop/mock_validator_test.go -------------------------------------------------------------------------------- /internal/core/shop/order.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/shop/order.go -------------------------------------------------------------------------------- /internal/core/shop/order_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/shop/order_test.go -------------------------------------------------------------------------------- /internal/core/shop/paginated_orders.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/shop/paginated_orders.go -------------------------------------------------------------------------------- /internal/core/shop/requests.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/shop/requests.go -------------------------------------------------------------------------------- /internal/core/shop/requests_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/shop/requests_test.go -------------------------------------------------------------------------------- /internal/core/shop/responses.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/shop/responses.go -------------------------------------------------------------------------------- /internal/core/shop/responses_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/shop/responses_test.go -------------------------------------------------------------------------------- /internal/core/shop/shop.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/shop/shop.go -------------------------------------------------------------------------------- /internal/core/shop/shop_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/core/shop/shop_test.go -------------------------------------------------------------------------------- /internal/log/log.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/log/log.go -------------------------------------------------------------------------------- /internal/platform/config/aws.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/config/aws.go -------------------------------------------------------------------------------- /internal/platform/config/email.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/config/email.go -------------------------------------------------------------------------------- /internal/platform/config/jwt.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/config/jwt.go -------------------------------------------------------------------------------- /internal/platform/config/migrator.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/config/migrator.go -------------------------------------------------------------------------------- /internal/platform/config/postgres.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/config/postgres.go -------------------------------------------------------------------------------- /internal/platform/config/redis.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/config/redis.go -------------------------------------------------------------------------------- /internal/platform/config/server.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/config/server.go -------------------------------------------------------------------------------- /internal/platform/config/storage.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/config/storage.go -------------------------------------------------------------------------------- /internal/platform/config/viper.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/config/viper.go -------------------------------------------------------------------------------- /internal/platform/email/email.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/email/email.go -------------------------------------------------------------------------------- /internal/platform/generator/password_generator.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/generator/password_generator.go -------------------------------------------------------------------------------- /internal/platform/generator/password_generator_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/generator/password_generator_test.go -------------------------------------------------------------------------------- /internal/platform/generator/uuid_generator.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/generator/uuid_generator.go -------------------------------------------------------------------------------- /internal/platform/generator/uuid_generator_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/generator/uuid_generator_test.go -------------------------------------------------------------------------------- /internal/platform/hash/bcrypt_wrapper.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/hash/bcrypt_wrapper.go -------------------------------------------------------------------------------- /internal/platform/hash/bcrypt_wrapper_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/hash/bcrypt_wrapper_test.go -------------------------------------------------------------------------------- /internal/platform/migrator/migrator.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/migrator/migrator.go -------------------------------------------------------------------------------- /internal/platform/payment/stripe.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/payment/stripe.go -------------------------------------------------------------------------------- /internal/platform/persistence/book_repository.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/persistence/book_repository.go -------------------------------------------------------------------------------- /internal/platform/persistence/book_repository_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/persistence/book_repository_test.go -------------------------------------------------------------------------------- /internal/platform/persistence/cart_repository.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/persistence/cart_repository.go -------------------------------------------------------------------------------- /internal/platform/persistence/cart_repository_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/persistence/cart_repository_test.go -------------------------------------------------------------------------------- /internal/platform/persistence/errors.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/persistence/errors.go -------------------------------------------------------------------------------- /internal/platform/persistence/order_repository.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/persistence/order_repository.go -------------------------------------------------------------------------------- /internal/platform/persistence/order_repository_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/persistence/order_repository_test.go -------------------------------------------------------------------------------- /internal/platform/persistence/postgres_repository_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/persistence/postgres_repository_test.go -------------------------------------------------------------------------------- /internal/platform/persistence/query_parser.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/persistence/query_parser.go -------------------------------------------------------------------------------- /internal/platform/persistence/query_parser_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/persistence/query_parser_test.go -------------------------------------------------------------------------------- /internal/platform/persistence/user_repository.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/persistence/user_repository.go -------------------------------------------------------------------------------- /internal/platform/persistence/user_repository_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/persistence/user_repository_test.go -------------------------------------------------------------------------------- /internal/platform/server/auth_middleware.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/server/auth_middleware.go -------------------------------------------------------------------------------- /internal/platform/server/auth_middleware_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/server/auth_middleware_test.go -------------------------------------------------------------------------------- /internal/platform/server/authentication_handler.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/server/authentication_handler.go -------------------------------------------------------------------------------- /internal/platform/server/authentication_handler_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/server/authentication_handler_test.go -------------------------------------------------------------------------------- /internal/platform/server/catalog_handler.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/server/catalog_handler.go -------------------------------------------------------------------------------- /internal/platform/server/catalog_handler_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/server/catalog_handler_test.go -------------------------------------------------------------------------------- /internal/platform/server/correlationid_middleware.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/server/correlationid_middleware.go -------------------------------------------------------------------------------- /internal/platform/server/error_middleware.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/server/error_middleware.go -------------------------------------------------------------------------------- /internal/platform/server/errors.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/server/errors.go -------------------------------------------------------------------------------- /internal/platform/server/healthcheck_handler.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/server/healthcheck_handler.go -------------------------------------------------------------------------------- /internal/platform/server/logger_middleware.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/server/logger_middleware.go -------------------------------------------------------------------------------- /internal/platform/server/mock_authenticator_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/server/mock_authenticator_test.go -------------------------------------------------------------------------------- /internal/platform/server/mock_catalog_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/server/mock_catalog_test.go -------------------------------------------------------------------------------- /internal/platform/server/mock_token_handler_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/server/mock_token_handler_test.go -------------------------------------------------------------------------------- /internal/platform/server/rate_limit_middleware.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/server/rate_limit_middleware.go -------------------------------------------------------------------------------- /internal/platform/server/rate_limit_middleware_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/server/rate_limit_middleware_test.go -------------------------------------------------------------------------------- /internal/platform/server/route.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/server/route.go -------------------------------------------------------------------------------- /internal/platform/server/route_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/server/route_test.go -------------------------------------------------------------------------------- /internal/platform/server/server.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/server/server.go -------------------------------------------------------------------------------- /internal/platform/server/server_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/server/server_test.go -------------------------------------------------------------------------------- /internal/platform/server/shop_handler.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/server/shop_handler.go -------------------------------------------------------------------------------- /internal/platform/server/shop_handler_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/server/shop_handler_test.go -------------------------------------------------------------------------------- /internal/platform/server/testdata/book1_content.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/server/testdata/book1_content.pdf -------------------------------------------------------------------------------- /internal/platform/server/testdata/book1_image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/server/testdata/book1_image.jpg -------------------------------------------------------------------------------- /internal/platform/storage/storage.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/storage/storage.go -------------------------------------------------------------------------------- /internal/platform/storage/storage_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/storage/storage_test.go -------------------------------------------------------------------------------- /internal/platform/token/jwt_wrapper.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/token/jwt_wrapper.go -------------------------------------------------------------------------------- /internal/platform/token/jwt_wrapper_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/token/jwt_wrapper_test.go -------------------------------------------------------------------------------- /internal/platform/validator/validator.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/validator/validator.go -------------------------------------------------------------------------------- /internal/platform/validator/validator_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/internal/platform/validator/validator_test.go -------------------------------------------------------------------------------- /migrations/0001_create_users_table.down.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/migrations/0001_create_users_table.down.sql -------------------------------------------------------------------------------- /migrations/0001_create_users_table.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/migrations/0001_create_users_table.up.sql -------------------------------------------------------------------------------- /migrations/0002_index_users_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX idx_users_email; 2 | -------------------------------------------------------------------------------- /migrations/0002_index_users_table.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/migrations/0002_index_users_table.up.sql -------------------------------------------------------------------------------- /migrations/0003_create_books_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE books; 2 | -------------------------------------------------------------------------------- /migrations/0003_create_books_table.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/migrations/0003_create_books_table.up.sql -------------------------------------------------------------------------------- /migrations/0004_create_orders_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE orders; -------------------------------------------------------------------------------- /migrations/0004_create_orders_table.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/migrations/0004_create_orders_table.up.sql -------------------------------------------------------------------------------- /migrations/0005_create_images_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE images; -------------------------------------------------------------------------------- /migrations/0005_create_images_table.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/migrations/0005_create_images_table.up.sql -------------------------------------------------------------------------------- /migrations/0006_drop_poster_image_bucket_key_col.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE books ADD COLUMN poster_image_bucket_key VARCHAR(50); -------------------------------------------------------------------------------- /migrations/0006_drop_poster_image_bucket_key_col.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE books DROP COLUMN poster_image_bucket_key; -------------------------------------------------------------------------------- /migrations/0007_rename_content_bucket_key.down.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/migrations/0007_rename_content_bucket_key.down.sql -------------------------------------------------------------------------------- /migrations/0007_rename_content_bucket_key.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/migrations/0007_rename_content_bucket_key.up.sql -------------------------------------------------------------------------------- /migrations/0008_update_orders_table.down.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/migrations/0008_update_orders_table.down.sql -------------------------------------------------------------------------------- /migrations/0008_update_orders_table.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/migrations/0008_update_orders_table.up.sql -------------------------------------------------------------------------------- /migrations/0009_create_items_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE items; -------------------------------------------------------------------------------- /migrations/0009_create_items_table.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/migrations/0009_create_items_table.up.sql -------------------------------------------------------------------------------- /scripts/generate_seed_data/book1_content.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/scripts/generate_seed_data/book1_content.pdf -------------------------------------------------------------------------------- /scripts/generate_seed_data/book1_image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/scripts/generate_seed_data/book1_image.jpg -------------------------------------------------------------------------------- /scripts/generate_seed_data/book2_content.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/scripts/generate_seed_data/book2_content.pdf -------------------------------------------------------------------------------- /scripts/generate_seed_data/book2_image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/scripts/generate_seed_data/book2_image.jpg -------------------------------------------------------------------------------- /scripts/generate_seed_data/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/scripts/generate_seed_data/main.go -------------------------------------------------------------------------------- /scripts/setup_localstack.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/scripts/setup_localstack.sh -------------------------------------------------------------------------------- /test/localstack_container.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/test/localstack_container.go -------------------------------------------------------------------------------- /test/postgres_container.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/test/postgres_container.go -------------------------------------------------------------------------------- /test/redis_container.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/C0lliNN/EbookStore/HEAD/test/redis_container.go --------------------------------------------------------------------------------