Loading CHANGELOG.md +1 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ The format is based on [keep a changelog](http://keepachangelog.com/) and this p ### Added - New storage list feature. - Ban users and create groups from within the Runtime environment. - New In-App Purchase validation feature. ### Changed - Run Facebook friends import after registration completes. Loading glide.lock +26 −3 Original line number Diff line number Diff line hash: 00c4318ad08f168ebf525164ff9fb486692a8f72905ef5d514bfe41bb006fb71 updated: 2017-06-29T10:26:44.307843698+01:00 hash: ff9abb7b8ba5a48c7ca600b2e89bc295be3d62101e22ef8ed817b7114a3015a7 updated: 2017-07-09T16:20:42.443074055+01:00 imports: - name: cloud.google.com/go version: 934866196d63fdcd8291ef6f16e70f4a830cda22 subpackages: - compute/metadata - name: github.com/armon/go-metrics version: 97c69685293dce4c0a2d0b19535179bbc976e4d2 - name: github.com/dgrijalva/jwt-go Loading @@ -26,7 +30,6 @@ imports: version: 8ee79997227bf9b34611aee7946ae64735e6fd93 subpackages: - proto - protoc-gen-go/descriptor - name: github.com/gorhill/cronexpr version: a557574d6c024ed6e36acc8b610f5f211c91568a - name: github.com/gorilla/context Loading Loading @@ -73,6 +76,26 @@ imports: version: 69d4b8aa71caaaa75c3dfc11211d1be495abec7c subpackages: - context - context/ctxhttp - name: golang.org/x/oauth2 version: cce311a261e6fcf29de72ca96827bdb0b7d9c9e6 subpackages: - google - internal - jws - jwt - name: google.golang.org/appengine version: ad2570cd3913654e00c5f0183b39d2f998e54046 subpackages: - internal - internal/app_identity - internal/base - internal/datastore - internal/log - internal/modules - internal/remote_api - internal/urlfetch - urlfetch - name: gopkg.in/gorp.v1 version: c87af80f3cc5036b55b83d77171e156791085e2e testImports: Loading glide.yaml +2 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,8 @@ import: - package: golang.org/x/crypto subpackages: - bcrypt - package: golang.org/x/oauth2/google - package: cloud.google.com/go/compute/metadata - package: github.com/golang/protobuf - package: github.com/gogo/protobuf version: ~0.4.0 Loading main.go +2 −1 Original line number Diff line number Diff line Loading @@ -99,7 +99,8 @@ func main() { } socialClient := social.NewClient(5 * time.Second) pipeline := server.NewPipeline(config, db, trackerService, matchmakerService, messageRouter, sessionRegistry, socialClient, runtime) purchaseService := server.NewPurchaseService(jsonLogger, multiLogger, db, config.GetPurchase()) pipeline := server.NewPipeline(config, db, trackerService, matchmakerService, messageRouter, sessionRegistry, socialClient, runtime, purchaseService) authService := server.NewAuthenticationService(jsonLogger, config, db, statsService, sessionRegistry, socialClient, pipeline, runtime) dashboardService := server.NewDashboardService(jsonLogger, multiLogger, semver, config, statsService) Loading migrations/20170620104217_storage_list.sql +19 −0 Original line number Diff line number Diff line Loading @@ -33,4 +33,23 @@ CREATE INDEX IF NOT EXISTS deleted_at_user_id_bucket_collection_read_record_idx CREATE INDEX IF NOT EXISTS deleted_at_bucket_read_collection_record_user_id_idx ON storage (deleted_at, bucket, read, collection, record, user_id); CREATE INDEX IF NOT EXISTS deleted_at_bucket_collection_read_record_user_id_idx ON storage (deleted_at, bucket, collection, read, record, user_id); CREATE TABLE IF NOT EXISTS purchase ( PRIMARY KEY (user_id, provider, receipt_id), -- ad-hoc purchase lookup user_id BYTEA NOT NULL, provider SMALLINT NOT NULL, -- google(0), apple(1) product_id VARCHAR(255) NOT NULL, receipt_id VARCHAR(255) NOT NULL, -- the transaction ID receipt BYTEA NOT NULL, provider_resp BYTEA NOT NULL, created_at BIGINT CHECK (created_at > 0) NOT NULL ); -- look up purchase by ID and retrieve user. This must be unique. CREATE UNIQUE INDEX IF NOT EXISTS purchase_provider_receipt_id_user_id_idx ON purchase (provider, receipt_id, user_id); -- list purchases by user CREATE INDEX IF NOT EXISTS purchase_user_id_created_at_provider_receipt_id_idx ON purchase (user_id, created_at, provider, receipt_id); -- list purchases by most recent timestamp CREATE INDEX IF NOT EXISTS purchase_created_at_user_id_provider_receipt_id_idx ON purchase (created_at, user_id, provider, receipt_id); -- +migrate Down DROP TABLE IF EXISTS purchase; Loading
CHANGELOG.md +1 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ The format is based on [keep a changelog](http://keepachangelog.com/) and this p ### Added - New storage list feature. - Ban users and create groups from within the Runtime environment. - New In-App Purchase validation feature. ### Changed - Run Facebook friends import after registration completes. Loading
glide.lock +26 −3 Original line number Diff line number Diff line hash: 00c4318ad08f168ebf525164ff9fb486692a8f72905ef5d514bfe41bb006fb71 updated: 2017-06-29T10:26:44.307843698+01:00 hash: ff9abb7b8ba5a48c7ca600b2e89bc295be3d62101e22ef8ed817b7114a3015a7 updated: 2017-07-09T16:20:42.443074055+01:00 imports: - name: cloud.google.com/go version: 934866196d63fdcd8291ef6f16e70f4a830cda22 subpackages: - compute/metadata - name: github.com/armon/go-metrics version: 97c69685293dce4c0a2d0b19535179bbc976e4d2 - name: github.com/dgrijalva/jwt-go Loading @@ -26,7 +30,6 @@ imports: version: 8ee79997227bf9b34611aee7946ae64735e6fd93 subpackages: - proto - protoc-gen-go/descriptor - name: github.com/gorhill/cronexpr version: a557574d6c024ed6e36acc8b610f5f211c91568a - name: github.com/gorilla/context Loading Loading @@ -73,6 +76,26 @@ imports: version: 69d4b8aa71caaaa75c3dfc11211d1be495abec7c subpackages: - context - context/ctxhttp - name: golang.org/x/oauth2 version: cce311a261e6fcf29de72ca96827bdb0b7d9c9e6 subpackages: - google - internal - jws - jwt - name: google.golang.org/appengine version: ad2570cd3913654e00c5f0183b39d2f998e54046 subpackages: - internal - internal/app_identity - internal/base - internal/datastore - internal/log - internal/modules - internal/remote_api - internal/urlfetch - urlfetch - name: gopkg.in/gorp.v1 version: c87af80f3cc5036b55b83d77171e156791085e2e testImports: Loading
glide.yaml +2 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,8 @@ import: - package: golang.org/x/crypto subpackages: - bcrypt - package: golang.org/x/oauth2/google - package: cloud.google.com/go/compute/metadata - package: github.com/golang/protobuf - package: github.com/gogo/protobuf version: ~0.4.0 Loading
main.go +2 −1 Original line number Diff line number Diff line Loading @@ -99,7 +99,8 @@ func main() { } socialClient := social.NewClient(5 * time.Second) pipeline := server.NewPipeline(config, db, trackerService, matchmakerService, messageRouter, sessionRegistry, socialClient, runtime) purchaseService := server.NewPurchaseService(jsonLogger, multiLogger, db, config.GetPurchase()) pipeline := server.NewPipeline(config, db, trackerService, matchmakerService, messageRouter, sessionRegistry, socialClient, runtime, purchaseService) authService := server.NewAuthenticationService(jsonLogger, config, db, statsService, sessionRegistry, socialClient, pipeline, runtime) dashboardService := server.NewDashboardService(jsonLogger, multiLogger, semver, config, statsService) Loading
migrations/20170620104217_storage_list.sql +19 −0 Original line number Diff line number Diff line Loading @@ -33,4 +33,23 @@ CREATE INDEX IF NOT EXISTS deleted_at_user_id_bucket_collection_read_record_idx CREATE INDEX IF NOT EXISTS deleted_at_bucket_read_collection_record_user_id_idx ON storage (deleted_at, bucket, read, collection, record, user_id); CREATE INDEX IF NOT EXISTS deleted_at_bucket_collection_read_record_user_id_idx ON storage (deleted_at, bucket, collection, read, record, user_id); CREATE TABLE IF NOT EXISTS purchase ( PRIMARY KEY (user_id, provider, receipt_id), -- ad-hoc purchase lookup user_id BYTEA NOT NULL, provider SMALLINT NOT NULL, -- google(0), apple(1) product_id VARCHAR(255) NOT NULL, receipt_id VARCHAR(255) NOT NULL, -- the transaction ID receipt BYTEA NOT NULL, provider_resp BYTEA NOT NULL, created_at BIGINT CHECK (created_at > 0) NOT NULL ); -- look up purchase by ID and retrieve user. This must be unique. CREATE UNIQUE INDEX IF NOT EXISTS purchase_provider_receipt_id_user_id_idx ON purchase (provider, receipt_id, user_id); -- list purchases by user CREATE INDEX IF NOT EXISTS purchase_user_id_created_at_provider_receipt_id_idx ON purchase (user_id, created_at, provider, receipt_id); -- list purchases by most recent timestamp CREATE INDEX IF NOT EXISTS purchase_created_at_user_id_provider_receipt_id_idx ON purchase (created_at, user_id, provider, receipt_id); -- +migrate Down DROP TABLE IF EXISTS purchase;