diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/.vscode/settings.json b/.vscode/settings.json old mode 100644 new mode 100755 diff --git a/Makefile b/Makefile old mode 100644 new mode 100755 diff --git a/TODO b/TODO old mode 100644 new mode 100755 diff --git a/api/BaseResponse.go b/api/BaseResponse.go old mode 100644 new mode 100755 diff --git a/api/api.go b/api/api.go old mode 100644 new mode 100755 diff --git a/api/image.go b/api/image.go old mode 100644 new mode 100755 diff --git a/api/location.go b/api/location.go old mode 100644 new mode 100755 diff --git a/api/middleware.go b/api/middleware.go old mode 100644 new mode 100755 diff --git a/api/news_event.go b/api/news_event.go old mode 100644 new mode 100755 diff --git a/api/region.go b/api/region.go old mode 100644 new mode 100755 diff --git a/api/reviews.go b/api/reviews.go old mode 100644 new mode 100755 diff --git a/api/server.go b/api/server.go old mode 100644 new mode 100755 diff --git a/api/tags.go b/api/tags.go old mode 100644 new mode 100755 diff --git a/api/test/location_test.go b/api/test/location_test.go old mode 100644 new mode 100755 diff --git a/api/test/main_test.go b/api/test/main_test.go old mode 100644 new mode 100755 diff --git a/api/test/user_test.go b/api/test/user_test.go old mode 100644 new mode 100755 diff --git a/api/token.go b/api/token.go old mode 100644 new mode 100755 diff --git a/api/user.go b/api/user.go old mode 100644 new mode 100755 diff --git a/data.ms/VERSION b/data.ms/VERSION old mode 100644 new mode 100755 diff --git a/data.ms/auth/data.mdb b/data.ms/auth/data.mdb old mode 100644 new mode 100755 diff --git a/data.ms/auth/lock.mdb b/data.ms/auth/lock.mdb old mode 100644 new mode 100755 index 9f2f325..d2a6034 Binary files a/data.ms/auth/lock.mdb and b/data.ms/auth/lock.mdb differ diff --git a/data.ms/indexes/7cfc824a-b5b6-44e5-98e9-36b251867cac/data.mdb b/data.ms/indexes/7cfc824a-b5b6-44e5-98e9-36b251867cac/data.mdb old mode 100644 new mode 100755 index 4ebac15..75eec7f Binary files a/data.ms/indexes/7cfc824a-b5b6-44e5-98e9-36b251867cac/data.mdb and b/data.ms/indexes/7cfc824a-b5b6-44e5-98e9-36b251867cac/data.mdb differ diff --git a/data.ms/indexes/7cfc824a-b5b6-44e5-98e9-36b251867cac/lock.mdb b/data.ms/indexes/7cfc824a-b5b6-44e5-98e9-36b251867cac/lock.mdb old mode 100644 new mode 100755 index 44aef30..d263ef7 Binary files a/data.ms/indexes/7cfc824a-b5b6-44e5-98e9-36b251867cac/lock.mdb and b/data.ms/indexes/7cfc824a-b5b6-44e5-98e9-36b251867cac/lock.mdb differ diff --git a/data.ms/instance-uid b/data.ms/instance-uid old mode 100644 new mode 100755 diff --git a/data.ms/tasks/data.mdb b/data.ms/tasks/data.mdb old mode 100644 new mode 100755 index 7e7c0b9..821990c Binary files a/data.ms/tasks/data.mdb and b/data.ms/tasks/data.mdb differ diff --git a/data.ms/tasks/lock.mdb b/data.ms/tasks/lock.mdb old mode 100644 new mode 100755 index abae36e..eb2d077 Binary files a/data.ms/tasks/lock.mdb and b/data.ms/tasks/lock.mdb differ diff --git a/db/csv_seeder/images.csv b/db/csv_seeder/images.csv old mode 100644 new mode 100755 diff --git a/db/csv_seeder/kabupaten.csv b/db/csv_seeder/kabupaten.csv old mode 100644 new mode 100755 diff --git a/db/csv_seeder/locations.csv b/db/csv_seeder/locations.csv old mode 100644 new mode 100755 diff --git a/db/csv_seeder/provinsi.csv b/db/csv_seeder/provinsi.csv old mode 100644 new mode 100755 diff --git a/db/csv_seeder/regions.csv b/db/csv_seeder/regions.csv old mode 100644 new mode 100755 diff --git a/db/csv_seeder/reviews.csv b/db/csv_seeder/reviews.csv old mode 100644 new mode 100755 diff --git a/db/csv_seeder/tags.csv b/db/csv_seeder/tags.csv old mode 100644 new mode 100755 diff --git a/db/csv_seeder/user.csv b/db/csv_seeder/user.csv old mode 100644 new mode 100755 diff --git a/db/migrations/000001_init_schema.down.sql b/db/migrations/000001_init_schema.down.sql old mode 100644 new mode 100755 diff --git a/db/migrations/000001_init_schema.up.sql b/db/migrations/000001_init_schema.up.sql old mode 100644 new mode 100755 diff --git a/db/migrations/000002_add_approvedby_in_locations_table.down.sql b/db/migrations/000002_add_approvedby_in_locations_table.down.sql old mode 100644 new mode 100755 diff --git a/db/migrations/000002_add_approvedby_in_locations_table.up.sql b/db/migrations/000002_add_approvedby_in_locations_table.up.sql old mode 100644 new mode 100755 diff --git a/db/migrations/000003_create_user_activities.down.sql b/db/migrations/000003_create_user_activities.down.sql old mode 100644 new mode 100755 diff --git a/db/migrations/000003_create_user_activities.up.sql b/db/migrations/000003_create_user_activities.up.sql old mode 100644 new mode 100755 diff --git a/db/migrations/000004_create_images_table.down.sql b/db/migrations/000004_create_images_table.down.sql old mode 100644 new mode 100755 diff --git a/db/migrations/000004_create_images_table.up.sql b/db/migrations/000004_create_images_table.up.sql old mode 100644 new mode 100755 diff --git a/db/migrations/000005_alter_tags_column_approvedby_nullable.down.sql b/db/migrations/000005_alter_tags_column_approvedby_nullable.down.sql old mode 100644 new mode 100755 diff --git a/db/migrations/000005_alter_tags_column_approvedby_nullable.up.sql b/db/migrations/000005_alter_tags_column_approvedby_nullable.up.sql old mode 100644 new mode 100755 diff --git a/db/migrations/000006_create_user_sessions_table.down.sql b/db/migrations/000006_create_user_sessions_table.down.sql old mode 100644 new mode 100755 diff --git a/db/migrations/000006_create_user_sessions_table.up.sql b/db/migrations/000006_create_user_sessions_table.up.sql old mode 100644 new mode 100755 diff --git a/db/migrations/000007_create_user_follow_table.down.sql b/db/migrations/000007_create_user_follow_table.down.sql old mode 100644 new mode 100755 diff --git a/db/migrations/000007_create_user_follow_table.up.sql b/db/migrations/000007_create_user_follow_table.up.sql old mode 100644 new mode 100755 diff --git a/db/migrations/000008_alter_users_add_about_column.down.sql b/db/migrations/000008_alter_users_add_about_column.down.sql old mode 100644 new mode 100755 diff --git a/db/migrations/000008_alter_users_add_about_column.up.sql b/db/migrations/000008_alter_users_add_about_column.up.sql old mode 100644 new mode 100755 diff --git a/db/migrations/000009_alter_users_add_website_column.down.sql b/db/migrations/000009_alter_users_add_website_column.down.sql old mode 100644 new mode 100755 diff --git a/db/migrations/000009_alter_users_add_website_column.up.sql b/db/migrations/000009_alter_users_add_website_column.up.sql old mode 100644 new mode 100755 diff --git a/db/migrations/000010_create_news_event_table.down.sql b/db/migrations/000010_create_news_event_table.down.sql old mode 100644 new mode 100755 diff --git a/db/migrations/000010_create_news_event_table.up.sql b/db/migrations/000010_create_news_event_table.up.sql old mode 100644 new mode 100755 diff --git a/db/mock/store.go b/db/mock/store.go old mode 100644 new mode 100755 diff --git a/db/queries/follow.sql b/db/queries/follow.sql old mode 100644 new mode 100755 diff --git a/db/queries/images.sql b/db/queries/images.sql old mode 100644 new mode 100755 diff --git a/db/queries/locations.sql b/db/queries/locations.sql old mode 100644 new mode 100755 diff --git a/db/queries/news_events.sql b/db/queries/news_events.sql old mode 100644 new mode 100755 diff --git a/db/queries/provinces.sql b/db/queries/provinces.sql old mode 100644 new mode 100755 diff --git a/db/queries/regencies.sql b/db/queries/regencies.sql old mode 100644 new mode 100755 diff --git a/db/queries/regions.sql b/db/queries/regions.sql old mode 100644 new mode 100755 diff --git a/db/queries/reviews.sql b/db/queries/reviews.sql old mode 100644 new mode 100755 diff --git a/db/queries/sessions.sql b/db/queries/sessions.sql old mode 100644 new mode 100755 diff --git a/db/queries/users.sql b/db/queries/users.sql old mode 100644 new mode 100755 diff --git a/db/sqlc/db.go b/db/sqlc/db.go old mode 100644 new mode 100755 diff --git a/db/sqlc/error.go b/db/sqlc/error.go old mode 100644 new mode 100755 diff --git a/db/sqlc/follow.sql.go b/db/sqlc/follow.sql.go old mode 100644 new mode 100755 diff --git a/db/sqlc/images.go b/db/sqlc/images.go old mode 100644 new mode 100755 diff --git a/db/sqlc/images.sql.go b/db/sqlc/images.sql.go old mode 100644 new mode 100755 diff --git a/db/sqlc/locations.go b/db/sqlc/locations.go old mode 100644 new mode 100755 diff --git a/db/sqlc/locations.sql.go b/db/sqlc/locations.sql.go old mode 100644 new mode 100755 diff --git a/db/sqlc/models.go b/db/sqlc/models.go old mode 100644 new mode 100755 diff --git a/db/sqlc/news_events.go b/db/sqlc/news_events.go old mode 100644 new mode 100755 diff --git a/db/sqlc/news_events.sql.go b/db/sqlc/news_events.sql.go old mode 100644 new mode 100755 diff --git a/db/sqlc/provinces.sql.go b/db/sqlc/provinces.sql.go old mode 100644 new mode 100755 diff --git a/db/sqlc/querier.go b/db/sqlc/querier.go old mode 100644 new mode 100755 diff --git a/db/sqlc/regencies.sql.go b/db/sqlc/regencies.sql.go old mode 100644 new mode 100755 diff --git a/db/sqlc/regions.sql.go b/db/sqlc/regions.sql.go old mode 100644 new mode 100755 diff --git a/db/sqlc/reviews.go b/db/sqlc/reviews.go old mode 100644 new mode 100755 diff --git a/db/sqlc/reviews.sql.go b/db/sqlc/reviews.sql.go old mode 100644 new mode 100755 diff --git a/db/sqlc/sessions.sql.go b/db/sqlc/sessions.sql.go old mode 100644 new mode 100755 diff --git a/db/sqlc/store.go b/db/sqlc/store.go old mode 100644 new mode 100755 diff --git a/db/sqlc/test/locations_test.go b/db/sqlc/test/locations_test.go old mode 100644 new mode 100755 diff --git a/db/sqlc/test/main_test.go b/db/sqlc/test/main_test.go old mode 100644 new mode 100755 diff --git a/db/sqlc/test/users_test.go b/db/sqlc/test/users_test.go old mode 100644 new mode 100755 diff --git a/db/sqlc/tx_location.go b/db/sqlc/tx_location.go old mode 100644 new mode 100755 diff --git a/db/sqlc/users.go b/db/sqlc/users.go old mode 100644 new mode 100755 diff --git a/db/sqlc/users.sql.go b/db/sqlc/users.sql.go old mode 100644 new mode 100755 diff --git a/dev.env.example b/dev.env.example old mode 100644 new mode 100755 diff --git a/go.mod b/go.mod old mode 100644 new mode 100755 diff --git a/go.sum b/go.sum old mode 100644 new mode 100755 diff --git a/import_csv.sh b/import_csv.sh index 536cb52..b67081e 100755 --- a/import_csv.sh +++ b/import_csv.sh @@ -1,5 +1,7 @@ #!/bin/sh cp ./db/csv_seeder/* /tmp/ + +# SEEDING MAIN DATAABSE sudo -u postgres psql \ -c '\copy users(id,username,password) FROM '"'/tmp/user.csv'"' DELIMITER '"','"' CSV HEADER;' \ -c '\copy regions(id, region_name) FROM '"'/tmp/regions.csv'"' DELIMITER '"','"' CSV HEADER;' \ @@ -10,6 +12,8 @@ sudo -u postgres psql \ -c '\copy images(id,image_url,uploaded_by,image_type,image_of) FROM '"'/tmp/images.csv'"' DELIMITER '"'#'"' CSV HEADER;' \ -c '\copy tags(id,name,submitted_by,target_id,tags_type) FROM '"'/tmp/tags.csv'"' DELIMITER '"','"' CSV HEADER;' \ -d hiling_dev && + +# SEEDING TEST DATABASE sudo -u postgres psql \ -c '\copy users(id,username,password) FROM '"'/tmp/user.csv'"' DELIMITER '"','"' CSV HEADER;' \ -c '\copy regions(id, region_name) FROM '"'/tmp/regions.csv'"' DELIMITER '"','"' CSV HEADER;' \ diff --git a/main.go b/main.go old mode 100644 new mode 100755 diff --git a/notes b/notes old mode 100644 new mode 100755 diff --git a/sqlc.yaml b/sqlc.yaml old mode 100644 new mode 100755 diff --git a/user_stories b/user_stories old mode 100644 new mode 100755 diff --git a/util/cloudfare/r2.go b/util/cloudfare/r2.go new file mode 100755 index 0000000..1046aea --- /dev/null +++ b/util/cloudfare/r2.go @@ -0,0 +1,2 @@ +package cloudfare + diff --git a/util/config.go b/util/config.go old mode 100644 new mode 100755 diff --git a/util/password.go b/util/password.go old mode 100644 new mode 100755 diff --git a/util/password_test.go b/util/password_test.go old mode 100644 new mode 100755 diff --git a/util/random.go b/util/random.go old mode 100644 new mode 100755 diff --git a/util/sql.go b/util/sql.go old mode 100644 new mode 100755 diff --git a/util/token/maker.go b/util/token/maker.go old mode 100644 new mode 100755 diff --git a/util/token/paseto.go b/util/token/paseto.go old mode 100644 new mode 100755 diff --git a/util/token/paseto_test.go b/util/token/paseto_test.go old mode 100644 new mode 100755 diff --git a/util/token/payload.go b/util/token/payload.go old mode 100644 new mode 100755