├── .circleci ├── config.yml └── scripts │ └── read-changelog.go ├── .dockerignore ├── .gitignore ├── CHANGELOG.md ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── configs ├── config.example.json ├── config.go ├── config_test.go ├── constants │ └── constants.go ├── list_id.go └── timeout.go ├── controllers ├── account.go ├── analytics.go ├── bookmark.go ├── controller-factory.go ├── donation.go ├── errors.go ├── mail.go ├── membership.go ├── menuitems.go ├── news_v2.go ├── oauth.go ├── subscription.go └── user.go ├── dev-env-setup ├── docker-compose.yml ├── mysql │ ├── Dockerfile │ ├── initdb.sh │ └── mysql.cnf └── wait-for-it.sh ├── doc ├── auth.apib ├── donation.apib ├── index.apib ├── index.html ├── mail.apib ├── news │ ├── asset.apib │ ├── authors.apib │ ├── followup.apib │ ├── index_page.apib │ ├── post.apib │ ├── postcategory.apib │ ├── review.apib │ ├── tag.apib │ └── topic.apib ├── oauth.apib ├── periodic-donation.apib ├── prime-donation.apib ├── user-donation.apib └── user.apib ├── entrypoint.sh ├── globals ├── constants.go └── globals.go ├── go.mod ├── go.sum ├── internal ├── member_cms │ ├── graphql.go │ ├── method.go │ └── receipt.go ├── mongo │ ├── client.go │ ├── document.go │ └── operator.go ├── news │ ├── algolia.go │ ├── author.go │ ├── category.go │ ├── category_set.go │ ├── model.go │ ├── mongo.go │ ├── mongo_test.go │ ├── query.go │ ├── query_test.go │ ├── section.go │ └── tag.go └── query │ └── query.go ├── main.go ├── membership_user.sql ├── middlewares ├── cache-control.go ├── jwt.go ├── mail-service.go └── recovery.go ├── migrations ├── 000001_add_existing_table_schemas.down.sql ├── 000001_add_existing_table_schemas.up.sql ├── 000002_add_linepay_info.down.sql ├── 000002_add_linepay_info.up.sql ├── 000003_update-send-receipt-default-value.down.sql ├── 000003_update-send-receipt-default-value.up.sql ├── 000004_update_payment_status_refunded.down.sql ├── 000004_update_payment_status_refunded.up.sql ├── 000005_increase_bank_result_msg_size.down.sql ├── 000005_increase_bank_result_msg_size.up.sql ├── 000006_add_receipt_header.down.sql ├── 000006_add_receipt_header.up.sql ├── 000007_add_donation_redesign_table_schemas.down.sql ├── 000007_add_donation_redesign_table_schemas.up.sql ├── 000008_update_donation_redesign_table_schemas.down.sql ├── 000008_update_donation_redesign_table_schemas.up.sql ├── 000009_add_mailjob_tables_schemas.down.sql ├── 000009_add_mailjob_tables_schemas.up.sql ├── 000010_create_roles_table.down.sql ├── 000010_create_roles_table.up.sql ├── 000011_create_users_roles_table.down.sql ├── 000011_create_users_roles_table.up.sql ├── 000012_add_users_activated.down.sql ├── 000012_add_users_activated.up.sql ├── 000013_add_roles_key.down.sql ├── 000013_add_roles_key.up.sql ├── 000014_add_user_source_and_multiple_roles.down.sql ├── 000014_add_user_source_and_multiple_roles.up.sql ├── 000015_add_user_reading_count_time.down.sql ├── 000015_add_user_reading_count_time.up.sql ├── 000016_add_user_reading_footprint.down.sql ├── 000016_add_user_reading_footprint.up.sql ├── 000017_increase_bookmarks_slug_size.down.sql ├── 000017_increase_bookmarks_slug_size.up.sql ├── 000018_update_users_bookmarks_schema.down.sql ├── 000018_update_users_bookmarks_schema.up.sql ├── 000019_change_ntch_roles.down.sql ├── 000019_change_ntch_roles.up.sql ├── 000020_add_receipt_no_column.down.sql ├── 000020_add_receipt_no_column.up.sql ├── 000021_add_receipt_serial_number_table.down.sql ├── 000021_add_receipt_serial_number_table.up.sql ├── 000022_add_name_to_users_table.down.sql ├── 000022_add_name_to_users_table.up.sql ├── 000023_add_cardholder_donate_reason.down.sql ├── 000023_add_cardholder_donate_reason.up.sql ├── 000024_add_show_offline_donation_to_user.down.sql ├── 000024_add_show_offline_donation_to_user.up.sql ├── 000025_add_should_merge_offline_donation_by_identity.down.sql ├── 000025_add_should_merge_offline_donation_by_identity.up.sql ├── 000026_remove_mailchimp_tables.down.sql └── 000026_remove_mailchimp_tables.up.sql ├── models ├── bookmark.go ├── donation.go ├── gin-response.go ├── messages.go ├── model_user.go ├── oauth.go ├── registration.go ├── service.go ├── subscription.go ├── user_preferences.go ├── users_bookmarks.go └── users_posts.go ├── routers └── router.go ├── services ├── mail.go ├── pubsub.go └── role_update.go ├── storage ├── analytics.go ├── bookmark.go ├── donation.go ├── errors.go ├── membership.go ├── news_v2.go ├── service.go ├── subscription.go └── user.go ├── template ├── authenticate.tmpl ├── role-actiontaker.tmpl ├── role-downgrade.tmpl ├── role-explorer.tmpl ├── role-trailblazer.tmpl ├── signin-otp.tmpl ├── signin.tmpl ├── success-donation-periodic.tmpl └── success-donation-prime.tmpl ├── tests ├── author_test.go ├── controller_account_test.go ├── controller_analytics_test.go ├── controller_bookmark_test.go ├── controller_donations_test.go ├── controller_mail_test.go ├── controller_subscriptions_test.go ├── controller_user_test.go ├── main_test.go ├── news_v2_test.go ├── pre_test_environment_setup.go └── structs.go └── utils ├── db.go ├── helpers.go ├── mocks ├── config.json └── mal-form-config.json ├── token.go └── utils.go /.circleci/config.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/.circleci/config.yml -------------------------------------------------------------------------------- /.circleci/scripts/read-changelog.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/.circleci/scripts/read-changelog.go -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | dev-env-setup 2 | tests 3 | doc 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/.gitignore -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/Dockerfile -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/LICENSE -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/Makefile -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/README.md -------------------------------------------------------------------------------- /configs/config.example.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/configs/config.example.json -------------------------------------------------------------------------------- /configs/config.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/configs/config.go -------------------------------------------------------------------------------- /configs/config_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/configs/config_test.go -------------------------------------------------------------------------------- /configs/constants/constants.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/configs/constants/constants.go -------------------------------------------------------------------------------- /configs/list_id.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/configs/list_id.go -------------------------------------------------------------------------------- /configs/timeout.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/configs/timeout.go -------------------------------------------------------------------------------- /controllers/account.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/controllers/account.go -------------------------------------------------------------------------------- /controllers/analytics.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/controllers/analytics.go -------------------------------------------------------------------------------- /controllers/bookmark.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/controllers/bookmark.go -------------------------------------------------------------------------------- /controllers/controller-factory.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/controllers/controller-factory.go -------------------------------------------------------------------------------- /controllers/donation.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/controllers/donation.go -------------------------------------------------------------------------------- /controllers/errors.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/controllers/errors.go -------------------------------------------------------------------------------- /controllers/mail.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/controllers/mail.go -------------------------------------------------------------------------------- /controllers/membership.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/controllers/membership.go -------------------------------------------------------------------------------- /controllers/menuitems.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/controllers/menuitems.go -------------------------------------------------------------------------------- /controllers/news_v2.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/controllers/news_v2.go -------------------------------------------------------------------------------- /controllers/oauth.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/controllers/oauth.go -------------------------------------------------------------------------------- /controllers/subscription.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/controllers/subscription.go -------------------------------------------------------------------------------- /controllers/user.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/controllers/user.go -------------------------------------------------------------------------------- /dev-env-setup/docker-compose.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/dev-env-setup/docker-compose.yml -------------------------------------------------------------------------------- /dev-env-setup/mysql/Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/dev-env-setup/mysql/Dockerfile -------------------------------------------------------------------------------- /dev-env-setup/mysql/initdb.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/dev-env-setup/mysql/initdb.sh -------------------------------------------------------------------------------- /dev-env-setup/mysql/mysql.cnf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/dev-env-setup/mysql/mysql.cnf -------------------------------------------------------------------------------- /dev-env-setup/wait-for-it.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/dev-env-setup/wait-for-it.sh -------------------------------------------------------------------------------- /doc/auth.apib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/doc/auth.apib -------------------------------------------------------------------------------- /doc/donation.apib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/doc/donation.apib -------------------------------------------------------------------------------- /doc/index.apib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/doc/index.apib -------------------------------------------------------------------------------- /doc/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/doc/index.html -------------------------------------------------------------------------------- /doc/mail.apib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/doc/mail.apib -------------------------------------------------------------------------------- /doc/news/asset.apib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/doc/news/asset.apib -------------------------------------------------------------------------------- /doc/news/authors.apib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/doc/news/authors.apib -------------------------------------------------------------------------------- /doc/news/followup.apib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/doc/news/followup.apib -------------------------------------------------------------------------------- /doc/news/index_page.apib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/doc/news/index_page.apib -------------------------------------------------------------------------------- /doc/news/post.apib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/doc/news/post.apib -------------------------------------------------------------------------------- /doc/news/postcategory.apib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/doc/news/postcategory.apib -------------------------------------------------------------------------------- /doc/news/review.apib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/doc/news/review.apib -------------------------------------------------------------------------------- /doc/news/tag.apib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/doc/news/tag.apib -------------------------------------------------------------------------------- /doc/news/topic.apib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/doc/news/topic.apib -------------------------------------------------------------------------------- /doc/oauth.apib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/doc/oauth.apib -------------------------------------------------------------------------------- /doc/periodic-donation.apib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/doc/periodic-donation.apib -------------------------------------------------------------------------------- /doc/prime-donation.apib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/doc/prime-donation.apib -------------------------------------------------------------------------------- /doc/user-donation.apib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/doc/user-donation.apib -------------------------------------------------------------------------------- /doc/user.apib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/doc/user.apib -------------------------------------------------------------------------------- /entrypoint.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/entrypoint.sh -------------------------------------------------------------------------------- /globals/constants.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/globals/constants.go -------------------------------------------------------------------------------- /globals/globals.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/globals/globals.go -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/go.mod -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/go.sum -------------------------------------------------------------------------------- /internal/member_cms/graphql.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/internal/member_cms/graphql.go -------------------------------------------------------------------------------- /internal/member_cms/method.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/internal/member_cms/method.go -------------------------------------------------------------------------------- /internal/member_cms/receipt.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/internal/member_cms/receipt.go -------------------------------------------------------------------------------- /internal/mongo/client.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/internal/mongo/client.go -------------------------------------------------------------------------------- /internal/mongo/document.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/internal/mongo/document.go -------------------------------------------------------------------------------- /internal/mongo/operator.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/internal/mongo/operator.go -------------------------------------------------------------------------------- /internal/news/algolia.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/internal/news/algolia.go -------------------------------------------------------------------------------- /internal/news/author.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/internal/news/author.go -------------------------------------------------------------------------------- /internal/news/category.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/internal/news/category.go -------------------------------------------------------------------------------- /internal/news/category_set.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/internal/news/category_set.go -------------------------------------------------------------------------------- /internal/news/model.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/internal/news/model.go -------------------------------------------------------------------------------- /internal/news/mongo.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/internal/news/mongo.go -------------------------------------------------------------------------------- /internal/news/mongo_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/internal/news/mongo_test.go -------------------------------------------------------------------------------- /internal/news/query.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/internal/news/query.go -------------------------------------------------------------------------------- /internal/news/query_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/internal/news/query_test.go -------------------------------------------------------------------------------- /internal/news/section.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/internal/news/section.go -------------------------------------------------------------------------------- /internal/news/tag.go: -------------------------------------------------------------------------------- 1 | package news 2 | 3 | const InfographicID = "630f029461ca4e07004ef530" 4 | -------------------------------------------------------------------------------- /internal/query/query.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/internal/query/query.go -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/main.go -------------------------------------------------------------------------------- /membership_user.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/membership_user.sql -------------------------------------------------------------------------------- /middlewares/cache-control.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/middlewares/cache-control.go -------------------------------------------------------------------------------- /middlewares/jwt.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/middlewares/jwt.go -------------------------------------------------------------------------------- /middlewares/mail-service.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/middlewares/mail-service.go -------------------------------------------------------------------------------- /middlewares/recovery.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/middlewares/recovery.go -------------------------------------------------------------------------------- /migrations/000001_add_existing_table_schemas.down.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000001_add_existing_table_schemas.down.sql -------------------------------------------------------------------------------- /migrations/000001_add_existing_table_schemas.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000001_add_existing_table_schemas.up.sql -------------------------------------------------------------------------------- /migrations/000002_add_linepay_info.down.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000002_add_linepay_info.down.sql -------------------------------------------------------------------------------- /migrations/000002_add_linepay_info.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000002_add_linepay_info.up.sql -------------------------------------------------------------------------------- /migrations/000003_update-send-receipt-default-value.down.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000003_update-send-receipt-default-value.down.sql -------------------------------------------------------------------------------- /migrations/000003_update-send-receipt-default-value.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000003_update-send-receipt-default-value.up.sql -------------------------------------------------------------------------------- /migrations/000004_update_payment_status_refunded.down.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000004_update_payment_status_refunded.down.sql -------------------------------------------------------------------------------- /migrations/000004_update_payment_status_refunded.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000004_update_payment_status_refunded.up.sql -------------------------------------------------------------------------------- /migrations/000005_increase_bank_result_msg_size.down.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000005_increase_bank_result_msg_size.down.sql -------------------------------------------------------------------------------- /migrations/000005_increase_bank_result_msg_size.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000005_increase_bank_result_msg_size.up.sql -------------------------------------------------------------------------------- /migrations/000006_add_receipt_header.down.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000006_add_receipt_header.down.sql -------------------------------------------------------------------------------- /migrations/000006_add_receipt_header.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000006_add_receipt_header.up.sql -------------------------------------------------------------------------------- /migrations/000007_add_donation_redesign_table_schemas.down.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000007_add_donation_redesign_table_schemas.down.sql -------------------------------------------------------------------------------- /migrations/000007_add_donation_redesign_table_schemas.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000007_add_donation_redesign_table_schemas.up.sql -------------------------------------------------------------------------------- /migrations/000008_update_donation_redesign_table_schemas.down.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000008_update_donation_redesign_table_schemas.down.sql -------------------------------------------------------------------------------- /migrations/000008_update_donation_redesign_table_schemas.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000008_update_donation_redesign_table_schemas.up.sql -------------------------------------------------------------------------------- /migrations/000009_add_mailjob_tables_schemas.down.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000009_add_mailjob_tables_schemas.down.sql -------------------------------------------------------------------------------- /migrations/000009_add_mailjob_tables_schemas.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000009_add_mailjob_tables_schemas.up.sql -------------------------------------------------------------------------------- /migrations/000010_create_roles_table.down.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000010_create_roles_table.down.sql -------------------------------------------------------------------------------- /migrations/000010_create_roles_table.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000010_create_roles_table.up.sql -------------------------------------------------------------------------------- /migrations/000011_create_users_roles_table.down.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000011_create_users_roles_table.down.sql -------------------------------------------------------------------------------- /migrations/000011_create_users_roles_table.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000011_create_users_roles_table.up.sql -------------------------------------------------------------------------------- /migrations/000012_add_users_activated.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `users` 2 | DROP COLUMN `activated`; 3 | -------------------------------------------------------------------------------- /migrations/000012_add_users_activated.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000012_add_users_activated.up.sql -------------------------------------------------------------------------------- /migrations/000013_add_roles_key.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `roles` 2 | DROP COLUMN `key`; 3 | -------------------------------------------------------------------------------- /migrations/000013_add_roles_key.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000013_add_roles_key.up.sql -------------------------------------------------------------------------------- /migrations/000014_add_user_source_and_multiple_roles.down.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000014_add_user_source_and_multiple_roles.down.sql -------------------------------------------------------------------------------- /migrations/000014_add_user_source_and_multiple_roles.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000014_add_user_source_and_multiple_roles.up.sql -------------------------------------------------------------------------------- /migrations/000015_add_user_reading_count_time.down.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000015_add_user_reading_count_time.down.sql -------------------------------------------------------------------------------- /migrations/000015_add_user_reading_count_time.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000015_add_user_reading_count_time.up.sql -------------------------------------------------------------------------------- /migrations/000016_add_user_reading_footprint.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS `users_posts_reading_footprints`; 2 | -------------------------------------------------------------------------------- /migrations/000016_add_user_reading_footprint.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000016_add_user_reading_footprint.up.sql -------------------------------------------------------------------------------- /migrations/000017_increase_bookmarks_slug_size.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `bookmarks` MODIFY `slug` varchar(100); -------------------------------------------------------------------------------- /migrations/000017_increase_bookmarks_slug_size.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `bookmarks` MODIFY `slug` varchar(500); -------------------------------------------------------------------------------- /migrations/000018_update_users_bookmarks_schema.down.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000018_update_users_bookmarks_schema.down.sql -------------------------------------------------------------------------------- /migrations/000018_update_users_bookmarks_schema.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000018_update_users_bookmarks_schema.up.sql -------------------------------------------------------------------------------- /migrations/000019_change_ntch_roles.down.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000019_change_ntch_roles.down.sql -------------------------------------------------------------------------------- /migrations/000019_change_ntch_roles.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000019_change_ntch_roles.up.sql -------------------------------------------------------------------------------- /migrations/000020_add_receipt_no_column.down.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000020_add_receipt_no_column.down.sql -------------------------------------------------------------------------------- /migrations/000020_add_receipt_no_column.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000020_add_receipt_no_column.up.sql -------------------------------------------------------------------------------- /migrations/000021_add_receipt_serial_number_table.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS `receipt_serial_numbers`; -------------------------------------------------------------------------------- /migrations/000021_add_receipt_serial_number_table.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000021_add_receipt_serial_number_table.up.sql -------------------------------------------------------------------------------- /migrations/000022_add_name_to_users_table.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `users` 2 | DROP COLUMN `name`; -------------------------------------------------------------------------------- /migrations/000022_add_name_to_users_table.up.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `users` 2 | ADD COLUMN `name` VARCHAR(191) DEFAULT NULL; -------------------------------------------------------------------------------- /migrations/000023_add_cardholder_donate_reason.down.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000023_add_cardholder_donate_reason.down.sql -------------------------------------------------------------------------------- /migrations/000023_add_cardholder_donate_reason.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000023_add_cardholder_donate_reason.up.sql -------------------------------------------------------------------------------- /migrations/000024_add_show_offline_donation_to_user.down.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `users` 2 | DROP COLUMN `is_showofflinedonation`; -------------------------------------------------------------------------------- /migrations/000024_add_show_offline_donation_to_user.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000024_add_show_offline_donation_to_user.up.sql -------------------------------------------------------------------------------- /migrations/000025_add_should_merge_offline_donation_by_identity.down.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000025_add_should_merge_offline_donation_by_identity.down.sql -------------------------------------------------------------------------------- /migrations/000025_add_should_merge_offline_donation_by_identity.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000025_add_should_merge_offline_donation_by_identity.up.sql -------------------------------------------------------------------------------- /migrations/000026_remove_mailchimp_tables.down.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000026_remove_mailchimp_tables.down.sql -------------------------------------------------------------------------------- /migrations/000026_remove_mailchimp_tables.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/migrations/000026_remove_mailchimp_tables.up.sql -------------------------------------------------------------------------------- /models/bookmark.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/models/bookmark.go -------------------------------------------------------------------------------- /models/donation.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/models/donation.go -------------------------------------------------------------------------------- /models/gin-response.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/models/gin-response.go -------------------------------------------------------------------------------- /models/messages.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/models/messages.go -------------------------------------------------------------------------------- /models/model_user.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/models/model_user.go -------------------------------------------------------------------------------- /models/oauth.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/models/oauth.go -------------------------------------------------------------------------------- /models/registration.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/models/registration.go -------------------------------------------------------------------------------- /models/service.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/models/service.go -------------------------------------------------------------------------------- /models/subscription.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/models/subscription.go -------------------------------------------------------------------------------- /models/user_preferences.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/models/user_preferences.go -------------------------------------------------------------------------------- /models/users_bookmarks.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/models/users_bookmarks.go -------------------------------------------------------------------------------- /models/users_posts.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/models/users_posts.go -------------------------------------------------------------------------------- /routers/router.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/routers/router.go -------------------------------------------------------------------------------- /services/mail.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/services/mail.go -------------------------------------------------------------------------------- /services/pubsub.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/services/pubsub.go -------------------------------------------------------------------------------- /services/role_update.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/services/role_update.go -------------------------------------------------------------------------------- /storage/analytics.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/storage/analytics.go -------------------------------------------------------------------------------- /storage/bookmark.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/storage/bookmark.go -------------------------------------------------------------------------------- /storage/donation.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/storage/donation.go -------------------------------------------------------------------------------- /storage/errors.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/storage/errors.go -------------------------------------------------------------------------------- /storage/membership.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/storage/membership.go -------------------------------------------------------------------------------- /storage/news_v2.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/storage/news_v2.go -------------------------------------------------------------------------------- /storage/service.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/storage/service.go -------------------------------------------------------------------------------- /storage/subscription.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/storage/subscription.go -------------------------------------------------------------------------------- /storage/user.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/storage/user.go -------------------------------------------------------------------------------- /template/authenticate.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/template/authenticate.tmpl -------------------------------------------------------------------------------- /template/role-actiontaker.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/template/role-actiontaker.tmpl -------------------------------------------------------------------------------- /template/role-downgrade.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/template/role-downgrade.tmpl -------------------------------------------------------------------------------- /template/role-explorer.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/template/role-explorer.tmpl -------------------------------------------------------------------------------- /template/role-trailblazer.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/template/role-trailblazer.tmpl -------------------------------------------------------------------------------- /template/signin-otp.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/template/signin-otp.tmpl -------------------------------------------------------------------------------- /template/signin.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/template/signin.tmpl -------------------------------------------------------------------------------- /template/success-donation-periodic.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/template/success-donation-periodic.tmpl -------------------------------------------------------------------------------- /template/success-donation-prime.tmpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/template/success-donation-prime.tmpl -------------------------------------------------------------------------------- /tests/author_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/tests/author_test.go -------------------------------------------------------------------------------- /tests/controller_account_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/tests/controller_account_test.go -------------------------------------------------------------------------------- /tests/controller_analytics_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/tests/controller_analytics_test.go -------------------------------------------------------------------------------- /tests/controller_bookmark_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/tests/controller_bookmark_test.go -------------------------------------------------------------------------------- /tests/controller_donations_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/tests/controller_donations_test.go -------------------------------------------------------------------------------- /tests/controller_mail_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/tests/controller_mail_test.go -------------------------------------------------------------------------------- /tests/controller_subscriptions_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/tests/controller_subscriptions_test.go -------------------------------------------------------------------------------- /tests/controller_user_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/tests/controller_user_test.go -------------------------------------------------------------------------------- /tests/main_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/tests/main_test.go -------------------------------------------------------------------------------- /tests/news_v2_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/tests/news_v2_test.go -------------------------------------------------------------------------------- /tests/pre_test_environment_setup.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/tests/pre_test_environment_setup.go -------------------------------------------------------------------------------- /tests/structs.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/tests/structs.go -------------------------------------------------------------------------------- /utils/db.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/utils/db.go -------------------------------------------------------------------------------- /utils/helpers.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/utils/helpers.go -------------------------------------------------------------------------------- /utils/mocks/config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/utils/mocks/config.json -------------------------------------------------------------------------------- /utils/mocks/mal-form-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "AppSettings": { 3 | } 4 | -------------------------------------------------------------------------------- /utils/token.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/utils/token.go -------------------------------------------------------------------------------- /utils/utils.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/twreporter/go-api/HEAD/utils/utils.go --------------------------------------------------------------------------------