diff --git a/go.mod b/go.mod index f0827de..80bc3ff 100644 --- a/go.mod +++ b/go.mod @@ -3,36 +3,79 @@ module git.solsynth.dev/goatworks/turbine go 1.25.5 require ( + firebase.google.com/go/v4 v4.18.0 github.com/charmbracelet/bubbles v0.21.0 github.com/charmbracelet/bubbletea v1.3.10 github.com/charmbracelet/lipgloss v1.1.0 + github.com/gofiber/contrib/v3/websocket v1.0.0-rc.1 github.com/gofiber/fiber/v3 v3.0.0-rc.3 + github.com/google/uuid v1.6.0 github.com/joho/godotenv v1.5.1 + github.com/nats-io/nats.go v1.47.0 github.com/rs/zerolog v1.34.0 + github.com/samber/lo v1.52.0 + github.com/sideshow/apns2 v0.25.0 github.com/spf13/viper v1.21.0 go.etcd.io/etcd/client/v3 v3.6.6 + google.golang.org/api v0.231.0 + google.golang.org/grpc v1.72.0 + google.golang.org/protobuf v1.36.6 gopkg.in/yaml.v3 v3.0.1 + gorm.io/driver/postgres v1.6.0 + gorm.io/gorm v1.31.1 ) require ( + cel.dev/expr v0.23.1 // indirect + cloud.google.com/go v0.121.0 // indirect + cloud.google.com/go/auth v0.16.1 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect + cloud.google.com/go/compute/metadata v0.6.0 // indirect + cloud.google.com/go/firestore v1.18.0 // indirect + cloud.google.com/go/iam v1.5.2 // indirect + cloud.google.com/go/longrunning v0.6.7 // indirect + cloud.google.com/go/monitoring v1.24.2 // indirect + cloud.google.com/go/storage v1.53.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.51.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.51.0 // indirect + github.com/MicahParks/keyfunc v1.9.0 // indirect github.com/andybalholm/brotli v1.2.0 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect github.com/charmbracelet/x/ansi v0.10.1 // indirect github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd // indirect github.com/charmbracelet/x/term v0.2.1 // indirect + github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 // indirect github.com/coreos/go-semver v0.3.1 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect + github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect + github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect + github.com/fasthttp/websocket v1.5.12 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.9.0 // indirect + github.com/go-jose/go-jose/v4 v4.0.5 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/go-viper/mapstructure/v2 v2.4.0 // indirect github.com/gofiber/schema v1.6.0 // indirect github.com/gofiber/utils/v2 v2.0.0-rc.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang-jwt/jwt/v4 v4.5.2 // indirect github.com/golang/protobuf v1.5.4 // indirect - github.com/google/uuid v1.6.0 // indirect + github.com/google/s2a-go v0.1.9 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect + github.com/googleapis/gax-go/v2 v2.14.1 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect - github.com/klauspost/compress v1.18.1 // indirect + github.com/jackc/pgpassfile v1.0.0 // indirect + github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect + github.com/jackc/pgx/v5 v5.7.6 // indirect + github.com/jackc/puddle/v2 v2.2.2 // indirect + github.com/jinzhu/inflection v1.0.0 // indirect + github.com/jinzhu/now v1.1.5 // indirect + github.com/klauspost/compress v1.18.2 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect @@ -41,30 +84,48 @@ require ( github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect github.com/muesli/cancelreader v0.2.2 // indirect github.com/muesli/termenv v0.16.0 // indirect + github.com/nats-io/nkeys v0.4.11 // indirect + github.com/nats-io/nuid v1.0.1 // indirect github.com/pelletier/go-toml/v2 v2.2.4 // indirect github.com/philhofer/fwd v1.2.0 // indirect + github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/sagikazarmark/locafero v0.11.0 // indirect + github.com/savsgio/gotils v0.0.0-20250924091648-bce9a52d7761 // indirect github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect github.com/spf13/afero v1.15.0 // indirect github.com/spf13/cast v1.10.0 // indirect github.com/spf13/pflag v1.0.10 // indirect + github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/tinylib/msgp v1.5.0 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasthttp v1.68.0 // indirect github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect + github.com/zeebo/errs v1.4.0 // indirect go.etcd.io/etcd/api/v3 v3.6.6 // indirect go.etcd.io/etcd/client/pkg/v3 v3.6.6 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/contrib/detectors/gcp v1.35.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect + go.opentelemetry.io/otel v1.35.0 // indirect + go.opentelemetry.io/otel/metric v1.35.0 // indirect + go.opentelemetry.io/otel/sdk v1.35.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.35.0 // indirect + go.opentelemetry.io/otel/trace v1.35.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/crypto v0.44.0 // indirect + golang.org/x/crypto v0.46.0 // indirect golang.org/x/net v0.47.0 // indirect + golang.org/x/oauth2 v0.30.0 // indirect + golang.org/x/sync v0.19.0 // indirect golang.org/x/sys v0.39.0 // indirect - golang.org/x/text v0.31.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb // indirect - google.golang.org/grpc v1.71.1 // indirect - google.golang.org/protobuf v1.36.5 // indirect + golang.org/x/text v0.32.0 // indirect + golang.org/x/time v0.11.0 // indirect + google.golang.org/appengine/v2 v2.0.6 // indirect + google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20250505200425-f936aa4a68b2 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250505200425-f936aa4a68b2 // indirect ) diff --git a/go.sum b/go.sum index 2b73df6..ab9241e 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,47 @@ +cel.dev/expr v0.23.1 h1:K4KOtPCJQjVggkARsjG9RWXP6O4R73aHeJMa/dmCQQg= +cel.dev/expr v0.23.1/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= +cloud.google.com/go v0.121.0 h1:pgfwva8nGw7vivjZiRfrmglGWiCJBP+0OmDpenG/Fwg= +cloud.google.com/go v0.121.0/go.mod h1:rS7Kytwheu/y9buoDmu5EIpMMCI4Mb8ND4aeN4Vwj7Q= +cloud.google.com/go/auth v0.16.1 h1:XrXauHMd30LhQYVRHLGvJiYeczweKQXZxsTbV9TiguU= +cloud.google.com/go/auth v0.16.1/go.mod h1:1howDHJ5IETh/LwYs3ZxvlkXF48aSqqJUM+5o02dNOI= +cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc= +cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c= +cloud.google.com/go/compute/metadata v0.6.0 h1:A6hENjEsCDtC1k8byVsgwvVcioamEHvZ4j01OwKxG9I= +cloud.google.com/go/compute/metadata v0.6.0/go.mod h1:FjyFAW1MW0C203CEOMDTu3Dk1FlqW3Rga40jzHL4hfg= +cloud.google.com/go/firestore v1.18.0 h1:cuydCaLS7Vl2SatAeivXyhbhDEIR8BDmtn4egDhIn2s= +cloud.google.com/go/firestore v1.18.0/go.mod h1:5ye0v48PhseZBdcl0qbl3uttu7FIEwEYVaWm0UIEOEU= +cloud.google.com/go/iam v1.5.2 h1:qgFRAGEmd8z6dJ/qyEchAuL9jpswyODjA2lS+w234g8= +cloud.google.com/go/iam v1.5.2/go.mod h1:SE1vg0N81zQqLzQEwxL2WI6yhetBdbNQuTvIKCSkUHE= +cloud.google.com/go/logging v1.13.0 h1:7j0HgAp0B94o1YRDqiqm26w4q1rDMH7XNRU34lJXHYc= +cloud.google.com/go/logging v1.13.0/go.mod h1:36CoKh6KA/M0PbhPKMq6/qety2DCAErbhXT62TuXALA= +cloud.google.com/go/longrunning v0.6.7 h1:IGtfDWHhQCgCjwQjV9iiLnUta9LBCo8R9QmAFsS/PrE= +cloud.google.com/go/longrunning v0.6.7/go.mod h1:EAFV3IZAKmM56TyiE6VAP3VoTzhZzySwI/YI1s/nRsY= +cloud.google.com/go/monitoring v1.24.2 h1:5OTsoJ1dXYIiMiuL+sYscLc9BumrL3CarVLL7dd7lHM= +cloud.google.com/go/monitoring v1.24.2/go.mod h1:x7yzPWcgDRnPEv3sI+jJGBkwl5qINf+6qY4eq0I9B4U= +cloud.google.com/go/storage v1.53.0 h1:gg0ERZwL17pJ+Cz3cD2qS60w1WMDnwcm5YPAIQBHUAw= +cloud.google.com/go/storage v1.53.0/go.mod h1:7/eO2a/srr9ImZW9k5uufcNahT2+fPb8w5it1i5boaA= +cloud.google.com/go/trace v1.11.6 h1:2O2zjPzqPYAHrn3OKl029qlqG6W8ZdYaOWRyr8NgMT4= +cloud.google.com/go/trace v1.11.6/go.mod h1:GA855OeDEBiBMzcckLPE2kDunIpC72N+Pq8WFieFjnI= +firebase.google.com/go/v4 v4.18.0 h1:S+g0P72oDGqOaG4wlLErX3zQmU9plVdu7j+Bc3R1qFw= +firebase.google.com/go/v4 v4.18.0/go.mod h1:P7UfBpzc8+Z3MckX79+zsWzKVfpGryr6HLbAe7gCWfs= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0 h1:ErKg/3iS1AKcTkf3yixlZ54f9U1rljCkQyEXWUnIUxc= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.27.0/go.mod h1:yAZHSGnqScoU556rBOVkwLze6WP5N+U11RHuWaGVxwY= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.51.0 h1:fYE9p3esPxA/C0rQ0AHhP0drtPXDRhaWiwg1DPqO7IU= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.51.0/go.mod h1:BnBReJLvVYx2CS/UHOgVz2BXKXD9wsQPxZug20nZhd0= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.51.0 h1:OqVGm6Ei3x5+yZmSJG1Mh2NwHvpVmZ08CB5qJhT9Nuk= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/cloudmock v0.51.0/go.mod h1:SZiPHWGOOk3bl8tkevxkoiwPgsIl6CwrWcbwjfHZpdM= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.51.0 h1:6/0iUd0xrnX7qt+mLNRwg5c0PGv8wpE8K90ryANQwMI= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.51.0/go.mod h1:otE2jQekW/PqXk1Awf5lmfokJx4uwuqcj1ab5SpGeW0= +github.com/MicahParks/keyfunc v1.9.0 h1:lhKd5xrFHLNOWrDc4Tyb/Q1AJ4LCzQ48GVJyVIID3+o= +github.com/MicahParks/keyfunc v1.9.0/go.mod h1:IdnCilugA0O/99dW+/MkvlyrsX8+L8+x95xuVNtM5jw= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20201120081800-1786d5ef83d4/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/andybalholm/brotli v1.2.0 h1:ukwgCxwYrmACq68yiUqwIWnGY0cTPox/M94sVwToPjQ= github.com/andybalholm/brotli v1.2.0/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/charmbracelet/bubbles v0.21.0 h1:9TdC97SdRVg/1aaXNVWfFH3nnLAwOXr8Fn6u6mfQdFs= github.com/charmbracelet/bubbles v0.21.0/go.mod h1:HF+v6QUR4HkEpz62dx7ym2xc71/KBHg+zKwJtMw+qtg= github.com/charmbracelet/bubbletea v1.3.10 h1:otUDHWMMzQSB0Pkc87rm691KZ3SWa4KUlvF9nRvCICw= @@ -16,20 +56,38 @@ github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd h1:vy0G github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd/go.mod h1:xe0nKWGd3eJgtqZRaN9RjMtK7xUYchjzPr7q6kcvCCs= github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ= github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg= +github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 h1:aQ3y1lwWyqYPiWZThqv1aFbZMiM9vblcSArJRf2Irls= +github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.13.4 h1:zEqyPVyku6IvWCFwux4x9RxkLOMUL+1vC9xUFv5l2/M= +github.com/envoyproxy/go-control-plane v0.13.4/go.mod h1:kDfuBlDVsSj2MjrLEtRWtHlsWIFcGyB2RMO44Dc5GZA= +github.com/envoyproxy/go-control-plane/envoy v1.32.4 h1:jb83lalDRZSpPWW2Z7Mck/8kXZ5CQAFYVjQcdVIr83A= +github.com/envoyproxy/go-control-plane/envoy v1.32.4/go.mod h1:Gzjc5k8JcJswLjAx1Zm+wSYE20UrLtt7JZMWiWQXQEw= +github.com/envoyproxy/go-control-plane/ratelimit v0.1.0 h1:/G9QYbddjL25KvtKTv3an9lx6VBE2cnb8wp1vEGNYGI= +github.com/envoyproxy/go-control-plane/ratelimit v0.1.0/go.mod h1:Wk+tMFAFbCXaJPzVVHnPgRKdUdwW/KdbRt94AzgRee4= +github.com/envoyproxy/protoc-gen-validate v1.2.1 h1:DEo3O99U8j4hBFwbJfrz9VtgcDfUKS7KJ7spH3d86P8= +github.com/envoyproxy/protoc-gen-validate v1.2.1/go.mod h1:d/C80l/jxXLdfEIhX1W2TmLfsJ31lvEjwamM4DxlWXU= github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4= github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM= +github.com/fasthttp/websocket v1.5.12 h1:e4RGPpWW2HTbL3zV0Y/t7g0ub294LkiuXXUuTOUInlE= +github.com/fasthttp/websocket v1.5.12/go.mod h1:I+liyL7/4moHojiOgUOIKEWm9EIxHqxZChS+aMFltyg= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= +github.com/go-jose/go-jose/v4 v4.0.5 h1:M6T8+mKZl/+fNNuFHvGIzDz7BTLQPIounk/b9dw3AaE= +github.com/go-jose/go-jose/v4 v4.0.5/go.mod h1:s3P1lRrkT8igV8D9OjyL4WRyHvjB6a4JSllnOrmmBOA= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -37,6 +95,8 @@ github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs= github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofiber/contrib/v3/websocket v1.0.0-rc.1 h1:8clbuE29DYk+X9in476o8HiOweDkQ6hUdrz5P3QsNb8= +github.com/gofiber/contrib/v3/websocket v1.0.0-rc.1/go.mod h1:FAz447DGYjVJzaU6tNC/hUF5oNr3/Qlb+AZ1Pe6Z13s= github.com/gofiber/fiber/v3 v3.0.0-rc.3 h1:h0KXuRHbivSslIpoHD1R/XjUsjcGwt+2vK0avFiYonA= github.com/gofiber/fiber/v3 v3.0.0-rc.3/go.mod h1:LNBPuS/rGoUFlOyy03fXsWAeWfdGoT1QytwjRVNSVWo= github.com/gofiber/schema v1.6.0 h1:rAgVDFwhndtC+hgV7Vu5ItQCn7eC2mBA4Eu1/ZTiEYY= @@ -45,20 +105,46 @@ github.com/gofiber/utils/v2 v2.0.0-rc.2 h1:NvJTf7yMafTq16lUOJv70nr+HIOLNQcvGme/X github.com/gofiber/utils/v2 v2.0.0-rc.2/go.mod h1:gXins5o7up+BQFiubmO8aUJc/+Mhd7EKXIiAK5GBomI= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v4 v4.4.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI= +github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/martian/v3 v3.3.3 h1:DIhPTQrbPkgs2yJYdXU/eNACCG5DVQjySNRNlflZ9Fc= +github.com/google/martian/v3 v3.3.3/go.mod h1:iEPrYcgCF7jA9OtScMFQyAlZZ4YXTKEtJ1E6RWzmBA0= +github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0= +github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.3.6 h1:GW/XbdyBFQ8Qe+YAmFU9uHLo7OnF5tL52HFAgMmyrf4= +github.com/googleapis/enterprise-certificate-proxy v0.3.6/go.mod h1:MkHOF77EYAE7qfSuSS9PU6g4Nt4e11cnsDUowfwewLA= +github.com/googleapis/gax-go/v2 v2.14.1 h1:hb0FFeiPaQskmvakKu5EbCbpntQn48jyHuvrkurSS/Q= +github.com/googleapis/gax-go/v2 v2.14.1/go.mod h1:Hb/NubMaVM88SrNkvl8X/o8XWwDJEPqouaLeN2IUxoA= github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo= github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI= +github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= +github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo= +github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= +github.com/jackc/pgx/v5 v5.7.6 h1:rWQc5FwZSPX58r1OQmkuaNicxdmExaEz5A2DO2hUuTk= +github.com/jackc/pgx/v5 v5.7.6/go.mod h1:aruU7o91Tc2q2cFp5h4uP3f6ztExVpyVv88Xl/8Vl8M= +github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo= +github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= +github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= +github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= +github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.18.1 h1:bcSGx7UbpBqMChDtsF28Lw6v/G94LPrrbMbdC3JH2co= -github.com/klauspost/compress v1.18.1/go.mod h1:ZQFFVG+MdnR0P+l6wpXgIL4NTtwiKIdBnrBd8Nrxr+0= +github.com/klauspost/compress v1.18.2 h1:iiPHWW0YrcFgpBYhsA6D1+fqHssJscY/Tm/y2Uqnapk= +github.com/klauspost/compress v1.18.2/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -82,11 +168,19 @@ github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELU github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc= github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk= +github.com/nats-io/nats.go v1.47.0 h1:YQdADw6J/UfGUd2Oy6tn4Hq6YHxCaJrVKayxxFqYrgM= +github.com/nats-io/nats.go v1.47.0/go.mod h1:iRWIPokVIFbVijxuMQq4y9ttaBTMe0SFdlZfMDd+33g= +github.com/nats-io/nkeys v0.4.11 h1:q44qGV008kYd9W1b1nEBkNzvnWxtRSQ7A8BoqRrcfa0= +github.com/nats-io/nkeys v0.4.11/go.mod h1:szDimtgmfOi9n25JpfIdGw12tZFYXqhGxjhVxsatHVE= +github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= github.com/philhofer/fwd v1.2.0 h1:e6DnBTl7vGY+Gz322/ASL4Gyp1FspeMvx1RNDoToZuM= github.com/philhofer/fwd v1.2.0/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo= +github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= @@ -99,8 +193,14 @@ github.com/rs/zerolog v1.34.0 h1:k43nTLIwcTVQAncfCw4KZ2VY6ukYoZaBPNOE8txlOeY= github.com/rs/zerolog v1.34.0/go.mod h1:bJsvje4Z08ROH4Nhs5iH600c3IkWhwp44iRc54W6wYQ= github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDcg+AAIFXc= github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik= +github.com/samber/lo v1.52.0 h1:Rvi+3BFHES3A8meP33VPAxiBZX/Aws5RxrschYGjomw= +github.com/samber/lo v1.52.0/go.mod h1:4+MXEGsJzbKGaUEQFKBq2xtfuznW9oz/WrgyzMzRoM0= +github.com/savsgio/gotils v0.0.0-20250924091648-bce9a52d7761 h1:McifyVxygw1d67y6vxUqls2D46J8W9nrki9c8c0eVvE= +github.com/savsgio/gotils v0.0.0-20250924091648-bce9a52d7761/go.mod h1:Vi9gvHvTw4yCUHIznFl5TPULS7aXwgaTByGeBY75Wko= github.com/shamaton/msgpack/v2 v2.4.0 h1:O5Z08MRmbo0lA9o2xnQ4TXx6teJbPqEurqcCOQ8Oi/4= github.com/shamaton/msgpack/v2 v2.4.0/go.mod h1:6khjYnkx73f7VQU7wjcFS9DFjs+59naVWJv1TB7qdOI= +github.com/sideshow/apns2 v0.25.0 h1:XOzanncO9MQxkb03T/2uU2KcdVjYiIf0TMLzec0FTW4= +github.com/sideshow/apns2 v0.25.0/go.mod h1:7Fceu+sL0XscxrfLSkAoH6UtvKefq3Kq1n4W3ayQZqE= github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw= github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8/go.mod h1:3n1Cwaq1E1/1lhQhtRK2ts/ZwZEhjcQeJQ1RuC6Q/8U= github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I= @@ -111,6 +211,12 @@ github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU= github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY= +github.com/spiffe/go-spiffe/v2 v2.5.0 h1:N2I01KCUkv1FAjZXJMwh95KK1ZIQLYbPfhaxw8WS0hE= +github.com/spiffe/go-spiffe/v2 v2.5.0/go.mod h1:P+NxobPc6wXhVtINNtFjNWGBTreew1GBUCwT2wPmb7g= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= @@ -129,6 +235,9 @@ github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZ github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/zeebo/errs v1.4.0 h1:XNdoD/RRMKP7HD0UhJnIzUy74ISdGGxURlYG8HSWSfM= +github.com/zeebo/errs v1.4.0/go.mod h1:sgbWHsvVuTPHcqJJGQ1WhI5KbWlHYz+2+2C/LSEtCw4= go.etcd.io/etcd/api/v3 v3.6.6 h1:mcaMp3+7JawWv69p6QShYWS8cIWUOl32bFLb6qf8pOQ= go.etcd.io/etcd/api/v3 v3.6.6/go.mod h1:f/om26iXl2wSkcTA1zGQv8reJRSLVdoEBsi4JdfMrx4= go.etcd.io/etcd/client/pkg/v3 v3.6.6 h1:uoqgzSOv2H9KlIF5O1Lsd8sW+eMLuV6wzE3q5GJGQNs= @@ -137,16 +246,24 @@ go.etcd.io/etcd/client/v3 v3.6.6 h1:G5z1wMf5B9SNexoxOHUGBaULurOZPIgGPsW6CN492ec= go.etcd.io/etcd/client/v3 v3.6.6/go.mod h1:36Qv6baQ07znPR3+n7t+Rk5VHEzVYPvFfGmfF4wBHV8= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY= -go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI= -go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ= -go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE= -go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= -go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= -go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= -go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= -go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= -go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= +go.opentelemetry.io/contrib/detectors/gcp v1.35.0 h1:bGvFt68+KTiAKFlacHW6AhA56GF2rS0bdD3aJYEnmzA= +go.opentelemetry.io/contrib/detectors/gcp v1.35.0/go.mod h1:qGWP8/+ILwMRIUf9uIVLloR1uo5ZYAslM4O6OqUi1DA= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 h1:x7wzEgXfnzJcHDwStJT+mxOz4etr2EcexjqhBvmoakw= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0/go.mod h1:rg+RlpR5dKwaS95IyyZqj5Wd4E13lk/msnTS0Xl9lJM= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0/go.mod h1:69uWxva0WgAA/4bu2Yy70SLDBwZXuQ6PbBpbsa5iZrQ= +go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= +go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.35.0 h1:PB3Zrjs1sG1GBX51SXyTSoOTqcDglmsk7nT6tkKPb/k= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.35.0/go.mod h1:U2R3XyVPzn0WX7wOIypPuptulsMcPDPs/oiSVOMVnHY= +go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= +go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= +go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= +go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= +go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= +go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= +go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= +go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -155,55 +272,93 @@ go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/crypto v0.0.0-20170512130425-ab89591268e0/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.44.0 h1:A97SsFvM3AIwEEmTBiaxPPTYpDC47w720rdiiUvgoAU= -golang.org/x/crypto v0.44.0/go.mod h1:013i+Nw79BMiQiMsOPcVCB5ZIJbYkerPrGnOa00tvmc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU= +golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0= golang.org/x/exp v0.0.0-20220909182711-5c715a9e8561 h1:MDc5xs78ZrZr3HMQugiXOAkSZtfTpbJLDr/lwfgO53E= golang.org/x/exp v0.0.0-20220909182711-5c715a9e8561/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220403103023-749bd193bc2b/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY= golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= +golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= +golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk= golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM= -golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU= +golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY= +golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0= +golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb h1:p31xT4yrYrSM/G4Sn2+TNUkVhFCbG9y8itM2S6Th950= -google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:jbe3Bkdp+Dh2IrslsFCklNhweNTBgSYanP1UXhJDhKg= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb h1:TLPQVbx1GJ8VKZxz52VAxl1EBgKXXbTiU9Fc5fZeLn4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I= -google.golang.org/grpc v1.71.1 h1:ffsFWr7ygTUscGPI0KKK6TLrGz0476KUvvsbqWK0rPI= -google.golang.org/grpc v1.71.1/go.mod h1:H0GRtasmQOh9LkFoCPDu3ZrwUtD1YGE+b2vYBYd/8Ec= -google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= -google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/api v0.231.0 h1:LbUD5FUl0C4qwia2bjXhCMH65yz1MLPzA/0OYEsYY7Q= +google.golang.org/api v0.231.0/go.mod h1:H52180fPI/QQlUc0F4xWfGZILdv09GCWKt2bcsn164A= +google.golang.org/appengine/v2 v2.0.6 h1:LvPZLGuchSBslPBp+LAhihBeGSiRh1myRoYK4NtuBIw= +google.golang.org/appengine/v2 v2.0.6/go.mod h1:WoEXGoXNfa0mLvaH5sV3ZSGXwVmy8yf7Z1JKf3J3wLI= +google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2 h1:1tXaIXCracvtsRxSBsYDiSBN0cuJvM7QYW+MrpIRY78= +google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2/go.mod h1:49MsLSx0oWMOZqcpB3uL8ZOkAh1+TndpJ8ONoCBWiZk= +google.golang.org/genproto/googleapis/api v0.0.0-20250505200425-f936aa4a68b2 h1:vPV0tzlsK6EzEDHNNH5sa7Hs9bd7iXR7B1tSiPepkV0= +google.golang.org/genproto/googleapis/api v0.0.0-20250505200425-f936aa4a68b2/go.mod h1:pKLAc5OolXC3ViWGI62vvC0n10CpwAtRcTNCFwTKBEw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250505200425-f936aa4a68b2 h1:IqsN8hx+lWLqlN+Sc3DoMy/watjofWiU8sRFgQ8fhKM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250505200425-f936aa4a68b2/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/grpc v1.72.0 h1:S7UkcVa60b5AAQTaO6ZKamFp1zMZSU0fGDK2WZLbBnM= +google.golang.org/grpc v1.72.0/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= +google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gorm.io/driver/postgres v1.6.0 h1:2dxzU8xJ+ivvqTRph34QX+WrRaJlmfyPqXmoGVjMBa4= +gorm.io/driver/postgres v1.6.0/go.mod h1:vUw0mrGgrTK+uPHEhAdV4sfFELrByKVGnaVRkXDhtWo= +gorm.io/gorm v1.31.1 h1:7CA8FTFz/gRfgqgpeKIBcervUn3xSyPUmr6B2WXJ7kg= +gorm.io/gorm v1.31.1/go.mod h1:XyQVbO2k6YkOis7C2437jSit3SsDK72s7n7rsSHd+Gs= diff --git a/pkg/ring/clients/email.go b/pkg/ring/clients/email.go new file mode 100644 index 0000000..aa68b56 --- /dev/null +++ b/pkg/ring/clients/email.go @@ -0,0 +1,130 @@ +package clients + +import ( + "fmt" + "net/smtp" + "crypto/tls" + + "github.com/spf13/viper" + "github.com/rs/zerolog/log" +) + +type SMTPSettings struct { + Host string + Port int + Username string + Password string + Encryption string // "tls", "ssl", "none" + FromAddress string + FromName string +} + +var smtpSettings SMTPSettings + +func InitSMTPSettings() { + smtpSettings = SMTPSettings{ + Host: viper.GetString("smtp.host"), + Port: viper.GetInt("smtp.port"), + Username: viper.GetString("smtp.username"), + Password: viper.GetString("smtp.password"), + Encryption: viper.GetString("smtp.encryption"), + FromAddress: viper.GetString("smtp.from_address"), + FromName: viper.GetString("smtp.from_name"), + } + + if smtpSettings.Host == "" || smtpSettings.Port == 0 || smtpSettings.FromAddress == "" { + log.Warn().Msg("SMTP configuration incomplete. Email sending may not work.") + } else { + log.Info().Msgf("SMTP client initialized for %s:%d", smtpSettings.Host, smtpSettings.Port) + } +} + +func GetSMTPSettings() SMTPSettings { + return smtpSettings +} + +// SendEmail sends an email using the configured SMTP settings. +func SendEmail(toAddress, subject, body string) error { + if smtpSettings.Host == "" { + return fmt.Errorf("SMTP client not initialized or host is empty") + } + + addr := fmt.Sprintf("%s:%d", smtpSettings.Host, smtpSettings.Port) + + // Setup authentication + auth := smtp.PlainAuth("", smtpSettings.Username, smtpSettings.Password, smtpSettings.Host) + + // Construct the email message + mime := "MIME-version: 1.0;\nContent-Type: text/html; charset=\"UTF-8\";\n" + msg := []byte("From: " + smtpSettings.FromName + " <" + smtpSettings.FromAddress + ">\r\n" + + "To: " + toAddress + "\r\n" + + "Subject: " + subject + "\r\n" + + mime + "\r\n" + + body + "\r\n") + + var err error + switch smtpSettings.Encryption { + case "tls": + // TLS encryption + err = sendMailTLS(addr, auth, smtpSettings.FromAddress, []string{toAddress}, msg) + case "ssl": + // SSL encryption (usually port 465) + err = smtp.SendMail(addr, auth, smtpSettings.FromAddress, []string{toAddress}, msg) + case "none": + // No encryption (usually port 25 or 587 without STARTTLS) + err = smtp.SendMail(addr, auth, smtpSettings.FromAddress, []string{toAddress}, msg) + default: + return fmt.Errorf("unsupported SMTP encryption type: %s", smtpSettings.Encryption) + } + + if err != nil { + return fmt.Errorf("failed to send email: %w", err) + } + log.Info().Msgf("Email sent successfully to %s", toAddress) + return nil +} + +// sendMailTLS sends an email over a TLS connection. +func sendMailTLS(addr string, auth smtp.Auth, from string, to []string, msg []byte) error { + conn, err := tls.Dial("tcp", addr, nil) + if err != nil { + return err + } + defer conn.Close() + + client, err := smtp.NewClient(conn, smtpSettings.Host) + if err != nil { + return err + } + defer client.Close() + + if auth != nil { + if ok, _ := client.Extension("AUTH"); ok { + if err = client.Auth(auth); err != nil { + return err + } + } + } + + if err = client.Mail(from); err != nil { + return err + } + for _, addr := range to { + if err = client.Rcpt(addr); err != nil { + return err + } + } + w, err := client.Data() + if err != nil { + return err + } + _, err = w.Write(msg) + if err != nil { + return err + } + err = w.Close() + if err != nil { + return err + } + return client.Quit() +} diff --git a/pkg/ring/clients/nats.go b/pkg/ring/clients/nats.go new file mode 100644 index 0000000..edcc8ff --- /dev/null +++ b/pkg/ring/clients/nats.go @@ -0,0 +1,29 @@ +package clients + +import ( + "github.com/nats-io/nats.go" + "github.com/rs/zerolog/log" + "github.com/spf13/viper" +) + +var natsConn *nats.Conn + +// InitNATSClient initializes the NATS client connection. +func InitNATSClient() { + natsURL := viper.GetString("nats.url") + if natsURL == "" { + log.Fatal().Msg("NATS URL not configured in viper (nats.url)") + } + + var err error + natsConn, err = nats.Connect(natsURL) + if err != nil { + log.Fatal().Err(err).Msg("Failed to connect to NATS server") + } + log.Info().Msgf("Connected to NATS server: %s", natsURL) +} + +// GetNATSClient returns the initialized NATS client connection. +func GetNATSClient() *nats.Conn { + return natsConn +} diff --git a/pkg/ring/clients/push.go b/pkg/ring/clients/push.go new file mode 100644 index 0000000..bbc4fbd --- /dev/null +++ b/pkg/ring/clients/push.go @@ -0,0 +1,67 @@ +package clients + +import ( + "context" + + firebase "firebase.google.com/go/v4" + "firebase.google.com/go/v4/messaging" + "github.com/rs/zerolog/log" + "github.com/sideshow/apns2" + "github.com/sideshow/apns2/token" + "github.com/spf13/viper" + "google.golang.org/api/option" +) + +var ( + apnsClient *apns2.Client + firebaseClient *messaging.Client +) + +func InitPushClients() { + // Initialize APNs Client + apnsCertPath := viper.GetString("apns.certificate_path") + apnsKeyID := viper.GetString("apns.key_id") + apnsTeamID := viper.GetString("apns.team_id") + + if apnsCertPath != "" && apnsKeyID != "" && apnsTeamID != "" { + authKey, err := token.AuthKeyFromFile(apnsCertPath) + token := &token.Token{ + AuthKey: authKey, + KeyID: apnsKeyID, + TeamID: apnsTeamID, + } + if err != nil { + log.Fatal().Err(err).Msg("Failed to create APNs auth key") + } + apnsClient = apns2.NewTokenClient(token) + apnsClient.Production() // Use Production environment + log.Info().Msg("APNs client initialized in production mode") + } else { + log.Warn().Msg("APNs configuration missing. Skipping APNs client initialization.") + } + + // Initialize Firebase Client + firebaseServiceAccountPath := viper.GetString("firebase.service_account_path") + if firebaseServiceAccountPath != "" { + opt := option.WithCredentialsFile(firebaseServiceAccountPath) + app, err := firebase.NewApp(context.Background(), nil, opt) + if err != nil { + log.Fatal().Err(err).Msg("Failed to create Firebase app") + } + firebaseClient, err = app.Messaging(context.Background()) + if err != nil { + log.Fatal().Err(err).Msg("Failed to create Firebase Messaging client") + } + log.Info().Msg("Firebase Messaging client initialized") + } else { + log.Warn().Msg("Firebase service account path missing. Skipping Firebase client initialization.") + } +} + +func GetAPNsClient() *apns2.Client { + return apnsClient +} + +func GetFirebaseClient() *messaging.Client { + return firebaseClient +} diff --git a/pkg/ring/infra/db.go b/pkg/ring/infra/db.go new file mode 100644 index 0000000..bbbc7c2 --- /dev/null +++ b/pkg/ring/infra/db.go @@ -0,0 +1,19 @@ +package infra + +import ( + "github.com/spf13/viper" + "gorm.io/driver/postgres" + "gorm.io/gorm" +) + +var Db *gorm.DB + +func ConnectDb() error { + dsn := viper.GetString("database.dsn") + db, err := gorm.Open(postgres.Open(dsn), &gorm.Config{}) + if err != nil { + return err + } + Db = db + return nil +} diff --git a/pkg/ring/main.go b/pkg/ring/main.go index feaaf2d..6a9192d 100644 --- a/pkg/ring/main.go +++ b/pkg/ring/main.go @@ -2,17 +2,31 @@ package main import ( "fmt" + "net" "os" + "os/signal" "strconv" "strings" + "syscall" + "time" + "git.solsynth.dev/goatworks/turbine/pkg/ring/clients" // Add this import + "git.solsynth.dev/goatworks/turbine/pkg/ring/infra" + "git.solsynth.dev/goatworks/turbine/pkg/ring/routes" + "git.solsynth.dev/goatworks/turbine/pkg/ring/services" + "git.solsynth.dev/goatworks/turbine/pkg/ring/websocket" // Add this import "git.solsynth.dev/goatworks/turbine/pkg/shared/hash" + pb "git.solsynth.dev/goatworks/turbine/pkg/shared/proto/gen" "git.solsynth.dev/goatworks/turbine/pkg/shared/registrar" + fiber_websocket "github.com/gofiber/contrib/v3/websocket" // Add this alias import "github.com/gofiber/fiber/v3" + "github.com/google/uuid" "github.com/rs/zerolog" "github.com/rs/zerolog/log" + "github.com/samber/lo" "github.com/spf13/viper" + "google.golang.org/grpc" ) func init() { @@ -31,12 +45,49 @@ func main() { log.Fatal().Err(err).Msg("Failed to read config file...") } log.Info().Msg("Configuration loaded.") + + clients.InitPushClients() // Initialize APNs and Firebase clients + clients.InitSMTPSettings() // Initialize SMTP client settings + clients.InitNATSClient() // Initialize NATS client + + // --- gRPC Server --- + grpcListenAddr := viper.GetString("grpc.listen") + if grpcListenAddr == "" { + log.Fatal().Msg("grpc.listen not configured") + } + + grpcServer := grpc.NewServer() + wsManager := websocket.NewManager(clients.GetNATSClient()) // Pass NATS client to WebSocket Manager + ringService := &services.RingServiceServerImpl{ + WsManager: wsManager, // Inject WebSocket Manager into RingService + } + pb.RegisterRingServiceServer(grpcServer, ringService) + pb.RegisterRingHandlerServiceServer(grpcServer, ringService) + + grpcLis, err := net.Listen("tcp", grpcListenAddr) + if err != nil { + log.Fatal().Err(err).Msgf("Failed to listen for gRPC: %s", grpcListenAddr) + } + + go func() { + log.Info().Msgf("gRPC server listening on %s", grpcListenAddr) + if err := grpcServer.Serve(grpcLis); err != nil { + log.Fatal().Err(err).Msg("Failed to serve gRPC") + } + }() + // --- Service Registration --- etcdEndpoints := viper.GetStringSlice("etcd.endpoints") if len(etcdEndpoints) == 0 { log.Fatal().Msg("etcd.endpoints not configured") } + if err := infra.ConnectDb(); err != nil { + log.Fatal().Err(err).Msg("Failed to connect database.") + } else { + infra.Db.AutoMigrate() + } + if viper.GetBool("etcd.insecure") { for i, ep := range etcdEndpoints { if !strings.HasPrefix(ep, "http://") && !strings.HasPrefix(ep, "https://") { @@ -61,7 +112,7 @@ func main() { log.Fatal().Err(err).Msg("Invalid listen address") } - serviceName := "config" + serviceName := "ring" // This should probably be "ring" instanceID := fmt.Sprint(hash.Hash(fmt.Sprintf("%s-%s-%d", serviceName, host, port)))[:8] err = serviceReg.Register(serviceName, "http", instanceID, host, port, 30) @@ -75,23 +126,45 @@ func main() { ServerHeader: "Turbine Ring", }) - // This is the main endpoint that serves the configuration as JSON. - app.Get("/", func(c fiber.Ctx) error { - log.Info().Msg("Serving shared configuration as JSON") + api := app.Group("/api") + { + api.Post("/notifications/subscription", routes.CreatePushSubscription) + } - // Use a new Viper instance to read the shared config - v := viper.New() - v.SetConfigName("shared_config") - v.AddConfigPath(".") // Look in the current directory (pkg/config) - v.SetConfigType("toml") + // Initialize WebSocket Controller + wsController := websocket.NewWebSocketController(wsManager) - if err := v.ReadInConfig(); err != nil { - log.Error().Err(err).Msg("Failed to read shared_config.toml") - return c.Status(fiber.StatusInternalServerError).JSON(fiber.Map{ - "error": "could not load configuration", - }) + // WebSocket endpoint + app.Use("/ws", func(c fiber.Ctx) error { + // Mock authentication based on C# example + // In a real scenario, you'd extract user/session from JWT or similar + // and set c.Locals("currentUser") and c.Locals("currentSession") + c.Locals("currentUser", &pb.Account{Id: uuid.New().String(), Name: "mock_user", Nick: "Mock User"}) + c.Locals("currentSession", &pb.AuthSession{ClientId: lo.ToPtr(uuid.New().String())}) + + if fiber_websocket.IsWebSocketUpgrade(c) { + return c.Next() } - - return c.JSON(v.AllSettings()) + return fiber.ErrUpgradeRequired }) + app.Get("/ws", fiber_websocket.New(wsController.HandleWebSocket)) + + // Graceful shutdown + c := make(chan os.Signal, 1) + signal.Notify(c, os.Interrupt, syscall.SIGTERM) + + go func() { + <-c + log.Info().Msg("Shutting down servers...") + if err := app.ShutdownWithTimeout(5 * time.Second); err != nil { + log.Error().Err(err).Msg("Fiber server shutdown error") + } + grpcServer.GracefulStop() + log.Info().Msg("Servers gracefully stopped") + }() + + err = app.Listen(listenAddr, fiber.ListenConfig{DisableStartupMessage: true}) + if err != nil { + log.Fatal().Err(err).Msg("Failed to start the server...") + } } diff --git a/pkg/ring/models/notification.go b/pkg/ring/models/notification.go new file mode 100644 index 0000000..89ce9fa --- /dev/null +++ b/pkg/ring/models/notification.go @@ -0,0 +1,45 @@ +package models + +import ( + "time" + + "github.com/google/uuid" + "gorm.io/gorm" +) + +type PushProvider int + +const ( + PushProviderApple PushProvider = iota + PushProviderGoogle +) + +type Notification struct { + Id uuid.UUID `gorm:"primarykey;type:uuid;default:gen_random_uuid()" json:"id"` + Topic string `gorm:"not null;size:1024" json:"topic"` + Title *string `json:"title"` + Subtitle *string `json:"subtitle"` + Content *string `json:"content"` + Meta map[string]any `gorm:"type:jsonb;default:'{}'::jsonb;not null" json:"meta"` + Priority int `gorm:"default:10" json:"priority"` + ViewedAt *time.Time `json:"viewed_at"` + AccountId uuid.UUID `gorm:"type:uuid;not null" json:"account_id"` + + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + DeletedAt gorm.DeletedAt `gorm:"index" json:"deleted_at"` +} + +type NotificationPushSubscription struct { + Id uuid.UUID `gorm:"primarykey;type:uuid;default:gen_random_uuid()" json:"id"` + AccountId uuid.UUID `gorm:"type:uuid;not null;uniqueIndex:account_device_deleted" json:"account_id"` + DeviceId string `gorm:"not null;size:8192;uniqueIndex:account_device_deleted" json:"device_id"` + DeviceToken string `gorm:"not null;size:8192" json:"device_token"` + Provider PushProvider `gorm:"not null" json:"provider"` + CountDelivered int `gorm:"default:0" json:"count_delivered"` + LastUsedAt *time.Time `json:"last_used_at"` + + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + DeletedAt gorm.DeletedAt `gorm:"uniqueIndex:account_device_deleted,index" json:"deleted_at"` +} diff --git a/pkg/ring/ring b/pkg/ring/ring new file mode 100755 index 0000000..c8ed609 Binary files /dev/null and b/pkg/ring/ring differ diff --git a/pkg/ring/routes/notification_api.go b/pkg/ring/routes/notification_api.go new file mode 100644 index 0000000..51e3c70 --- /dev/null +++ b/pkg/ring/routes/notification_api.go @@ -0,0 +1,7 @@ +package routes + +import "github.com/gofiber/fiber/v3" + +func CreatePushSubscription(c fiber.Ctx) error { + return c.JSON(fiber.Map{}) +} diff --git a/pkg/ring/services/ring_service.go b/pkg/ring/services/ring_service.go new file mode 100644 index 0000000..9201d9c --- /dev/null +++ b/pkg/ring/services/ring_service.go @@ -0,0 +1,435 @@ +package services + +import ( + "context" + "encoding/json" + "fmt" + + "firebase.google.com/go/v4/messaging" + "github.com/google/uuid" + "github.com/rs/zerolog/log" + "github.com/sideshow/apns2" + "github.com/sideshow/apns2/payload" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/types/known/emptypb" + + "git.solsynth.dev/goatworks/turbine/pkg/ring/clients" + "git.solsynth.dev/goatworks/turbine/pkg/ring/infra" + "git.solsynth.dev/goatworks/turbine/pkg/ring/models" + "git.solsynth.dev/goatworks/turbine/pkg/ring/websocket" + pb "git.solsynth.dev/goatworks/turbine/pkg/shared/proto/gen" +) + +// RingServiceServerImpl implements the RingServiceServer and RingHandlerServiceServer interfaces +type RingServiceServerImpl struct { + pb.UnimplementedRingServiceServer + pb.UnimplementedRingHandlerServiceServer + WsManager *websocket.Manager // Add WebSocket Manager +} + +// sendPushNotification helper function to send notifications via APNs or FCM +func sendPushNotification(ctx context.Context, notif *models.Notification, sub *models.NotificationPushSubscription) error { + if sub.Provider == models.PushProviderApple { + apnsClient := clients.GetAPNsClient() + if apnsClient == nil { + return fmt.Errorf("APNs client not initialized") + } + + apnsPayload := payload.NewPayload(). + AlertTitle(*notif.Title). + AlertBody(*notif.Content) + + if notif.Subtitle != nil { + apnsPayload.AlertSubtitle(*notif.Subtitle) + } + + if notif.Meta != nil { + metaBytes, err := json.Marshal(notif.Meta) + if err != nil { + log.Error().Err(err).Msg("Failed to marshal notification meta for APNs") + } else { + apnsPayload.Custom("meta", string(metaBytes)) + } + } + + notification := &apns2.Notification{ + DeviceToken: sub.DeviceToken, + Topic: notif.Topic, + Payload: apnsPayload, + } + + res, err := apnsClient.PushWithContext(ctx, notification) + if err != nil { + return fmt.Errorf("failed to send APNs push notification: %w", err) + } + if res.Sent() { + log.Info().Msgf("APNs notification sent successfully to device %s (token: %s)", sub.DeviceId, sub.DeviceToken) + } else { + log.Error().Msgf("APNs notification failed to send to device %s (token: %s) with reason: %s", sub.DeviceId, sub.DeviceToken, res.Reason) + if res.StatusCode == 410 { // Expired token + log.Warn().Msgf("APNs token for device %s expired. Deleting subscription.", sub.DeviceId) + // TODO: Delete the subscription + } + return fmt.Errorf("APNs push notification failed: %s", res.Reason) + } + } else if sub.Provider == models.PushProviderGoogle { + firebaseClient := clients.GetFirebaseClient() + if firebaseClient == nil { + return fmt.Errorf("Firebase client not initialized") + } + + message := &messaging.Message{ + Token: sub.DeviceToken, + Notification: &messaging.Notification{ + Title: *notif.Title, + Body: *notif.Content, + }, + Data: make(map[string]string), + } + + if notif.Meta != nil { + for k, v := range notif.Meta { + message.Data[k] = fmt.Sprintf("%v", v) + } + } + + res, err := firebaseClient.Send(ctx, message) + if err != nil { + return fmt.Errorf("failed to send Firebase push notification: %w", err) + } + log.Info().Msgf("Firebase notification sent successfully to device %s (token: %s): %s", sub.DeviceId, sub.DeviceToken, res) + } else { + return fmt.Errorf("unsupported push provider: %v", sub.Provider) + } + return nil +} + +// SendEmail implements proto.RingServiceServer +func (s *RingServiceServerImpl) SendEmail(ctx context.Context, req *pb.SendEmailRequest) (*emptypb.Empty, error) { + log.Info().Msgf("Received SendEmail request: %+v", req.GetEmail()) + + email := req.GetEmail() + if email == nil { + return nil, status.Errorf(codes.InvalidArgument, "email message is nil") + } + + if email.ToAddress == "" || email.Subject == "" || email.Body == "" { + return nil, status.Errorf(codes.InvalidArgument, "to_address, subject, and body cannot be empty") + } + + err := clients.SendEmail(email.ToAddress, email.Subject, email.Body) + if err != nil { + log.Error().Err(err).Msg("Failed to send email") + return nil, status.Errorf(codes.Internal, "failed to send email: %v", err) + } + + log.Info().Msgf("Email sent successfully to %s", email.ToAddress) + return &emptypb.Empty{}, nil +} + +// PushWebSocketPacket implements proto.RingServiceServer +func (s *RingServiceServerImpl) PushWebSocketPacket(ctx context.Context, req *pb.PushWebSocketPacketRequest) (*emptypb.Empty, error) { + log.Info().Msgf("Received PushWebSocketPacket request for user %s: %+v", req.GetUserId(), req.GetPacket()) + + if s.WsManager == nil { + return nil, status.Errorf(codes.Unavailable, "WebSocket manager not initialized") + } + + accountID, err := uuid.Parse(req.GetUserId()) + if err != nil { + return nil, status.Errorf(codes.InvalidArgument, "invalid user ID: %v", err) + } + + packet := websocket.FromProtoValue(req.GetPacket()) + s.WsManager.SendPacketToAccount(accountID, packet) + + return &emptypb.Empty{}, nil +} + +// PushWebSocketPacketToUsers implements proto.RingServiceServer +func (s *RingServiceServerImpl) PushWebSocketPacketToUsers(ctx context.Context, req *pb.PushWebSocketPacketToUsersRequest) (*emptypb.Empty, error) { + log.Info().Msgf("Received PushWebSocketPacketToUsers request for users %v: %+v", req.GetUserIds(), req.GetPacket()) + + if s.WsManager == nil { + return nil, status.Errorf(codes.Unavailable, "WebSocket manager not initialized") + } + + packet := websocket.FromProtoValue(req.GetPacket()) + for _, userID := range req.GetUserIds() { + accountID, err := uuid.Parse(userID) + if err != nil { + log.Warn().Err(err).Msgf("Invalid user ID in batch: %s, skipping", userID) + continue + } + s.WsManager.SendPacketToAccount(accountID, packet) + } + + return &emptypb.Empty{}, nil +} + +// PushWebSocketPacketToDevice implements proto.RingServiceServer +func (s *RingServiceServerImpl) PushWebSocketPacketToDevice(ctx context.Context, req *pb.PushWebSocketPacketToDeviceRequest) (*emptypb.Empty, error) { + log.Info().Msgf("Received PushWebSocketPacketToDevice request for device %s: %+v", req.GetDeviceId(), req.GetPacket()) + + if s.WsManager == nil { + return nil, status.Errorf(codes.Unavailable, "WebSocket manager not initialized") + } + + packet := websocket.FromProtoValue(req.GetPacket()) + s.WsManager.SendPacketToDevice(req.GetDeviceId(), packet) + + return &emptypb.Empty{}, nil +} + +// PushWebSocketPacketToDevices implements proto.RingServiceServer +func (s *RingServiceServerImpl) PushWebSocketPacketToDevices(ctx context.Context, req *pb.PushWebSocketPacketToDevicesRequest) (*emptypb.Empty, error) { + log.Info().Msgf("Received PushWebSocketPacketToDevices request for devices %v: %+v", req.GetDeviceIds(), req.GetPacket()) + + if s.WsManager == nil { + return nil, status.Errorf(codes.Unavailable, "WebSocket manager not initialized") + } + + packet := websocket.FromProtoValue(req.GetPacket()) + for _, deviceID := range req.GetDeviceIds() { + s.WsManager.SendPacketToDevice(deviceID, packet) + } + + return &emptypb.Empty{}, nil +} + +// SendPushNotificationToUser implements proto.RingServiceServer +func (s *RingServiceServerImpl) SendPushNotificationToUser(ctx context.Context, req *pb.SendPushNotificationToUserRequest) (*emptypb.Empty, error) { + log.Info().Msgf("Received SendPushNotificationToUser request for user %s: %+v", req.GetUserId(), req.GetNotification()) + + // 1. Parse incoming notification and save to DB + accountID, err := uuid.Parse(req.GetUserId()) + if err != nil { + return nil, status.Errorf(codes.InvalidArgument, "invalid account ID: %v", err) + } + + notif := &models.Notification{ + Topic: req.GetNotification().GetTopic(), + Title: &req.GetNotification().Title, + Content: &req.GetNotification().Body, + AccountId: accountID, + } + + if req.GetNotification().Subtitle != "" { + subtitle := req.GetNotification().Subtitle + notif.Subtitle = &subtitle + } + + if req.GetNotification().Meta != nil { + var metaMap map[string]any + if err := json.Unmarshal(req.GetNotification().GetMeta(), &metaMap); err != nil { + log.Warn().Err(err).Msg("Failed to unmarshal notification meta, sending without it") + } else { + notif.Meta = metaMap + } + } + + if err := infra.Db.WithContext(ctx).Create(notif).Error; err != nil { + log.Error().Err(err).Msg("Failed to save notification to database") + return nil, status.Errorf(codes.Internal, "failed to save notification: %v", err) + } + log.Info().Msgf("Notification saved to DB: %s", notif.Id.String()) + + // 2. Retrieve push subscriptions for the user + var subscriptions []models.NotificationPushSubscription + if err := infra.Db.WithContext(ctx).Where("account_id = ?", req.GetUserId()).Find(&subscriptions).Error; err != nil { + log.Error().Err(err).Msgf("Failed to retrieve subscriptions for account %s", req.GetUserId()) + return nil, status.Errorf(codes.Internal, "failed to retrieve subscriptions: %v", err) + } + + if len(subscriptions) == 0 { + log.Info().Msgf("No active push subscriptions found for user %s", req.GetUserId()) + return &emptypb.Empty{}, nil + } + + // 3. Send notification to each subscription + for _, sub := range subscriptions { + sub := sub // Create a local copy for the goroutine + go func() { + if err := sendPushNotification(ctx, notif, &sub); err != nil { + log.Error().Err(err).Msgf("Failed to send push notification to device %s", sub.DeviceId) + } + }() + } + + return &emptypb.Empty{}, nil +} + +// SendPushNotificationToUsers implements proto.RingServiceServer +func (s *RingServiceServerImpl) SendPushNotificationToUsers(ctx context.Context, req *pb.SendPushNotificationToUsersRequest) (*emptypb.Empty, error) { + log.Info().Msgf("Received SendPushNotificationToUsers request for users %v: %+v", req.GetUserIds(), req.GetNotification()) + + // 1. Parse incoming notification (one notification for all users) + // We'll create separate DB entries for each user if needed, or link to a single notification. + // For simplicity, let's assume we save one notification per user for now. + // A better approach for many users might be a single notification record linked to multiple user-notification bridges. + + // Extract common notification details + notificationProto := req.GetNotification() + metaMap := make(map[string]any) + if notificationProto.Meta != nil { + if err := json.Unmarshal(notificationProto.GetMeta(), &metaMap); err != nil { + log.Warn().Err(err).Msg("Failed to unmarshal notification meta for batch, sending without it") + } + } + + for _, userID := range req.GetUserIds() { + accountID, err := uuid.Parse(userID) + if err != nil { + log.Warn().Err(err).Msgf("Invalid account ID in batch: %s, skipping", userID) + continue + } + + notif := &models.Notification{ + Topic: notificationProto.GetTopic(), + Title: ¬ificationProto.Title, + Content: ¬ificationProto.Body, + Meta: metaMap, + AccountId: accountID, + } + + if notificationProto.Subtitle != "" { + subtitle := notificationProto.Subtitle + notif.Subtitle = &subtitle + } + + if err := infra.Db.WithContext(ctx).Create(notif).Error; err != nil { + log.Error().Err(err).Msgf("Failed to save notification to database for user %s: %v", userID, err) + continue + } + log.Info().Msgf("Notification saved to DB for user %s: %s", userID, notif.Id.String()) + + // Retrieve push subscriptions for the current user + var subscriptions []models.NotificationPushSubscription + if err := infra.Db.WithContext(ctx).Where("account_id = ?", userID).Find(&subscriptions).Error; err != nil { + log.Error().Err(err).Msgf("Failed to retrieve subscriptions for account %s in batch: %v", userID, err) + continue + } + + if len(subscriptions) == 0 { + log.Info().Msgf("No active push subscriptions found for user %s in batch", userID) + continue + } + + // Send notification to each subscription for the current user + for _, sub := range subscriptions { + sub := sub // Create a local copy for the goroutine + go func() { + if err := sendPushNotification(ctx, notif, &sub); err != nil { + log.Error().Err(err).Msgf("Failed to send push notification to device %s for user %s", sub.DeviceId, userID) + } + }() + } + } + + return &emptypb.Empty{}, nil +} + +// UnsubscribePushNotifications implements proto.RingServiceServer +func (s *RingServiceServerImpl) UnsubscribePushNotifications(ctx context.Context, req *pb.UnsubscribePushNotificationsRequest) (*emptypb.Empty, error) { + log.Info().Msgf("Received UnsubscribePushNotifications request for device %s", req.GetDeviceId()) + + if req.GetDeviceId() == "" { + return nil, status.Errorf(codes.InvalidArgument, "device_id cannot be empty") + } + + result := infra.Db.WithContext(ctx).Where("device_id = ?", req.GetDeviceId()).Delete(&models.NotificationPushSubscription{}) + if result.Error != nil { + log.Error().Err(result.Error).Msgf("Failed to unsubscribe device %s", req.GetDeviceId()) + return nil, status.Errorf(codes.Internal, "failed to unsubscribe: %v", result.Error) + } + + if result.RowsAffected == 0 { + log.Info().Msgf("No subscription found for device %s to unsubscribe", req.GetDeviceId()) + } else { + log.Info().Msgf("Successfully unsubscribed device %s", req.GetDeviceId()) + } + + return &emptypb.Empty{}, nil +} + +// GetWebsocketConnectionStatus implements proto.RingServiceServer +func (s *RingServiceServerImpl) GetWebsocketConnectionStatus(ctx context.Context, req *pb.GetWebsocketConnectionStatusRequest) (*pb.GetWebsocketConnectionStatusResponse, error) { + log.Info().Msgf("Received GetWebsocketConnectionStatus request: %+v", req) + + if s.WsManager == nil { + return nil, status.Errorf(codes.Unavailable, "WebSocket manager not initialized") + } + + isConnected := false + switch id := req.GetId().(type) { + case *pb.GetWebsocketConnectionStatusRequest_DeviceId: + isConnected = s.WsManager.GetDeviceIsConnected(id.DeviceId) + case *pb.GetWebsocketConnectionStatusRequest_UserId: + accountID, err := uuid.Parse(id.UserId) + if err != nil { + return nil, status.Errorf(codes.InvalidArgument, "invalid user ID: %v", err) + } + isConnected = s.WsManager.GetAccountIsConnected(accountID) + default: + return nil, status.Errorf(codes.InvalidArgument, "either device_id or user_id must be provided") + } + + return &pb.GetWebsocketConnectionStatusResponse{IsConnected: isConnected}, nil +} + +// GetWebsocketConnectionStatusBatch implements proto.RingServiceServer +func (s *RingServiceServerImpl) GetWebsocketConnectionStatusBatch(ctx context.Context, req *pb.GetWebsocketConnectionStatusBatchRequest) (*pb.GetWebsocketConnectionStatusBatchResponse, error) { + log.Info().Msgf("Received GetWebsocketConnectionStatusBatch request: %+v", req) + + if s.WsManager == nil { + return nil, status.Errorf(codes.Unavailable, "WebSocket manager not initialized") + } + + response := &pb.GetWebsocketConnectionStatusBatchResponse{ + IsConnected: make(map[string]bool), + } + + for _, userID := range req.GetUsersId() { + accountID, err := uuid.Parse(userID) + if err != nil { + log.Warn().Err(err).Msgf("Invalid user ID in batch: %s, skipping", userID) + response.IsConnected[userID] = false // Indicate connection status as false for invalid IDs + continue + } + response.IsConnected[userID] = s.WsManager.GetAccountIsConnected(accountID) + } + + return response, nil +} + +// ReceiveWebSocketPacket implements proto.RingHandlerServiceServer +func (s *RingServiceServerImpl) ReceiveWebSocketPacket(ctx context.Context, req *pb.ReceiveWebSocketPacketRequest) (*emptypb.Empty, error) { + log.Info().Msgf("Received ReceiveWebSocketPacket request: %+v", req) + + if s.WsManager == nil { + return nil, status.Errorf(codes.Unavailable, "WebSocket manager not initialized") + } + + packet := websocket.FromProtoValue(req.GetPacket()) + + // The C# HandlePacket expects current user and device ID. + // For this gRPC endpoint, we can use the account and device_id from the request. + if req.GetAccount() == nil || req.GetAccount().GetId() == "" { + return nil, status.Errorf(codes.InvalidArgument, "account information missing in request") + } + if req.GetDeviceId() == "" { + return nil, status.Errorf(codes.InvalidArgument, "device_id missing in request") + } + + // Assuming the request comes from a trusted source, we can use the provided account. + // We don't have a direct *websocket.Conn here, so we can't send error responses back on a direct WebSocket. + // Errors will be logged and returned as gRPC errors. + err := s.WsManager.HandlePacket(req.GetAccount(), req.GetDeviceId(), packet, nil) // Pass nil for *websocket.Conn + if err != nil { + log.Error().Err(err).Msg("Failed to handle received WebSocket packet via gRPC") + return nil, status.Errorf(codes.Internal, "failed to process packet: %v", err) + } + + return &emptypb.Empty{}, nil +} diff --git a/pkg/ring/websocket/controller.go b/pkg/ring/websocket/controller.go new file mode 100644 index 0000000..4815a43 --- /dev/null +++ b/pkg/ring/websocket/controller.go @@ -0,0 +1,144 @@ +package websocket + +import ( + "fmt" + + "github.com/gofiber/contrib/v3/websocket" + "github.com/google/uuid" + "github.com/rs/zerolog/log" + "github.com/samber/lo" + + pb "git.solsynth.dev/goatworks/turbine/pkg/shared/proto/gen" +) + +// WebSocketController handles the WebSocket endpoint. +type WebSocketController struct { + Manager *Manager +} + +// NewWebSocketController creates a new WebSocketController. +func NewWebSocketController(manager *Manager) *WebSocketController { + return &WebSocketController{ + Manager: manager, + } +} + +// HandleWebSocket is the main handler for the /ws endpoint. +func (wc *WebSocketController) HandleWebSocket(c *websocket.Conn) { + // Mock Authentication for now based on C# example + // In a real scenario, this would involve JWT verification, session lookup, etc. + // For demonstration, we'll assume a dummy user and session. + // The C# code uses HttpContext.Items to get CurrentUser and CurrentSession. + // In Go Fiber, we can pass this through Locals or use middleware to set it up. + // For now, let's create a dummy user and session. + + // TODO: Replace with actual authentication logic + // For now, assume a dummy account and session + // Based on the C# code, CurrentUser and CurrentSession are pb.Account and pb.AuthSession + dummyAccount := &pb.Account{ + Id: uuid.New().String(), + Name: "dummy_user", + Nick: "Dummy User", + } + dummySession := &pb.AuthSession{ + ClientId: lo.ToPtr(uuid.New().String()), // This is used as deviceId if not present + } + + // Device ID handling + deviceAlt := c.Query("deviceAlt") + if deviceAlt != "" { + allowedDeviceAlternative := []string{"watch"} // Hardcoded for now + found := false + for _, alt := range allowedDeviceAlternative { + if deviceAlt == alt { + found = true + break + } + } + if !found { + log.Warn().Msgf("Unsupported device alternative: %s", deviceAlt) + bytes, _ := newErrorPacket("Unsupported device alternative: " + deviceAlt).ToBytes() + c.WriteMessage(websocket.BinaryMessage, bytes) + c.Close() + return + } + } + + accountID := uuid.MustParse(dummyAccount.Id) + deviceIDStr := "" + if dummySession.ClientId == nil { + deviceIDStr = uuid.New().String() + } else { + deviceIDStr = *dummySession.ClientId + } + if deviceAlt != "" { + deviceIDStr = fmt.Sprintf("%s+%s", deviceIDStr, deviceAlt) + } + + // Setup connection context for cancellation + cancel := func() {} // Placeholder + connectionKey := ConnectionKey{AccountID: accountID, DeviceID: deviceIDStr} + + // Add connection to manager + if !wc.Manager.TryAdd(connectionKey, c, cancel) { + bytes, _ := newErrorPacket("Too many connections from the same device and account.").ToBytes() + c.WriteMessage(websocket.BinaryMessage, bytes) + c.Close() + return + } + + log.Debug().Msgf("Connection established with user @%s#%s and device #%s", dummyAccount.Name, dummyAccount.Id, deviceIDStr) + + // Publish WebSocket connected event + wc.Manager.PublishWebSocketConnectedEvent(accountID, deviceIDStr, false) // isOffline is false on connection + + defer func() { + wc.Manager.Disconnect(connectionKey, "Client disconnected.") + // Publish WebSocket disconnected event + isOffline := !wc.Manager.GetAccountIsConnected(accountID) // Check if account is completely offline + wc.Manager.PublishWebSocketDisconnectedEvent(accountID, deviceIDStr, isOffline) + log.Debug().Msgf("Connection disconnected with user @%s#%s and device #%s", dummyAccount.Name, dummyAccount.Id, deviceIDStr) + }() + + // Main event loop + for { + mt, msg, err := c.ReadMessage() + if err != nil { + log.Error().Err(err).Msg("WebSocket read error") + break + } + + if mt == websocket.CloseMessage { + log.Info().Msg("Received close message from client") + break + } + + if mt != websocket.BinaryMessage { + log.Warn().Msgf("Received non-binary message type: %d", mt) + continue + } + + packet, err := FromBytes(msg) + if err != nil { + log.Error().Err(err).Msg("Failed to deserialize WebSocket packet") + bytes, _ := newErrorPacket("Failed to deserialize packet").ToBytes() + c.WriteMessage(websocket.BinaryMessage, bytes) + continue + } + + if err := wc.Manager.HandlePacket(dummyAccount, deviceIDStr, packet, c); err != nil { + log.Error().Err(err).Msg("Failed to handle incoming WebSocket packet") + bytes, _ := newErrorPacket("Failed to process packet").ToBytes() + c.WriteMessage(websocket.BinaryMessage, bytes) + // Depending on error, might want to close connection + } + } +} + +// newErrorPacket creates a new WebSocketPacket with an error type. +func newErrorPacket(message string) *WebSocketPacket { + return &WebSocketPacket{ + Type: WebSocketPacketTypeError, + ErrorMessage: message, + } +} diff --git a/pkg/ring/websocket/manager.go b/pkg/ring/websocket/manager.go new file mode 100644 index 0000000..bfe6acc --- /dev/null +++ b/pkg/ring/websocket/manager.go @@ -0,0 +1,292 @@ +package websocket + +import ( + "context" + "fmt" + "sync" + + "github.com/gofiber/contrib/v3/websocket" + "github.com/google/uuid" + "github.com/nats-io/nats.go" + "github.com/rs/zerolog/log" + "google.golang.org/protobuf/proto" // Import for proto.Marshal + "google.golang.org/protobuf/types/known/wrapperspb" + + pb "git.solsynth.dev/goatworks/turbine/pkg/shared/proto/gen" +) + +// ConnectionKey represents the unique identifier for a WebSocket connection. +type ConnectionKey struct { + AccountID uuid.UUID + DeviceID string +} + +// ConnectionState holds the WebSocket connection and its cancellation context. +type ConnectionState struct { + Conn *websocket.Conn + Cancel context.CancelFunc +} + +// Manager manages active WebSocket connections. +type Manager struct { + connections sync.Map // Map[ConnectionKey]*ConnectionState + natsClient *nats.Conn +} + +// NewManager creates a new WebSocket Manager. +func NewManager(natsClient *nats.Conn) *Manager { + return &Manager{ + natsClient: natsClient, + } +} + +// TryAdd attempts to add a new connection. If a connection with the same key exists, +// it disconnects the old one and then adds the new one. +func (m *Manager) TryAdd(key ConnectionKey, conn *websocket.Conn, cancel context.CancelFunc) bool { + // Disconnect existing connection with the same identifier, if any + if _, loaded := m.connections.Load(key); loaded { + log.Warn().Msgf("Duplicate connection detected for %s:%s. Disconnecting old one.", key.AccountID, key.DeviceID) + m.Disconnect(key, "Just connected somewhere else with the same identifier.") + } + + m.connections.Store(key, &ConnectionState{Conn: conn, Cancel: cancel}) + log.Info().Msgf("Connection established for user %s and device %s", key.AccountID, key.DeviceID) + return true +} + +// Disconnect removes a connection and closes it. +func (m *Manager) Disconnect(key ConnectionKey, reason string) { + if stateAny, loaded := m.connections.LoadAndDelete(key); loaded { + state := stateAny.(ConnectionState) + + // Cancel the context to stop any goroutines associated with this connection + if state.Cancel != nil { + state.Cancel() + } + + // Close the WebSocket connection + err := state.Conn.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseNormalClosure, reason)) + if err != nil { + log.Error().Err(err).Msgf("Error sending close message to WebSocket for %s:%s", key.AccountID, key.DeviceID) + } + err = state.Conn.Close() // Ensure the connection is closed + if err != nil { + log.Error().Err(err).Msgf("Error closing WebSocket for %s:%s", key.AccountID, key.DeviceID) + } + + log.Info().Msgf("Connection disconnected for user %s and device %s. Reason: %s", key.AccountID, key.DeviceID, reason) + } +} + +// GetDeviceIsConnected checks if any connection exists for a given device ID. +func (m *Manager) GetDeviceIsConnected(deviceID string) bool { + var isConnected bool + m.connections.Range(func(k, v interface{}) bool { + connKey := k.(ConnectionKey) + if connKey.DeviceID == deviceID { + isConnected = true + return false // Stop iteration + } + return true + }) + return isConnected +} + +// GetAccountIsConnected checks if any connection exists for a given account ID. +func (m *Manager) GetAccountIsConnected(accountID uuid.UUID) bool { + var isConnected bool + m.connections.Range(func(k, v interface{}) bool { + connKey := k.(ConnectionKey) + if connKey.AccountID == accountID { + isConnected = true + return false // Stop iteration + } + return true + }) + return isConnected +} + +// SendPacketToAccount sends a WebSocketPacket to all connections for a given account ID. +func (m *Manager) SendPacketToAccount(accountID uuid.UUID, packet *WebSocketPacket) { + packetBytes, err := packet.ToBytes() + if err != nil { + log.Error().Err(err).Msgf("Failed to marshal packet for account %s", accountID) + return + } + + m.connections.Range(func(k, v interface{}) bool { + connKey := k.(ConnectionKey) + if connKey.AccountID == accountID { + state := v.(*ConnectionState) + if state.Conn != nil { + err := state.Conn.WriteMessage(websocket.BinaryMessage, packetBytes) + if err != nil { + log.Error().Err(err).Msgf("Failed to send packet to account %s, device %s", accountID, connKey.DeviceID) + // Optionally, disconnect this problematic connection + // m.Disconnect(connKey, "Failed to send packet") + } + } + } + return true + }) +} + +// SendPacketToDevice sends a WebSocketPacket to all connections for a given device ID. +func (m *Manager) SendPacketToDevice(deviceID string, packet *WebSocketPacket) { + packetBytes, err := packet.ToBytes() + if err != nil { + log.Error().Err(err).Msgf("Failed to marshal packet for device %s", deviceID) + return + } + + m.connections.Range(func(k, v interface{}) bool { + connKey := k.(ConnectionKey) + if connKey.DeviceID == deviceID { + state := v.(*ConnectionState) + if state.Conn != nil { + err := state.Conn.WriteMessage(websocket.BinaryMessage, packetBytes) + if err != nil { + log.Error().Err(err).Msgf("Failed to send packet to device %s, account %s", deviceID, connKey.AccountID) + // Optionally, disconnect this problematic connection + // m.Disconnect(connKey, "Failed to send packet") + } + } + } + return true + }) +} + +// PublishWebSocketConnectedEvent publishes a WebSocketConnectedEvent to NATS. +func (m *Manager) PublishWebSocketConnectedEvent(accountID uuid.UUID, deviceID string, isOffline bool) { + if m.natsClient == nil { + log.Warn().Msg("NATS client not initialized. Cannot publish WebSocketConnectedEvent.") + return + } + + event := &pb.WebSocketConnectedEvent{ + AccountId: wrapperspb.String(accountID.String()), + DeviceId: deviceID, + IsOffline: isOffline, + } + eventBytes, err := proto.Marshal(event) + if err != nil { + log.Error().Err(err).Msg("Failed to marshal WebSocketConnectedEvent") + return + } + + // Assuming WebSocketConnectedEvent.Type is a constant or can be derived + // For now, let's use a hardcoded subject. This needs to be consistent with C# code. + // C# uses `WebSocketConnectedEvent.Type` + // TODO: Define NATS subjects in a centralized place or derive from proto events. + natsSubject := "turbine.websocket.connected" + err = m.natsClient.Publish(natsSubject, eventBytes) + if err != nil { + log.Error().Err(err).Msg("Failed to publish WebSocketConnectedEvent to NATS") + } else { + log.Info().Msgf("Published WebSocketConnectedEvent for %s:%s to NATS subject %s", accountID, deviceID, natsSubject) + } +} + +// PublishWebSocketDisconnectedEvent publishes a WebSocketDisconnectedEvent to NATS. +func (m *Manager) PublishWebSocketDisconnectedEvent(accountID uuid.UUID, deviceID string, isOffline bool) { + if m.natsClient == nil { + log.Warn().Msg("NATS client not initialized. Cannot publish WebSocketDisconnectedEvent.") + return + } + + event := &pb.WebSocketDisconnectedEvent{ + AccountId: wrapperspb.String(accountID.String()), + DeviceId: deviceID, + IsOffline: isOffline, + } + eventBytes, err := proto.Marshal(event) + if err != nil { + log.Error().Err(err).Msg("Failed to marshal WebSocketDisconnectedEvent") + return + } + + // Assuming WebSocketDisconnectedEvent.Type is a constant or can be derived + natsSubject := "turbine.websocket.disconnected" + err = m.natsClient.Publish(natsSubject, eventBytes) + if err != nil { + log.Error().Err(err).Msg("Failed to publish WebSocketDisconnectedEvent to NATS") + } else { + log.Info().Msgf("Published WebSocketDisconnectedEvent for %s:%s to NATS subject %s", accountID, deviceID, natsSubject) + } +} + +// HandlePacket processes incoming WebSocketPacket. +func (m *Manager) HandlePacket(currentUser *pb.Account, deviceID string, packet *WebSocketPacket, conn *websocket.Conn) error { + switch packet.Type { + case WebSocketPacketTypePing: + pongPacket := &WebSocketPacket{Type: WebSocketPacketTypePong} + pongBytes, err := pongPacket.ToBytes() + if err != nil { + log.Error().Err(err).Msg("Failed to marshal pong packet") + return err + } + return conn.WriteMessage(websocket.BinaryMessage, pongBytes) + case WebSocketPacketTypeError: + log.Error().Msgf("Received error packet from device %s: %s", deviceID, packet.ErrorMessage) + return nil // Or handle error appropriately + default: + if packet.Endpoint != "" { + return m.forwardPacketToNATS(currentUser, deviceID, packet) + } else { + errorPacket := &WebSocketPacket{ + Type: WebSocketPacketTypeError, + ErrorMessage: fmt.Sprintf("Unprocessable packet: %s", packet.Type), + } + errorBytes, err := errorPacket.ToBytes() + if err != nil { + log.Error().Err(err).Msg("Failed to marshal error packet") + return err + } + return conn.WriteMessage(websocket.BinaryMessage, errorBytes) + } + } +} + +func (m *Manager) forwardPacketToNATS(currentUser *pb.Account, deviceID string, packet *WebSocketPacket) error { + if m.natsClient == nil { + log.Warn().Msg("NATS client not initialized. Cannot forward packets to NATS.") + return fmt.Errorf("NATS client not initialized") + } + + packetBytes, err := packet.ToBytes() + if err != nil { + log.Error().Err(err).Msg("Failed to marshal WebSocketPacket for NATS forwarding") + return err + } + + // Convert currentUser.Id to string for the proto message + var accountIDStr string + if currentUser != nil && currentUser.Id != "" { + accountIDStr = currentUser.Id + } else { + log.Warn().Msg("CurrentUser or CurrentUser.Id is nil/empty for NATS forwarding") + return fmt.Errorf("current user ID is missing") + } + + event := &pb.WebSocketPacketEvent{ + AccountId: wrapperspb.String(accountIDStr), + DeviceId: deviceID, + PacketBytes: packetBytes, + } + eventBytes, err := proto.Marshal(event) + if err != nil { + log.Error().Err(err).Msg("Failed to marshal WebSocketPacketEvent for NATS") + return err + } + + // C# uses WebSocketPacketEvent.SubjectPrefix + endpoint + // TODO: Centralize NATS subject definitions + natsSubject := fmt.Sprintf("turbine.websocket.packet.%s", packet.Endpoint) + err = m.natsClient.Publish(natsSubject, eventBytes) + if err != nil { + log.Error().Err(err).Msg("Failed to publish WebSocketPacketEvent to NATS") + return err + } + log.Info().Msgf("Forwarded packet to NATS subject %s from device %s", natsSubject, deviceID) + return nil +} diff --git a/pkg/ring/websocket/models.go b/pkg/ring/websocket/models.go new file mode 100644 index 0000000..45214ad --- /dev/null +++ b/pkg/ring/websocket/models.go @@ -0,0 +1,82 @@ +package websocket + +import ( + "encoding/json" + "fmt" + + pb "git.solsynth.dev/goatworks/turbine/pkg/shared/proto/gen" + "google.golang.org/protobuf/types/known/wrapperspb" +) + +// WebSocketPacket represents a WebSocket message packet. +type WebSocketPacket struct { + Type string `json:"type"` + Data json.RawMessage `json:"data,omitempty"` // Use json.RawMessage to delay deserialization + Endpoint string `json:"endpoint,omitempty"` + ErrorMessage string `json:"error_message,omitempty"` +} + +// ToBytes serializes the WebSocketPacket to a byte array for sending over WebSocket. +func (w *WebSocketPacket) ToBytes() ([]byte, error) { + return json.Marshal(w) +} + +// FromBytes deserializes a byte array into a WebSocketPacket. +func FromBytes(bytes []byte) (*WebSocketPacket, error) { + var packet WebSocketPacket + err := json.Unmarshal(bytes, &packet) + if err != nil { + return nil, fmt.Errorf("failed to deserialize WebSocketPacket: %w", err) + } + return &packet, nil +} + +// GetData deserializes the Data property to the specified type T. +func (w *WebSocketPacket) GetData(v interface{}) error { + if w.Data == nil { + return nil + } + return json.Unmarshal(w.Data, v) +} + +// ToProtoValue converts the WebSocketPacket to its protobuf equivalent. +func (w *WebSocketPacket) ToProtoValue() *pb.WebSocketPacket { + var dataBytes []byte + if w.Data != nil { + dataBytes = w.Data + } + var errorMessage string + if w.ErrorMessage != "" { + errorMessage = w.ErrorMessage + } + return &pb.WebSocketPacket{ + Type: w.Type, + Data: dataBytes, + ErrorMessage: wrapperspb.String(errorMessage), + } +} + +// FromProtoValue converts a protobuf WebSocketPacket to its Go struct equivalent. +func FromProtoValue(packet *pb.WebSocketPacket) *WebSocketPacket { + var data json.RawMessage + if packet.Data != nil { + data = json.RawMessage(packet.Data) + } + var errorMessage string + if packet.ErrorMessage != nil { + errorMessage = packet.ErrorMessage.GetValue() + } + + return &WebSocketPacket{ + Type: packet.Type, + Data: data, + ErrorMessage: errorMessage, + } +} + +// WebSocketPacketType constants from C# example +const ( + WebSocketPacketTypePing = "ping" + WebSocketPacketTypePong = "pong" + WebSocketPacketTypeError = "error" +) diff --git a/pkg/shared/models/base.go b/pkg/shared/models/base.go new file mode 100644 index 0000000..4cd23e0 --- /dev/null +++ b/pkg/shared/models/base.go @@ -0,0 +1,14 @@ +package models + +import ( + "time" + + "gorm.io/gorm" +) + +type Model struct { + ID uint `gorm:"primarykey" json:"id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"created_at"` + DeletedAt gorm.DeletedAt `gorm:"index" json:"created_at"` +} diff --git a/pkg/shared/proto/account.proto b/pkg/shared/proto/account.proto new file mode 100644 index 0000000..610f2f0 --- /dev/null +++ b/pkg/shared/proto/account.proto @@ -0,0 +1,499 @@ +syntax = "proto3"; + +package proto; + +option csharp_namespace = "DysonNetwork.Shared.Proto"; + +option go_package = "git.solsynth.dev/goatworks/turbine/pkg/shared/proto/gen"; + +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; + +import 'file.proto'; +import 'wallet.proto'; + +// Account represents a user account in the system +message Account { + string id = 1; + string name = 2; + string nick = 3; + string language = 4; + string region = 18; + google.protobuf.Timestamp activated_at = 5; + bool is_superuser = 6; + + AccountProfile profile = 7; + optional SubscriptionReferenceObject perk_subscription = 16; + repeated AccountContact contacts = 8; + repeated AccountBadge badges = 9; + repeated AccountAuthFactor auth_factors = 10; + repeated AccountConnection connections = 11; + repeated Relationship outgoing_relationships = 12; + repeated Relationship incoming_relationships = 13; + + google.protobuf.Timestamp created_at = 14; + google.protobuf.Timestamp updated_at = 15; + + google.protobuf.StringValue automated_id = 17; +} + +// Enum for status attitude +enum StatusAttitude { + STATUS_ATTITUDE_UNSPECIFIED = 0; + POSITIVE = 1; + NEGATIVE = 2; + NEUTRAL = 3; +} + +// AccountStatus represents the status of an account +message AccountStatus { + string id = 1; + StatusAttitude attitude = 2; + bool is_online = 3; + bool is_customized = 4; + bool is_invisible = 5; + bool is_not_disturb = 6; + google.protobuf.StringValue label = 7; + google.protobuf.Timestamp cleared_at = 8; + string account_id = 9; + bytes meta = 10; +} + +message UsernameColor { + string type = 1; + google.protobuf.StringValue value = 2; + google.protobuf.StringValue direction = 3; + repeated string colors = 4; +} + +message ProfileLink { + string name = 1; + string url = 2; +} + +// Profile contains detailed information about a user +message AccountProfile { + string id = 1; + google.protobuf.StringValue first_name = 2; + google.protobuf.StringValue middle_name = 3; + google.protobuf.StringValue last_name = 4; + google.protobuf.StringValue bio = 5; + google.protobuf.StringValue gender = 6; + google.protobuf.StringValue pronouns = 7; + google.protobuf.StringValue time_zone = 8; + google.protobuf.StringValue location = 9; + google.protobuf.Timestamp birthday = 10; + google.protobuf.Timestamp last_seen_at = 11; + + VerificationMark verification = 12; + BadgeReferenceObject active_badge = 13; + + int32 experience = 14; + int32 level = 15; + double leveling_progress = 16; + double social_credits = 17; + int32 social_credits_level = 18; + + CloudFile picture = 19; + CloudFile background = 20; + + string account_id = 21; + + google.protobuf.Timestamp created_at = 22; + google.protobuf.Timestamp updated_at = 23; + optional UsernameColor username_color = 24; + repeated ProfileLink links = 25; +} + +// AccountContact represents a contact method for an account +message AccountContact { + string id = 1; + AccountContactType type = 2; + google.protobuf.Timestamp verified_at = 3; + bool is_primary = 4; + string content = 5; + string account_id = 6; + + google.protobuf.Timestamp created_at = 7; + google.protobuf.Timestamp updated_at = 8; +} + +// Enum for contact types +enum AccountContactType { + ACCOUNT_CONTACT_TYPE_UNSPECIFIED = 0; + EMAIL = 1; + PHONE_NUMBER = 2; + ADDRESS = 3; +} + +// AccountAuthFactor represents an authentication factor for an account +message AccountAuthFactor { + string id = 1; + AccountAuthFactorType type = 2; + google.protobuf.StringValue secret = 3; // Omitted from JSON serialization in original + map config = 4; // Omitted from JSON serialization in original + int32 trustworthy = 5; + google.protobuf.Timestamp enabled_at = 6; + google.protobuf.Timestamp expired_at = 7; + string account_id = 8; + map created_response = 9; // For initial setup + + google.protobuf.Timestamp created_at = 10; + google.protobuf.Timestamp updated_at = 11; +} + +// Enum for authentication factor types +enum AccountAuthFactorType { + AUTH_FACTOR_TYPE_UNSPECIFIED = 0; + PASSWORD = 1; + EMAIL_CODE = 2; + IN_APP_CODE = 3; + TIMED_CODE = 4; + PIN_CODE = 5; +} + +// AccountBadge represents a badge associated with an account +message AccountBadge { + string id = 1; // Unique identifier for the badge + string type = 2; // Type/category of the badge + google.protobuf.StringValue label = 3; // Display name of the badge + google.protobuf.StringValue caption = 4; // Optional description of the badge + map meta = 5; // Additional metadata for the badge + google.protobuf.Timestamp activated_at = 6; // When the badge was activated + google.protobuf.Timestamp expired_at = 7; // Optional expiration time + string account_id = 8; // ID of the account this badge belongs to + + google.protobuf.Timestamp created_at = 9; + google.protobuf.Timestamp updated_at = 10; +} + +// AccountConnection represents a third-party connection for an account +message AccountConnection { + string id = 1; + string provider = 2; + string provided_identifier = 3; + map meta = 4; + google.protobuf.StringValue access_token = 5; // Omitted from JSON serialization + google.protobuf.StringValue refresh_token = 6; // Omitted from JSON serialization + google.protobuf.Timestamp last_used_at = 7; + string account_id = 8; + + google.protobuf.Timestamp created_at = 9; + google.protobuf.Timestamp updated_at = 10; +} + +// VerificationMark represents verification status +message VerificationMark { + VerificationMarkType type = 1; + string title = 2; + string description = 3; + string verified_by = 4; + + google.protobuf.Timestamp created_at = 5; + google.protobuf.Timestamp updated_at = 6; +} + +enum VerificationMarkType { + VERIFICATION_MARK_TYPE_UNSPECIFIED = 0; + OFFICIAL = 1; + INDIVIDUAL = 2; + ORGANIZATION = 3; + GOVERNMENT = 4; + CREATOR = 5; + DEVELOPER = 6; + PARODY = 7; +} + +// BadgeReferenceObject represents a reference to a badge with minimal information +message BadgeReferenceObject { + string id = 1; // Unique identifier for the badge + string type = 2; // Type/category of the badge + google.protobuf.StringValue label = 3; // Display name of the badge + google.protobuf.StringValue caption = 4; // Optional description of the badge + map meta = 5; // Additional metadata for the badge + google.protobuf.Timestamp activated_at = 6; // When the badge was activated + google.protobuf.Timestamp expired_at = 7; // Optional expiration time + string account_id = 8; // ID of the account this badge belongs to +} + +// Relationship represents a connection between two accounts +message Relationship { + string account_id = 1; + string related_id = 2; + optional Account account = 3; + optional Account related = 4; + int32 status = 5; + + google.protobuf.Timestamp created_at = 6; + google.protobuf.Timestamp updated_at = 7; +} + +// Leveling information +message LevelingInfo { + int32 current_level = 1; + int32 current_experience = 2; + int32 next_level_experience = 3; + int32 previous_level_experience = 4; + double level_progress = 5; + repeated int32 experience_per_level = 6; +} + +// ActionLog represents a record of an action taken by a user +message ActionLog { + string id = 1; // Unique identifier for the log entry + string action = 2; // The action that was performed, e.g., "user.login" + map meta = 3; // Metadata associated with the action + google.protobuf.StringValue user_agent = 4; // User agent of the client + google.protobuf.StringValue ip_address = 5; // IP address of the client + google.protobuf.StringValue location = 6; // Geographic location of the client, derived from IP + string account_id = 7; // The account that performed the action + google.protobuf.StringValue session_id = 8; // The session in which the action was performed + + google.protobuf.Timestamp created_at = 9; // When the action log was created +} + +message GetAccountStatusBatchResponse { + repeated AccountStatus statuses = 1; +} + +// ==================================== +// Service Definitions +// ==================================== + +// AccountService provides CRUD operations for user accounts and related entities +service AccountService { + // Account Operations + rpc GetAccount(GetAccountRequest) returns (Account) {} + rpc GetBotAccount(GetBotAccountRequest) returns (Account) {} + rpc GetAccountBatch(GetAccountBatchRequest) returns (GetAccountBatchResponse) {} + rpc GetBotAccountBatch(GetBotAccountBatchRequest) returns (GetAccountBatchResponse) {} + rpc LookupAccountBatch(LookupAccountBatchRequest) returns (GetAccountBatchResponse) {} + rpc SearchAccount(SearchAccountRequest) returns (GetAccountBatchResponse) {} + rpc ListAccounts(ListAccountsRequest) returns (ListAccountsResponse) {} + + rpc GetAccountStatus(GetAccountRequest) returns (AccountStatus) {} + rpc GetAccountStatusBatch(GetAccountBatchRequest) returns (GetAccountStatusBatchResponse) {} + + // Profile Operations + rpc GetProfile(GetProfileRequest) returns (AccountProfile) {} + + // Contact Operations + rpc ListContacts(ListContactsRequest) returns (ListContactsResponse) {} + + // Badge Operations + rpc ListBadges(ListBadgesRequest) returns (ListBadgesResponse) {} + + // Authentication Factor Operations + rpc ListAuthFactors(ListAuthFactorsRequest) returns (ListAuthFactorsResponse) {} + + // Connection Operations + rpc ListConnections(ListConnectionsRequest) returns (ListConnectionsResponse) {} + + // Relationship Operations + rpc ListRelationships(ListRelationshipsRequest) returns (ListRelationshipsResponse) {} + + rpc GetRelationship(GetRelationshipRequest) returns (GetRelationshipResponse) {} + rpc HasRelationship(GetRelationshipRequest) returns (google.protobuf.BoolValue) {} + rpc ListFriends(ListRelationshipSimpleRequest) returns (ListRelationshipSimpleResponse) {} + rpc ListBlocked(ListRelationshipSimpleRequest) returns (ListRelationshipSimpleResponse) {} +} + +// ActionLogService provides operations for action logs +service ActionLogService { + rpc CreateActionLog(CreateActionLogRequest) returns (CreateActionLogResponse) {} + rpc ListActionLogs(ListActionLogsRequest) returns (ListActionLogsResponse) {} +} + +// ==================================== +// Request/Response Messages +// ==================================== + +// ActionLog Requests/Responses +message CreateActionLogRequest { + string action = 1; + map meta = 2; + google.protobuf.StringValue user_agent = 3; + google.protobuf.StringValue ip_address = 4; + google.protobuf.StringValue location = 5; + string account_id = 6; + google.protobuf.StringValue session_id = 7; +} + +message CreateActionLogResponse { + ActionLog action_log = 1; +} + +message ListActionLogsRequest { + string account_id = 1; + string action = 2; + int32 page_size = 3; + string page_token = 4; + string order_by = 5; +} + +message ListActionLogsResponse { + repeated ActionLog action_logs = 1; + string next_page_token = 2; + int32 total_size = 3; +} + +// Account Requests/Responses +message GetAccountRequest { + string id = 1; // Account ID to retrieve +} + +message GetBotAccountRequest { + string automated_id = 1; +} + +message GetAccountBatchRequest { + repeated string id = 1; // Account ID to retrieve +} + +message GetBotAccountBatchRequest { + repeated string automated_id = 1; +} + +message LookupAccountBatchRequest { + repeated string names = 1; +} + +message SearchAccountRequest { + string query = 1; +} + +message GetAccountBatchResponse { + repeated Account accounts = 1; // List of accounts +} + +message CreateAccountRequest { + string name = 1; // Required: Unique username + string nick = 2; // Optional: Display name + string language = 3; // Default language + bool is_superuser = 4; // Admin flag + AccountProfile profile = 5; // Initial profile data +} + +message UpdateAccountRequest { + string id = 1; // Account ID to update + google.protobuf.StringValue name = 2; // New username if changing + google.protobuf.StringValue nick = 3; // New display name + google.protobuf.StringValue language = 4; // New language + google.protobuf.BoolValue is_superuser = 5; // Admin status +} + +message DeleteAccountRequest { + string id = 1; // Account ID to delete + bool purge = 2; // If true, permanently delete instead of soft delete +} + +message ListAccountsRequest { + int32 page_size = 1; // Number of results per page + string page_token = 2; // Token for pagination + string filter = 3; // Filter expression + string order_by = 4; // Sort order +} + +message ListAccountsResponse { + repeated Account accounts = 1; // List of accounts + string next_page_token = 2; // Token for next page + int32 total_size = 3; // Total number of accounts +} + +// Profile Requests/Responses +message GetProfileRequest { + string account_id = 1; // Account ID to get profile for +} + +message UpdateProfileRequest { + string account_id = 1; // Account ID to update profile for + AccountProfile profile = 2; // Profile data to update + google.protobuf.FieldMask update_mask = 3; // Fields to update +} + +// Contact Requests/Responses +message AddContactRequest { + string account_id = 1; // Account to add contact to + AccountContactType type = 2; // Type of contact + string content = 3; // Contact content (email, phone, etc.) + bool is_primary = 4; // If this should be the primary contact +} + +message ListContactsRequest { + string account_id = 1; // Account ID to list contacts for + AccountContactType type = 2; // Optional: filter by type + bool verified_only = 3; // Only return verified contacts +} + +message ListContactsResponse { + repeated AccountContact contacts = 1; // List of contacts +} + +message VerifyContactRequest { + string id = 1; // Contact ID to verify + string account_id = 2; // Account ID (for validation) + string code = 3; // Verification code +} + +// Badge Requests/Responses +message ListBadgesRequest { + string account_id = 1; // Account to list badges for + string type = 2; // Optional: filter by type + bool active_only = 3; // Only return active (non-expired) badges +} + +message ListBadgesResponse { + repeated AccountBadge badges = 1; // List of badges +} + +message ListAuthFactorsRequest { + string account_id = 1; // Account to list factors for + bool active_only = 2; // Only return active (non-expired) factors +} + +message ListAuthFactorsResponse { + repeated AccountAuthFactor factors = 1; // List of auth factors +} + +message ListConnectionsRequest { + string account_id = 1; // Account to list connections for + string provider = 2; // Optional: filter by provider +} + +message ListConnectionsResponse { + repeated AccountConnection connections = 1; // List of connections +} + +// Relationship Requests/Responses +message ListRelationshipsRequest { + string account_id = 1; // Account to list relationships for + optional int32 status = 2; // Filter by status + int32 page_size = 5; // Number of results per page + string page_token = 6; // Token for pagination +} + +message ListRelationshipsResponse { + repeated Relationship relationships = 1; // List of relationships + string next_page_token = 2; // Token for next page + int32 total_size = 3; // Total number of relationships +} + +message GetRelationshipRequest { + string account_id = 1; + string related_id = 2; + optional int32 status = 3; +} + +message GetRelationshipResponse { + optional Relationship relationship = 1; +} + +message ListRelationshipSimpleRequest { + string account_id = 1; +} + +message ListRelationshipSimpleResponse { + repeated string accounts_id = 1; +} diff --git a/pkg/shared/proto/auth.proto b/pkg/shared/proto/auth.proto new file mode 100644 index 0000000..f0ab3ec --- /dev/null +++ b/pkg/shared/proto/auth.proto @@ -0,0 +1,212 @@ +syntax = "proto3"; + +package proto; + +option csharp_namespace = "DysonNetwork.Shared.Proto"; + +option go_package = "git.solsynth.dev/goatworks/turbine/pkg/shared/proto/gen"; + +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "google/protobuf/struct.proto"; + +import "account.proto"; + +// Represents a user session +message AuthSession { + string id = 1; + optional google.protobuf.Timestamp last_granted_at = 3; + optional google.protobuf.Timestamp expired_at = 4; + string account_id = 5; + Account account = 6; + google.protobuf.StringValue app_id = 9; + optional string client_id = 10; + optional string parent_session_id = 11; + AuthClient client = 12; + repeated string audiences = 13; + repeated string scopes = 14; + google.protobuf.StringValue ip_address = 15; + google.protobuf.StringValue user_agent = 16; + SessionType type = 17; +} + +// Represents an authentication challenge +message AuthChallenge { + string id = 1; + google.protobuf.Timestamp expired_at = 2; + int32 step_remain = 3; + int32 step_total = 4; + int32 failed_attempts = 5; + repeated string blacklist_factors = 8; + repeated string audiences = 9; + repeated string scopes = 10; + google.protobuf.StringValue ip_address = 11; + google.protobuf.StringValue user_agent = 12; + google.protobuf.StringValue device_id = 13; + google.protobuf.StringValue nonce = 14; + // Point location is omitted as there is no direct proto equivalent. + string account_id = 15; + google.protobuf.StringValue device_name = 16; + ClientPlatform platform = 17; +} + +message AuthClient { + string id = 1; + ClientPlatform platform = 2; + google.protobuf.StringValue device_name = 3; + google.protobuf.StringValue device_label = 4; + string device_id = 5; + string account_id = 6; +} + +// Enum for challenge types +enum SessionType { + CHALLENGE_TYPE_UNSPECIFIED = 0; + LOGIN = 1; + OAUTH = 2; + OIDC = 3; +} + +// Enum for client platforms +enum ClientPlatform { + CLIENT_PLATFORM_UNSPECIFIED = 0; + UNIDENTIFIED = 1; + WEB = 2; + IOS = 3; + ANDROID = 4; + MACOS = 5; + WINDOWS = 6; + LINUX = 7; +} + +service AuthService { + rpc Authenticate(AuthenticateRequest) returns (AuthenticateResponse) {} + + rpc ValidatePin(ValidatePinRequest) returns (ValidateResponse) {} + rpc ValidateCaptcha(ValidateCaptchaRequest) returns (ValidateResponse) {} +} + +message AuthenticateRequest { + string token = 1; + optional google.protobuf.StringValue ip_address = 2; +} + +message AuthenticateResponse { + bool valid = 1; + optional string message = 2; + optional AuthSession session = 3; +} + +message ValidatePinRequest { + string account_id = 1; + string pin = 2; +} + +message ValidateCaptchaRequest { + string token = 1; +} + +message ValidateResponse { + bool valid = 1; +} + +enum PermissionNodeActorType { + ACCOUNT = 0; + GROUP = 1; +} + +// Permission related messages and services +message PermissionNode { + string id = 1; + string actor = 2; + PermissionNodeActorType type = 3; + string key = 4; + google.protobuf.Value value = 5; // Using Value to represent generic type + google.protobuf.Timestamp expired_at = 6; + google.protobuf.Timestamp affected_at = 7; + string group_id = 8; // Optional group ID +} + +message PermissionGroup { + string id = 1; + string name = 2; + google.protobuf.Timestamp created_at = 3; +} + +message HasPermissionRequest { + string actor = 1; + string key = 2; + optional PermissionNodeActorType type = 3; +} + +message HasPermissionResponse { + bool has_permission = 1; +} + +message GetPermissionRequest { + string actor = 1; + optional PermissionNodeActorType type = 2; + string key = 3; +} + +message GetPermissionResponse { + google.protobuf.Value value = 1; // Using Value to represent generic type +} + +message AddPermissionNodeRequest { + string actor = 1; + optional PermissionNodeActorType type = 2; + string key = 3; + google.protobuf.Value value = 4; + google.protobuf.Timestamp expired_at = 5; + google.protobuf.Timestamp affected_at = 6; +} + +message AddPermissionNodeResponse { + PermissionNode node = 1; +} + +message AddPermissionNodeToGroupRequest { + PermissionGroup group = 1; + string actor = 2; + optional PermissionNodeActorType type = 3; + string key = 4; + google.protobuf.Value value = 5; + google.protobuf.Timestamp expired_at = 6; + google.protobuf.Timestamp affected_at = 7; +} + +message AddPermissionNodeToGroupResponse { + PermissionNode node = 1; +} + +message RemovePermissionNodeRequest { + string actor = 1; + optional PermissionNodeActorType type = 2; + string key = 3; +} + +message RemovePermissionNodeResponse { + bool success = 1; +} + +message RemovePermissionNodeFromGroupRequest { + PermissionGroup group = 1; + string actor = 2; + string key = 4; +} + +message RemovePermissionNodeFromGroupResponse { + bool success = 1; +} + +service PermissionService { + rpc HasPermission(HasPermissionRequest) returns (HasPermissionResponse) {} + rpc GetPermission(GetPermissionRequest) returns (GetPermissionResponse) {} + rpc AddPermissionNode(AddPermissionNodeRequest) returns (AddPermissionNodeResponse) {} + rpc AddPermissionNodeToGroup(AddPermissionNodeToGroupRequest) returns (AddPermissionNodeToGroupResponse) {} + rpc RemovePermissionNode(RemovePermissionNodeRequest) returns (RemovePermissionNodeResponse) {} + rpc RemovePermissionNodeFromGroup(RemovePermissionNodeFromGroupRequest) + returns (RemovePermissionNodeFromGroupResponse) {} +} + diff --git a/pkg/shared/proto/develop.proto b/pkg/shared/proto/develop.proto new file mode 100644 index 0000000..c60df0d --- /dev/null +++ b/pkg/shared/proto/develop.proto @@ -0,0 +1,187 @@ +syntax = "proto3"; + +package proto; + +option csharp_namespace = "DysonNetwork.Shared.Proto"; + +option go_package = "git.solsynth.dev/goatworks/turbine/pkg/shared/proto/gen"; + +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "account.proto"; +import "file.proto"; + +message CustomAppOauthConfig { + string client_uri = 1; + repeated string redirect_uris = 2; + repeated string post_logout_redirect_uris = 3; + repeated string allowed_scopes = 4; + repeated string allowed_grant_types = 5; + bool require_pkce = 6; + bool allow_offline_access = 7; +} + +message CustomAppLinks { + string home_page = 1; + string privacy_policy = 2; + string terms_of_service = 3; +} + +enum CustomAppStatus { + CUSTOM_APP_STATUS_UNSPECIFIED = 0; + DEVELOPING = 1; + STAGING = 2; + PRODUCTION = 3; + SUSPENDED = 4; +} + +message CustomApp { + string id = 1; + string slug = 2; + string name = 3; + string description = 4; + CustomAppStatus status = 5; + + // jsonb columns represented as bytes + CloudFile picture = 6; + CloudFile background = 7; + VerificationMark verification = 8; + CustomAppLinks links = 9; + CustomAppOauthConfig oauth_config = 13; + + string project_id = 10; + + google.protobuf.Timestamp created_at = 11; + google.protobuf.Timestamp updated_at = 12; +} + +message CustomAppSecret { + string id = 1; + string secret = 2; + string description = 3; + google.protobuf.Timestamp expired_at = 4; + bool is_oidc = 5; + + string app_id = 6; + + google.protobuf.Timestamp created_at = 7; + google.protobuf.Timestamp updated_at = 8; +} + +message GetCustomAppRequest { + oneof Query { + string id = 1; + string slug = 2; + } +} + +message GetCustomAppResponse { + CustomApp app = 1; +} + +message CheckCustomAppSecretRequest { + oneof SecretIdentifier { + string secret_id = 1; + string app_id = 2; + } + string secret = 3; + optional bool is_oidc = 4; +} + +message CheckCustomAppSecretResponse { + bool valid = 1; +} + +service CustomAppService { + rpc GetCustomApp(GetCustomAppRequest) returns (GetCustomAppResponse); + rpc CheckCustomAppSecret(CheckCustomAppSecretRequest) returns (CheckCustomAppSecretResponse); +} + +// BotAccount represents a bot account in the system +// It extends the base Account with bot-specific fields +message BotAccount { + // Base account information + Account account = 1; + + // Bot-specific information + string slug = 2; // Unique identifier for the bot + bool is_active = 3; // Whether the bot is currently active + string automated_id = 5; // The bot ID + + // Timestamps + google.protobuf.Timestamp created_at = 6; + google.protobuf.Timestamp updated_at = 7; +} + +// Request/Response messages for BotAccount operations +message CreateBotAccountRequest { + Account account = 1; + string automated_id = 2; + google.protobuf.StringValue picture_id = 8; + google.protobuf.StringValue background_id = 9; +} + +message CreateBotAccountResponse { + BotAccount bot = 1; // The created bot account +} + +message UpdateBotAccountRequest { + string automated_id = 1; // ID of the bot account to update + Account account = 2; // Updated account information + optional string picture_id = 8; + optional string background_id = 9; +} + +message UpdateBotAccountResponse { + BotAccount bot = 1; // The updated bot account +} + +message DeleteBotAccountRequest { + string automated_id = 1; // ID of the bot account to delete + bool force = 2; // Whether to force delete (bypass soft delete) +} + +message DeleteBotAccountResponse { + bool success = 1; // Whether the deletion was successful +} + +message ApiKey { + string id = 1; + string label = 2; + string account_id = 3; + string session_id = 4; + google.protobuf.StringValue key = 5; + google.protobuf.Timestamp created_at = 6; + google.protobuf.Timestamp updated_at = 7; +} + +message GetApiKeyRequest { + string id = 1; +} + +message ListApiKeyRequest { + string automated_id = 1; +} + +message GetApiKeyBatchResponse { + repeated ApiKey data = 1; +} + +message DeleteApiKeyResponse { + bool success = 1; +} + +// This service should be implemented by the Pass service to handle the creation, update, and deletion of bot accounts +service BotAccountReceiverService { + rpc CreateBotAccount(CreateBotAccountRequest) returns (CreateBotAccountResponse); + rpc UpdateBotAccount(UpdateBotAccountRequest) returns (UpdateBotAccountResponse); + rpc DeleteBotAccount(DeleteBotAccountRequest) returns (DeleteBotAccountResponse); + + rpc GetApiKey(GetApiKeyRequest) returns (ApiKey); + rpc ListApiKey(ListApiKeyRequest) returns (GetApiKeyBatchResponse); + rpc CreateApiKey(ApiKey) returns (ApiKey); + rpc UpdateApiKey(ApiKey) returns (ApiKey); + rpc RotateApiKey(GetApiKeyRequest) returns (ApiKey); + rpc DeleteApiKey(GetApiKeyRequest) returns (DeleteApiKeyResponse); +} + diff --git a/pkg/shared/proto/file.proto b/pkg/shared/proto/file.proto new file mode 100644 index 0000000..1c2b22e --- /dev/null +++ b/pkg/shared/proto/file.proto @@ -0,0 +1,304 @@ +syntax = "proto3"; + +package proto; + +option csharp_namespace = "DysonNetwork.Shared.Proto"; + +option go_package = "git.solsynth.dev/goatworks/turbine/pkg/shared/proto/gen"; + +import "google/protobuf/timestamp.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/duration.proto"; + +// CloudFile represents a reference to a file stored in cloud storage. +// It contains metadata about the file that won't change, helping to reduce database load. +message CloudFile { + // Unique identifier for the file + string id = 1; + + // Original name of the file + string name = 2; + + // The metadata uses JSON bytes to store to keep the data structure over gRPC + // File metadata (e.g., dimensions, duration, etc.) + bytes file_meta = 3; + // User-defined metadata + bytes user_meta = 4; + optional bytes sensitive_marks = 12; + + // MIME type of the file + string mime_type = 5; + + // File content hash (e.g., MD5, SHA-256) + string hash = 6; + + // File size in bytes + int64 size = 7; + + // Indicates if the file is stored with compression + bool has_compression = 8; + + // URL to access the file + string url = 9; + + // Content type of the file + string content_type = 10; + + // When the file was uploaded + google.protobuf.Timestamp uploaded_at = 11; +} + +// Service for file operations +service FileService { + // Get file reference by ID + rpc GetFile(GetFileRequest) returns (CloudFile); + rpc GetFileBatch(GetFileBatchRequest) returns (GetFileBatchResponse); + + // Update an existing file reference + rpc UpdateFile(UpdateFileRequest) returns (CloudFile); + + // Delete a file reference + rpc DeleteFile(DeleteFileRequest) returns (google.protobuf.Empty); + + // Load files from references + rpc LoadFromReference(LoadFromReferenceRequest) returns (LoadFromReferenceResponse); + + // Check if a file is referenced by any resource + rpc IsReferenced(IsReferencedRequest) returns (IsReferencedResponse); + + // Purge cache for a file + rpc PurgeCache(PurgeCacheRequest) returns (google.protobuf.Empty); +} + +// Request message for GetFile +message GetFileRequest { + string id = 1; +} + +message GetFileBatchRequest { + repeated string ids = 1; +} + +message GetFileBatchResponse { + repeated CloudFile files = 1; +} + +// Request message for UpdateFile +message UpdateFileRequest { + CloudFile file = 1; + google.protobuf.FieldMask update_mask = 2; +} + +message FileMetadata { + string file_id = 1; + string file_name = 2; + string content_type = 3; + string account_id = 4; +} + +message UploadMetadata { + string file_id = 1; + string target_remote = 2; + string suffix = 3; + string content_type = 4; +} + +message DeleteFileRequest { + string id = 1; + bool purge = 2; +} + +message LoadFromReferenceRequest { + repeated string reference_ids = 1; +} + +message LoadFromReferenceResponse { + repeated CloudFile files = 1; +} + +message GetReferenceCountRequest { + string file_id = 1; +} + +message GetReferenceCountResponse { + int32 count = 1; +} + +message IsReferencedRequest { + string file_id = 1; +} + +message IsReferencedResponse { + bool is_referenced = 1; +} + +message PurgeCacheRequest { + string file_id = 1; +} + +// CloudFileReference represents a reference to a CloudFile with additional metadata +// about its usage in the system. +message CloudFileReference { + // Unique identifier for the reference + string id = 1; + + // Reference to the actual file + string file_id = 2; + + // The actual file data (optional, can be populated when needed) + CloudFile file = 3; + + // Description of how this file is being used + string usage = 4; + + // ID of the resource that this file is associated with + string resource_id = 5; + + // Optional expiration timestamp for the reference + google.protobuf.Timestamp expired_at = 6; +} + +// Request/Response messages for FileReferenceService +message CreateReferenceRequest { + string file_id = 1; + string usage = 2; + string resource_id = 3; + optional google.protobuf.Timestamp expired_at = 4; + optional google.protobuf.Duration duration = 5; // Alternative to expired_at +} + +message CreateReferenceBatchRequest { + repeated string files_id = 1; + string usage = 2; + string resource_id = 3; + optional google.protobuf.Timestamp expired_at = 4; + optional google.protobuf.Duration duration = 5; // Alternative to expired_at +} + +message CreateReferenceBatchResponse { + repeated CloudFileReference references = 1; +} + +message GetReferencesRequest { + string file_id = 1; +} + +message GetReferencesResponse { + repeated CloudFileReference references = 1; +} + +message GetResourceReferencesRequest { + string resource_id = 1; + string usage = 2; // Optional +} + +message GetResourceFilesRequest { + string resource_id = 1; + optional string usage = 2; +} + +message GetResourceFilesResponse { + repeated CloudFile files = 1; +} + +message DeleteResourceReferencesRequest { + string resource_id = 1; + optional string usage = 2; +} + +message DeleteResourceReferencesBatchRequest { + repeated string resource_ids = 1; + optional string usage = 2; +} + +message DeleteResourceReferencesResponse { + int32 deleted_count = 1; +} + +message DeleteReferenceRequest { + string reference_id = 1; +} + +message DeleteReferenceResponse { + bool success = 1; +} + +message UpdateResourceFilesRequest { + string resource_id = 1; + repeated string file_ids = 2; + string usage = 3; + google.protobuf.Timestamp expired_at = 4; + google.protobuf.Duration duration = 5; // Alternative to expired_at +} + +message UpdateResourceFilesResponse { + repeated CloudFileReference references = 1; +} + +message SetReferenceExpirationRequest { + string reference_id = 1; + google.protobuf.Timestamp expired_at = 2; + google.protobuf.Duration duration = 3; // Alternative to expired_at +} + +message SetReferenceExpirationResponse { + bool success = 1; +} + +message SetFileReferencesExpirationRequest { + string file_id = 1; + google.protobuf.Timestamp expired_at = 2; +} + +message SetFileReferencesExpirationResponse { + int32 updated_count = 1; +} + +message HasFileReferencesRequest { + string file_id = 1; +} + +message HasFileReferencesResponse { + bool has_references = 1; +} + +// Service for managing file references +service FileReferenceService { + // Creates a new reference to a file for a specific resource + rpc CreateReference(CreateReferenceRequest) returns (CloudFileReference); + rpc CreateReferenceBatch(CreateReferenceBatchRequest) returns (CreateReferenceBatchResponse); + + // Gets all references to a file + rpc GetReferences(GetReferencesRequest) returns (GetReferencesResponse); + + // Gets the number of references to a file + rpc GetReferenceCount(GetReferenceCountRequest) returns (GetReferenceCountResponse); + + // Gets all references for a specific resource and optional usage + rpc GetResourceReferences(GetResourceReferencesRequest) returns (GetReferencesResponse); + + // Gets all files referenced by a resource with optional usage filter + rpc GetResourceFiles(GetResourceFilesRequest) returns (GetResourceFilesResponse); + + // Deletes references for a specific resource and optional usage + rpc DeleteResourceReferences(DeleteResourceReferencesRequest) returns (DeleteResourceReferencesResponse); + + // Deletes references for multiple specific resources and optional usage + rpc DeleteResourceReferencesBatch(DeleteResourceReferencesBatchRequest) returns (DeleteResourceReferencesResponse); + + // Deletes a specific file reference + rpc DeleteReference(DeleteReferenceRequest) returns (DeleteReferenceResponse); + + // Updates the files referenced by a resource + rpc UpdateResourceFiles(UpdateResourceFilesRequest) returns (UpdateResourceFilesResponse); + + // Updates the expiration time for a file reference + rpc SetReferenceExpiration(SetReferenceExpirationRequest) returns (SetReferenceExpirationResponse); + + // Updates the expiration time for all references to a file + rpc SetFileReferencesExpiration(SetFileReferencesExpirationRequest) returns (SetFileReferencesExpirationResponse); + + // Checks if a file has any references + rpc HasFileReferences(HasFileReferencesRequest) returns (HasFileReferencesResponse); +} diff --git a/pkg/shared/proto/gen/account.pb.go b/pkg/shared/proto/gen/account.pb.go new file mode 100644 index 0000000..f00b2de --- /dev/null +++ b/pkg/shared/proto/gen/account.pb.go @@ -0,0 +1,4474 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.10 +// protoc v6.33.1 +// source: account.proto + +package gen + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + structpb "google.golang.org/protobuf/types/known/structpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Enum for status attitude +type StatusAttitude int32 + +const ( + StatusAttitude_STATUS_ATTITUDE_UNSPECIFIED StatusAttitude = 0 + StatusAttitude_POSITIVE StatusAttitude = 1 + StatusAttitude_NEGATIVE StatusAttitude = 2 + StatusAttitude_NEUTRAL StatusAttitude = 3 +) + +// Enum value maps for StatusAttitude. +var ( + StatusAttitude_name = map[int32]string{ + 0: "STATUS_ATTITUDE_UNSPECIFIED", + 1: "POSITIVE", + 2: "NEGATIVE", + 3: "NEUTRAL", + } + StatusAttitude_value = map[string]int32{ + "STATUS_ATTITUDE_UNSPECIFIED": 0, + "POSITIVE": 1, + "NEGATIVE": 2, + "NEUTRAL": 3, + } +) + +func (x StatusAttitude) Enum() *StatusAttitude { + p := new(StatusAttitude) + *p = x + return p +} + +func (x StatusAttitude) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StatusAttitude) Descriptor() protoreflect.EnumDescriptor { + return file_account_proto_enumTypes[0].Descriptor() +} + +func (StatusAttitude) Type() protoreflect.EnumType { + return &file_account_proto_enumTypes[0] +} + +func (x StatusAttitude) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use StatusAttitude.Descriptor instead. +func (StatusAttitude) EnumDescriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{0} +} + +// Enum for contact types +type AccountContactType int32 + +const ( + AccountContactType_ACCOUNT_CONTACT_TYPE_UNSPECIFIED AccountContactType = 0 + AccountContactType_EMAIL AccountContactType = 1 + AccountContactType_PHONE_NUMBER AccountContactType = 2 + AccountContactType_ADDRESS AccountContactType = 3 +) + +// Enum value maps for AccountContactType. +var ( + AccountContactType_name = map[int32]string{ + 0: "ACCOUNT_CONTACT_TYPE_UNSPECIFIED", + 1: "EMAIL", + 2: "PHONE_NUMBER", + 3: "ADDRESS", + } + AccountContactType_value = map[string]int32{ + "ACCOUNT_CONTACT_TYPE_UNSPECIFIED": 0, + "EMAIL": 1, + "PHONE_NUMBER": 2, + "ADDRESS": 3, + } +) + +func (x AccountContactType) Enum() *AccountContactType { + p := new(AccountContactType) + *p = x + return p +} + +func (x AccountContactType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AccountContactType) Descriptor() protoreflect.EnumDescriptor { + return file_account_proto_enumTypes[1].Descriptor() +} + +func (AccountContactType) Type() protoreflect.EnumType { + return &file_account_proto_enumTypes[1] +} + +func (x AccountContactType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AccountContactType.Descriptor instead. +func (AccountContactType) EnumDescriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{1} +} + +// Enum for authentication factor types +type AccountAuthFactorType int32 + +const ( + AccountAuthFactorType_AUTH_FACTOR_TYPE_UNSPECIFIED AccountAuthFactorType = 0 + AccountAuthFactorType_PASSWORD AccountAuthFactorType = 1 + AccountAuthFactorType_EMAIL_CODE AccountAuthFactorType = 2 + AccountAuthFactorType_IN_APP_CODE AccountAuthFactorType = 3 + AccountAuthFactorType_TIMED_CODE AccountAuthFactorType = 4 + AccountAuthFactorType_PIN_CODE AccountAuthFactorType = 5 +) + +// Enum value maps for AccountAuthFactorType. +var ( + AccountAuthFactorType_name = map[int32]string{ + 0: "AUTH_FACTOR_TYPE_UNSPECIFIED", + 1: "PASSWORD", + 2: "EMAIL_CODE", + 3: "IN_APP_CODE", + 4: "TIMED_CODE", + 5: "PIN_CODE", + } + AccountAuthFactorType_value = map[string]int32{ + "AUTH_FACTOR_TYPE_UNSPECIFIED": 0, + "PASSWORD": 1, + "EMAIL_CODE": 2, + "IN_APP_CODE": 3, + "TIMED_CODE": 4, + "PIN_CODE": 5, + } +) + +func (x AccountAuthFactorType) Enum() *AccountAuthFactorType { + p := new(AccountAuthFactorType) + *p = x + return p +} + +func (x AccountAuthFactorType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AccountAuthFactorType) Descriptor() protoreflect.EnumDescriptor { + return file_account_proto_enumTypes[2].Descriptor() +} + +func (AccountAuthFactorType) Type() protoreflect.EnumType { + return &file_account_proto_enumTypes[2] +} + +func (x AccountAuthFactorType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AccountAuthFactorType.Descriptor instead. +func (AccountAuthFactorType) EnumDescriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{2} +} + +type VerificationMarkType int32 + +const ( + VerificationMarkType_VERIFICATION_MARK_TYPE_UNSPECIFIED VerificationMarkType = 0 + VerificationMarkType_OFFICIAL VerificationMarkType = 1 + VerificationMarkType_INDIVIDUAL VerificationMarkType = 2 + VerificationMarkType_ORGANIZATION VerificationMarkType = 3 + VerificationMarkType_GOVERNMENT VerificationMarkType = 4 + VerificationMarkType_CREATOR VerificationMarkType = 5 + VerificationMarkType_DEVELOPER VerificationMarkType = 6 + VerificationMarkType_PARODY VerificationMarkType = 7 +) + +// Enum value maps for VerificationMarkType. +var ( + VerificationMarkType_name = map[int32]string{ + 0: "VERIFICATION_MARK_TYPE_UNSPECIFIED", + 1: "OFFICIAL", + 2: "INDIVIDUAL", + 3: "ORGANIZATION", + 4: "GOVERNMENT", + 5: "CREATOR", + 6: "DEVELOPER", + 7: "PARODY", + } + VerificationMarkType_value = map[string]int32{ + "VERIFICATION_MARK_TYPE_UNSPECIFIED": 0, + "OFFICIAL": 1, + "INDIVIDUAL": 2, + "ORGANIZATION": 3, + "GOVERNMENT": 4, + "CREATOR": 5, + "DEVELOPER": 6, + "PARODY": 7, + } +) + +func (x VerificationMarkType) Enum() *VerificationMarkType { + p := new(VerificationMarkType) + *p = x + return p +} + +func (x VerificationMarkType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (VerificationMarkType) Descriptor() protoreflect.EnumDescriptor { + return file_account_proto_enumTypes[3].Descriptor() +} + +func (VerificationMarkType) Type() protoreflect.EnumType { + return &file_account_proto_enumTypes[3] +} + +func (x VerificationMarkType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use VerificationMarkType.Descriptor instead. +func (VerificationMarkType) EnumDescriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{3} +} + +// Account represents a user account in the system +type Account struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Nick string `protobuf:"bytes,3,opt,name=nick,proto3" json:"nick,omitempty"` + Language string `protobuf:"bytes,4,opt,name=language,proto3" json:"language,omitempty"` + Region string `protobuf:"bytes,18,opt,name=region,proto3" json:"region,omitempty"` + ActivatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=activated_at,json=activatedAt,proto3" json:"activated_at,omitempty"` + IsSuperuser bool `protobuf:"varint,6,opt,name=is_superuser,json=isSuperuser,proto3" json:"is_superuser,omitempty"` + Profile *AccountProfile `protobuf:"bytes,7,opt,name=profile,proto3" json:"profile,omitempty"` + PerkSubscription *SubscriptionReferenceObject `protobuf:"bytes,16,opt,name=perk_subscription,json=perkSubscription,proto3,oneof" json:"perk_subscription,omitempty"` + Contacts []*AccountContact `protobuf:"bytes,8,rep,name=contacts,proto3" json:"contacts,omitempty"` + Badges []*AccountBadge `protobuf:"bytes,9,rep,name=badges,proto3" json:"badges,omitempty"` + AuthFactors []*AccountAuthFactor `protobuf:"bytes,10,rep,name=auth_factors,json=authFactors,proto3" json:"auth_factors,omitempty"` + Connections []*AccountConnection `protobuf:"bytes,11,rep,name=connections,proto3" json:"connections,omitempty"` + OutgoingRelationships []*Relationship `protobuf:"bytes,12,rep,name=outgoing_relationships,json=outgoingRelationships,proto3" json:"outgoing_relationships,omitempty"` + IncomingRelationships []*Relationship `protobuf:"bytes,13,rep,name=incoming_relationships,json=incomingRelationships,proto3" json:"incoming_relationships,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,14,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + AutomatedId *wrapperspb.StringValue `protobuf:"bytes,17,opt,name=automated_id,json=automatedId,proto3" json:"automated_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Account) Reset() { + *x = Account{} + mi := &file_account_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Account) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Account) ProtoMessage() {} + +func (x *Account) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Account.ProtoReflect.Descriptor instead. +func (*Account) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{0} +} + +func (x *Account) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Account) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Account) GetNick() string { + if x != nil { + return x.Nick + } + return "" +} + +func (x *Account) GetLanguage() string { + if x != nil { + return x.Language + } + return "" +} + +func (x *Account) GetRegion() string { + if x != nil { + return x.Region + } + return "" +} + +func (x *Account) GetActivatedAt() *timestamppb.Timestamp { + if x != nil { + return x.ActivatedAt + } + return nil +} + +func (x *Account) GetIsSuperuser() bool { + if x != nil { + return x.IsSuperuser + } + return false +} + +func (x *Account) GetProfile() *AccountProfile { + if x != nil { + return x.Profile + } + return nil +} + +func (x *Account) GetPerkSubscription() *SubscriptionReferenceObject { + if x != nil { + return x.PerkSubscription + } + return nil +} + +func (x *Account) GetContacts() []*AccountContact { + if x != nil { + return x.Contacts + } + return nil +} + +func (x *Account) GetBadges() []*AccountBadge { + if x != nil { + return x.Badges + } + return nil +} + +func (x *Account) GetAuthFactors() []*AccountAuthFactor { + if x != nil { + return x.AuthFactors + } + return nil +} + +func (x *Account) GetConnections() []*AccountConnection { + if x != nil { + return x.Connections + } + return nil +} + +func (x *Account) GetOutgoingRelationships() []*Relationship { + if x != nil { + return x.OutgoingRelationships + } + return nil +} + +func (x *Account) GetIncomingRelationships() []*Relationship { + if x != nil { + return x.IncomingRelationships + } + return nil +} + +func (x *Account) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Account) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +func (x *Account) GetAutomatedId() *wrapperspb.StringValue { + if x != nil { + return x.AutomatedId + } + return nil +} + +// AccountStatus represents the status of an account +type AccountStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Attitude StatusAttitude `protobuf:"varint,2,opt,name=attitude,proto3,enum=proto.StatusAttitude" json:"attitude,omitempty"` + IsOnline bool `protobuf:"varint,3,opt,name=is_online,json=isOnline,proto3" json:"is_online,omitempty"` + IsCustomized bool `protobuf:"varint,4,opt,name=is_customized,json=isCustomized,proto3" json:"is_customized,omitempty"` + IsInvisible bool `protobuf:"varint,5,opt,name=is_invisible,json=isInvisible,proto3" json:"is_invisible,omitempty"` + IsNotDisturb bool `protobuf:"varint,6,opt,name=is_not_disturb,json=isNotDisturb,proto3" json:"is_not_disturb,omitempty"` + Label *wrapperspb.StringValue `protobuf:"bytes,7,opt,name=label,proto3" json:"label,omitempty"` + ClearedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=cleared_at,json=clearedAt,proto3" json:"cleared_at,omitempty"` + AccountId string `protobuf:"bytes,9,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + Meta []byte `protobuf:"bytes,10,opt,name=meta,proto3" json:"meta,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AccountStatus) Reset() { + *x = AccountStatus{} + mi := &file_account_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AccountStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountStatus) ProtoMessage() {} + +func (x *AccountStatus) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccountStatus.ProtoReflect.Descriptor instead. +func (*AccountStatus) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{1} +} + +func (x *AccountStatus) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *AccountStatus) GetAttitude() StatusAttitude { + if x != nil { + return x.Attitude + } + return StatusAttitude_STATUS_ATTITUDE_UNSPECIFIED +} + +func (x *AccountStatus) GetIsOnline() bool { + if x != nil { + return x.IsOnline + } + return false +} + +func (x *AccountStatus) GetIsCustomized() bool { + if x != nil { + return x.IsCustomized + } + return false +} + +func (x *AccountStatus) GetIsInvisible() bool { + if x != nil { + return x.IsInvisible + } + return false +} + +func (x *AccountStatus) GetIsNotDisturb() bool { + if x != nil { + return x.IsNotDisturb + } + return false +} + +func (x *AccountStatus) GetLabel() *wrapperspb.StringValue { + if x != nil { + return x.Label + } + return nil +} + +func (x *AccountStatus) GetClearedAt() *timestamppb.Timestamp { + if x != nil { + return x.ClearedAt + } + return nil +} + +func (x *AccountStatus) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *AccountStatus) GetMeta() []byte { + if x != nil { + return x.Meta + } + return nil +} + +type UsernameColor struct { + state protoimpl.MessageState `protogen:"open.v1"` + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Value *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + Direction *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=direction,proto3" json:"direction,omitempty"` + Colors []string `protobuf:"bytes,4,rep,name=colors,proto3" json:"colors,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UsernameColor) Reset() { + *x = UsernameColor{} + mi := &file_account_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UsernameColor) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UsernameColor) ProtoMessage() {} + +func (x *UsernameColor) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UsernameColor.ProtoReflect.Descriptor instead. +func (*UsernameColor) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{2} +} + +func (x *UsernameColor) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *UsernameColor) GetValue() *wrapperspb.StringValue { + if x != nil { + return x.Value + } + return nil +} + +func (x *UsernameColor) GetDirection() *wrapperspb.StringValue { + if x != nil { + return x.Direction + } + return nil +} + +func (x *UsernameColor) GetColors() []string { + if x != nil { + return x.Colors + } + return nil +} + +type ProfileLink struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ProfileLink) Reset() { + *x = ProfileLink{} + mi := &file_account_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ProfileLink) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProfileLink) ProtoMessage() {} + +func (x *ProfileLink) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProfileLink.ProtoReflect.Descriptor instead. +func (*ProfileLink) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{3} +} + +func (x *ProfileLink) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ProfileLink) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +// Profile contains detailed information about a user +type AccountProfile struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + FirstName *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"` + MiddleName *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=middle_name,json=middleName,proto3" json:"middle_name,omitempty"` + LastName *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"` + Bio *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=bio,proto3" json:"bio,omitempty"` + Gender *wrapperspb.StringValue `protobuf:"bytes,6,opt,name=gender,proto3" json:"gender,omitempty"` + Pronouns *wrapperspb.StringValue `protobuf:"bytes,7,opt,name=pronouns,proto3" json:"pronouns,omitempty"` + TimeZone *wrapperspb.StringValue `protobuf:"bytes,8,opt,name=time_zone,json=timeZone,proto3" json:"time_zone,omitempty"` + Location *wrapperspb.StringValue `protobuf:"bytes,9,opt,name=location,proto3" json:"location,omitempty"` + Birthday *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=birthday,proto3" json:"birthday,omitempty"` + LastSeenAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=last_seen_at,json=lastSeenAt,proto3" json:"last_seen_at,omitempty"` + Verification *VerificationMark `protobuf:"bytes,12,opt,name=verification,proto3" json:"verification,omitempty"` + ActiveBadge *BadgeReferenceObject `protobuf:"bytes,13,opt,name=active_badge,json=activeBadge,proto3" json:"active_badge,omitempty"` + Experience int32 `protobuf:"varint,14,opt,name=experience,proto3" json:"experience,omitempty"` + Level int32 `protobuf:"varint,15,opt,name=level,proto3" json:"level,omitempty"` + LevelingProgress float64 `protobuf:"fixed64,16,opt,name=leveling_progress,json=levelingProgress,proto3" json:"leveling_progress,omitempty"` + SocialCredits float64 `protobuf:"fixed64,17,opt,name=social_credits,json=socialCredits,proto3" json:"social_credits,omitempty"` + SocialCreditsLevel int32 `protobuf:"varint,18,opt,name=social_credits_level,json=socialCreditsLevel,proto3" json:"social_credits_level,omitempty"` + Picture *CloudFile `protobuf:"bytes,19,opt,name=picture,proto3" json:"picture,omitempty"` + Background *CloudFile `protobuf:"bytes,20,opt,name=background,proto3" json:"background,omitempty"` + AccountId string `protobuf:"bytes,21,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,22,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,23,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + UsernameColor *UsernameColor `protobuf:"bytes,24,opt,name=username_color,json=usernameColor,proto3,oneof" json:"username_color,omitempty"` + Links []*ProfileLink `protobuf:"bytes,25,rep,name=links,proto3" json:"links,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AccountProfile) Reset() { + *x = AccountProfile{} + mi := &file_account_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AccountProfile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountProfile) ProtoMessage() {} + +func (x *AccountProfile) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccountProfile.ProtoReflect.Descriptor instead. +func (*AccountProfile) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{4} +} + +func (x *AccountProfile) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *AccountProfile) GetFirstName() *wrapperspb.StringValue { + if x != nil { + return x.FirstName + } + return nil +} + +func (x *AccountProfile) GetMiddleName() *wrapperspb.StringValue { + if x != nil { + return x.MiddleName + } + return nil +} + +func (x *AccountProfile) GetLastName() *wrapperspb.StringValue { + if x != nil { + return x.LastName + } + return nil +} + +func (x *AccountProfile) GetBio() *wrapperspb.StringValue { + if x != nil { + return x.Bio + } + return nil +} + +func (x *AccountProfile) GetGender() *wrapperspb.StringValue { + if x != nil { + return x.Gender + } + return nil +} + +func (x *AccountProfile) GetPronouns() *wrapperspb.StringValue { + if x != nil { + return x.Pronouns + } + return nil +} + +func (x *AccountProfile) GetTimeZone() *wrapperspb.StringValue { + if x != nil { + return x.TimeZone + } + return nil +} + +func (x *AccountProfile) GetLocation() *wrapperspb.StringValue { + if x != nil { + return x.Location + } + return nil +} + +func (x *AccountProfile) GetBirthday() *timestamppb.Timestamp { + if x != nil { + return x.Birthday + } + return nil +} + +func (x *AccountProfile) GetLastSeenAt() *timestamppb.Timestamp { + if x != nil { + return x.LastSeenAt + } + return nil +} + +func (x *AccountProfile) GetVerification() *VerificationMark { + if x != nil { + return x.Verification + } + return nil +} + +func (x *AccountProfile) GetActiveBadge() *BadgeReferenceObject { + if x != nil { + return x.ActiveBadge + } + return nil +} + +func (x *AccountProfile) GetExperience() int32 { + if x != nil { + return x.Experience + } + return 0 +} + +func (x *AccountProfile) GetLevel() int32 { + if x != nil { + return x.Level + } + return 0 +} + +func (x *AccountProfile) GetLevelingProgress() float64 { + if x != nil { + return x.LevelingProgress + } + return 0 +} + +func (x *AccountProfile) GetSocialCredits() float64 { + if x != nil { + return x.SocialCredits + } + return 0 +} + +func (x *AccountProfile) GetSocialCreditsLevel() int32 { + if x != nil { + return x.SocialCreditsLevel + } + return 0 +} + +func (x *AccountProfile) GetPicture() *CloudFile { + if x != nil { + return x.Picture + } + return nil +} + +func (x *AccountProfile) GetBackground() *CloudFile { + if x != nil { + return x.Background + } + return nil +} + +func (x *AccountProfile) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *AccountProfile) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *AccountProfile) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +func (x *AccountProfile) GetUsernameColor() *UsernameColor { + if x != nil { + return x.UsernameColor + } + return nil +} + +func (x *AccountProfile) GetLinks() []*ProfileLink { + if x != nil { + return x.Links + } + return nil +} + +// AccountContact represents a contact method for an account +type AccountContact struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Type AccountContactType `protobuf:"varint,2,opt,name=type,proto3,enum=proto.AccountContactType" json:"type,omitempty"` + VerifiedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=verified_at,json=verifiedAt,proto3" json:"verified_at,omitempty"` + IsPrimary bool `protobuf:"varint,4,opt,name=is_primary,json=isPrimary,proto3" json:"is_primary,omitempty"` + Content string `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"` + AccountId string `protobuf:"bytes,6,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AccountContact) Reset() { + *x = AccountContact{} + mi := &file_account_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AccountContact) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountContact) ProtoMessage() {} + +func (x *AccountContact) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccountContact.ProtoReflect.Descriptor instead. +func (*AccountContact) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{5} +} + +func (x *AccountContact) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *AccountContact) GetType() AccountContactType { + if x != nil { + return x.Type + } + return AccountContactType_ACCOUNT_CONTACT_TYPE_UNSPECIFIED +} + +func (x *AccountContact) GetVerifiedAt() *timestamppb.Timestamp { + if x != nil { + return x.VerifiedAt + } + return nil +} + +func (x *AccountContact) GetIsPrimary() bool { + if x != nil { + return x.IsPrimary + } + return false +} + +func (x *AccountContact) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +func (x *AccountContact) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *AccountContact) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *AccountContact) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +// AccountAuthFactor represents an authentication factor for an account +type AccountAuthFactor struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Type AccountAuthFactorType `protobuf:"varint,2,opt,name=type,proto3,enum=proto.AccountAuthFactorType" json:"type,omitempty"` + Secret *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=secret,proto3" json:"secret,omitempty"` // Omitted from JSON serialization in original + Config map[string]*structpb.Value `protobuf:"bytes,4,rep,name=config,proto3" json:"config,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Omitted from JSON serialization in original + Trustworthy int32 `protobuf:"varint,5,opt,name=trustworthy,proto3" json:"trustworthy,omitempty"` + EnabledAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=enabled_at,json=enabledAt,proto3" json:"enabled_at,omitempty"` + ExpiredAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"` + AccountId string `protobuf:"bytes,8,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + CreatedResponse map[string]*structpb.Value `protobuf:"bytes,9,rep,name=created_response,json=createdResponse,proto3" json:"created_response,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // For initial setup + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AccountAuthFactor) Reset() { + *x = AccountAuthFactor{} + mi := &file_account_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AccountAuthFactor) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountAuthFactor) ProtoMessage() {} + +func (x *AccountAuthFactor) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccountAuthFactor.ProtoReflect.Descriptor instead. +func (*AccountAuthFactor) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{6} +} + +func (x *AccountAuthFactor) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *AccountAuthFactor) GetType() AccountAuthFactorType { + if x != nil { + return x.Type + } + return AccountAuthFactorType_AUTH_FACTOR_TYPE_UNSPECIFIED +} + +func (x *AccountAuthFactor) GetSecret() *wrapperspb.StringValue { + if x != nil { + return x.Secret + } + return nil +} + +func (x *AccountAuthFactor) GetConfig() map[string]*structpb.Value { + if x != nil { + return x.Config + } + return nil +} + +func (x *AccountAuthFactor) GetTrustworthy() int32 { + if x != nil { + return x.Trustworthy + } + return 0 +} + +func (x *AccountAuthFactor) GetEnabledAt() *timestamppb.Timestamp { + if x != nil { + return x.EnabledAt + } + return nil +} + +func (x *AccountAuthFactor) GetExpiredAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiredAt + } + return nil +} + +func (x *AccountAuthFactor) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *AccountAuthFactor) GetCreatedResponse() map[string]*structpb.Value { + if x != nil { + return x.CreatedResponse + } + return nil +} + +func (x *AccountAuthFactor) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *AccountAuthFactor) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +// AccountBadge represents a badge associated with an account +type AccountBadge struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Unique identifier for the badge + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // Type/category of the badge + Label *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=label,proto3" json:"label,omitempty"` // Display name of the badge + Caption *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=caption,proto3" json:"caption,omitempty"` // Optional description of the badge + Meta map[string]*structpb.Value `protobuf:"bytes,5,rep,name=meta,proto3" json:"meta,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Additional metadata for the badge + ActivatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=activated_at,json=activatedAt,proto3" json:"activated_at,omitempty"` // When the badge was activated + ExpiredAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"` // Optional expiration time + AccountId string `protobuf:"bytes,8,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // ID of the account this badge belongs to + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AccountBadge) Reset() { + *x = AccountBadge{} + mi := &file_account_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AccountBadge) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountBadge) ProtoMessage() {} + +func (x *AccountBadge) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccountBadge.ProtoReflect.Descriptor instead. +func (*AccountBadge) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{7} +} + +func (x *AccountBadge) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *AccountBadge) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *AccountBadge) GetLabel() *wrapperspb.StringValue { + if x != nil { + return x.Label + } + return nil +} + +func (x *AccountBadge) GetCaption() *wrapperspb.StringValue { + if x != nil { + return x.Caption + } + return nil +} + +func (x *AccountBadge) GetMeta() map[string]*structpb.Value { + if x != nil { + return x.Meta + } + return nil +} + +func (x *AccountBadge) GetActivatedAt() *timestamppb.Timestamp { + if x != nil { + return x.ActivatedAt + } + return nil +} + +func (x *AccountBadge) GetExpiredAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiredAt + } + return nil +} + +func (x *AccountBadge) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *AccountBadge) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *AccountBadge) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +// AccountConnection represents a third-party connection for an account +type AccountConnection struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Provider string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty"` + ProvidedIdentifier string `protobuf:"bytes,3,opt,name=provided_identifier,json=providedIdentifier,proto3" json:"provided_identifier,omitempty"` + Meta map[string]*structpb.Value `protobuf:"bytes,4,rep,name=meta,proto3" json:"meta,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + AccessToken *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` // Omitted from JSON serialization + RefreshToken *wrapperspb.StringValue `protobuf:"bytes,6,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` // Omitted from JSON serialization + LastUsedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=last_used_at,json=lastUsedAt,proto3" json:"last_used_at,omitempty"` + AccountId string `protobuf:"bytes,8,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AccountConnection) Reset() { + *x = AccountConnection{} + mi := &file_account_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AccountConnection) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountConnection) ProtoMessage() {} + +func (x *AccountConnection) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccountConnection.ProtoReflect.Descriptor instead. +func (*AccountConnection) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{8} +} + +func (x *AccountConnection) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *AccountConnection) GetProvider() string { + if x != nil { + return x.Provider + } + return "" +} + +func (x *AccountConnection) GetProvidedIdentifier() string { + if x != nil { + return x.ProvidedIdentifier + } + return "" +} + +func (x *AccountConnection) GetMeta() map[string]*structpb.Value { + if x != nil { + return x.Meta + } + return nil +} + +func (x *AccountConnection) GetAccessToken() *wrapperspb.StringValue { + if x != nil { + return x.AccessToken + } + return nil +} + +func (x *AccountConnection) GetRefreshToken() *wrapperspb.StringValue { + if x != nil { + return x.RefreshToken + } + return nil +} + +func (x *AccountConnection) GetLastUsedAt() *timestamppb.Timestamp { + if x != nil { + return x.LastUsedAt + } + return nil +} + +func (x *AccountConnection) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *AccountConnection) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *AccountConnection) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +// VerificationMark represents verification status +type VerificationMark struct { + state protoimpl.MessageState `protogen:"open.v1"` + Type VerificationMarkType `protobuf:"varint,1,opt,name=type,proto3,enum=proto.VerificationMarkType" json:"type,omitempty"` + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + VerifiedBy string `protobuf:"bytes,4,opt,name=verified_by,json=verifiedBy,proto3" json:"verified_by,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VerificationMark) Reset() { + *x = VerificationMark{} + mi := &file_account_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VerificationMark) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VerificationMark) ProtoMessage() {} + +func (x *VerificationMark) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VerificationMark.ProtoReflect.Descriptor instead. +func (*VerificationMark) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{9} +} + +func (x *VerificationMark) GetType() VerificationMarkType { + if x != nil { + return x.Type + } + return VerificationMarkType_VERIFICATION_MARK_TYPE_UNSPECIFIED +} + +func (x *VerificationMark) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *VerificationMark) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *VerificationMark) GetVerifiedBy() string { + if x != nil { + return x.VerifiedBy + } + return "" +} + +func (x *VerificationMark) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *VerificationMark) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +// BadgeReferenceObject represents a reference to a badge with minimal information +type BadgeReferenceObject struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Unique identifier for the badge + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // Type/category of the badge + Label *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=label,proto3" json:"label,omitempty"` // Display name of the badge + Caption *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=caption,proto3" json:"caption,omitempty"` // Optional description of the badge + Meta map[string]*structpb.Value `protobuf:"bytes,5,rep,name=meta,proto3" json:"meta,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Additional metadata for the badge + ActivatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=activated_at,json=activatedAt,proto3" json:"activated_at,omitempty"` // When the badge was activated + ExpiredAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"` // Optional expiration time + AccountId string `protobuf:"bytes,8,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // ID of the account this badge belongs to + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BadgeReferenceObject) Reset() { + *x = BadgeReferenceObject{} + mi := &file_account_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BadgeReferenceObject) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BadgeReferenceObject) ProtoMessage() {} + +func (x *BadgeReferenceObject) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BadgeReferenceObject.ProtoReflect.Descriptor instead. +func (*BadgeReferenceObject) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{10} +} + +func (x *BadgeReferenceObject) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *BadgeReferenceObject) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *BadgeReferenceObject) GetLabel() *wrapperspb.StringValue { + if x != nil { + return x.Label + } + return nil +} + +func (x *BadgeReferenceObject) GetCaption() *wrapperspb.StringValue { + if x != nil { + return x.Caption + } + return nil +} + +func (x *BadgeReferenceObject) GetMeta() map[string]*structpb.Value { + if x != nil { + return x.Meta + } + return nil +} + +func (x *BadgeReferenceObject) GetActivatedAt() *timestamppb.Timestamp { + if x != nil { + return x.ActivatedAt + } + return nil +} + +func (x *BadgeReferenceObject) GetExpiredAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiredAt + } + return nil +} + +func (x *BadgeReferenceObject) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +// Relationship represents a connection between two accounts +type Relationship struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + RelatedId string `protobuf:"bytes,2,opt,name=related_id,json=relatedId,proto3" json:"related_id,omitempty"` + Account *Account `protobuf:"bytes,3,opt,name=account,proto3,oneof" json:"account,omitempty"` + Related *Account `protobuf:"bytes,4,opt,name=related,proto3,oneof" json:"related,omitempty"` + Status int32 `protobuf:"varint,5,opt,name=status,proto3" json:"status,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Relationship) Reset() { + *x = Relationship{} + mi := &file_account_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Relationship) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Relationship) ProtoMessage() {} + +func (x *Relationship) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Relationship.ProtoReflect.Descriptor instead. +func (*Relationship) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{11} +} + +func (x *Relationship) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *Relationship) GetRelatedId() string { + if x != nil { + return x.RelatedId + } + return "" +} + +func (x *Relationship) GetAccount() *Account { + if x != nil { + return x.Account + } + return nil +} + +func (x *Relationship) GetRelated() *Account { + if x != nil { + return x.Related + } + return nil +} + +func (x *Relationship) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *Relationship) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Relationship) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +// Leveling information +type LevelingInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + CurrentLevel int32 `protobuf:"varint,1,opt,name=current_level,json=currentLevel,proto3" json:"current_level,omitempty"` + CurrentExperience int32 `protobuf:"varint,2,opt,name=current_experience,json=currentExperience,proto3" json:"current_experience,omitempty"` + NextLevelExperience int32 `protobuf:"varint,3,opt,name=next_level_experience,json=nextLevelExperience,proto3" json:"next_level_experience,omitempty"` + PreviousLevelExperience int32 `protobuf:"varint,4,opt,name=previous_level_experience,json=previousLevelExperience,proto3" json:"previous_level_experience,omitempty"` + LevelProgress float64 `protobuf:"fixed64,5,opt,name=level_progress,json=levelProgress,proto3" json:"level_progress,omitempty"` + ExperiencePerLevel []int32 `protobuf:"varint,6,rep,packed,name=experience_per_level,json=experiencePerLevel,proto3" json:"experience_per_level,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LevelingInfo) Reset() { + *x = LevelingInfo{} + mi := &file_account_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LevelingInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LevelingInfo) ProtoMessage() {} + +func (x *LevelingInfo) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LevelingInfo.ProtoReflect.Descriptor instead. +func (*LevelingInfo) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{12} +} + +func (x *LevelingInfo) GetCurrentLevel() int32 { + if x != nil { + return x.CurrentLevel + } + return 0 +} + +func (x *LevelingInfo) GetCurrentExperience() int32 { + if x != nil { + return x.CurrentExperience + } + return 0 +} + +func (x *LevelingInfo) GetNextLevelExperience() int32 { + if x != nil { + return x.NextLevelExperience + } + return 0 +} + +func (x *LevelingInfo) GetPreviousLevelExperience() int32 { + if x != nil { + return x.PreviousLevelExperience + } + return 0 +} + +func (x *LevelingInfo) GetLevelProgress() float64 { + if x != nil { + return x.LevelProgress + } + return 0 +} + +func (x *LevelingInfo) GetExperiencePerLevel() []int32 { + if x != nil { + return x.ExperiencePerLevel + } + return nil +} + +// ActionLog represents a record of an action taken by a user +type ActionLog struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Unique identifier for the log entry + Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"` // The action that was performed, e.g., "user.login" + Meta map[string]*structpb.Value `protobuf:"bytes,3,rep,name=meta,proto3" json:"meta,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // Metadata associated with the action + UserAgent *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"` // User agent of the client + IpAddress *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"` // IP address of the client + Location *wrapperspb.StringValue `protobuf:"bytes,6,opt,name=location,proto3" json:"location,omitempty"` // Geographic location of the client, derived from IP + AccountId string `protobuf:"bytes,7,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // The account that performed the action + SessionId *wrapperspb.StringValue `protobuf:"bytes,8,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` // The session in which the action was performed + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // When the action log was created + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActionLog) Reset() { + *x = ActionLog{} + mi := &file_account_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActionLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionLog) ProtoMessage() {} + +func (x *ActionLog) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActionLog.ProtoReflect.Descriptor instead. +func (*ActionLog) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{13} +} + +func (x *ActionLog) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ActionLog) GetAction() string { + if x != nil { + return x.Action + } + return "" +} + +func (x *ActionLog) GetMeta() map[string]*structpb.Value { + if x != nil { + return x.Meta + } + return nil +} + +func (x *ActionLog) GetUserAgent() *wrapperspb.StringValue { + if x != nil { + return x.UserAgent + } + return nil +} + +func (x *ActionLog) GetIpAddress() *wrapperspb.StringValue { + if x != nil { + return x.IpAddress + } + return nil +} + +func (x *ActionLog) GetLocation() *wrapperspb.StringValue { + if x != nil { + return x.Location + } + return nil +} + +func (x *ActionLog) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *ActionLog) GetSessionId() *wrapperspb.StringValue { + if x != nil { + return x.SessionId + } + return nil +} + +func (x *ActionLog) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +type GetAccountStatusBatchResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Statuses []*AccountStatus `protobuf:"bytes,1,rep,name=statuses,proto3" json:"statuses,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAccountStatusBatchResponse) Reset() { + *x = GetAccountStatusBatchResponse{} + mi := &file_account_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAccountStatusBatchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccountStatusBatchResponse) ProtoMessage() {} + +func (x *GetAccountStatusBatchResponse) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAccountStatusBatchResponse.ProtoReflect.Descriptor instead. +func (*GetAccountStatusBatchResponse) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{14} +} + +func (x *GetAccountStatusBatchResponse) GetStatuses() []*AccountStatus { + if x != nil { + return x.Statuses + } + return nil +} + +// ActionLog Requests/Responses +type CreateActionLogRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Action string `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"` + Meta map[string]*structpb.Value `protobuf:"bytes,2,rep,name=meta,proto3" json:"meta,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + UserAgent *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"` + IpAddress *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"` + Location *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=location,proto3" json:"location,omitempty"` + AccountId string `protobuf:"bytes,6,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + SessionId *wrapperspb.StringValue `protobuf:"bytes,7,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateActionLogRequest) Reset() { + *x = CreateActionLogRequest{} + mi := &file_account_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateActionLogRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateActionLogRequest) ProtoMessage() {} + +func (x *CreateActionLogRequest) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateActionLogRequest.ProtoReflect.Descriptor instead. +func (*CreateActionLogRequest) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{15} +} + +func (x *CreateActionLogRequest) GetAction() string { + if x != nil { + return x.Action + } + return "" +} + +func (x *CreateActionLogRequest) GetMeta() map[string]*structpb.Value { + if x != nil { + return x.Meta + } + return nil +} + +func (x *CreateActionLogRequest) GetUserAgent() *wrapperspb.StringValue { + if x != nil { + return x.UserAgent + } + return nil +} + +func (x *CreateActionLogRequest) GetIpAddress() *wrapperspb.StringValue { + if x != nil { + return x.IpAddress + } + return nil +} + +func (x *CreateActionLogRequest) GetLocation() *wrapperspb.StringValue { + if x != nil { + return x.Location + } + return nil +} + +func (x *CreateActionLogRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *CreateActionLogRequest) GetSessionId() *wrapperspb.StringValue { + if x != nil { + return x.SessionId + } + return nil +} + +type CreateActionLogResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + ActionLog *ActionLog `protobuf:"bytes,1,opt,name=action_log,json=actionLog,proto3" json:"action_log,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateActionLogResponse) Reset() { + *x = CreateActionLogResponse{} + mi := &file_account_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateActionLogResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateActionLogResponse) ProtoMessage() {} + +func (x *CreateActionLogResponse) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateActionLogResponse.ProtoReflect.Descriptor instead. +func (*CreateActionLogResponse) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{16} +} + +func (x *CreateActionLogResponse) GetActionLog() *ActionLog { + if x != nil { + return x.ActionLog + } + return nil +} + +type ListActionLogsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"` + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + OrderBy string `protobuf:"bytes,5,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListActionLogsRequest) Reset() { + *x = ListActionLogsRequest{} + mi := &file_account_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListActionLogsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListActionLogsRequest) ProtoMessage() {} + +func (x *ListActionLogsRequest) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListActionLogsRequest.ProtoReflect.Descriptor instead. +func (*ListActionLogsRequest) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{17} +} + +func (x *ListActionLogsRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *ListActionLogsRequest) GetAction() string { + if x != nil { + return x.Action + } + return "" +} + +func (x *ListActionLogsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListActionLogsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListActionLogsRequest) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +type ListActionLogsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + ActionLogs []*ActionLog `protobuf:"bytes,1,rep,name=action_logs,json=actionLogs,proto3" json:"action_logs,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListActionLogsResponse) Reset() { + *x = ListActionLogsResponse{} + mi := &file_account_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListActionLogsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListActionLogsResponse) ProtoMessage() {} + +func (x *ListActionLogsResponse) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListActionLogsResponse.ProtoReflect.Descriptor instead. +func (*ListActionLogsResponse) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{18} +} + +func (x *ListActionLogsResponse) GetActionLogs() []*ActionLog { + if x != nil { + return x.ActionLogs + } + return nil +} + +func (x *ListActionLogsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListActionLogsResponse) GetTotalSize() int32 { + if x != nil { + return x.TotalSize + } + return 0 +} + +// Account Requests/Responses +type GetAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Account ID to retrieve + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAccountRequest) Reset() { + *x = GetAccountRequest{} + mi := &file_account_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccountRequest) ProtoMessage() {} + +func (x *GetAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAccountRequest.ProtoReflect.Descriptor instead. +func (*GetAccountRequest) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{19} +} + +func (x *GetAccountRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetBotAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AutomatedId string `protobuf:"bytes,1,opt,name=automated_id,json=automatedId,proto3" json:"automated_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBotAccountRequest) Reset() { + *x = GetBotAccountRequest{} + mi := &file_account_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBotAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBotAccountRequest) ProtoMessage() {} + +func (x *GetBotAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBotAccountRequest.ProtoReflect.Descriptor instead. +func (*GetBotAccountRequest) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{20} +} + +func (x *GetBotAccountRequest) GetAutomatedId() string { + if x != nil { + return x.AutomatedId + } + return "" +} + +type GetAccountBatchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id []string `protobuf:"bytes,1,rep,name=id,proto3" json:"id,omitempty"` // Account ID to retrieve + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAccountBatchRequest) Reset() { + *x = GetAccountBatchRequest{} + mi := &file_account_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAccountBatchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccountBatchRequest) ProtoMessage() {} + +func (x *GetAccountBatchRequest) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAccountBatchRequest.ProtoReflect.Descriptor instead. +func (*GetAccountBatchRequest) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{21} +} + +func (x *GetAccountBatchRequest) GetId() []string { + if x != nil { + return x.Id + } + return nil +} + +type GetBotAccountBatchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AutomatedId []string `protobuf:"bytes,1,rep,name=automated_id,json=automatedId,proto3" json:"automated_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBotAccountBatchRequest) Reset() { + *x = GetBotAccountBatchRequest{} + mi := &file_account_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBotAccountBatchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBotAccountBatchRequest) ProtoMessage() {} + +func (x *GetBotAccountBatchRequest) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBotAccountBatchRequest.ProtoReflect.Descriptor instead. +func (*GetBotAccountBatchRequest) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{22} +} + +func (x *GetBotAccountBatchRequest) GetAutomatedId() []string { + if x != nil { + return x.AutomatedId + } + return nil +} + +type LookupAccountBatchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LookupAccountBatchRequest) Reset() { + *x = LookupAccountBatchRequest{} + mi := &file_account_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LookupAccountBatchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LookupAccountBatchRequest) ProtoMessage() {} + +func (x *LookupAccountBatchRequest) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LookupAccountBatchRequest.ProtoReflect.Descriptor instead. +func (*LookupAccountBatchRequest) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{23} +} + +func (x *LookupAccountBatchRequest) GetNames() []string { + if x != nil { + return x.Names + } + return nil +} + +type SearchAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SearchAccountRequest) Reset() { + *x = SearchAccountRequest{} + mi := &file_account_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SearchAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchAccountRequest) ProtoMessage() {} + +func (x *SearchAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchAccountRequest.ProtoReflect.Descriptor instead. +func (*SearchAccountRequest) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{24} +} + +func (x *SearchAccountRequest) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +type GetAccountBatchResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Accounts []*Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` // List of accounts + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAccountBatchResponse) Reset() { + *x = GetAccountBatchResponse{} + mi := &file_account_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAccountBatchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccountBatchResponse) ProtoMessage() {} + +func (x *GetAccountBatchResponse) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAccountBatchResponse.ProtoReflect.Descriptor instead. +func (*GetAccountBatchResponse) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{25} +} + +func (x *GetAccountBatchResponse) GetAccounts() []*Account { + if x != nil { + return x.Accounts + } + return nil +} + +type CreateAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Required: Unique username + Nick string `protobuf:"bytes,2,opt,name=nick,proto3" json:"nick,omitempty"` // Optional: Display name + Language string `protobuf:"bytes,3,opt,name=language,proto3" json:"language,omitempty"` // Default language + IsSuperuser bool `protobuf:"varint,4,opt,name=is_superuser,json=isSuperuser,proto3" json:"is_superuser,omitempty"` // Admin flag + Profile *AccountProfile `protobuf:"bytes,5,opt,name=profile,proto3" json:"profile,omitempty"` // Initial profile data + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateAccountRequest) Reset() { + *x = CreateAccountRequest{} + mi := &file_account_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAccountRequest) ProtoMessage() {} + +func (x *CreateAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateAccountRequest.ProtoReflect.Descriptor instead. +func (*CreateAccountRequest) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{26} +} + +func (x *CreateAccountRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CreateAccountRequest) GetNick() string { + if x != nil { + return x.Nick + } + return "" +} + +func (x *CreateAccountRequest) GetLanguage() string { + if x != nil { + return x.Language + } + return "" +} + +func (x *CreateAccountRequest) GetIsSuperuser() bool { + if x != nil { + return x.IsSuperuser + } + return false +} + +func (x *CreateAccountRequest) GetProfile() *AccountProfile { + if x != nil { + return x.Profile + } + return nil +} + +type UpdateAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Account ID to update + Name *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // New username if changing + Nick *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=nick,proto3" json:"nick,omitempty"` // New display name + Language *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=language,proto3" json:"language,omitempty"` // New language + IsSuperuser *wrapperspb.BoolValue `protobuf:"bytes,5,opt,name=is_superuser,json=isSuperuser,proto3" json:"is_superuser,omitempty"` // Admin status + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateAccountRequest) Reset() { + *x = UpdateAccountRequest{} + mi := &file_account_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateAccountRequest) ProtoMessage() {} + +func (x *UpdateAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateAccountRequest.ProtoReflect.Descriptor instead. +func (*UpdateAccountRequest) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{27} +} + +func (x *UpdateAccountRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *UpdateAccountRequest) GetName() *wrapperspb.StringValue { + if x != nil { + return x.Name + } + return nil +} + +func (x *UpdateAccountRequest) GetNick() *wrapperspb.StringValue { + if x != nil { + return x.Nick + } + return nil +} + +func (x *UpdateAccountRequest) GetLanguage() *wrapperspb.StringValue { + if x != nil { + return x.Language + } + return nil +} + +func (x *UpdateAccountRequest) GetIsSuperuser() *wrapperspb.BoolValue { + if x != nil { + return x.IsSuperuser + } + return nil +} + +type DeleteAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Account ID to delete + Purge bool `protobuf:"varint,2,opt,name=purge,proto3" json:"purge,omitempty"` // If true, permanently delete instead of soft delete + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteAccountRequest) Reset() { + *x = DeleteAccountRequest{} + mi := &file_account_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAccountRequest) ProtoMessage() {} + +func (x *DeleteAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteAccountRequest.ProtoReflect.Descriptor instead. +func (*DeleteAccountRequest) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{28} +} + +func (x *DeleteAccountRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *DeleteAccountRequest) GetPurge() bool { + if x != nil { + return x.Purge + } + return false +} + +type ListAccountsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // Number of results per page + PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // Token for pagination + Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` // Filter expression + OrderBy string `protobuf:"bytes,4,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` // Sort order + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListAccountsRequest) Reset() { + *x = ListAccountsRequest{} + mi := &file_account_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListAccountsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAccountsRequest) ProtoMessage() {} + +func (x *ListAccountsRequest) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAccountsRequest.ProtoReflect.Descriptor instead. +func (*ListAccountsRequest) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{29} +} + +func (x *ListAccountsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListAccountsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListAccountsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListAccountsRequest) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +type ListAccountsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Accounts []*Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` // List of accounts + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // Token for next page + TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` // Total number of accounts + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListAccountsResponse) Reset() { + *x = ListAccountsResponse{} + mi := &file_account_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListAccountsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAccountsResponse) ProtoMessage() {} + +func (x *ListAccountsResponse) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAccountsResponse.ProtoReflect.Descriptor instead. +func (*ListAccountsResponse) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{30} +} + +func (x *ListAccountsResponse) GetAccounts() []*Account { + if x != nil { + return x.Accounts + } + return nil +} + +func (x *ListAccountsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListAccountsResponse) GetTotalSize() int32 { + if x != nil { + return x.TotalSize + } + return 0 +} + +// Profile Requests/Responses +type GetProfileRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // Account ID to get profile for + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetProfileRequest) Reset() { + *x = GetProfileRequest{} + mi := &file_account_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetProfileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProfileRequest) ProtoMessage() {} + +func (x *GetProfileRequest) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProfileRequest.ProtoReflect.Descriptor instead. +func (*GetProfileRequest) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{31} +} + +func (x *GetProfileRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +type UpdateProfileRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // Account ID to update profile for + Profile *AccountProfile `protobuf:"bytes,2,opt,name=profile,proto3" json:"profile,omitempty"` // Profile data to update + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` // Fields to update + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateProfileRequest) Reset() { + *x = UpdateProfileRequest{} + mi := &file_account_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateProfileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateProfileRequest) ProtoMessage() {} + +func (x *UpdateProfileRequest) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateProfileRequest.ProtoReflect.Descriptor instead. +func (*UpdateProfileRequest) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{32} +} + +func (x *UpdateProfileRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *UpdateProfileRequest) GetProfile() *AccountProfile { + if x != nil { + return x.Profile + } + return nil +} + +func (x *UpdateProfileRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Contact Requests/Responses +type AddContactRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // Account to add contact to + Type AccountContactType `protobuf:"varint,2,opt,name=type,proto3,enum=proto.AccountContactType" json:"type,omitempty"` // Type of contact + Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"` // Contact content (email, phone, etc.) + IsPrimary bool `protobuf:"varint,4,opt,name=is_primary,json=isPrimary,proto3" json:"is_primary,omitempty"` // If this should be the primary contact + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddContactRequest) Reset() { + *x = AddContactRequest{} + mi := &file_account_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddContactRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddContactRequest) ProtoMessage() {} + +func (x *AddContactRequest) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddContactRequest.ProtoReflect.Descriptor instead. +func (*AddContactRequest) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{33} +} + +func (x *AddContactRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *AddContactRequest) GetType() AccountContactType { + if x != nil { + return x.Type + } + return AccountContactType_ACCOUNT_CONTACT_TYPE_UNSPECIFIED +} + +func (x *AddContactRequest) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +func (x *AddContactRequest) GetIsPrimary() bool { + if x != nil { + return x.IsPrimary + } + return false +} + +type ListContactsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // Account ID to list contacts for + Type AccountContactType `protobuf:"varint,2,opt,name=type,proto3,enum=proto.AccountContactType" json:"type,omitempty"` // Optional: filter by type + VerifiedOnly bool `protobuf:"varint,3,opt,name=verified_only,json=verifiedOnly,proto3" json:"verified_only,omitempty"` // Only return verified contacts + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListContactsRequest) Reset() { + *x = ListContactsRequest{} + mi := &file_account_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListContactsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListContactsRequest) ProtoMessage() {} + +func (x *ListContactsRequest) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListContactsRequest.ProtoReflect.Descriptor instead. +func (*ListContactsRequest) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{34} +} + +func (x *ListContactsRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *ListContactsRequest) GetType() AccountContactType { + if x != nil { + return x.Type + } + return AccountContactType_ACCOUNT_CONTACT_TYPE_UNSPECIFIED +} + +func (x *ListContactsRequest) GetVerifiedOnly() bool { + if x != nil { + return x.VerifiedOnly + } + return false +} + +type ListContactsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Contacts []*AccountContact `protobuf:"bytes,1,rep,name=contacts,proto3" json:"contacts,omitempty"` // List of contacts + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListContactsResponse) Reset() { + *x = ListContactsResponse{} + mi := &file_account_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListContactsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListContactsResponse) ProtoMessage() {} + +func (x *ListContactsResponse) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListContactsResponse.ProtoReflect.Descriptor instead. +func (*ListContactsResponse) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{35} +} + +func (x *ListContactsResponse) GetContacts() []*AccountContact { + if x != nil { + return x.Contacts + } + return nil +} + +type VerifyContactRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Contact ID to verify + AccountId string `protobuf:"bytes,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // Account ID (for validation) + Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` // Verification code + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VerifyContactRequest) Reset() { + *x = VerifyContactRequest{} + mi := &file_account_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VerifyContactRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VerifyContactRequest) ProtoMessage() {} + +func (x *VerifyContactRequest) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VerifyContactRequest.ProtoReflect.Descriptor instead. +func (*VerifyContactRequest) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{36} +} + +func (x *VerifyContactRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *VerifyContactRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *VerifyContactRequest) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +// Badge Requests/Responses +type ListBadgesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // Account to list badges for + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` // Optional: filter by type + ActiveOnly bool `protobuf:"varint,3,opt,name=active_only,json=activeOnly,proto3" json:"active_only,omitempty"` // Only return active (non-expired) badges + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListBadgesRequest) Reset() { + *x = ListBadgesRequest{} + mi := &file_account_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListBadgesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListBadgesRequest) ProtoMessage() {} + +func (x *ListBadgesRequest) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListBadgesRequest.ProtoReflect.Descriptor instead. +func (*ListBadgesRequest) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{37} +} + +func (x *ListBadgesRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *ListBadgesRequest) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *ListBadgesRequest) GetActiveOnly() bool { + if x != nil { + return x.ActiveOnly + } + return false +} + +type ListBadgesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Badges []*AccountBadge `protobuf:"bytes,1,rep,name=badges,proto3" json:"badges,omitempty"` // List of badges + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListBadgesResponse) Reset() { + *x = ListBadgesResponse{} + mi := &file_account_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListBadgesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListBadgesResponse) ProtoMessage() {} + +func (x *ListBadgesResponse) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[38] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListBadgesResponse.ProtoReflect.Descriptor instead. +func (*ListBadgesResponse) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{38} +} + +func (x *ListBadgesResponse) GetBadges() []*AccountBadge { + if x != nil { + return x.Badges + } + return nil +} + +type ListAuthFactorsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // Account to list factors for + ActiveOnly bool `protobuf:"varint,2,opt,name=active_only,json=activeOnly,proto3" json:"active_only,omitempty"` // Only return active (non-expired) factors + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListAuthFactorsRequest) Reset() { + *x = ListAuthFactorsRequest{} + mi := &file_account_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListAuthFactorsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAuthFactorsRequest) ProtoMessage() {} + +func (x *ListAuthFactorsRequest) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[39] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAuthFactorsRequest.ProtoReflect.Descriptor instead. +func (*ListAuthFactorsRequest) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{39} +} + +func (x *ListAuthFactorsRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *ListAuthFactorsRequest) GetActiveOnly() bool { + if x != nil { + return x.ActiveOnly + } + return false +} + +type ListAuthFactorsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Factors []*AccountAuthFactor `protobuf:"bytes,1,rep,name=factors,proto3" json:"factors,omitempty"` // List of auth factors + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListAuthFactorsResponse) Reset() { + *x = ListAuthFactorsResponse{} + mi := &file_account_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListAuthFactorsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAuthFactorsResponse) ProtoMessage() {} + +func (x *ListAuthFactorsResponse) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[40] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListAuthFactorsResponse.ProtoReflect.Descriptor instead. +func (*ListAuthFactorsResponse) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{40} +} + +func (x *ListAuthFactorsResponse) GetFactors() []*AccountAuthFactor { + if x != nil { + return x.Factors + } + return nil +} + +type ListConnectionsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // Account to list connections for + Provider string `protobuf:"bytes,2,opt,name=provider,proto3" json:"provider,omitempty"` // Optional: filter by provider + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListConnectionsRequest) Reset() { + *x = ListConnectionsRequest{} + mi := &file_account_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListConnectionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListConnectionsRequest) ProtoMessage() {} + +func (x *ListConnectionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[41] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListConnectionsRequest.ProtoReflect.Descriptor instead. +func (*ListConnectionsRequest) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{41} +} + +func (x *ListConnectionsRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *ListConnectionsRequest) GetProvider() string { + if x != nil { + return x.Provider + } + return "" +} + +type ListConnectionsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Connections []*AccountConnection `protobuf:"bytes,1,rep,name=connections,proto3" json:"connections,omitempty"` // List of connections + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListConnectionsResponse) Reset() { + *x = ListConnectionsResponse{} + mi := &file_account_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListConnectionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListConnectionsResponse) ProtoMessage() {} + +func (x *ListConnectionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[42] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListConnectionsResponse.ProtoReflect.Descriptor instead. +func (*ListConnectionsResponse) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{42} +} + +func (x *ListConnectionsResponse) GetConnections() []*AccountConnection { + if x != nil { + return x.Connections + } + return nil +} + +// Relationship Requests/Responses +type ListRelationshipsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // Account to list relationships for + Status *int32 `protobuf:"varint,2,opt,name=status,proto3,oneof" json:"status,omitempty"` // Filter by status + PageSize int32 `protobuf:"varint,5,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // Number of results per page + PageToken string `protobuf:"bytes,6,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // Token for pagination + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListRelationshipsRequest) Reset() { + *x = ListRelationshipsRequest{} + mi := &file_account_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListRelationshipsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRelationshipsRequest) ProtoMessage() {} + +func (x *ListRelationshipsRequest) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[43] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRelationshipsRequest.ProtoReflect.Descriptor instead. +func (*ListRelationshipsRequest) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{43} +} + +func (x *ListRelationshipsRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *ListRelationshipsRequest) GetStatus() int32 { + if x != nil && x.Status != nil { + return *x.Status + } + return 0 +} + +func (x *ListRelationshipsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListRelationshipsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +type ListRelationshipsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Relationships []*Relationship `protobuf:"bytes,1,rep,name=relationships,proto3" json:"relationships,omitempty"` // List of relationships + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // Token for next page + TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` // Total number of relationships + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListRelationshipsResponse) Reset() { + *x = ListRelationshipsResponse{} + mi := &file_account_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListRelationshipsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRelationshipsResponse) ProtoMessage() {} + +func (x *ListRelationshipsResponse) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[44] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRelationshipsResponse.ProtoReflect.Descriptor instead. +func (*ListRelationshipsResponse) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{44} +} + +func (x *ListRelationshipsResponse) GetRelationships() []*Relationship { + if x != nil { + return x.Relationships + } + return nil +} + +func (x *ListRelationshipsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListRelationshipsResponse) GetTotalSize() int32 { + if x != nil { + return x.TotalSize + } + return 0 +} + +type GetRelationshipRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + RelatedId string `protobuf:"bytes,2,opt,name=related_id,json=relatedId,proto3" json:"related_id,omitempty"` + Status *int32 `protobuf:"varint,3,opt,name=status,proto3,oneof" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetRelationshipRequest) Reset() { + *x = GetRelationshipRequest{} + mi := &file_account_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetRelationshipRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRelationshipRequest) ProtoMessage() {} + +func (x *GetRelationshipRequest) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[45] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRelationshipRequest.ProtoReflect.Descriptor instead. +func (*GetRelationshipRequest) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{45} +} + +func (x *GetRelationshipRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *GetRelationshipRequest) GetRelatedId() string { + if x != nil { + return x.RelatedId + } + return "" +} + +func (x *GetRelationshipRequest) GetStatus() int32 { + if x != nil && x.Status != nil { + return *x.Status + } + return 0 +} + +type GetRelationshipResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Relationship *Relationship `protobuf:"bytes,1,opt,name=relationship,proto3,oneof" json:"relationship,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetRelationshipResponse) Reset() { + *x = GetRelationshipResponse{} + mi := &file_account_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetRelationshipResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRelationshipResponse) ProtoMessage() {} + +func (x *GetRelationshipResponse) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[46] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRelationshipResponse.ProtoReflect.Descriptor instead. +func (*GetRelationshipResponse) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{46} +} + +func (x *GetRelationshipResponse) GetRelationship() *Relationship { + if x != nil { + return x.Relationship + } + return nil +} + +type ListRelationshipSimpleRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListRelationshipSimpleRequest) Reset() { + *x = ListRelationshipSimpleRequest{} + mi := &file_account_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListRelationshipSimpleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRelationshipSimpleRequest) ProtoMessage() {} + +func (x *ListRelationshipSimpleRequest) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[47] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRelationshipSimpleRequest.ProtoReflect.Descriptor instead. +func (*ListRelationshipSimpleRequest) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{47} +} + +func (x *ListRelationshipSimpleRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +type ListRelationshipSimpleResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountsId []string `protobuf:"bytes,1,rep,name=accounts_id,json=accountsId,proto3" json:"accounts_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListRelationshipSimpleResponse) Reset() { + *x = ListRelationshipSimpleResponse{} + mi := &file_account_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListRelationshipSimpleResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRelationshipSimpleResponse) ProtoMessage() {} + +func (x *ListRelationshipSimpleResponse) ProtoReflect() protoreflect.Message { + mi := &file_account_proto_msgTypes[48] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRelationshipSimpleResponse.ProtoReflect.Descriptor instead. +func (*ListRelationshipSimpleResponse) Descriptor() ([]byte, []int) { + return file_account_proto_rawDescGZIP(), []int{48} +} + +func (x *ListRelationshipSimpleResponse) GetAccountsId() []string { + if x != nil { + return x.AccountsId + } + return nil +} + +var File_account_proto protoreflect.FileDescriptor + +const file_account_proto_rawDesc = "" + + "\n" + + "\raccount.proto\x12\x05proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\n" + + "file.proto\x1a\fwallet.proto\"\x9c\a\n" + + "\aAccount\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n" + + "\x04nick\x18\x03 \x01(\tR\x04nick\x12\x1a\n" + + "\blanguage\x18\x04 \x01(\tR\blanguage\x12\x16\n" + + "\x06region\x18\x12 \x01(\tR\x06region\x12=\n" + + "\factivated_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\vactivatedAt\x12!\n" + + "\fis_superuser\x18\x06 \x01(\bR\visSuperuser\x12/\n" + + "\aprofile\x18\a \x01(\v2\x15.proto.AccountProfileR\aprofile\x12T\n" + + "\x11perk_subscription\x18\x10 \x01(\v2\".proto.SubscriptionReferenceObjectH\x00R\x10perkSubscription\x88\x01\x01\x121\n" + + "\bcontacts\x18\b \x03(\v2\x15.proto.AccountContactR\bcontacts\x12+\n" + + "\x06badges\x18\t \x03(\v2\x13.proto.AccountBadgeR\x06badges\x12;\n" + + "\fauth_factors\x18\n" + + " \x03(\v2\x18.proto.AccountAuthFactorR\vauthFactors\x12:\n" + + "\vconnections\x18\v \x03(\v2\x18.proto.AccountConnectionR\vconnections\x12J\n" + + "\x16outgoing_relationships\x18\f \x03(\v2\x13.proto.RelationshipR\x15outgoingRelationships\x12J\n" + + "\x16incoming_relationships\x18\r \x03(\v2\x13.proto.RelationshipR\x15incomingRelationships\x129\n" + + "\n" + + "created_at\x18\x0e \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\x0f \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x12?\n" + + "\fautomated_id\x18\x11 \x01(\v2\x1c.google.protobuf.StringValueR\vautomatedIdB\x14\n" + + "\x12_perk_subscription\"\xff\x02\n" + + "\rAccountStatus\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x121\n" + + "\battitude\x18\x02 \x01(\x0e2\x15.proto.StatusAttitudeR\battitude\x12\x1b\n" + + "\tis_online\x18\x03 \x01(\bR\bisOnline\x12#\n" + + "\ris_customized\x18\x04 \x01(\bR\fisCustomized\x12!\n" + + "\fis_invisible\x18\x05 \x01(\bR\visInvisible\x12$\n" + + "\x0eis_not_disturb\x18\x06 \x01(\bR\fisNotDisturb\x122\n" + + "\x05label\x18\a \x01(\v2\x1c.google.protobuf.StringValueR\x05label\x129\n" + + "\n" + + "cleared_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\tclearedAt\x12\x1d\n" + + "\n" + + "account_id\x18\t \x01(\tR\taccountId\x12\x12\n" + + "\x04meta\x18\n" + + " \x01(\fR\x04meta\"\xab\x01\n" + + "\rUsernameColor\x12\x12\n" + + "\x04type\x18\x01 \x01(\tR\x04type\x122\n" + + "\x05value\x18\x02 \x01(\v2\x1c.google.protobuf.StringValueR\x05value\x12:\n" + + "\tdirection\x18\x03 \x01(\v2\x1c.google.protobuf.StringValueR\tdirection\x12\x16\n" + + "\x06colors\x18\x04 \x03(\tR\x06colors\"3\n" + + "\vProfileLink\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x10\n" + + "\x03url\x18\x02 \x01(\tR\x03url\"\x8d\n" + + "\n" + + "\x0eAccountProfile\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12;\n" + + "\n" + + "first_name\x18\x02 \x01(\v2\x1c.google.protobuf.StringValueR\tfirstName\x12=\n" + + "\vmiddle_name\x18\x03 \x01(\v2\x1c.google.protobuf.StringValueR\n" + + "middleName\x129\n" + + "\tlast_name\x18\x04 \x01(\v2\x1c.google.protobuf.StringValueR\blastName\x12.\n" + + "\x03bio\x18\x05 \x01(\v2\x1c.google.protobuf.StringValueR\x03bio\x124\n" + + "\x06gender\x18\x06 \x01(\v2\x1c.google.protobuf.StringValueR\x06gender\x128\n" + + "\bpronouns\x18\a \x01(\v2\x1c.google.protobuf.StringValueR\bpronouns\x129\n" + + "\ttime_zone\x18\b \x01(\v2\x1c.google.protobuf.StringValueR\btimeZone\x128\n" + + "\blocation\x18\t \x01(\v2\x1c.google.protobuf.StringValueR\blocation\x126\n" + + "\bbirthday\x18\n" + + " \x01(\v2\x1a.google.protobuf.TimestampR\bbirthday\x12<\n" + + "\flast_seen_at\x18\v \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "lastSeenAt\x12;\n" + + "\fverification\x18\f \x01(\v2\x17.proto.VerificationMarkR\fverification\x12>\n" + + "\factive_badge\x18\r \x01(\v2\x1b.proto.BadgeReferenceObjectR\vactiveBadge\x12\x1e\n" + + "\n" + + "experience\x18\x0e \x01(\x05R\n" + + "experience\x12\x14\n" + + "\x05level\x18\x0f \x01(\x05R\x05level\x12+\n" + + "\x11leveling_progress\x18\x10 \x01(\x01R\x10levelingProgress\x12%\n" + + "\x0esocial_credits\x18\x11 \x01(\x01R\rsocialCredits\x120\n" + + "\x14social_credits_level\x18\x12 \x01(\x05R\x12socialCreditsLevel\x12*\n" + + "\apicture\x18\x13 \x01(\v2\x10.proto.CloudFileR\apicture\x120\n" + + "\n" + + "background\x18\x14 \x01(\v2\x10.proto.CloudFileR\n" + + "background\x12\x1d\n" + + "\n" + + "account_id\x18\x15 \x01(\tR\taccountId\x129\n" + + "\n" + + "created_at\x18\x16 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\x17 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x12@\n" + + "\x0eusername_color\x18\x18 \x01(\v2\x14.proto.UsernameColorH\x00R\rusernameColor\x88\x01\x01\x12(\n" + + "\x05links\x18\x19 \x03(\v2\x12.proto.ProfileLinkR\x05linksB\x11\n" + + "\x0f_username_color\"\xda\x02\n" + + "\x0eAccountContact\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12-\n" + + "\x04type\x18\x02 \x01(\x0e2\x19.proto.AccountContactTypeR\x04type\x12;\n" + + "\vverified_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "verifiedAt\x12\x1d\n" + + "\n" + + "is_primary\x18\x04 \x01(\bR\tisPrimary\x12\x18\n" + + "\acontent\x18\x05 \x01(\tR\acontent\x12\x1d\n" + + "\n" + + "account_id\x18\x06 \x01(\tR\taccountId\x129\n" + + "\n" + + "created_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"\xff\x05\n" + + "\x11AccountAuthFactor\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x120\n" + + "\x04type\x18\x02 \x01(\x0e2\x1c.proto.AccountAuthFactorTypeR\x04type\x124\n" + + "\x06secret\x18\x03 \x01(\v2\x1c.google.protobuf.StringValueR\x06secret\x12<\n" + + "\x06config\x18\x04 \x03(\v2$.proto.AccountAuthFactor.ConfigEntryR\x06config\x12 \n" + + "\vtrustworthy\x18\x05 \x01(\x05R\vtrustworthy\x129\n" + + "\n" + + "enabled_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tenabledAt\x129\n" + + "\n" + + "expired_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\texpiredAt\x12\x1d\n" + + "\n" + + "account_id\x18\b \x01(\tR\taccountId\x12X\n" + + "\x10created_response\x18\t \x03(\v2-.proto.AccountAuthFactor.CreatedResponseEntryR\x0fcreatedResponse\x129\n" + + "\n" + + "created_at\x18\n" + + " \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\v \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x1aQ\n" + + "\vConfigEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12,\n" + + "\x05value\x18\x02 \x01(\v2\x16.google.protobuf.ValueR\x05value:\x028\x01\x1aZ\n" + + "\x14CreatedResponseEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12,\n" + + "\x05value\x18\x02 \x01(\v2\x16.google.protobuf.ValueR\x05value:\x028\x01\"\xb1\x04\n" + + "\fAccountBadge\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04type\x18\x02 \x01(\tR\x04type\x122\n" + + "\x05label\x18\x03 \x01(\v2\x1c.google.protobuf.StringValueR\x05label\x126\n" + + "\acaption\x18\x04 \x01(\v2\x1c.google.protobuf.StringValueR\acaption\x121\n" + + "\x04meta\x18\x05 \x03(\v2\x1d.proto.AccountBadge.MetaEntryR\x04meta\x12=\n" + + "\factivated_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\vactivatedAt\x129\n" + + "\n" + + "expired_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\texpiredAt\x12\x1d\n" + + "\n" + + "account_id\x18\b \x01(\tR\taccountId\x129\n" + + "\n" + + "created_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\n" + + " \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x1aO\n" + + "\tMetaEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12,\n" + + "\x05value\x18\x02 \x01(\v2\x16.google.protobuf.ValueR\x05value:\x028\x01\"\xd0\x04\n" + + "\x11AccountConnection\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1a\n" + + "\bprovider\x18\x02 \x01(\tR\bprovider\x12/\n" + + "\x13provided_identifier\x18\x03 \x01(\tR\x12providedIdentifier\x126\n" + + "\x04meta\x18\x04 \x03(\v2\".proto.AccountConnection.MetaEntryR\x04meta\x12?\n" + + "\faccess_token\x18\x05 \x01(\v2\x1c.google.protobuf.StringValueR\vaccessToken\x12A\n" + + "\rrefresh_token\x18\x06 \x01(\v2\x1c.google.protobuf.StringValueR\frefreshToken\x12<\n" + + "\flast_used_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "lastUsedAt\x12\x1d\n" + + "\n" + + "account_id\x18\b \x01(\tR\taccountId\x129\n" + + "\n" + + "created_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\n" + + " \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x1aO\n" + + "\tMetaEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12,\n" + + "\x05value\x18\x02 \x01(\v2\x16.google.protobuf.ValueR\x05value:\x028\x01\"\x92\x02\n" + + "\x10VerificationMark\x12/\n" + + "\x04type\x18\x01 \x01(\x0e2\x1b.proto.VerificationMarkTypeR\x04type\x12\x14\n" + + "\x05title\x18\x02 \x01(\tR\x05title\x12 \n" + + "\vdescription\x18\x03 \x01(\tR\vdescription\x12\x1f\n" + + "\vverified_by\x18\x04 \x01(\tR\n" + + "verifiedBy\x129\n" + + "\n" + + "created_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"\xcb\x03\n" + + "\x14BadgeReferenceObject\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04type\x18\x02 \x01(\tR\x04type\x122\n" + + "\x05label\x18\x03 \x01(\v2\x1c.google.protobuf.StringValueR\x05label\x126\n" + + "\acaption\x18\x04 \x01(\v2\x1c.google.protobuf.StringValueR\acaption\x129\n" + + "\x04meta\x18\x05 \x03(\v2%.proto.BadgeReferenceObject.MetaEntryR\x04meta\x12=\n" + + "\factivated_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\vactivatedAt\x129\n" + + "\n" + + "expired_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\texpiredAt\x12\x1d\n" + + "\n" + + "account_id\x18\b \x01(\tR\taccountId\x1aO\n" + + "\tMetaEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12,\n" + + "\x05value\x18\x02 \x01(\v2\x16.google.protobuf.ValueR\x05value:\x028\x01\"\xd0\x02\n" + + "\fRelationship\x12\x1d\n" + + "\n" + + "account_id\x18\x01 \x01(\tR\taccountId\x12\x1d\n" + + "\n" + + "related_id\x18\x02 \x01(\tR\trelatedId\x12-\n" + + "\aaccount\x18\x03 \x01(\v2\x0e.proto.AccountH\x00R\aaccount\x88\x01\x01\x12-\n" + + "\arelated\x18\x04 \x01(\v2\x0e.proto.AccountH\x01R\arelated\x88\x01\x01\x12\x16\n" + + "\x06status\x18\x05 \x01(\x05R\x06status\x129\n" + + "\n" + + "created_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAtB\n" + + "\n" + + "\b_accountB\n" + + "\n" + + "\b_related\"\xab\x02\n" + + "\fLevelingInfo\x12#\n" + + "\rcurrent_level\x18\x01 \x01(\x05R\fcurrentLevel\x12-\n" + + "\x12current_experience\x18\x02 \x01(\x05R\x11currentExperience\x122\n" + + "\x15next_level_experience\x18\x03 \x01(\x05R\x13nextLevelExperience\x12:\n" + + "\x19previous_level_experience\x18\x04 \x01(\x05R\x17previousLevelExperience\x12%\n" + + "\x0elevel_progress\x18\x05 \x01(\x01R\rlevelProgress\x120\n" + + "\x14experience_per_level\x18\x06 \x03(\x05R\x12experiencePerLevel\"\xff\x03\n" + + "\tActionLog\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" + + "\x06action\x18\x02 \x01(\tR\x06action\x12.\n" + + "\x04meta\x18\x03 \x03(\v2\x1a.proto.ActionLog.MetaEntryR\x04meta\x12;\n" + + "\n" + + "user_agent\x18\x04 \x01(\v2\x1c.google.protobuf.StringValueR\tuserAgent\x12;\n" + + "\n" + + "ip_address\x18\x05 \x01(\v2\x1c.google.protobuf.StringValueR\tipAddress\x128\n" + + "\blocation\x18\x06 \x01(\v2\x1c.google.protobuf.StringValueR\blocation\x12\x1d\n" + + "\n" + + "account_id\x18\a \x01(\tR\taccountId\x12;\n" + + "\n" + + "session_id\x18\b \x01(\v2\x1c.google.protobuf.StringValueR\tsessionId\x129\n" + + "\n" + + "created_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x1aO\n" + + "\tMetaEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12,\n" + + "\x05value\x18\x02 \x01(\v2\x16.google.protobuf.ValueR\x05value:\x028\x01\"Q\n" + + "\x1dGetAccountStatusBatchResponse\x120\n" + + "\bstatuses\x18\x01 \x03(\v2\x14.proto.AccountStatusR\bstatuses\"\xce\x03\n" + + "\x16CreateActionLogRequest\x12\x16\n" + + "\x06action\x18\x01 \x01(\tR\x06action\x12;\n" + + "\x04meta\x18\x02 \x03(\v2'.proto.CreateActionLogRequest.MetaEntryR\x04meta\x12;\n" + + "\n" + + "user_agent\x18\x03 \x01(\v2\x1c.google.protobuf.StringValueR\tuserAgent\x12;\n" + + "\n" + + "ip_address\x18\x04 \x01(\v2\x1c.google.protobuf.StringValueR\tipAddress\x128\n" + + "\blocation\x18\x05 \x01(\v2\x1c.google.protobuf.StringValueR\blocation\x12\x1d\n" + + "\n" + + "account_id\x18\x06 \x01(\tR\taccountId\x12;\n" + + "\n" + + "session_id\x18\a \x01(\v2\x1c.google.protobuf.StringValueR\tsessionId\x1aO\n" + + "\tMetaEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12,\n" + + "\x05value\x18\x02 \x01(\v2\x16.google.protobuf.ValueR\x05value:\x028\x01\"J\n" + + "\x17CreateActionLogResponse\x12/\n" + + "\n" + + "action_log\x18\x01 \x01(\v2\x10.proto.ActionLogR\tactionLog\"\xa5\x01\n" + + "\x15ListActionLogsRequest\x12\x1d\n" + + "\n" + + "account_id\x18\x01 \x01(\tR\taccountId\x12\x16\n" + + "\x06action\x18\x02 \x01(\tR\x06action\x12\x1b\n" + + "\tpage_size\x18\x03 \x01(\x05R\bpageSize\x12\x1d\n" + + "\n" + + "page_token\x18\x04 \x01(\tR\tpageToken\x12\x19\n" + + "\border_by\x18\x05 \x01(\tR\aorderBy\"\x92\x01\n" + + "\x16ListActionLogsResponse\x121\n" + + "\vaction_logs\x18\x01 \x03(\v2\x10.proto.ActionLogR\n" + + "actionLogs\x12&\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x12\x1d\n" + + "\n" + + "total_size\x18\x03 \x01(\x05R\ttotalSize\"#\n" + + "\x11GetAccountRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"9\n" + + "\x14GetBotAccountRequest\x12!\n" + + "\fautomated_id\x18\x01 \x01(\tR\vautomatedId\"(\n" + + "\x16GetAccountBatchRequest\x12\x0e\n" + + "\x02id\x18\x01 \x03(\tR\x02id\">\n" + + "\x19GetBotAccountBatchRequest\x12!\n" + + "\fautomated_id\x18\x01 \x03(\tR\vautomatedId\"1\n" + + "\x19LookupAccountBatchRequest\x12\x14\n" + + "\x05names\x18\x01 \x03(\tR\x05names\",\n" + + "\x14SearchAccountRequest\x12\x14\n" + + "\x05query\x18\x01 \x01(\tR\x05query\"E\n" + + "\x17GetAccountBatchResponse\x12*\n" + + "\baccounts\x18\x01 \x03(\v2\x0e.proto.AccountR\baccounts\"\xae\x01\n" + + "\x14CreateAccountRequest\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" + + "\x04nick\x18\x02 \x01(\tR\x04nick\x12\x1a\n" + + "\blanguage\x18\x03 \x01(\tR\blanguage\x12!\n" + + "\fis_superuser\x18\x04 \x01(\bR\visSuperuser\x12/\n" + + "\aprofile\x18\x05 \x01(\v2\x15.proto.AccountProfileR\aprofile\"\x83\x02\n" + + "\x14UpdateAccountRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x120\n" + + "\x04name\x18\x02 \x01(\v2\x1c.google.protobuf.StringValueR\x04name\x120\n" + + "\x04nick\x18\x03 \x01(\v2\x1c.google.protobuf.StringValueR\x04nick\x128\n" + + "\blanguage\x18\x04 \x01(\v2\x1c.google.protobuf.StringValueR\blanguage\x12=\n" + + "\fis_superuser\x18\x05 \x01(\v2\x1a.google.protobuf.BoolValueR\visSuperuser\"<\n" + + "\x14DeleteAccountRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x14\n" + + "\x05purge\x18\x02 \x01(\bR\x05purge\"\x84\x01\n" + + "\x13ListAccountsRequest\x12\x1b\n" + + "\tpage_size\x18\x01 \x01(\x05R\bpageSize\x12\x1d\n" + + "\n" + + "page_token\x18\x02 \x01(\tR\tpageToken\x12\x16\n" + + "\x06filter\x18\x03 \x01(\tR\x06filter\x12\x19\n" + + "\border_by\x18\x04 \x01(\tR\aorderBy\"\x89\x01\n" + + "\x14ListAccountsResponse\x12*\n" + + "\baccounts\x18\x01 \x03(\v2\x0e.proto.AccountR\baccounts\x12&\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x12\x1d\n" + + "\n" + + "total_size\x18\x03 \x01(\x05R\ttotalSize\"2\n" + + "\x11GetProfileRequest\x12\x1d\n" + + "\n" + + "account_id\x18\x01 \x01(\tR\taccountId\"\xa3\x01\n" + + "\x14UpdateProfileRequest\x12\x1d\n" + + "\n" + + "account_id\x18\x01 \x01(\tR\taccountId\x12/\n" + + "\aprofile\x18\x02 \x01(\v2\x15.proto.AccountProfileR\aprofile\x12;\n" + + "\vupdate_mask\x18\x03 \x01(\v2\x1a.google.protobuf.FieldMaskR\n" + + "updateMask\"\x9a\x01\n" + + "\x11AddContactRequest\x12\x1d\n" + + "\n" + + "account_id\x18\x01 \x01(\tR\taccountId\x12-\n" + + "\x04type\x18\x02 \x01(\x0e2\x19.proto.AccountContactTypeR\x04type\x12\x18\n" + + "\acontent\x18\x03 \x01(\tR\acontent\x12\x1d\n" + + "\n" + + "is_primary\x18\x04 \x01(\bR\tisPrimary\"\x88\x01\n" + + "\x13ListContactsRequest\x12\x1d\n" + + "\n" + + "account_id\x18\x01 \x01(\tR\taccountId\x12-\n" + + "\x04type\x18\x02 \x01(\x0e2\x19.proto.AccountContactTypeR\x04type\x12#\n" + + "\rverified_only\x18\x03 \x01(\bR\fverifiedOnly\"I\n" + + "\x14ListContactsResponse\x121\n" + + "\bcontacts\x18\x01 \x03(\v2\x15.proto.AccountContactR\bcontacts\"Y\n" + + "\x14VerifyContactRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n" + + "\n" + + "account_id\x18\x02 \x01(\tR\taccountId\x12\x12\n" + + "\x04code\x18\x03 \x01(\tR\x04code\"g\n" + + "\x11ListBadgesRequest\x12\x1d\n" + + "\n" + + "account_id\x18\x01 \x01(\tR\taccountId\x12\x12\n" + + "\x04type\x18\x02 \x01(\tR\x04type\x12\x1f\n" + + "\vactive_only\x18\x03 \x01(\bR\n" + + "activeOnly\"A\n" + + "\x12ListBadgesResponse\x12+\n" + + "\x06badges\x18\x01 \x03(\v2\x13.proto.AccountBadgeR\x06badges\"X\n" + + "\x16ListAuthFactorsRequest\x12\x1d\n" + + "\n" + + "account_id\x18\x01 \x01(\tR\taccountId\x12\x1f\n" + + "\vactive_only\x18\x02 \x01(\bR\n" + + "activeOnly\"M\n" + + "\x17ListAuthFactorsResponse\x122\n" + + "\afactors\x18\x01 \x03(\v2\x18.proto.AccountAuthFactorR\afactors\"S\n" + + "\x16ListConnectionsRequest\x12\x1d\n" + + "\n" + + "account_id\x18\x01 \x01(\tR\taccountId\x12\x1a\n" + + "\bprovider\x18\x02 \x01(\tR\bprovider\"U\n" + + "\x17ListConnectionsResponse\x12:\n" + + "\vconnections\x18\x01 \x03(\v2\x18.proto.AccountConnectionR\vconnections\"\x9d\x01\n" + + "\x18ListRelationshipsRequest\x12\x1d\n" + + "\n" + + "account_id\x18\x01 \x01(\tR\taccountId\x12\x1b\n" + + "\x06status\x18\x02 \x01(\x05H\x00R\x06status\x88\x01\x01\x12\x1b\n" + + "\tpage_size\x18\x05 \x01(\x05R\bpageSize\x12\x1d\n" + + "\n" + + "page_token\x18\x06 \x01(\tR\tpageTokenB\t\n" + + "\a_status\"\x9d\x01\n" + + "\x19ListRelationshipsResponse\x129\n" + + "\rrelationships\x18\x01 \x03(\v2\x13.proto.RelationshipR\rrelationships\x12&\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x12\x1d\n" + + "\n" + + "total_size\x18\x03 \x01(\x05R\ttotalSize\"~\n" + + "\x16GetRelationshipRequest\x12\x1d\n" + + "\n" + + "account_id\x18\x01 \x01(\tR\taccountId\x12\x1d\n" + + "\n" + + "related_id\x18\x02 \x01(\tR\trelatedId\x12\x1b\n" + + "\x06status\x18\x03 \x01(\x05H\x00R\x06status\x88\x01\x01B\t\n" + + "\a_status\"h\n" + + "\x17GetRelationshipResponse\x12<\n" + + "\frelationship\x18\x01 \x01(\v2\x13.proto.RelationshipH\x00R\frelationship\x88\x01\x01B\x0f\n" + + "\r_relationship\">\n" + + "\x1dListRelationshipSimpleRequest\x12\x1d\n" + + "\n" + + "account_id\x18\x01 \x01(\tR\taccountId\"A\n" + + "\x1eListRelationshipSimpleResponse\x12\x1f\n" + + "\vaccounts_id\x18\x01 \x03(\tR\n" + + "accountsId*Z\n" + + "\x0eStatusAttitude\x12\x1f\n" + + "\x1bSTATUS_ATTITUDE_UNSPECIFIED\x10\x00\x12\f\n" + + "\bPOSITIVE\x10\x01\x12\f\n" + + "\bNEGATIVE\x10\x02\x12\v\n" + + "\aNEUTRAL\x10\x03*d\n" + + "\x12AccountContactType\x12$\n" + + " ACCOUNT_CONTACT_TYPE_UNSPECIFIED\x10\x00\x12\t\n" + + "\x05EMAIL\x10\x01\x12\x10\n" + + "\fPHONE_NUMBER\x10\x02\x12\v\n" + + "\aADDRESS\x10\x03*\x86\x01\n" + + "\x15AccountAuthFactorType\x12 \n" + + "\x1cAUTH_FACTOR_TYPE_UNSPECIFIED\x10\x00\x12\f\n" + + "\bPASSWORD\x10\x01\x12\x0e\n" + + "\n" + + "EMAIL_CODE\x10\x02\x12\x0f\n" + + "\vIN_APP_CODE\x10\x03\x12\x0e\n" + + "\n" + + "TIMED_CODE\x10\x04\x12\f\n" + + "\bPIN_CODE\x10\x05*\xa6\x01\n" + + "\x14VerificationMarkType\x12&\n" + + "\"VERIFICATION_MARK_TYPE_UNSPECIFIED\x10\x00\x12\f\n" + + "\bOFFICIAL\x10\x01\x12\x0e\n" + + "\n" + + "INDIVIDUAL\x10\x02\x12\x10\n" + + "\fORGANIZATION\x10\x03\x12\x0e\n" + + "\n" + + "GOVERNMENT\x10\x04\x12\v\n" + + "\aCREATOR\x10\x05\x12\r\n" + + "\tDEVELOPER\x10\x06\x12\n" + + "\n" + + "\x06PARODY\x10\a2\x86\f\n" + + "\x0eAccountService\x128\n" + + "\n" + + "GetAccount\x12\x18.proto.GetAccountRequest\x1a\x0e.proto.Account\"\x00\x12>\n" + + "\rGetBotAccount\x12\x1b.proto.GetBotAccountRequest\x1a\x0e.proto.Account\"\x00\x12R\n" + + "\x0fGetAccountBatch\x12\x1d.proto.GetAccountBatchRequest\x1a\x1e.proto.GetAccountBatchResponse\"\x00\x12X\n" + + "\x12GetBotAccountBatch\x12 .proto.GetBotAccountBatchRequest\x1a\x1e.proto.GetAccountBatchResponse\"\x00\x12X\n" + + "\x12LookupAccountBatch\x12 .proto.LookupAccountBatchRequest\x1a\x1e.proto.GetAccountBatchResponse\"\x00\x12N\n" + + "\rSearchAccount\x12\x1b.proto.SearchAccountRequest\x1a\x1e.proto.GetAccountBatchResponse\"\x00\x12I\n" + + "\fListAccounts\x12\x1a.proto.ListAccountsRequest\x1a\x1b.proto.ListAccountsResponse\"\x00\x12D\n" + + "\x10GetAccountStatus\x12\x18.proto.GetAccountRequest\x1a\x14.proto.AccountStatus\"\x00\x12^\n" + + "\x15GetAccountStatusBatch\x12\x1d.proto.GetAccountBatchRequest\x1a$.proto.GetAccountStatusBatchResponse\"\x00\x12?\n" + + "\n" + + "GetProfile\x12\x18.proto.GetProfileRequest\x1a\x15.proto.AccountProfile\"\x00\x12I\n" + + "\fListContacts\x12\x1a.proto.ListContactsRequest\x1a\x1b.proto.ListContactsResponse\"\x00\x12C\n" + + "\n" + + "ListBadges\x12\x18.proto.ListBadgesRequest\x1a\x19.proto.ListBadgesResponse\"\x00\x12R\n" + + "\x0fListAuthFactors\x12\x1d.proto.ListAuthFactorsRequest\x1a\x1e.proto.ListAuthFactorsResponse\"\x00\x12R\n" + + "\x0fListConnections\x12\x1d.proto.ListConnectionsRequest\x1a\x1e.proto.ListConnectionsResponse\"\x00\x12X\n" + + "\x11ListRelationships\x12\x1f.proto.ListRelationshipsRequest\x1a .proto.ListRelationshipsResponse\"\x00\x12R\n" + + "\x0fGetRelationship\x12\x1d.proto.GetRelationshipRequest\x1a\x1e.proto.GetRelationshipResponse\"\x00\x12N\n" + + "\x0fHasRelationship\x12\x1d.proto.GetRelationshipRequest\x1a\x1a.google.protobuf.BoolValue\"\x00\x12\\\n" + + "\vListFriends\x12$.proto.ListRelationshipSimpleRequest\x1a%.proto.ListRelationshipSimpleResponse\"\x00\x12\\\n" + + "\vListBlocked\x12$.proto.ListRelationshipSimpleRequest\x1a%.proto.ListRelationshipSimpleResponse\"\x002\xb7\x01\n" + + "\x10ActionLogService\x12R\n" + + "\x0fCreateActionLog\x12\x1d.proto.CreateActionLogRequest\x1a\x1e.proto.CreateActionLogResponse\"\x00\x12O\n" + + "\x0eListActionLogs\x12\x1c.proto.ListActionLogsRequest\x1a\x1d.proto.ListActionLogsResponse\"\x00BUZ7git.solsynth.dev/goatworks/turbine/pkg/shared/proto/gen\xaa\x02\x19DysonNetwork.Shared.Protob\x06proto3" + +var ( + file_account_proto_rawDescOnce sync.Once + file_account_proto_rawDescData []byte +) + +func file_account_proto_rawDescGZIP() []byte { + file_account_proto_rawDescOnce.Do(func() { + file_account_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_account_proto_rawDesc), len(file_account_proto_rawDesc))) + }) + return file_account_proto_rawDescData +} + +var file_account_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_account_proto_msgTypes = make([]protoimpl.MessageInfo, 56) +var file_account_proto_goTypes = []any{ + (StatusAttitude)(0), // 0: proto.StatusAttitude + (AccountContactType)(0), // 1: proto.AccountContactType + (AccountAuthFactorType)(0), // 2: proto.AccountAuthFactorType + (VerificationMarkType)(0), // 3: proto.VerificationMarkType + (*Account)(nil), // 4: proto.Account + (*AccountStatus)(nil), // 5: proto.AccountStatus + (*UsernameColor)(nil), // 6: proto.UsernameColor + (*ProfileLink)(nil), // 7: proto.ProfileLink + (*AccountProfile)(nil), // 8: proto.AccountProfile + (*AccountContact)(nil), // 9: proto.AccountContact + (*AccountAuthFactor)(nil), // 10: proto.AccountAuthFactor + (*AccountBadge)(nil), // 11: proto.AccountBadge + (*AccountConnection)(nil), // 12: proto.AccountConnection + (*VerificationMark)(nil), // 13: proto.VerificationMark + (*BadgeReferenceObject)(nil), // 14: proto.BadgeReferenceObject + (*Relationship)(nil), // 15: proto.Relationship + (*LevelingInfo)(nil), // 16: proto.LevelingInfo + (*ActionLog)(nil), // 17: proto.ActionLog + (*GetAccountStatusBatchResponse)(nil), // 18: proto.GetAccountStatusBatchResponse + (*CreateActionLogRequest)(nil), // 19: proto.CreateActionLogRequest + (*CreateActionLogResponse)(nil), // 20: proto.CreateActionLogResponse + (*ListActionLogsRequest)(nil), // 21: proto.ListActionLogsRequest + (*ListActionLogsResponse)(nil), // 22: proto.ListActionLogsResponse + (*GetAccountRequest)(nil), // 23: proto.GetAccountRequest + (*GetBotAccountRequest)(nil), // 24: proto.GetBotAccountRequest + (*GetAccountBatchRequest)(nil), // 25: proto.GetAccountBatchRequest + (*GetBotAccountBatchRequest)(nil), // 26: proto.GetBotAccountBatchRequest + (*LookupAccountBatchRequest)(nil), // 27: proto.LookupAccountBatchRequest + (*SearchAccountRequest)(nil), // 28: proto.SearchAccountRequest + (*GetAccountBatchResponse)(nil), // 29: proto.GetAccountBatchResponse + (*CreateAccountRequest)(nil), // 30: proto.CreateAccountRequest + (*UpdateAccountRequest)(nil), // 31: proto.UpdateAccountRequest + (*DeleteAccountRequest)(nil), // 32: proto.DeleteAccountRequest + (*ListAccountsRequest)(nil), // 33: proto.ListAccountsRequest + (*ListAccountsResponse)(nil), // 34: proto.ListAccountsResponse + (*GetProfileRequest)(nil), // 35: proto.GetProfileRequest + (*UpdateProfileRequest)(nil), // 36: proto.UpdateProfileRequest + (*AddContactRequest)(nil), // 37: proto.AddContactRequest + (*ListContactsRequest)(nil), // 38: proto.ListContactsRequest + (*ListContactsResponse)(nil), // 39: proto.ListContactsResponse + (*VerifyContactRequest)(nil), // 40: proto.VerifyContactRequest + (*ListBadgesRequest)(nil), // 41: proto.ListBadgesRequest + (*ListBadgesResponse)(nil), // 42: proto.ListBadgesResponse + (*ListAuthFactorsRequest)(nil), // 43: proto.ListAuthFactorsRequest + (*ListAuthFactorsResponse)(nil), // 44: proto.ListAuthFactorsResponse + (*ListConnectionsRequest)(nil), // 45: proto.ListConnectionsRequest + (*ListConnectionsResponse)(nil), // 46: proto.ListConnectionsResponse + (*ListRelationshipsRequest)(nil), // 47: proto.ListRelationshipsRequest + (*ListRelationshipsResponse)(nil), // 48: proto.ListRelationshipsResponse + (*GetRelationshipRequest)(nil), // 49: proto.GetRelationshipRequest + (*GetRelationshipResponse)(nil), // 50: proto.GetRelationshipResponse + (*ListRelationshipSimpleRequest)(nil), // 51: proto.ListRelationshipSimpleRequest + (*ListRelationshipSimpleResponse)(nil), // 52: proto.ListRelationshipSimpleResponse + nil, // 53: proto.AccountAuthFactor.ConfigEntry + nil, // 54: proto.AccountAuthFactor.CreatedResponseEntry + nil, // 55: proto.AccountBadge.MetaEntry + nil, // 56: proto.AccountConnection.MetaEntry + nil, // 57: proto.BadgeReferenceObject.MetaEntry + nil, // 58: proto.ActionLog.MetaEntry + nil, // 59: proto.CreateActionLogRequest.MetaEntry + (*timestamppb.Timestamp)(nil), // 60: google.protobuf.Timestamp + (*SubscriptionReferenceObject)(nil), // 61: proto.SubscriptionReferenceObject + (*wrapperspb.StringValue)(nil), // 62: google.protobuf.StringValue + (*CloudFile)(nil), // 63: proto.CloudFile + (*wrapperspb.BoolValue)(nil), // 64: google.protobuf.BoolValue + (*fieldmaskpb.FieldMask)(nil), // 65: google.protobuf.FieldMask + (*structpb.Value)(nil), // 66: google.protobuf.Value +} +var file_account_proto_depIdxs = []int32{ + 60, // 0: proto.Account.activated_at:type_name -> google.protobuf.Timestamp + 8, // 1: proto.Account.profile:type_name -> proto.AccountProfile + 61, // 2: proto.Account.perk_subscription:type_name -> proto.SubscriptionReferenceObject + 9, // 3: proto.Account.contacts:type_name -> proto.AccountContact + 11, // 4: proto.Account.badges:type_name -> proto.AccountBadge + 10, // 5: proto.Account.auth_factors:type_name -> proto.AccountAuthFactor + 12, // 6: proto.Account.connections:type_name -> proto.AccountConnection + 15, // 7: proto.Account.outgoing_relationships:type_name -> proto.Relationship + 15, // 8: proto.Account.incoming_relationships:type_name -> proto.Relationship + 60, // 9: proto.Account.created_at:type_name -> google.protobuf.Timestamp + 60, // 10: proto.Account.updated_at:type_name -> google.protobuf.Timestamp + 62, // 11: proto.Account.automated_id:type_name -> google.protobuf.StringValue + 0, // 12: proto.AccountStatus.attitude:type_name -> proto.StatusAttitude + 62, // 13: proto.AccountStatus.label:type_name -> google.protobuf.StringValue + 60, // 14: proto.AccountStatus.cleared_at:type_name -> google.protobuf.Timestamp + 62, // 15: proto.UsernameColor.value:type_name -> google.protobuf.StringValue + 62, // 16: proto.UsernameColor.direction:type_name -> google.protobuf.StringValue + 62, // 17: proto.AccountProfile.first_name:type_name -> google.protobuf.StringValue + 62, // 18: proto.AccountProfile.middle_name:type_name -> google.protobuf.StringValue + 62, // 19: proto.AccountProfile.last_name:type_name -> google.protobuf.StringValue + 62, // 20: proto.AccountProfile.bio:type_name -> google.protobuf.StringValue + 62, // 21: proto.AccountProfile.gender:type_name -> google.protobuf.StringValue + 62, // 22: proto.AccountProfile.pronouns:type_name -> google.protobuf.StringValue + 62, // 23: proto.AccountProfile.time_zone:type_name -> google.protobuf.StringValue + 62, // 24: proto.AccountProfile.location:type_name -> google.protobuf.StringValue + 60, // 25: proto.AccountProfile.birthday:type_name -> google.protobuf.Timestamp + 60, // 26: proto.AccountProfile.last_seen_at:type_name -> google.protobuf.Timestamp + 13, // 27: proto.AccountProfile.verification:type_name -> proto.VerificationMark + 14, // 28: proto.AccountProfile.active_badge:type_name -> proto.BadgeReferenceObject + 63, // 29: proto.AccountProfile.picture:type_name -> proto.CloudFile + 63, // 30: proto.AccountProfile.background:type_name -> proto.CloudFile + 60, // 31: proto.AccountProfile.created_at:type_name -> google.protobuf.Timestamp + 60, // 32: proto.AccountProfile.updated_at:type_name -> google.protobuf.Timestamp + 6, // 33: proto.AccountProfile.username_color:type_name -> proto.UsernameColor + 7, // 34: proto.AccountProfile.links:type_name -> proto.ProfileLink + 1, // 35: proto.AccountContact.type:type_name -> proto.AccountContactType + 60, // 36: proto.AccountContact.verified_at:type_name -> google.protobuf.Timestamp + 60, // 37: proto.AccountContact.created_at:type_name -> google.protobuf.Timestamp + 60, // 38: proto.AccountContact.updated_at:type_name -> google.protobuf.Timestamp + 2, // 39: proto.AccountAuthFactor.type:type_name -> proto.AccountAuthFactorType + 62, // 40: proto.AccountAuthFactor.secret:type_name -> google.protobuf.StringValue + 53, // 41: proto.AccountAuthFactor.config:type_name -> proto.AccountAuthFactor.ConfigEntry + 60, // 42: proto.AccountAuthFactor.enabled_at:type_name -> google.protobuf.Timestamp + 60, // 43: proto.AccountAuthFactor.expired_at:type_name -> google.protobuf.Timestamp + 54, // 44: proto.AccountAuthFactor.created_response:type_name -> proto.AccountAuthFactor.CreatedResponseEntry + 60, // 45: proto.AccountAuthFactor.created_at:type_name -> google.protobuf.Timestamp + 60, // 46: proto.AccountAuthFactor.updated_at:type_name -> google.protobuf.Timestamp + 62, // 47: proto.AccountBadge.label:type_name -> google.protobuf.StringValue + 62, // 48: proto.AccountBadge.caption:type_name -> google.protobuf.StringValue + 55, // 49: proto.AccountBadge.meta:type_name -> proto.AccountBadge.MetaEntry + 60, // 50: proto.AccountBadge.activated_at:type_name -> google.protobuf.Timestamp + 60, // 51: proto.AccountBadge.expired_at:type_name -> google.protobuf.Timestamp + 60, // 52: proto.AccountBadge.created_at:type_name -> google.protobuf.Timestamp + 60, // 53: proto.AccountBadge.updated_at:type_name -> google.protobuf.Timestamp + 56, // 54: proto.AccountConnection.meta:type_name -> proto.AccountConnection.MetaEntry + 62, // 55: proto.AccountConnection.access_token:type_name -> google.protobuf.StringValue + 62, // 56: proto.AccountConnection.refresh_token:type_name -> google.protobuf.StringValue + 60, // 57: proto.AccountConnection.last_used_at:type_name -> google.protobuf.Timestamp + 60, // 58: proto.AccountConnection.created_at:type_name -> google.protobuf.Timestamp + 60, // 59: proto.AccountConnection.updated_at:type_name -> google.protobuf.Timestamp + 3, // 60: proto.VerificationMark.type:type_name -> proto.VerificationMarkType + 60, // 61: proto.VerificationMark.created_at:type_name -> google.protobuf.Timestamp + 60, // 62: proto.VerificationMark.updated_at:type_name -> google.protobuf.Timestamp + 62, // 63: proto.BadgeReferenceObject.label:type_name -> google.protobuf.StringValue + 62, // 64: proto.BadgeReferenceObject.caption:type_name -> google.protobuf.StringValue + 57, // 65: proto.BadgeReferenceObject.meta:type_name -> proto.BadgeReferenceObject.MetaEntry + 60, // 66: proto.BadgeReferenceObject.activated_at:type_name -> google.protobuf.Timestamp + 60, // 67: proto.BadgeReferenceObject.expired_at:type_name -> google.protobuf.Timestamp + 4, // 68: proto.Relationship.account:type_name -> proto.Account + 4, // 69: proto.Relationship.related:type_name -> proto.Account + 60, // 70: proto.Relationship.created_at:type_name -> google.protobuf.Timestamp + 60, // 71: proto.Relationship.updated_at:type_name -> google.protobuf.Timestamp + 58, // 72: proto.ActionLog.meta:type_name -> proto.ActionLog.MetaEntry + 62, // 73: proto.ActionLog.user_agent:type_name -> google.protobuf.StringValue + 62, // 74: proto.ActionLog.ip_address:type_name -> google.protobuf.StringValue + 62, // 75: proto.ActionLog.location:type_name -> google.protobuf.StringValue + 62, // 76: proto.ActionLog.session_id:type_name -> google.protobuf.StringValue + 60, // 77: proto.ActionLog.created_at:type_name -> google.protobuf.Timestamp + 5, // 78: proto.GetAccountStatusBatchResponse.statuses:type_name -> proto.AccountStatus + 59, // 79: proto.CreateActionLogRequest.meta:type_name -> proto.CreateActionLogRequest.MetaEntry + 62, // 80: proto.CreateActionLogRequest.user_agent:type_name -> google.protobuf.StringValue + 62, // 81: proto.CreateActionLogRequest.ip_address:type_name -> google.protobuf.StringValue + 62, // 82: proto.CreateActionLogRequest.location:type_name -> google.protobuf.StringValue + 62, // 83: proto.CreateActionLogRequest.session_id:type_name -> google.protobuf.StringValue + 17, // 84: proto.CreateActionLogResponse.action_log:type_name -> proto.ActionLog + 17, // 85: proto.ListActionLogsResponse.action_logs:type_name -> proto.ActionLog + 4, // 86: proto.GetAccountBatchResponse.accounts:type_name -> proto.Account + 8, // 87: proto.CreateAccountRequest.profile:type_name -> proto.AccountProfile + 62, // 88: proto.UpdateAccountRequest.name:type_name -> google.protobuf.StringValue + 62, // 89: proto.UpdateAccountRequest.nick:type_name -> google.protobuf.StringValue + 62, // 90: proto.UpdateAccountRequest.language:type_name -> google.protobuf.StringValue + 64, // 91: proto.UpdateAccountRequest.is_superuser:type_name -> google.protobuf.BoolValue + 4, // 92: proto.ListAccountsResponse.accounts:type_name -> proto.Account + 8, // 93: proto.UpdateProfileRequest.profile:type_name -> proto.AccountProfile + 65, // 94: proto.UpdateProfileRequest.update_mask:type_name -> google.protobuf.FieldMask + 1, // 95: proto.AddContactRequest.type:type_name -> proto.AccountContactType + 1, // 96: proto.ListContactsRequest.type:type_name -> proto.AccountContactType + 9, // 97: proto.ListContactsResponse.contacts:type_name -> proto.AccountContact + 11, // 98: proto.ListBadgesResponse.badges:type_name -> proto.AccountBadge + 10, // 99: proto.ListAuthFactorsResponse.factors:type_name -> proto.AccountAuthFactor + 12, // 100: proto.ListConnectionsResponse.connections:type_name -> proto.AccountConnection + 15, // 101: proto.ListRelationshipsResponse.relationships:type_name -> proto.Relationship + 15, // 102: proto.GetRelationshipResponse.relationship:type_name -> proto.Relationship + 66, // 103: proto.AccountAuthFactor.ConfigEntry.value:type_name -> google.protobuf.Value + 66, // 104: proto.AccountAuthFactor.CreatedResponseEntry.value:type_name -> google.protobuf.Value + 66, // 105: proto.AccountBadge.MetaEntry.value:type_name -> google.protobuf.Value + 66, // 106: proto.AccountConnection.MetaEntry.value:type_name -> google.protobuf.Value + 66, // 107: proto.BadgeReferenceObject.MetaEntry.value:type_name -> google.protobuf.Value + 66, // 108: proto.ActionLog.MetaEntry.value:type_name -> google.protobuf.Value + 66, // 109: proto.CreateActionLogRequest.MetaEntry.value:type_name -> google.protobuf.Value + 23, // 110: proto.AccountService.GetAccount:input_type -> proto.GetAccountRequest + 24, // 111: proto.AccountService.GetBotAccount:input_type -> proto.GetBotAccountRequest + 25, // 112: proto.AccountService.GetAccountBatch:input_type -> proto.GetAccountBatchRequest + 26, // 113: proto.AccountService.GetBotAccountBatch:input_type -> proto.GetBotAccountBatchRequest + 27, // 114: proto.AccountService.LookupAccountBatch:input_type -> proto.LookupAccountBatchRequest + 28, // 115: proto.AccountService.SearchAccount:input_type -> proto.SearchAccountRequest + 33, // 116: proto.AccountService.ListAccounts:input_type -> proto.ListAccountsRequest + 23, // 117: proto.AccountService.GetAccountStatus:input_type -> proto.GetAccountRequest + 25, // 118: proto.AccountService.GetAccountStatusBatch:input_type -> proto.GetAccountBatchRequest + 35, // 119: proto.AccountService.GetProfile:input_type -> proto.GetProfileRequest + 38, // 120: proto.AccountService.ListContacts:input_type -> proto.ListContactsRequest + 41, // 121: proto.AccountService.ListBadges:input_type -> proto.ListBadgesRequest + 43, // 122: proto.AccountService.ListAuthFactors:input_type -> proto.ListAuthFactorsRequest + 45, // 123: proto.AccountService.ListConnections:input_type -> proto.ListConnectionsRequest + 47, // 124: proto.AccountService.ListRelationships:input_type -> proto.ListRelationshipsRequest + 49, // 125: proto.AccountService.GetRelationship:input_type -> proto.GetRelationshipRequest + 49, // 126: proto.AccountService.HasRelationship:input_type -> proto.GetRelationshipRequest + 51, // 127: proto.AccountService.ListFriends:input_type -> proto.ListRelationshipSimpleRequest + 51, // 128: proto.AccountService.ListBlocked:input_type -> proto.ListRelationshipSimpleRequest + 19, // 129: proto.ActionLogService.CreateActionLog:input_type -> proto.CreateActionLogRequest + 21, // 130: proto.ActionLogService.ListActionLogs:input_type -> proto.ListActionLogsRequest + 4, // 131: proto.AccountService.GetAccount:output_type -> proto.Account + 4, // 132: proto.AccountService.GetBotAccount:output_type -> proto.Account + 29, // 133: proto.AccountService.GetAccountBatch:output_type -> proto.GetAccountBatchResponse + 29, // 134: proto.AccountService.GetBotAccountBatch:output_type -> proto.GetAccountBatchResponse + 29, // 135: proto.AccountService.LookupAccountBatch:output_type -> proto.GetAccountBatchResponse + 29, // 136: proto.AccountService.SearchAccount:output_type -> proto.GetAccountBatchResponse + 34, // 137: proto.AccountService.ListAccounts:output_type -> proto.ListAccountsResponse + 5, // 138: proto.AccountService.GetAccountStatus:output_type -> proto.AccountStatus + 18, // 139: proto.AccountService.GetAccountStatusBatch:output_type -> proto.GetAccountStatusBatchResponse + 8, // 140: proto.AccountService.GetProfile:output_type -> proto.AccountProfile + 39, // 141: proto.AccountService.ListContacts:output_type -> proto.ListContactsResponse + 42, // 142: proto.AccountService.ListBadges:output_type -> proto.ListBadgesResponse + 44, // 143: proto.AccountService.ListAuthFactors:output_type -> proto.ListAuthFactorsResponse + 46, // 144: proto.AccountService.ListConnections:output_type -> proto.ListConnectionsResponse + 48, // 145: proto.AccountService.ListRelationships:output_type -> proto.ListRelationshipsResponse + 50, // 146: proto.AccountService.GetRelationship:output_type -> proto.GetRelationshipResponse + 64, // 147: proto.AccountService.HasRelationship:output_type -> google.protobuf.BoolValue + 52, // 148: proto.AccountService.ListFriends:output_type -> proto.ListRelationshipSimpleResponse + 52, // 149: proto.AccountService.ListBlocked:output_type -> proto.ListRelationshipSimpleResponse + 20, // 150: proto.ActionLogService.CreateActionLog:output_type -> proto.CreateActionLogResponse + 22, // 151: proto.ActionLogService.ListActionLogs:output_type -> proto.ListActionLogsResponse + 131, // [131:152] is the sub-list for method output_type + 110, // [110:131] is the sub-list for method input_type + 110, // [110:110] is the sub-list for extension type_name + 110, // [110:110] is the sub-list for extension extendee + 0, // [0:110] is the sub-list for field type_name +} + +func init() { file_account_proto_init() } +func file_account_proto_init() { + if File_account_proto != nil { + return + } + file_file_proto_init() + file_wallet_proto_init() + file_account_proto_msgTypes[0].OneofWrappers = []any{} + file_account_proto_msgTypes[4].OneofWrappers = []any{} + file_account_proto_msgTypes[11].OneofWrappers = []any{} + file_account_proto_msgTypes[43].OneofWrappers = []any{} + file_account_proto_msgTypes[45].OneofWrappers = []any{} + file_account_proto_msgTypes[46].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_account_proto_rawDesc), len(file_account_proto_rawDesc)), + NumEnums: 4, + NumMessages: 56, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_account_proto_goTypes, + DependencyIndexes: file_account_proto_depIdxs, + EnumInfos: file_account_proto_enumTypes, + MessageInfos: file_account_proto_msgTypes, + }.Build() + File_account_proto = out.File + file_account_proto_goTypes = nil + file_account_proto_depIdxs = nil +} diff --git a/pkg/shared/proto/gen/account_grpc.pb.go b/pkg/shared/proto/gen/account_grpc.pb.go new file mode 100644 index 0000000..0e5abbc --- /dev/null +++ b/pkg/shared/proto/gen/account_grpc.pb.go @@ -0,0 +1,968 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.0 +// - protoc v6.33.1 +// source: account.proto + +package gen + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + AccountService_GetAccount_FullMethodName = "/proto.AccountService/GetAccount" + AccountService_GetBotAccount_FullMethodName = "/proto.AccountService/GetBotAccount" + AccountService_GetAccountBatch_FullMethodName = "/proto.AccountService/GetAccountBatch" + AccountService_GetBotAccountBatch_FullMethodName = "/proto.AccountService/GetBotAccountBatch" + AccountService_LookupAccountBatch_FullMethodName = "/proto.AccountService/LookupAccountBatch" + AccountService_SearchAccount_FullMethodName = "/proto.AccountService/SearchAccount" + AccountService_ListAccounts_FullMethodName = "/proto.AccountService/ListAccounts" + AccountService_GetAccountStatus_FullMethodName = "/proto.AccountService/GetAccountStatus" + AccountService_GetAccountStatusBatch_FullMethodName = "/proto.AccountService/GetAccountStatusBatch" + AccountService_GetProfile_FullMethodName = "/proto.AccountService/GetProfile" + AccountService_ListContacts_FullMethodName = "/proto.AccountService/ListContacts" + AccountService_ListBadges_FullMethodName = "/proto.AccountService/ListBadges" + AccountService_ListAuthFactors_FullMethodName = "/proto.AccountService/ListAuthFactors" + AccountService_ListConnections_FullMethodName = "/proto.AccountService/ListConnections" + AccountService_ListRelationships_FullMethodName = "/proto.AccountService/ListRelationships" + AccountService_GetRelationship_FullMethodName = "/proto.AccountService/GetRelationship" + AccountService_HasRelationship_FullMethodName = "/proto.AccountService/HasRelationship" + AccountService_ListFriends_FullMethodName = "/proto.AccountService/ListFriends" + AccountService_ListBlocked_FullMethodName = "/proto.AccountService/ListBlocked" +) + +// AccountServiceClient is the client API for AccountService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// AccountService provides CRUD operations for user accounts and related entities +type AccountServiceClient interface { + // Account Operations + GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*Account, error) + GetBotAccount(ctx context.Context, in *GetBotAccountRequest, opts ...grpc.CallOption) (*Account, error) + GetAccountBatch(ctx context.Context, in *GetAccountBatchRequest, opts ...grpc.CallOption) (*GetAccountBatchResponse, error) + GetBotAccountBatch(ctx context.Context, in *GetBotAccountBatchRequest, opts ...grpc.CallOption) (*GetAccountBatchResponse, error) + LookupAccountBatch(ctx context.Context, in *LookupAccountBatchRequest, opts ...grpc.CallOption) (*GetAccountBatchResponse, error) + SearchAccount(ctx context.Context, in *SearchAccountRequest, opts ...grpc.CallOption) (*GetAccountBatchResponse, error) + ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error) + GetAccountStatus(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*AccountStatus, error) + GetAccountStatusBatch(ctx context.Context, in *GetAccountBatchRequest, opts ...grpc.CallOption) (*GetAccountStatusBatchResponse, error) + // Profile Operations + GetProfile(ctx context.Context, in *GetProfileRequest, opts ...grpc.CallOption) (*AccountProfile, error) + // Contact Operations + ListContacts(ctx context.Context, in *ListContactsRequest, opts ...grpc.CallOption) (*ListContactsResponse, error) + // Badge Operations + ListBadges(ctx context.Context, in *ListBadgesRequest, opts ...grpc.CallOption) (*ListBadgesResponse, error) + // Authentication Factor Operations + ListAuthFactors(ctx context.Context, in *ListAuthFactorsRequest, opts ...grpc.CallOption) (*ListAuthFactorsResponse, error) + // Connection Operations + ListConnections(ctx context.Context, in *ListConnectionsRequest, opts ...grpc.CallOption) (*ListConnectionsResponse, error) + // Relationship Operations + ListRelationships(ctx context.Context, in *ListRelationshipsRequest, opts ...grpc.CallOption) (*ListRelationshipsResponse, error) + GetRelationship(ctx context.Context, in *GetRelationshipRequest, opts ...grpc.CallOption) (*GetRelationshipResponse, error) + HasRelationship(ctx context.Context, in *GetRelationshipRequest, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) + ListFriends(ctx context.Context, in *ListRelationshipSimpleRequest, opts ...grpc.CallOption) (*ListRelationshipSimpleResponse, error) + ListBlocked(ctx context.Context, in *ListRelationshipSimpleRequest, opts ...grpc.CallOption) (*ListRelationshipSimpleResponse, error) +} + +type accountServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewAccountServiceClient(cc grpc.ClientConnInterface) AccountServiceClient { + return &accountServiceClient{cc} +} + +func (c *accountServiceClient) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*Account, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Account) + err := c.cc.Invoke(ctx, AccountService_GetAccount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) GetBotAccount(ctx context.Context, in *GetBotAccountRequest, opts ...grpc.CallOption) (*Account, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Account) + err := c.cc.Invoke(ctx, AccountService_GetBotAccount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) GetAccountBatch(ctx context.Context, in *GetAccountBatchRequest, opts ...grpc.CallOption) (*GetAccountBatchResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetAccountBatchResponse) + err := c.cc.Invoke(ctx, AccountService_GetAccountBatch_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) GetBotAccountBatch(ctx context.Context, in *GetBotAccountBatchRequest, opts ...grpc.CallOption) (*GetAccountBatchResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetAccountBatchResponse) + err := c.cc.Invoke(ctx, AccountService_GetBotAccountBatch_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) LookupAccountBatch(ctx context.Context, in *LookupAccountBatchRequest, opts ...grpc.CallOption) (*GetAccountBatchResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetAccountBatchResponse) + err := c.cc.Invoke(ctx, AccountService_LookupAccountBatch_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) SearchAccount(ctx context.Context, in *SearchAccountRequest, opts ...grpc.CallOption) (*GetAccountBatchResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetAccountBatchResponse) + err := c.cc.Invoke(ctx, AccountService_SearchAccount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListAccountsResponse) + err := c.cc.Invoke(ctx, AccountService_ListAccounts_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) GetAccountStatus(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*AccountStatus, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AccountStatus) + err := c.cc.Invoke(ctx, AccountService_GetAccountStatus_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) GetAccountStatusBatch(ctx context.Context, in *GetAccountBatchRequest, opts ...grpc.CallOption) (*GetAccountStatusBatchResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetAccountStatusBatchResponse) + err := c.cc.Invoke(ctx, AccountService_GetAccountStatusBatch_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) GetProfile(ctx context.Context, in *GetProfileRequest, opts ...grpc.CallOption) (*AccountProfile, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AccountProfile) + err := c.cc.Invoke(ctx, AccountService_GetProfile_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) ListContacts(ctx context.Context, in *ListContactsRequest, opts ...grpc.CallOption) (*ListContactsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListContactsResponse) + err := c.cc.Invoke(ctx, AccountService_ListContacts_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) ListBadges(ctx context.Context, in *ListBadgesRequest, opts ...grpc.CallOption) (*ListBadgesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListBadgesResponse) + err := c.cc.Invoke(ctx, AccountService_ListBadges_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) ListAuthFactors(ctx context.Context, in *ListAuthFactorsRequest, opts ...grpc.CallOption) (*ListAuthFactorsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListAuthFactorsResponse) + err := c.cc.Invoke(ctx, AccountService_ListAuthFactors_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) ListConnections(ctx context.Context, in *ListConnectionsRequest, opts ...grpc.CallOption) (*ListConnectionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListConnectionsResponse) + err := c.cc.Invoke(ctx, AccountService_ListConnections_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) ListRelationships(ctx context.Context, in *ListRelationshipsRequest, opts ...grpc.CallOption) (*ListRelationshipsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListRelationshipsResponse) + err := c.cc.Invoke(ctx, AccountService_ListRelationships_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) GetRelationship(ctx context.Context, in *GetRelationshipRequest, opts ...grpc.CallOption) (*GetRelationshipResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetRelationshipResponse) + err := c.cc.Invoke(ctx, AccountService_GetRelationship_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) HasRelationship(ctx context.Context, in *GetRelationshipRequest, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(wrapperspb.BoolValue) + err := c.cc.Invoke(ctx, AccountService_HasRelationship_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) ListFriends(ctx context.Context, in *ListRelationshipSimpleRequest, opts ...grpc.CallOption) (*ListRelationshipSimpleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListRelationshipSimpleResponse) + err := c.cc.Invoke(ctx, AccountService_ListFriends_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *accountServiceClient) ListBlocked(ctx context.Context, in *ListRelationshipSimpleRequest, opts ...grpc.CallOption) (*ListRelationshipSimpleResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListRelationshipSimpleResponse) + err := c.cc.Invoke(ctx, AccountService_ListBlocked_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AccountServiceServer is the server API for AccountService service. +// All implementations must embed UnimplementedAccountServiceServer +// for forward compatibility. +// +// AccountService provides CRUD operations for user accounts and related entities +type AccountServiceServer interface { + // Account Operations + GetAccount(context.Context, *GetAccountRequest) (*Account, error) + GetBotAccount(context.Context, *GetBotAccountRequest) (*Account, error) + GetAccountBatch(context.Context, *GetAccountBatchRequest) (*GetAccountBatchResponse, error) + GetBotAccountBatch(context.Context, *GetBotAccountBatchRequest) (*GetAccountBatchResponse, error) + LookupAccountBatch(context.Context, *LookupAccountBatchRequest) (*GetAccountBatchResponse, error) + SearchAccount(context.Context, *SearchAccountRequest) (*GetAccountBatchResponse, error) + ListAccounts(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error) + GetAccountStatus(context.Context, *GetAccountRequest) (*AccountStatus, error) + GetAccountStatusBatch(context.Context, *GetAccountBatchRequest) (*GetAccountStatusBatchResponse, error) + // Profile Operations + GetProfile(context.Context, *GetProfileRequest) (*AccountProfile, error) + // Contact Operations + ListContacts(context.Context, *ListContactsRequest) (*ListContactsResponse, error) + // Badge Operations + ListBadges(context.Context, *ListBadgesRequest) (*ListBadgesResponse, error) + // Authentication Factor Operations + ListAuthFactors(context.Context, *ListAuthFactorsRequest) (*ListAuthFactorsResponse, error) + // Connection Operations + ListConnections(context.Context, *ListConnectionsRequest) (*ListConnectionsResponse, error) + // Relationship Operations + ListRelationships(context.Context, *ListRelationshipsRequest) (*ListRelationshipsResponse, error) + GetRelationship(context.Context, *GetRelationshipRequest) (*GetRelationshipResponse, error) + HasRelationship(context.Context, *GetRelationshipRequest) (*wrapperspb.BoolValue, error) + ListFriends(context.Context, *ListRelationshipSimpleRequest) (*ListRelationshipSimpleResponse, error) + ListBlocked(context.Context, *ListRelationshipSimpleRequest) (*ListRelationshipSimpleResponse, error) + mustEmbedUnimplementedAccountServiceServer() +} + +// UnimplementedAccountServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedAccountServiceServer struct{} + +func (UnimplementedAccountServiceServer) GetAccount(context.Context, *GetAccountRequest) (*Account, error) { + return nil, status.Error(codes.Unimplemented, "method GetAccount not implemented") +} +func (UnimplementedAccountServiceServer) GetBotAccount(context.Context, *GetBotAccountRequest) (*Account, error) { + return nil, status.Error(codes.Unimplemented, "method GetBotAccount not implemented") +} +func (UnimplementedAccountServiceServer) GetAccountBatch(context.Context, *GetAccountBatchRequest) (*GetAccountBatchResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetAccountBatch not implemented") +} +func (UnimplementedAccountServiceServer) GetBotAccountBatch(context.Context, *GetBotAccountBatchRequest) (*GetAccountBatchResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetBotAccountBatch not implemented") +} +func (UnimplementedAccountServiceServer) LookupAccountBatch(context.Context, *LookupAccountBatchRequest) (*GetAccountBatchResponse, error) { + return nil, status.Error(codes.Unimplemented, "method LookupAccountBatch not implemented") +} +func (UnimplementedAccountServiceServer) SearchAccount(context.Context, *SearchAccountRequest) (*GetAccountBatchResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SearchAccount not implemented") +} +func (UnimplementedAccountServiceServer) ListAccounts(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListAccounts not implemented") +} +func (UnimplementedAccountServiceServer) GetAccountStatus(context.Context, *GetAccountRequest) (*AccountStatus, error) { + return nil, status.Error(codes.Unimplemented, "method GetAccountStatus not implemented") +} +func (UnimplementedAccountServiceServer) GetAccountStatusBatch(context.Context, *GetAccountBatchRequest) (*GetAccountStatusBatchResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetAccountStatusBatch not implemented") +} +func (UnimplementedAccountServiceServer) GetProfile(context.Context, *GetProfileRequest) (*AccountProfile, error) { + return nil, status.Error(codes.Unimplemented, "method GetProfile not implemented") +} +func (UnimplementedAccountServiceServer) ListContacts(context.Context, *ListContactsRequest) (*ListContactsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListContacts not implemented") +} +func (UnimplementedAccountServiceServer) ListBadges(context.Context, *ListBadgesRequest) (*ListBadgesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListBadges not implemented") +} +func (UnimplementedAccountServiceServer) ListAuthFactors(context.Context, *ListAuthFactorsRequest) (*ListAuthFactorsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListAuthFactors not implemented") +} +func (UnimplementedAccountServiceServer) ListConnections(context.Context, *ListConnectionsRequest) (*ListConnectionsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListConnections not implemented") +} +func (UnimplementedAccountServiceServer) ListRelationships(context.Context, *ListRelationshipsRequest) (*ListRelationshipsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListRelationships not implemented") +} +func (UnimplementedAccountServiceServer) GetRelationship(context.Context, *GetRelationshipRequest) (*GetRelationshipResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetRelationship not implemented") +} +func (UnimplementedAccountServiceServer) HasRelationship(context.Context, *GetRelationshipRequest) (*wrapperspb.BoolValue, error) { + return nil, status.Error(codes.Unimplemented, "method HasRelationship not implemented") +} +func (UnimplementedAccountServiceServer) ListFriends(context.Context, *ListRelationshipSimpleRequest) (*ListRelationshipSimpleResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListFriends not implemented") +} +func (UnimplementedAccountServiceServer) ListBlocked(context.Context, *ListRelationshipSimpleRequest) (*ListRelationshipSimpleResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListBlocked not implemented") +} +func (UnimplementedAccountServiceServer) mustEmbedUnimplementedAccountServiceServer() {} +func (UnimplementedAccountServiceServer) testEmbeddedByValue() {} + +// UnsafeAccountServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AccountServiceServer will +// result in compilation errors. +type UnsafeAccountServiceServer interface { + mustEmbedUnimplementedAccountServiceServer() +} + +func RegisterAccountServiceServer(s grpc.ServiceRegistrar, srv AccountServiceServer) { + // If the following call panics, it indicates UnimplementedAccountServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&AccountService_ServiceDesc, srv) +} + +func _AccountService_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).GetAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_GetAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).GetAccount(ctx, req.(*GetAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_GetBotAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBotAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).GetBotAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_GetBotAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).GetBotAccount(ctx, req.(*GetBotAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_GetAccountBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAccountBatchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).GetAccountBatch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_GetAccountBatch_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).GetAccountBatch(ctx, req.(*GetAccountBatchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_GetBotAccountBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBotAccountBatchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).GetBotAccountBatch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_GetBotAccountBatch_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).GetBotAccountBatch(ctx, req.(*GetBotAccountBatchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_LookupAccountBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LookupAccountBatchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).LookupAccountBatch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_LookupAccountBatch_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).LookupAccountBatch(ctx, req.(*LookupAccountBatchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_SearchAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).SearchAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_SearchAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).SearchAccount(ctx, req.(*SearchAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_ListAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAccountsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).ListAccounts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_ListAccounts_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).ListAccounts(ctx, req.(*ListAccountsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_GetAccountStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).GetAccountStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_GetAccountStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).GetAccountStatus(ctx, req.(*GetAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_GetAccountStatusBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAccountBatchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).GetAccountStatusBatch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_GetAccountStatusBatch_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).GetAccountStatusBatch(ctx, req.(*GetAccountBatchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_GetProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetProfileRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).GetProfile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_GetProfile_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).GetProfile(ctx, req.(*GetProfileRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_ListContacts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListContactsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).ListContacts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_ListContacts_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).ListContacts(ctx, req.(*ListContactsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_ListBadges_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListBadgesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).ListBadges(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_ListBadges_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).ListBadges(ctx, req.(*ListBadgesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_ListAuthFactors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAuthFactorsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).ListAuthFactors(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_ListAuthFactors_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).ListAuthFactors(ctx, req.(*ListAuthFactorsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_ListConnections_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListConnectionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).ListConnections(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_ListConnections_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).ListConnections(ctx, req.(*ListConnectionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_ListRelationships_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListRelationshipsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).ListRelationships(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_ListRelationships_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).ListRelationships(ctx, req.(*ListRelationshipsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_GetRelationship_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRelationshipRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).GetRelationship(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_GetRelationship_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).GetRelationship(ctx, req.(*GetRelationshipRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_HasRelationship_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRelationshipRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).HasRelationship(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_HasRelationship_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).HasRelationship(ctx, req.(*GetRelationshipRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_ListFriends_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListRelationshipSimpleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).ListFriends(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_ListFriends_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).ListFriends(ctx, req.(*ListRelationshipSimpleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AccountService_ListBlocked_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListRelationshipSimpleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).ListBlocked(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AccountService_ListBlocked_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).ListBlocked(ctx, req.(*ListRelationshipSimpleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// AccountService_ServiceDesc is the grpc.ServiceDesc for AccountService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var AccountService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "proto.AccountService", + HandlerType: (*AccountServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetAccount", + Handler: _AccountService_GetAccount_Handler, + }, + { + MethodName: "GetBotAccount", + Handler: _AccountService_GetBotAccount_Handler, + }, + { + MethodName: "GetAccountBatch", + Handler: _AccountService_GetAccountBatch_Handler, + }, + { + MethodName: "GetBotAccountBatch", + Handler: _AccountService_GetBotAccountBatch_Handler, + }, + { + MethodName: "LookupAccountBatch", + Handler: _AccountService_LookupAccountBatch_Handler, + }, + { + MethodName: "SearchAccount", + Handler: _AccountService_SearchAccount_Handler, + }, + { + MethodName: "ListAccounts", + Handler: _AccountService_ListAccounts_Handler, + }, + { + MethodName: "GetAccountStatus", + Handler: _AccountService_GetAccountStatus_Handler, + }, + { + MethodName: "GetAccountStatusBatch", + Handler: _AccountService_GetAccountStatusBatch_Handler, + }, + { + MethodName: "GetProfile", + Handler: _AccountService_GetProfile_Handler, + }, + { + MethodName: "ListContacts", + Handler: _AccountService_ListContacts_Handler, + }, + { + MethodName: "ListBadges", + Handler: _AccountService_ListBadges_Handler, + }, + { + MethodName: "ListAuthFactors", + Handler: _AccountService_ListAuthFactors_Handler, + }, + { + MethodName: "ListConnections", + Handler: _AccountService_ListConnections_Handler, + }, + { + MethodName: "ListRelationships", + Handler: _AccountService_ListRelationships_Handler, + }, + { + MethodName: "GetRelationship", + Handler: _AccountService_GetRelationship_Handler, + }, + { + MethodName: "HasRelationship", + Handler: _AccountService_HasRelationship_Handler, + }, + { + MethodName: "ListFriends", + Handler: _AccountService_ListFriends_Handler, + }, + { + MethodName: "ListBlocked", + Handler: _AccountService_ListBlocked_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "account.proto", +} + +const ( + ActionLogService_CreateActionLog_FullMethodName = "/proto.ActionLogService/CreateActionLog" + ActionLogService_ListActionLogs_FullMethodName = "/proto.ActionLogService/ListActionLogs" +) + +// ActionLogServiceClient is the client API for ActionLogService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// ActionLogService provides operations for action logs +type ActionLogServiceClient interface { + CreateActionLog(ctx context.Context, in *CreateActionLogRequest, opts ...grpc.CallOption) (*CreateActionLogResponse, error) + ListActionLogs(ctx context.Context, in *ListActionLogsRequest, opts ...grpc.CallOption) (*ListActionLogsResponse, error) +} + +type actionLogServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewActionLogServiceClient(cc grpc.ClientConnInterface) ActionLogServiceClient { + return &actionLogServiceClient{cc} +} + +func (c *actionLogServiceClient) CreateActionLog(ctx context.Context, in *CreateActionLogRequest, opts ...grpc.CallOption) (*CreateActionLogResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreateActionLogResponse) + err := c.cc.Invoke(ctx, ActionLogService_CreateActionLog_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *actionLogServiceClient) ListActionLogs(ctx context.Context, in *ListActionLogsRequest, opts ...grpc.CallOption) (*ListActionLogsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListActionLogsResponse) + err := c.cc.Invoke(ctx, ActionLogService_ListActionLogs_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ActionLogServiceServer is the server API for ActionLogService service. +// All implementations must embed UnimplementedActionLogServiceServer +// for forward compatibility. +// +// ActionLogService provides operations for action logs +type ActionLogServiceServer interface { + CreateActionLog(context.Context, *CreateActionLogRequest) (*CreateActionLogResponse, error) + ListActionLogs(context.Context, *ListActionLogsRequest) (*ListActionLogsResponse, error) + mustEmbedUnimplementedActionLogServiceServer() +} + +// UnimplementedActionLogServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedActionLogServiceServer struct{} + +func (UnimplementedActionLogServiceServer) CreateActionLog(context.Context, *CreateActionLogRequest) (*CreateActionLogResponse, error) { + return nil, status.Error(codes.Unimplemented, "method CreateActionLog not implemented") +} +func (UnimplementedActionLogServiceServer) ListActionLogs(context.Context, *ListActionLogsRequest) (*ListActionLogsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListActionLogs not implemented") +} +func (UnimplementedActionLogServiceServer) mustEmbedUnimplementedActionLogServiceServer() {} +func (UnimplementedActionLogServiceServer) testEmbeddedByValue() {} + +// UnsafeActionLogServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ActionLogServiceServer will +// result in compilation errors. +type UnsafeActionLogServiceServer interface { + mustEmbedUnimplementedActionLogServiceServer() +} + +func RegisterActionLogServiceServer(s grpc.ServiceRegistrar, srv ActionLogServiceServer) { + // If the following call panics, it indicates UnimplementedActionLogServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&ActionLogService_ServiceDesc, srv) +} + +func _ActionLogService_CreateActionLog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateActionLogRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ActionLogServiceServer).CreateActionLog(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ActionLogService_CreateActionLog_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ActionLogServiceServer).CreateActionLog(ctx, req.(*CreateActionLogRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ActionLogService_ListActionLogs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListActionLogsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ActionLogServiceServer).ListActionLogs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ActionLogService_ListActionLogs_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ActionLogServiceServer).ListActionLogs(ctx, req.(*ListActionLogsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ActionLogService_ServiceDesc is the grpc.ServiceDesc for ActionLogService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ActionLogService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "proto.ActionLogService", + HandlerType: (*ActionLogServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateActionLog", + Handler: _ActionLogService_CreateActionLog_Handler, + }, + { + MethodName: "ListActionLogs", + Handler: _ActionLogService_ListActionLogs_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "account.proto", +} diff --git a/pkg/shared/proto/gen/auth.pb.go b/pkg/shared/proto/gen/auth.pb.go new file mode 100644 index 0000000..5302654 --- /dev/null +++ b/pkg/shared/proto/gen/auth.pb.go @@ -0,0 +1,2002 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.10 +// protoc v6.33.1 +// source: auth.proto + +package gen + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Enum for challenge types +type SessionType int32 + +const ( + SessionType_CHALLENGE_TYPE_UNSPECIFIED SessionType = 0 + SessionType_LOGIN SessionType = 1 + SessionType_OAUTH SessionType = 2 + SessionType_OIDC SessionType = 3 +) + +// Enum value maps for SessionType. +var ( + SessionType_name = map[int32]string{ + 0: "CHALLENGE_TYPE_UNSPECIFIED", + 1: "LOGIN", + 2: "OAUTH", + 3: "OIDC", + } + SessionType_value = map[string]int32{ + "CHALLENGE_TYPE_UNSPECIFIED": 0, + "LOGIN": 1, + "OAUTH": 2, + "OIDC": 3, + } +) + +func (x SessionType) Enum() *SessionType { + p := new(SessionType) + *p = x + return p +} + +func (x SessionType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SessionType) Descriptor() protoreflect.EnumDescriptor { + return file_auth_proto_enumTypes[0].Descriptor() +} + +func (SessionType) Type() protoreflect.EnumType { + return &file_auth_proto_enumTypes[0] +} + +func (x SessionType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SessionType.Descriptor instead. +func (SessionType) EnumDescriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{0} +} + +// Enum for client platforms +type ClientPlatform int32 + +const ( + ClientPlatform_CLIENT_PLATFORM_UNSPECIFIED ClientPlatform = 0 + ClientPlatform_UNIDENTIFIED ClientPlatform = 1 + ClientPlatform_WEB ClientPlatform = 2 + ClientPlatform_IOS ClientPlatform = 3 + ClientPlatform_ANDROID ClientPlatform = 4 + ClientPlatform_MACOS ClientPlatform = 5 + ClientPlatform_WINDOWS ClientPlatform = 6 + ClientPlatform_LINUX ClientPlatform = 7 +) + +// Enum value maps for ClientPlatform. +var ( + ClientPlatform_name = map[int32]string{ + 0: "CLIENT_PLATFORM_UNSPECIFIED", + 1: "UNIDENTIFIED", + 2: "WEB", + 3: "IOS", + 4: "ANDROID", + 5: "MACOS", + 6: "WINDOWS", + 7: "LINUX", + } + ClientPlatform_value = map[string]int32{ + "CLIENT_PLATFORM_UNSPECIFIED": 0, + "UNIDENTIFIED": 1, + "WEB": 2, + "IOS": 3, + "ANDROID": 4, + "MACOS": 5, + "WINDOWS": 6, + "LINUX": 7, + } +) + +func (x ClientPlatform) Enum() *ClientPlatform { + p := new(ClientPlatform) + *p = x + return p +} + +func (x ClientPlatform) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ClientPlatform) Descriptor() protoreflect.EnumDescriptor { + return file_auth_proto_enumTypes[1].Descriptor() +} + +func (ClientPlatform) Type() protoreflect.EnumType { + return &file_auth_proto_enumTypes[1] +} + +func (x ClientPlatform) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ClientPlatform.Descriptor instead. +func (ClientPlatform) EnumDescriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{1} +} + +type PermissionNodeActorType int32 + +const ( + PermissionNodeActorType_ACCOUNT PermissionNodeActorType = 0 + PermissionNodeActorType_GROUP PermissionNodeActorType = 1 +) + +// Enum value maps for PermissionNodeActorType. +var ( + PermissionNodeActorType_name = map[int32]string{ + 0: "ACCOUNT", + 1: "GROUP", + } + PermissionNodeActorType_value = map[string]int32{ + "ACCOUNT": 0, + "GROUP": 1, + } +) + +func (x PermissionNodeActorType) Enum() *PermissionNodeActorType { + p := new(PermissionNodeActorType) + *p = x + return p +} + +func (x PermissionNodeActorType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PermissionNodeActorType) Descriptor() protoreflect.EnumDescriptor { + return file_auth_proto_enumTypes[2].Descriptor() +} + +func (PermissionNodeActorType) Type() protoreflect.EnumType { + return &file_auth_proto_enumTypes[2] +} + +func (x PermissionNodeActorType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PermissionNodeActorType.Descriptor instead. +func (PermissionNodeActorType) EnumDescriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{2} +} + +// Represents a user session +type AuthSession struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + LastGrantedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_granted_at,json=lastGrantedAt,proto3,oneof" json:"last_granted_at,omitempty"` + ExpiredAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=expired_at,json=expiredAt,proto3,oneof" json:"expired_at,omitempty"` + AccountId string `protobuf:"bytes,5,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + Account *Account `protobuf:"bytes,6,opt,name=account,proto3" json:"account,omitempty"` + AppId *wrapperspb.StringValue `protobuf:"bytes,9,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` + ClientId *string `protobuf:"bytes,10,opt,name=client_id,json=clientId,proto3,oneof" json:"client_id,omitempty"` + ParentSessionId *string `protobuf:"bytes,11,opt,name=parent_session_id,json=parentSessionId,proto3,oneof" json:"parent_session_id,omitempty"` + Client *AuthClient `protobuf:"bytes,12,opt,name=client,proto3" json:"client,omitempty"` + Audiences []string `protobuf:"bytes,13,rep,name=audiences,proto3" json:"audiences,omitempty"` + Scopes []string `protobuf:"bytes,14,rep,name=scopes,proto3" json:"scopes,omitempty"` + IpAddress *wrapperspb.StringValue `protobuf:"bytes,15,opt,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"` + UserAgent *wrapperspb.StringValue `protobuf:"bytes,16,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"` + Type SessionType `protobuf:"varint,17,opt,name=type,proto3,enum=proto.SessionType" json:"type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AuthSession) Reset() { + *x = AuthSession{} + mi := &file_auth_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AuthSession) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuthSession) ProtoMessage() {} + +func (x *AuthSession) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuthSession.ProtoReflect.Descriptor instead. +func (*AuthSession) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{0} +} + +func (x *AuthSession) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *AuthSession) GetLastGrantedAt() *timestamppb.Timestamp { + if x != nil { + return x.LastGrantedAt + } + return nil +} + +func (x *AuthSession) GetExpiredAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiredAt + } + return nil +} + +func (x *AuthSession) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *AuthSession) GetAccount() *Account { + if x != nil { + return x.Account + } + return nil +} + +func (x *AuthSession) GetAppId() *wrapperspb.StringValue { + if x != nil { + return x.AppId + } + return nil +} + +func (x *AuthSession) GetClientId() string { + if x != nil && x.ClientId != nil { + return *x.ClientId + } + return "" +} + +func (x *AuthSession) GetParentSessionId() string { + if x != nil && x.ParentSessionId != nil { + return *x.ParentSessionId + } + return "" +} + +func (x *AuthSession) GetClient() *AuthClient { + if x != nil { + return x.Client + } + return nil +} + +func (x *AuthSession) GetAudiences() []string { + if x != nil { + return x.Audiences + } + return nil +} + +func (x *AuthSession) GetScopes() []string { + if x != nil { + return x.Scopes + } + return nil +} + +func (x *AuthSession) GetIpAddress() *wrapperspb.StringValue { + if x != nil { + return x.IpAddress + } + return nil +} + +func (x *AuthSession) GetUserAgent() *wrapperspb.StringValue { + if x != nil { + return x.UserAgent + } + return nil +} + +func (x *AuthSession) GetType() SessionType { + if x != nil { + return x.Type + } + return SessionType_CHALLENGE_TYPE_UNSPECIFIED +} + +// Represents an authentication challenge +type AuthChallenge struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ExpiredAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"` + StepRemain int32 `protobuf:"varint,3,opt,name=step_remain,json=stepRemain,proto3" json:"step_remain,omitempty"` + StepTotal int32 `protobuf:"varint,4,opt,name=step_total,json=stepTotal,proto3" json:"step_total,omitempty"` + FailedAttempts int32 `protobuf:"varint,5,opt,name=failed_attempts,json=failedAttempts,proto3" json:"failed_attempts,omitempty"` + BlacklistFactors []string `protobuf:"bytes,8,rep,name=blacklist_factors,json=blacklistFactors,proto3" json:"blacklist_factors,omitempty"` + Audiences []string `protobuf:"bytes,9,rep,name=audiences,proto3" json:"audiences,omitempty"` + Scopes []string `protobuf:"bytes,10,rep,name=scopes,proto3" json:"scopes,omitempty"` + IpAddress *wrapperspb.StringValue `protobuf:"bytes,11,opt,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"` + UserAgent *wrapperspb.StringValue `protobuf:"bytes,12,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"` + DeviceId *wrapperspb.StringValue `protobuf:"bytes,13,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"` + Nonce *wrapperspb.StringValue `protobuf:"bytes,14,opt,name=nonce,proto3" json:"nonce,omitempty"` + // Point location is omitted as there is no direct proto equivalent. + AccountId string `protobuf:"bytes,15,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + DeviceName *wrapperspb.StringValue `protobuf:"bytes,16,opt,name=device_name,json=deviceName,proto3" json:"device_name,omitempty"` + Platform ClientPlatform `protobuf:"varint,17,opt,name=platform,proto3,enum=proto.ClientPlatform" json:"platform,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AuthChallenge) Reset() { + *x = AuthChallenge{} + mi := &file_auth_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AuthChallenge) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuthChallenge) ProtoMessage() {} + +func (x *AuthChallenge) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuthChallenge.ProtoReflect.Descriptor instead. +func (*AuthChallenge) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{1} +} + +func (x *AuthChallenge) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *AuthChallenge) GetExpiredAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiredAt + } + return nil +} + +func (x *AuthChallenge) GetStepRemain() int32 { + if x != nil { + return x.StepRemain + } + return 0 +} + +func (x *AuthChallenge) GetStepTotal() int32 { + if x != nil { + return x.StepTotal + } + return 0 +} + +func (x *AuthChallenge) GetFailedAttempts() int32 { + if x != nil { + return x.FailedAttempts + } + return 0 +} + +func (x *AuthChallenge) GetBlacklistFactors() []string { + if x != nil { + return x.BlacklistFactors + } + return nil +} + +func (x *AuthChallenge) GetAudiences() []string { + if x != nil { + return x.Audiences + } + return nil +} + +func (x *AuthChallenge) GetScopes() []string { + if x != nil { + return x.Scopes + } + return nil +} + +func (x *AuthChallenge) GetIpAddress() *wrapperspb.StringValue { + if x != nil { + return x.IpAddress + } + return nil +} + +func (x *AuthChallenge) GetUserAgent() *wrapperspb.StringValue { + if x != nil { + return x.UserAgent + } + return nil +} + +func (x *AuthChallenge) GetDeviceId() *wrapperspb.StringValue { + if x != nil { + return x.DeviceId + } + return nil +} + +func (x *AuthChallenge) GetNonce() *wrapperspb.StringValue { + if x != nil { + return x.Nonce + } + return nil +} + +func (x *AuthChallenge) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *AuthChallenge) GetDeviceName() *wrapperspb.StringValue { + if x != nil { + return x.DeviceName + } + return nil +} + +func (x *AuthChallenge) GetPlatform() ClientPlatform { + if x != nil { + return x.Platform + } + return ClientPlatform_CLIENT_PLATFORM_UNSPECIFIED +} + +type AuthClient struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Platform ClientPlatform `protobuf:"varint,2,opt,name=platform,proto3,enum=proto.ClientPlatform" json:"platform,omitempty"` + DeviceName *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=device_name,json=deviceName,proto3" json:"device_name,omitempty"` + DeviceLabel *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=device_label,json=deviceLabel,proto3" json:"device_label,omitempty"` + DeviceId string `protobuf:"bytes,5,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"` + AccountId string `protobuf:"bytes,6,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AuthClient) Reset() { + *x = AuthClient{} + mi := &file_auth_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AuthClient) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuthClient) ProtoMessage() {} + +func (x *AuthClient) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuthClient.ProtoReflect.Descriptor instead. +func (*AuthClient) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{2} +} + +func (x *AuthClient) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *AuthClient) GetPlatform() ClientPlatform { + if x != nil { + return x.Platform + } + return ClientPlatform_CLIENT_PLATFORM_UNSPECIFIED +} + +func (x *AuthClient) GetDeviceName() *wrapperspb.StringValue { + if x != nil { + return x.DeviceName + } + return nil +} + +func (x *AuthClient) GetDeviceLabel() *wrapperspb.StringValue { + if x != nil { + return x.DeviceLabel + } + return nil +} + +func (x *AuthClient) GetDeviceId() string { + if x != nil { + return x.DeviceId + } + return "" +} + +func (x *AuthClient) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +type AuthenticateRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + IpAddress *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=ip_address,json=ipAddress,proto3,oneof" json:"ip_address,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AuthenticateRequest) Reset() { + *x = AuthenticateRequest{} + mi := &file_auth_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AuthenticateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuthenticateRequest) ProtoMessage() {} + +func (x *AuthenticateRequest) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuthenticateRequest.ProtoReflect.Descriptor instead. +func (*AuthenticateRequest) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{3} +} + +func (x *AuthenticateRequest) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *AuthenticateRequest) GetIpAddress() *wrapperspb.StringValue { + if x != nil { + return x.IpAddress + } + return nil +} + +type AuthenticateResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` + Message *string `protobuf:"bytes,2,opt,name=message,proto3,oneof" json:"message,omitempty"` + Session *AuthSession `protobuf:"bytes,3,opt,name=session,proto3,oneof" json:"session,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AuthenticateResponse) Reset() { + *x = AuthenticateResponse{} + mi := &file_auth_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AuthenticateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuthenticateResponse) ProtoMessage() {} + +func (x *AuthenticateResponse) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuthenticateResponse.ProtoReflect.Descriptor instead. +func (*AuthenticateResponse) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{4} +} + +func (x *AuthenticateResponse) GetValid() bool { + if x != nil { + return x.Valid + } + return false +} + +func (x *AuthenticateResponse) GetMessage() string { + if x != nil && x.Message != nil { + return *x.Message + } + return "" +} + +func (x *AuthenticateResponse) GetSession() *AuthSession { + if x != nil { + return x.Session + } + return nil +} + +type ValidatePinRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + Pin string `protobuf:"bytes,2,opt,name=pin,proto3" json:"pin,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ValidatePinRequest) Reset() { + *x = ValidatePinRequest{} + mi := &file_auth_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ValidatePinRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidatePinRequest) ProtoMessage() {} + +func (x *ValidatePinRequest) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidatePinRequest.ProtoReflect.Descriptor instead. +func (*ValidatePinRequest) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{5} +} + +func (x *ValidatePinRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *ValidatePinRequest) GetPin() string { + if x != nil { + return x.Pin + } + return "" +} + +type ValidateCaptchaRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ValidateCaptchaRequest) Reset() { + *x = ValidateCaptchaRequest{} + mi := &file_auth_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ValidateCaptchaRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateCaptchaRequest) ProtoMessage() {} + +func (x *ValidateCaptchaRequest) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidateCaptchaRequest.ProtoReflect.Descriptor instead. +func (*ValidateCaptchaRequest) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{6} +} + +func (x *ValidateCaptchaRequest) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +type ValidateResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ValidateResponse) Reset() { + *x = ValidateResponse{} + mi := &file_auth_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ValidateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateResponse) ProtoMessage() {} + +func (x *ValidateResponse) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidateResponse.ProtoReflect.Descriptor instead. +func (*ValidateResponse) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{7} +} + +func (x *ValidateResponse) GetValid() bool { + if x != nil { + return x.Valid + } + return false +} + +// Permission related messages and services +type PermissionNode struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Actor string `protobuf:"bytes,2,opt,name=actor,proto3" json:"actor,omitempty"` + Type PermissionNodeActorType `protobuf:"varint,3,opt,name=type,proto3,enum=proto.PermissionNodeActorType" json:"type,omitempty"` + Key string `protobuf:"bytes,4,opt,name=key,proto3" json:"key,omitempty"` + Value *structpb.Value `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"` // Using Value to represent generic type + ExpiredAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"` + AffectedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=affected_at,json=affectedAt,proto3" json:"affected_at,omitempty"` + GroupId string `protobuf:"bytes,8,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` // Optional group ID + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PermissionNode) Reset() { + *x = PermissionNode{} + mi := &file_auth_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PermissionNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PermissionNode) ProtoMessage() {} + +func (x *PermissionNode) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PermissionNode.ProtoReflect.Descriptor instead. +func (*PermissionNode) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{8} +} + +func (x *PermissionNode) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *PermissionNode) GetActor() string { + if x != nil { + return x.Actor + } + return "" +} + +func (x *PermissionNode) GetType() PermissionNodeActorType { + if x != nil { + return x.Type + } + return PermissionNodeActorType_ACCOUNT +} + +func (x *PermissionNode) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *PermissionNode) GetValue() *structpb.Value { + if x != nil { + return x.Value + } + return nil +} + +func (x *PermissionNode) GetExpiredAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiredAt + } + return nil +} + +func (x *PermissionNode) GetAffectedAt() *timestamppb.Timestamp { + if x != nil { + return x.AffectedAt + } + return nil +} + +func (x *PermissionNode) GetGroupId() string { + if x != nil { + return x.GroupId + } + return "" +} + +type PermissionGroup struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PermissionGroup) Reset() { + *x = PermissionGroup{} + mi := &file_auth_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PermissionGroup) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PermissionGroup) ProtoMessage() {} + +func (x *PermissionGroup) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PermissionGroup.ProtoReflect.Descriptor instead. +func (*PermissionGroup) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{9} +} + +func (x *PermissionGroup) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *PermissionGroup) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PermissionGroup) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +type HasPermissionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Actor string `protobuf:"bytes,1,opt,name=actor,proto3" json:"actor,omitempty"` + Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + Type *PermissionNodeActorType `protobuf:"varint,3,opt,name=type,proto3,enum=proto.PermissionNodeActorType,oneof" json:"type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HasPermissionRequest) Reset() { + *x = HasPermissionRequest{} + mi := &file_auth_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HasPermissionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HasPermissionRequest) ProtoMessage() {} + +func (x *HasPermissionRequest) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HasPermissionRequest.ProtoReflect.Descriptor instead. +func (*HasPermissionRequest) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{10} +} + +func (x *HasPermissionRequest) GetActor() string { + if x != nil { + return x.Actor + } + return "" +} + +func (x *HasPermissionRequest) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *HasPermissionRequest) GetType() PermissionNodeActorType { + if x != nil && x.Type != nil { + return *x.Type + } + return PermissionNodeActorType_ACCOUNT +} + +type HasPermissionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + HasPermission bool `protobuf:"varint,1,opt,name=has_permission,json=hasPermission,proto3" json:"has_permission,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HasPermissionResponse) Reset() { + *x = HasPermissionResponse{} + mi := &file_auth_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HasPermissionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HasPermissionResponse) ProtoMessage() {} + +func (x *HasPermissionResponse) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HasPermissionResponse.ProtoReflect.Descriptor instead. +func (*HasPermissionResponse) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{11} +} + +func (x *HasPermissionResponse) GetHasPermission() bool { + if x != nil { + return x.HasPermission + } + return false +} + +type GetPermissionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Actor string `protobuf:"bytes,1,opt,name=actor,proto3" json:"actor,omitempty"` + Type *PermissionNodeActorType `protobuf:"varint,2,opt,name=type,proto3,enum=proto.PermissionNodeActorType,oneof" json:"type,omitempty"` + Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPermissionRequest) Reset() { + *x = GetPermissionRequest{} + mi := &file_auth_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPermissionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPermissionRequest) ProtoMessage() {} + +func (x *GetPermissionRequest) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPermissionRequest.ProtoReflect.Descriptor instead. +func (*GetPermissionRequest) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{12} +} + +func (x *GetPermissionRequest) GetActor() string { + if x != nil { + return x.Actor + } + return "" +} + +func (x *GetPermissionRequest) GetType() PermissionNodeActorType { + if x != nil && x.Type != nil { + return *x.Type + } + return PermissionNodeActorType_ACCOUNT +} + +func (x *GetPermissionRequest) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +type GetPermissionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Value *structpb.Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // Using Value to represent generic type + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPermissionResponse) Reset() { + *x = GetPermissionResponse{} + mi := &file_auth_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPermissionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPermissionResponse) ProtoMessage() {} + +func (x *GetPermissionResponse) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPermissionResponse.ProtoReflect.Descriptor instead. +func (*GetPermissionResponse) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{13} +} + +func (x *GetPermissionResponse) GetValue() *structpb.Value { + if x != nil { + return x.Value + } + return nil +} + +type AddPermissionNodeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Actor string `protobuf:"bytes,1,opt,name=actor,proto3" json:"actor,omitempty"` + Type *PermissionNodeActorType `protobuf:"varint,2,opt,name=type,proto3,enum=proto.PermissionNodeActorType,oneof" json:"type,omitempty"` + Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` + Value *structpb.Value `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` + ExpiredAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"` + AffectedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=affected_at,json=affectedAt,proto3" json:"affected_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddPermissionNodeRequest) Reset() { + *x = AddPermissionNodeRequest{} + mi := &file_auth_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddPermissionNodeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddPermissionNodeRequest) ProtoMessage() {} + +func (x *AddPermissionNodeRequest) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddPermissionNodeRequest.ProtoReflect.Descriptor instead. +func (*AddPermissionNodeRequest) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{14} +} + +func (x *AddPermissionNodeRequest) GetActor() string { + if x != nil { + return x.Actor + } + return "" +} + +func (x *AddPermissionNodeRequest) GetType() PermissionNodeActorType { + if x != nil && x.Type != nil { + return *x.Type + } + return PermissionNodeActorType_ACCOUNT +} + +func (x *AddPermissionNodeRequest) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *AddPermissionNodeRequest) GetValue() *structpb.Value { + if x != nil { + return x.Value + } + return nil +} + +func (x *AddPermissionNodeRequest) GetExpiredAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiredAt + } + return nil +} + +func (x *AddPermissionNodeRequest) GetAffectedAt() *timestamppb.Timestamp { + if x != nil { + return x.AffectedAt + } + return nil +} + +type AddPermissionNodeResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Node *PermissionNode `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddPermissionNodeResponse) Reset() { + *x = AddPermissionNodeResponse{} + mi := &file_auth_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddPermissionNodeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddPermissionNodeResponse) ProtoMessage() {} + +func (x *AddPermissionNodeResponse) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddPermissionNodeResponse.ProtoReflect.Descriptor instead. +func (*AddPermissionNodeResponse) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{15} +} + +func (x *AddPermissionNodeResponse) GetNode() *PermissionNode { + if x != nil { + return x.Node + } + return nil +} + +type AddPermissionNodeToGroupRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Group *PermissionGroup `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` + Actor string `protobuf:"bytes,2,opt,name=actor,proto3" json:"actor,omitempty"` + Type *PermissionNodeActorType `protobuf:"varint,3,opt,name=type,proto3,enum=proto.PermissionNodeActorType,oneof" json:"type,omitempty"` + Key string `protobuf:"bytes,4,opt,name=key,proto3" json:"key,omitempty"` + Value *structpb.Value `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"` + ExpiredAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"` + AffectedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=affected_at,json=affectedAt,proto3" json:"affected_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddPermissionNodeToGroupRequest) Reset() { + *x = AddPermissionNodeToGroupRequest{} + mi := &file_auth_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddPermissionNodeToGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddPermissionNodeToGroupRequest) ProtoMessage() {} + +func (x *AddPermissionNodeToGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddPermissionNodeToGroupRequest.ProtoReflect.Descriptor instead. +func (*AddPermissionNodeToGroupRequest) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{16} +} + +func (x *AddPermissionNodeToGroupRequest) GetGroup() *PermissionGroup { + if x != nil { + return x.Group + } + return nil +} + +func (x *AddPermissionNodeToGroupRequest) GetActor() string { + if x != nil { + return x.Actor + } + return "" +} + +func (x *AddPermissionNodeToGroupRequest) GetType() PermissionNodeActorType { + if x != nil && x.Type != nil { + return *x.Type + } + return PermissionNodeActorType_ACCOUNT +} + +func (x *AddPermissionNodeToGroupRequest) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *AddPermissionNodeToGroupRequest) GetValue() *structpb.Value { + if x != nil { + return x.Value + } + return nil +} + +func (x *AddPermissionNodeToGroupRequest) GetExpiredAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiredAt + } + return nil +} + +func (x *AddPermissionNodeToGroupRequest) GetAffectedAt() *timestamppb.Timestamp { + if x != nil { + return x.AffectedAt + } + return nil +} + +type AddPermissionNodeToGroupResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Node *PermissionNode `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddPermissionNodeToGroupResponse) Reset() { + *x = AddPermissionNodeToGroupResponse{} + mi := &file_auth_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddPermissionNodeToGroupResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddPermissionNodeToGroupResponse) ProtoMessage() {} + +func (x *AddPermissionNodeToGroupResponse) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddPermissionNodeToGroupResponse.ProtoReflect.Descriptor instead. +func (*AddPermissionNodeToGroupResponse) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{17} +} + +func (x *AddPermissionNodeToGroupResponse) GetNode() *PermissionNode { + if x != nil { + return x.Node + } + return nil +} + +type RemovePermissionNodeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Actor string `protobuf:"bytes,1,opt,name=actor,proto3" json:"actor,omitempty"` + Type *PermissionNodeActorType `protobuf:"varint,2,opt,name=type,proto3,enum=proto.PermissionNodeActorType,oneof" json:"type,omitempty"` + Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RemovePermissionNodeRequest) Reset() { + *x = RemovePermissionNodeRequest{} + mi := &file_auth_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RemovePermissionNodeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemovePermissionNodeRequest) ProtoMessage() {} + +func (x *RemovePermissionNodeRequest) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemovePermissionNodeRequest.ProtoReflect.Descriptor instead. +func (*RemovePermissionNodeRequest) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{18} +} + +func (x *RemovePermissionNodeRequest) GetActor() string { + if x != nil { + return x.Actor + } + return "" +} + +func (x *RemovePermissionNodeRequest) GetType() PermissionNodeActorType { + if x != nil && x.Type != nil { + return *x.Type + } + return PermissionNodeActorType_ACCOUNT +} + +func (x *RemovePermissionNodeRequest) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +type RemovePermissionNodeResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RemovePermissionNodeResponse) Reset() { + *x = RemovePermissionNodeResponse{} + mi := &file_auth_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RemovePermissionNodeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemovePermissionNodeResponse) ProtoMessage() {} + +func (x *RemovePermissionNodeResponse) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemovePermissionNodeResponse.ProtoReflect.Descriptor instead. +func (*RemovePermissionNodeResponse) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{19} +} + +func (x *RemovePermissionNodeResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +type RemovePermissionNodeFromGroupRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Group *PermissionGroup `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` + Actor string `protobuf:"bytes,2,opt,name=actor,proto3" json:"actor,omitempty"` + Key string `protobuf:"bytes,4,opt,name=key,proto3" json:"key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RemovePermissionNodeFromGroupRequest) Reset() { + *x = RemovePermissionNodeFromGroupRequest{} + mi := &file_auth_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RemovePermissionNodeFromGroupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemovePermissionNodeFromGroupRequest) ProtoMessage() {} + +func (x *RemovePermissionNodeFromGroupRequest) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemovePermissionNodeFromGroupRequest.ProtoReflect.Descriptor instead. +func (*RemovePermissionNodeFromGroupRequest) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{20} +} + +func (x *RemovePermissionNodeFromGroupRequest) GetGroup() *PermissionGroup { + if x != nil { + return x.Group + } + return nil +} + +func (x *RemovePermissionNodeFromGroupRequest) GetActor() string { + if x != nil { + return x.Actor + } + return "" +} + +func (x *RemovePermissionNodeFromGroupRequest) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +type RemovePermissionNodeFromGroupResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RemovePermissionNodeFromGroupResponse) Reset() { + *x = RemovePermissionNodeFromGroupResponse{} + mi := &file_auth_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RemovePermissionNodeFromGroupResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemovePermissionNodeFromGroupResponse) ProtoMessage() {} + +func (x *RemovePermissionNodeFromGroupResponse) ProtoReflect() protoreflect.Message { + mi := &file_auth_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemovePermissionNodeFromGroupResponse.ProtoReflect.Descriptor instead. +func (*RemovePermissionNodeFromGroupResponse) Descriptor() ([]byte, []int) { + return file_auth_proto_rawDescGZIP(), []int{21} +} + +func (x *RemovePermissionNodeFromGroupResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +var File_auth_proto protoreflect.FileDescriptor + +const file_auth_proto_rawDesc = "" + + "\n" + + "\n" + + "auth.proto\x12\x05proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\raccount.proto\"\xc1\x05\n" + + "\vAuthSession\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12G\n" + + "\x0flast_granted_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampH\x00R\rlastGrantedAt\x88\x01\x01\x12>\n" + + "\n" + + "expired_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampH\x01R\texpiredAt\x88\x01\x01\x12\x1d\n" + + "\n" + + "account_id\x18\x05 \x01(\tR\taccountId\x12(\n" + + "\aaccount\x18\x06 \x01(\v2\x0e.proto.AccountR\aaccount\x123\n" + + "\x06app_id\x18\t \x01(\v2\x1c.google.protobuf.StringValueR\x05appId\x12 \n" + + "\tclient_id\x18\n" + + " \x01(\tH\x02R\bclientId\x88\x01\x01\x12/\n" + + "\x11parent_session_id\x18\v \x01(\tH\x03R\x0fparentSessionId\x88\x01\x01\x12)\n" + + "\x06client\x18\f \x01(\v2\x11.proto.AuthClientR\x06client\x12\x1c\n" + + "\taudiences\x18\r \x03(\tR\taudiences\x12\x16\n" + + "\x06scopes\x18\x0e \x03(\tR\x06scopes\x12;\n" + + "\n" + + "ip_address\x18\x0f \x01(\v2\x1c.google.protobuf.StringValueR\tipAddress\x12;\n" + + "\n" + + "user_agent\x18\x10 \x01(\v2\x1c.google.protobuf.StringValueR\tuserAgent\x12&\n" + + "\x04type\x18\x11 \x01(\x0e2\x12.proto.SessionTypeR\x04typeB\x12\n" + + "\x10_last_granted_atB\r\n" + + "\v_expired_atB\f\n" + + "\n" + + "_client_idB\x14\n" + + "\x12_parent_session_id\"\xa0\x05\n" + + "\rAuthChallenge\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x129\n" + + "\n" + + "expired_at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\texpiredAt\x12\x1f\n" + + "\vstep_remain\x18\x03 \x01(\x05R\n" + + "stepRemain\x12\x1d\n" + + "\n" + + "step_total\x18\x04 \x01(\x05R\tstepTotal\x12'\n" + + "\x0ffailed_attempts\x18\x05 \x01(\x05R\x0efailedAttempts\x12+\n" + + "\x11blacklist_factors\x18\b \x03(\tR\x10blacklistFactors\x12\x1c\n" + + "\taudiences\x18\t \x03(\tR\taudiences\x12\x16\n" + + "\x06scopes\x18\n" + + " \x03(\tR\x06scopes\x12;\n" + + "\n" + + "ip_address\x18\v \x01(\v2\x1c.google.protobuf.StringValueR\tipAddress\x12;\n" + + "\n" + + "user_agent\x18\f \x01(\v2\x1c.google.protobuf.StringValueR\tuserAgent\x129\n" + + "\tdevice_id\x18\r \x01(\v2\x1c.google.protobuf.StringValueR\bdeviceId\x122\n" + + "\x05nonce\x18\x0e \x01(\v2\x1c.google.protobuf.StringValueR\x05nonce\x12\x1d\n" + + "\n" + + "account_id\x18\x0f \x01(\tR\taccountId\x12=\n" + + "\vdevice_name\x18\x10 \x01(\v2\x1c.google.protobuf.StringValueR\n" + + "deviceName\x121\n" + + "\bplatform\x18\x11 \x01(\x0e2\x15.proto.ClientPlatformR\bplatform\"\x8b\x02\n" + + "\n" + + "AuthClient\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x121\n" + + "\bplatform\x18\x02 \x01(\x0e2\x15.proto.ClientPlatformR\bplatform\x12=\n" + + "\vdevice_name\x18\x03 \x01(\v2\x1c.google.protobuf.StringValueR\n" + + "deviceName\x12?\n" + + "\fdevice_label\x18\x04 \x01(\v2\x1c.google.protobuf.StringValueR\vdeviceLabel\x12\x1b\n" + + "\tdevice_id\x18\x05 \x01(\tR\bdeviceId\x12\x1d\n" + + "\n" + + "account_id\x18\x06 \x01(\tR\taccountId\"|\n" + + "\x13AuthenticateRequest\x12\x14\n" + + "\x05token\x18\x01 \x01(\tR\x05token\x12@\n" + + "\n" + + "ip_address\x18\x02 \x01(\v2\x1c.google.protobuf.StringValueH\x00R\tipAddress\x88\x01\x01B\r\n" + + "\v_ip_address\"\x96\x01\n" + + "\x14AuthenticateResponse\x12\x14\n" + + "\x05valid\x18\x01 \x01(\bR\x05valid\x12\x1d\n" + + "\amessage\x18\x02 \x01(\tH\x00R\amessage\x88\x01\x01\x121\n" + + "\asession\x18\x03 \x01(\v2\x12.proto.AuthSessionH\x01R\asession\x88\x01\x01B\n" + + "\n" + + "\b_messageB\n" + + "\n" + + "\b_session\"E\n" + + "\x12ValidatePinRequest\x12\x1d\n" + + "\n" + + "account_id\x18\x01 \x01(\tR\taccountId\x12\x10\n" + + "\x03pin\x18\x02 \x01(\tR\x03pin\".\n" + + "\x16ValidateCaptchaRequest\x12\x14\n" + + "\x05token\x18\x01 \x01(\tR\x05token\"(\n" + + "\x10ValidateResponse\x12\x14\n" + + "\x05valid\x18\x01 \x01(\bR\x05valid\"\xbd\x02\n" + + "\x0ePermissionNode\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x14\n" + + "\x05actor\x18\x02 \x01(\tR\x05actor\x122\n" + + "\x04type\x18\x03 \x01(\x0e2\x1e.proto.PermissionNodeActorTypeR\x04type\x12\x10\n" + + "\x03key\x18\x04 \x01(\tR\x03key\x12,\n" + + "\x05value\x18\x05 \x01(\v2\x16.google.protobuf.ValueR\x05value\x129\n" + + "\n" + + "expired_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\texpiredAt\x12;\n" + + "\vaffected_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "affectedAt\x12\x19\n" + + "\bgroup_id\x18\b \x01(\tR\agroupId\"p\n" + + "\x0fPermissionGroup\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x129\n" + + "\n" + + "created_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\"\x80\x01\n" + + "\x14HasPermissionRequest\x12\x14\n" + + "\x05actor\x18\x01 \x01(\tR\x05actor\x12\x10\n" + + "\x03key\x18\x02 \x01(\tR\x03key\x127\n" + + "\x04type\x18\x03 \x01(\x0e2\x1e.proto.PermissionNodeActorTypeH\x00R\x04type\x88\x01\x01B\a\n" + + "\x05_type\">\n" + + "\x15HasPermissionResponse\x12%\n" + + "\x0ehas_permission\x18\x01 \x01(\bR\rhasPermission\"\x80\x01\n" + + "\x14GetPermissionRequest\x12\x14\n" + + "\x05actor\x18\x01 \x01(\tR\x05actor\x127\n" + + "\x04type\x18\x02 \x01(\x0e2\x1e.proto.PermissionNodeActorTypeH\x00R\x04type\x88\x01\x01\x12\x10\n" + + "\x03key\x18\x03 \x01(\tR\x03keyB\a\n" + + "\x05_type\"E\n" + + "\x15GetPermissionResponse\x12,\n" + + "\x05value\x18\x01 \x01(\v2\x16.google.protobuf.ValueR\x05value\"\xaa\x02\n" + + "\x18AddPermissionNodeRequest\x12\x14\n" + + "\x05actor\x18\x01 \x01(\tR\x05actor\x127\n" + + "\x04type\x18\x02 \x01(\x0e2\x1e.proto.PermissionNodeActorTypeH\x00R\x04type\x88\x01\x01\x12\x10\n" + + "\x03key\x18\x03 \x01(\tR\x03key\x12,\n" + + "\x05value\x18\x04 \x01(\v2\x16.google.protobuf.ValueR\x05value\x129\n" + + "\n" + + "expired_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\texpiredAt\x12;\n" + + "\vaffected_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "affectedAtB\a\n" + + "\x05_type\"F\n" + + "\x19AddPermissionNodeResponse\x12)\n" + + "\x04node\x18\x01 \x01(\v2\x15.proto.PermissionNodeR\x04node\"\xdf\x02\n" + + "\x1fAddPermissionNodeToGroupRequest\x12,\n" + + "\x05group\x18\x01 \x01(\v2\x16.proto.PermissionGroupR\x05group\x12\x14\n" + + "\x05actor\x18\x02 \x01(\tR\x05actor\x127\n" + + "\x04type\x18\x03 \x01(\x0e2\x1e.proto.PermissionNodeActorTypeH\x00R\x04type\x88\x01\x01\x12\x10\n" + + "\x03key\x18\x04 \x01(\tR\x03key\x12,\n" + + "\x05value\x18\x05 \x01(\v2\x16.google.protobuf.ValueR\x05value\x129\n" + + "\n" + + "expired_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\texpiredAt\x12;\n" + + "\vaffected_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "affectedAtB\a\n" + + "\x05_type\"M\n" + + " AddPermissionNodeToGroupResponse\x12)\n" + + "\x04node\x18\x01 \x01(\v2\x15.proto.PermissionNodeR\x04node\"\x87\x01\n" + + "\x1bRemovePermissionNodeRequest\x12\x14\n" + + "\x05actor\x18\x01 \x01(\tR\x05actor\x127\n" + + "\x04type\x18\x02 \x01(\x0e2\x1e.proto.PermissionNodeActorTypeH\x00R\x04type\x88\x01\x01\x12\x10\n" + + "\x03key\x18\x03 \x01(\tR\x03keyB\a\n" + + "\x05_type\"8\n" + + "\x1cRemovePermissionNodeResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess\"|\n" + + "$RemovePermissionNodeFromGroupRequest\x12,\n" + + "\x05group\x18\x01 \x01(\v2\x16.proto.PermissionGroupR\x05group\x12\x14\n" + + "\x05actor\x18\x02 \x01(\tR\x05actor\x12\x10\n" + + "\x03key\x18\x04 \x01(\tR\x03key\"A\n" + + "%RemovePermissionNodeFromGroupResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess*M\n" + + "\vSessionType\x12\x1e\n" + + "\x1aCHALLENGE_TYPE_UNSPECIFIED\x10\x00\x12\t\n" + + "\x05LOGIN\x10\x01\x12\t\n" + + "\x05OAUTH\x10\x02\x12\b\n" + + "\x04OIDC\x10\x03*\x85\x01\n" + + "\x0eClientPlatform\x12\x1f\n" + + "\x1bCLIENT_PLATFORM_UNSPECIFIED\x10\x00\x12\x10\n" + + "\fUNIDENTIFIED\x10\x01\x12\a\n" + + "\x03WEB\x10\x02\x12\a\n" + + "\x03IOS\x10\x03\x12\v\n" + + "\aANDROID\x10\x04\x12\t\n" + + "\x05MACOS\x10\x05\x12\v\n" + + "\aWINDOWS\x10\x06\x12\t\n" + + "\x05LINUX\x10\a*1\n" + + "\x17PermissionNodeActorType\x12\v\n" + + "\aACCOUNT\x10\x00\x12\t\n" + + "\x05GROUP\x10\x012\xea\x01\n" + + "\vAuthService\x12I\n" + + "\fAuthenticate\x12\x1a.proto.AuthenticateRequest\x1a\x1b.proto.AuthenticateResponse\"\x00\x12C\n" + + "\vValidatePin\x12\x19.proto.ValidatePinRequest\x1a\x17.proto.ValidateResponse\"\x00\x12K\n" + + "\x0fValidateCaptcha\x12\x1d.proto.ValidateCaptchaRequest\x1a\x17.proto.ValidateResponse\"\x002\xd9\x04\n" + + "\x11PermissionService\x12L\n" + + "\rHasPermission\x12\x1b.proto.HasPermissionRequest\x1a\x1c.proto.HasPermissionResponse\"\x00\x12L\n" + + "\rGetPermission\x12\x1b.proto.GetPermissionRequest\x1a\x1c.proto.GetPermissionResponse\"\x00\x12X\n" + + "\x11AddPermissionNode\x12\x1f.proto.AddPermissionNodeRequest\x1a .proto.AddPermissionNodeResponse\"\x00\x12m\n" + + "\x18AddPermissionNodeToGroup\x12&.proto.AddPermissionNodeToGroupRequest\x1a'.proto.AddPermissionNodeToGroupResponse\"\x00\x12a\n" + + "\x14RemovePermissionNode\x12\".proto.RemovePermissionNodeRequest\x1a#.proto.RemovePermissionNodeResponse\"\x00\x12|\n" + + "\x1dRemovePermissionNodeFromGroup\x12+.proto.RemovePermissionNodeFromGroupRequest\x1a,.proto.RemovePermissionNodeFromGroupResponse\"\x00BUZ7git.solsynth.dev/goatworks/turbine/pkg/shared/proto/gen\xaa\x02\x19DysonNetwork.Shared.Protob\x06proto3" + +var ( + file_auth_proto_rawDescOnce sync.Once + file_auth_proto_rawDescData []byte +) + +func file_auth_proto_rawDescGZIP() []byte { + file_auth_proto_rawDescOnce.Do(func() { + file_auth_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_auth_proto_rawDesc), len(file_auth_proto_rawDesc))) + }) + return file_auth_proto_rawDescData +} + +var file_auth_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 22) +var file_auth_proto_goTypes = []any{ + (SessionType)(0), // 0: proto.SessionType + (ClientPlatform)(0), // 1: proto.ClientPlatform + (PermissionNodeActorType)(0), // 2: proto.PermissionNodeActorType + (*AuthSession)(nil), // 3: proto.AuthSession + (*AuthChallenge)(nil), // 4: proto.AuthChallenge + (*AuthClient)(nil), // 5: proto.AuthClient + (*AuthenticateRequest)(nil), // 6: proto.AuthenticateRequest + (*AuthenticateResponse)(nil), // 7: proto.AuthenticateResponse + (*ValidatePinRequest)(nil), // 8: proto.ValidatePinRequest + (*ValidateCaptchaRequest)(nil), // 9: proto.ValidateCaptchaRequest + (*ValidateResponse)(nil), // 10: proto.ValidateResponse + (*PermissionNode)(nil), // 11: proto.PermissionNode + (*PermissionGroup)(nil), // 12: proto.PermissionGroup + (*HasPermissionRequest)(nil), // 13: proto.HasPermissionRequest + (*HasPermissionResponse)(nil), // 14: proto.HasPermissionResponse + (*GetPermissionRequest)(nil), // 15: proto.GetPermissionRequest + (*GetPermissionResponse)(nil), // 16: proto.GetPermissionResponse + (*AddPermissionNodeRequest)(nil), // 17: proto.AddPermissionNodeRequest + (*AddPermissionNodeResponse)(nil), // 18: proto.AddPermissionNodeResponse + (*AddPermissionNodeToGroupRequest)(nil), // 19: proto.AddPermissionNodeToGroupRequest + (*AddPermissionNodeToGroupResponse)(nil), // 20: proto.AddPermissionNodeToGroupResponse + (*RemovePermissionNodeRequest)(nil), // 21: proto.RemovePermissionNodeRequest + (*RemovePermissionNodeResponse)(nil), // 22: proto.RemovePermissionNodeResponse + (*RemovePermissionNodeFromGroupRequest)(nil), // 23: proto.RemovePermissionNodeFromGroupRequest + (*RemovePermissionNodeFromGroupResponse)(nil), // 24: proto.RemovePermissionNodeFromGroupResponse + (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp + (*Account)(nil), // 26: proto.Account + (*wrapperspb.StringValue)(nil), // 27: google.protobuf.StringValue + (*structpb.Value)(nil), // 28: google.protobuf.Value +} +var file_auth_proto_depIdxs = []int32{ + 25, // 0: proto.AuthSession.last_granted_at:type_name -> google.protobuf.Timestamp + 25, // 1: proto.AuthSession.expired_at:type_name -> google.protobuf.Timestamp + 26, // 2: proto.AuthSession.account:type_name -> proto.Account + 27, // 3: proto.AuthSession.app_id:type_name -> google.protobuf.StringValue + 5, // 4: proto.AuthSession.client:type_name -> proto.AuthClient + 27, // 5: proto.AuthSession.ip_address:type_name -> google.protobuf.StringValue + 27, // 6: proto.AuthSession.user_agent:type_name -> google.protobuf.StringValue + 0, // 7: proto.AuthSession.type:type_name -> proto.SessionType + 25, // 8: proto.AuthChallenge.expired_at:type_name -> google.protobuf.Timestamp + 27, // 9: proto.AuthChallenge.ip_address:type_name -> google.protobuf.StringValue + 27, // 10: proto.AuthChallenge.user_agent:type_name -> google.protobuf.StringValue + 27, // 11: proto.AuthChallenge.device_id:type_name -> google.protobuf.StringValue + 27, // 12: proto.AuthChallenge.nonce:type_name -> google.protobuf.StringValue + 27, // 13: proto.AuthChallenge.device_name:type_name -> google.protobuf.StringValue + 1, // 14: proto.AuthChallenge.platform:type_name -> proto.ClientPlatform + 1, // 15: proto.AuthClient.platform:type_name -> proto.ClientPlatform + 27, // 16: proto.AuthClient.device_name:type_name -> google.protobuf.StringValue + 27, // 17: proto.AuthClient.device_label:type_name -> google.protobuf.StringValue + 27, // 18: proto.AuthenticateRequest.ip_address:type_name -> google.protobuf.StringValue + 3, // 19: proto.AuthenticateResponse.session:type_name -> proto.AuthSession + 2, // 20: proto.PermissionNode.type:type_name -> proto.PermissionNodeActorType + 28, // 21: proto.PermissionNode.value:type_name -> google.protobuf.Value + 25, // 22: proto.PermissionNode.expired_at:type_name -> google.protobuf.Timestamp + 25, // 23: proto.PermissionNode.affected_at:type_name -> google.protobuf.Timestamp + 25, // 24: proto.PermissionGroup.created_at:type_name -> google.protobuf.Timestamp + 2, // 25: proto.HasPermissionRequest.type:type_name -> proto.PermissionNodeActorType + 2, // 26: proto.GetPermissionRequest.type:type_name -> proto.PermissionNodeActorType + 28, // 27: proto.GetPermissionResponse.value:type_name -> google.protobuf.Value + 2, // 28: proto.AddPermissionNodeRequest.type:type_name -> proto.PermissionNodeActorType + 28, // 29: proto.AddPermissionNodeRequest.value:type_name -> google.protobuf.Value + 25, // 30: proto.AddPermissionNodeRequest.expired_at:type_name -> google.protobuf.Timestamp + 25, // 31: proto.AddPermissionNodeRequest.affected_at:type_name -> google.protobuf.Timestamp + 11, // 32: proto.AddPermissionNodeResponse.node:type_name -> proto.PermissionNode + 12, // 33: proto.AddPermissionNodeToGroupRequest.group:type_name -> proto.PermissionGroup + 2, // 34: proto.AddPermissionNodeToGroupRequest.type:type_name -> proto.PermissionNodeActorType + 28, // 35: proto.AddPermissionNodeToGroupRequest.value:type_name -> google.protobuf.Value + 25, // 36: proto.AddPermissionNodeToGroupRequest.expired_at:type_name -> google.protobuf.Timestamp + 25, // 37: proto.AddPermissionNodeToGroupRequest.affected_at:type_name -> google.protobuf.Timestamp + 11, // 38: proto.AddPermissionNodeToGroupResponse.node:type_name -> proto.PermissionNode + 2, // 39: proto.RemovePermissionNodeRequest.type:type_name -> proto.PermissionNodeActorType + 12, // 40: proto.RemovePermissionNodeFromGroupRequest.group:type_name -> proto.PermissionGroup + 6, // 41: proto.AuthService.Authenticate:input_type -> proto.AuthenticateRequest + 8, // 42: proto.AuthService.ValidatePin:input_type -> proto.ValidatePinRequest + 9, // 43: proto.AuthService.ValidateCaptcha:input_type -> proto.ValidateCaptchaRequest + 13, // 44: proto.PermissionService.HasPermission:input_type -> proto.HasPermissionRequest + 15, // 45: proto.PermissionService.GetPermission:input_type -> proto.GetPermissionRequest + 17, // 46: proto.PermissionService.AddPermissionNode:input_type -> proto.AddPermissionNodeRequest + 19, // 47: proto.PermissionService.AddPermissionNodeToGroup:input_type -> proto.AddPermissionNodeToGroupRequest + 21, // 48: proto.PermissionService.RemovePermissionNode:input_type -> proto.RemovePermissionNodeRequest + 23, // 49: proto.PermissionService.RemovePermissionNodeFromGroup:input_type -> proto.RemovePermissionNodeFromGroupRequest + 7, // 50: proto.AuthService.Authenticate:output_type -> proto.AuthenticateResponse + 10, // 51: proto.AuthService.ValidatePin:output_type -> proto.ValidateResponse + 10, // 52: proto.AuthService.ValidateCaptcha:output_type -> proto.ValidateResponse + 14, // 53: proto.PermissionService.HasPermission:output_type -> proto.HasPermissionResponse + 16, // 54: proto.PermissionService.GetPermission:output_type -> proto.GetPermissionResponse + 18, // 55: proto.PermissionService.AddPermissionNode:output_type -> proto.AddPermissionNodeResponse + 20, // 56: proto.PermissionService.AddPermissionNodeToGroup:output_type -> proto.AddPermissionNodeToGroupResponse + 22, // 57: proto.PermissionService.RemovePermissionNode:output_type -> proto.RemovePermissionNodeResponse + 24, // 58: proto.PermissionService.RemovePermissionNodeFromGroup:output_type -> proto.RemovePermissionNodeFromGroupResponse + 50, // [50:59] is the sub-list for method output_type + 41, // [41:50] is the sub-list for method input_type + 41, // [41:41] is the sub-list for extension type_name + 41, // [41:41] is the sub-list for extension extendee + 0, // [0:41] is the sub-list for field type_name +} + +func init() { file_auth_proto_init() } +func file_auth_proto_init() { + if File_auth_proto != nil { + return + } + file_account_proto_init() + file_auth_proto_msgTypes[0].OneofWrappers = []any{} + file_auth_proto_msgTypes[3].OneofWrappers = []any{} + file_auth_proto_msgTypes[4].OneofWrappers = []any{} + file_auth_proto_msgTypes[10].OneofWrappers = []any{} + file_auth_proto_msgTypes[12].OneofWrappers = []any{} + file_auth_proto_msgTypes[14].OneofWrappers = []any{} + file_auth_proto_msgTypes[16].OneofWrappers = []any{} + file_auth_proto_msgTypes[18].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_auth_proto_rawDesc), len(file_auth_proto_rawDesc)), + NumEnums: 3, + NumMessages: 22, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_auth_proto_goTypes, + DependencyIndexes: file_auth_proto_depIdxs, + EnumInfos: file_auth_proto_enumTypes, + MessageInfos: file_auth_proto_msgTypes, + }.Build() + File_auth_proto = out.File + file_auth_proto_goTypes = nil + file_auth_proto_depIdxs = nil +} diff --git a/pkg/shared/proto/gen/auth_grpc.pb.go b/pkg/shared/proto/gen/auth_grpc.pb.go new file mode 100644 index 0000000..c662310 --- /dev/null +++ b/pkg/shared/proto/gen/auth_grpc.pb.go @@ -0,0 +1,489 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.0 +// - protoc v6.33.1 +// source: auth.proto + +package gen + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + AuthService_Authenticate_FullMethodName = "/proto.AuthService/Authenticate" + AuthService_ValidatePin_FullMethodName = "/proto.AuthService/ValidatePin" + AuthService_ValidateCaptcha_FullMethodName = "/proto.AuthService/ValidateCaptcha" +) + +// AuthServiceClient is the client API for AuthService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type AuthServiceClient interface { + Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error) + ValidatePin(ctx context.Context, in *ValidatePinRequest, opts ...grpc.CallOption) (*ValidateResponse, error) + ValidateCaptcha(ctx context.Context, in *ValidateCaptchaRequest, opts ...grpc.CallOption) (*ValidateResponse, error) +} + +type authServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient { + return &authServiceClient{cc} +} + +func (c *authServiceClient) Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AuthenticateResponse) + err := c.cc.Invoke(ctx, AuthService_Authenticate_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authServiceClient) ValidatePin(ctx context.Context, in *ValidatePinRequest, opts ...grpc.CallOption) (*ValidateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ValidateResponse) + err := c.cc.Invoke(ctx, AuthService_ValidatePin_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *authServiceClient) ValidateCaptcha(ctx context.Context, in *ValidateCaptchaRequest, opts ...grpc.CallOption) (*ValidateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ValidateResponse) + err := c.cc.Invoke(ctx, AuthService_ValidateCaptcha_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AuthServiceServer is the server API for AuthService service. +// All implementations must embed UnimplementedAuthServiceServer +// for forward compatibility. +type AuthServiceServer interface { + Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error) + ValidatePin(context.Context, *ValidatePinRequest) (*ValidateResponse, error) + ValidateCaptcha(context.Context, *ValidateCaptchaRequest) (*ValidateResponse, error) + mustEmbedUnimplementedAuthServiceServer() +} + +// UnimplementedAuthServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedAuthServiceServer struct{} + +func (UnimplementedAuthServiceServer) Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error) { + return nil, status.Error(codes.Unimplemented, "method Authenticate not implemented") +} +func (UnimplementedAuthServiceServer) ValidatePin(context.Context, *ValidatePinRequest) (*ValidateResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ValidatePin not implemented") +} +func (UnimplementedAuthServiceServer) ValidateCaptcha(context.Context, *ValidateCaptchaRequest) (*ValidateResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ValidateCaptcha not implemented") +} +func (UnimplementedAuthServiceServer) mustEmbedUnimplementedAuthServiceServer() {} +func (UnimplementedAuthServiceServer) testEmbeddedByValue() {} + +// UnsafeAuthServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AuthServiceServer will +// result in compilation errors. +type UnsafeAuthServiceServer interface { + mustEmbedUnimplementedAuthServiceServer() +} + +func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer) { + // If the following call panics, it indicates UnimplementedAuthServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&AuthService_ServiceDesc, srv) +} + +func _AuthService_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AuthenticateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).Authenticate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AuthService_Authenticate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).Authenticate(ctx, req.(*AuthenticateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthService_ValidatePin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ValidatePinRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).ValidatePin(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AuthService_ValidatePin_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).ValidatePin(ctx, req.(*ValidatePinRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AuthService_ValidateCaptcha_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ValidateCaptchaRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthServiceServer).ValidateCaptcha(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AuthService_ValidateCaptcha_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthServiceServer).ValidateCaptcha(ctx, req.(*ValidateCaptchaRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var AuthService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "proto.AuthService", + HandlerType: (*AuthServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Authenticate", + Handler: _AuthService_Authenticate_Handler, + }, + { + MethodName: "ValidatePin", + Handler: _AuthService_ValidatePin_Handler, + }, + { + MethodName: "ValidateCaptcha", + Handler: _AuthService_ValidateCaptcha_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "auth.proto", +} + +const ( + PermissionService_HasPermission_FullMethodName = "/proto.PermissionService/HasPermission" + PermissionService_GetPermission_FullMethodName = "/proto.PermissionService/GetPermission" + PermissionService_AddPermissionNode_FullMethodName = "/proto.PermissionService/AddPermissionNode" + PermissionService_AddPermissionNodeToGroup_FullMethodName = "/proto.PermissionService/AddPermissionNodeToGroup" + PermissionService_RemovePermissionNode_FullMethodName = "/proto.PermissionService/RemovePermissionNode" + PermissionService_RemovePermissionNodeFromGroup_FullMethodName = "/proto.PermissionService/RemovePermissionNodeFromGroup" +) + +// PermissionServiceClient is the client API for PermissionService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type PermissionServiceClient interface { + HasPermission(ctx context.Context, in *HasPermissionRequest, opts ...grpc.CallOption) (*HasPermissionResponse, error) + GetPermission(ctx context.Context, in *GetPermissionRequest, opts ...grpc.CallOption) (*GetPermissionResponse, error) + AddPermissionNode(ctx context.Context, in *AddPermissionNodeRequest, opts ...grpc.CallOption) (*AddPermissionNodeResponse, error) + AddPermissionNodeToGroup(ctx context.Context, in *AddPermissionNodeToGroupRequest, opts ...grpc.CallOption) (*AddPermissionNodeToGroupResponse, error) + RemovePermissionNode(ctx context.Context, in *RemovePermissionNodeRequest, opts ...grpc.CallOption) (*RemovePermissionNodeResponse, error) + RemovePermissionNodeFromGroup(ctx context.Context, in *RemovePermissionNodeFromGroupRequest, opts ...grpc.CallOption) (*RemovePermissionNodeFromGroupResponse, error) +} + +type permissionServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewPermissionServiceClient(cc grpc.ClientConnInterface) PermissionServiceClient { + return &permissionServiceClient{cc} +} + +func (c *permissionServiceClient) HasPermission(ctx context.Context, in *HasPermissionRequest, opts ...grpc.CallOption) (*HasPermissionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(HasPermissionResponse) + err := c.cc.Invoke(ctx, PermissionService_HasPermission_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *permissionServiceClient) GetPermission(ctx context.Context, in *GetPermissionRequest, opts ...grpc.CallOption) (*GetPermissionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetPermissionResponse) + err := c.cc.Invoke(ctx, PermissionService_GetPermission_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *permissionServiceClient) AddPermissionNode(ctx context.Context, in *AddPermissionNodeRequest, opts ...grpc.CallOption) (*AddPermissionNodeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AddPermissionNodeResponse) + err := c.cc.Invoke(ctx, PermissionService_AddPermissionNode_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *permissionServiceClient) AddPermissionNodeToGroup(ctx context.Context, in *AddPermissionNodeToGroupRequest, opts ...grpc.CallOption) (*AddPermissionNodeToGroupResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AddPermissionNodeToGroupResponse) + err := c.cc.Invoke(ctx, PermissionService_AddPermissionNodeToGroup_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *permissionServiceClient) RemovePermissionNode(ctx context.Context, in *RemovePermissionNodeRequest, opts ...grpc.CallOption) (*RemovePermissionNodeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RemovePermissionNodeResponse) + err := c.cc.Invoke(ctx, PermissionService_RemovePermissionNode_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *permissionServiceClient) RemovePermissionNodeFromGroup(ctx context.Context, in *RemovePermissionNodeFromGroupRequest, opts ...grpc.CallOption) (*RemovePermissionNodeFromGroupResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RemovePermissionNodeFromGroupResponse) + err := c.cc.Invoke(ctx, PermissionService_RemovePermissionNodeFromGroup_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PermissionServiceServer is the server API for PermissionService service. +// All implementations must embed UnimplementedPermissionServiceServer +// for forward compatibility. +type PermissionServiceServer interface { + HasPermission(context.Context, *HasPermissionRequest) (*HasPermissionResponse, error) + GetPermission(context.Context, *GetPermissionRequest) (*GetPermissionResponse, error) + AddPermissionNode(context.Context, *AddPermissionNodeRequest) (*AddPermissionNodeResponse, error) + AddPermissionNodeToGroup(context.Context, *AddPermissionNodeToGroupRequest) (*AddPermissionNodeToGroupResponse, error) + RemovePermissionNode(context.Context, *RemovePermissionNodeRequest) (*RemovePermissionNodeResponse, error) + RemovePermissionNodeFromGroup(context.Context, *RemovePermissionNodeFromGroupRequest) (*RemovePermissionNodeFromGroupResponse, error) + mustEmbedUnimplementedPermissionServiceServer() +} + +// UnimplementedPermissionServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedPermissionServiceServer struct{} + +func (UnimplementedPermissionServiceServer) HasPermission(context.Context, *HasPermissionRequest) (*HasPermissionResponse, error) { + return nil, status.Error(codes.Unimplemented, "method HasPermission not implemented") +} +func (UnimplementedPermissionServiceServer) GetPermission(context.Context, *GetPermissionRequest) (*GetPermissionResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetPermission not implemented") +} +func (UnimplementedPermissionServiceServer) AddPermissionNode(context.Context, *AddPermissionNodeRequest) (*AddPermissionNodeResponse, error) { + return nil, status.Error(codes.Unimplemented, "method AddPermissionNode not implemented") +} +func (UnimplementedPermissionServiceServer) AddPermissionNodeToGroup(context.Context, *AddPermissionNodeToGroupRequest) (*AddPermissionNodeToGroupResponse, error) { + return nil, status.Error(codes.Unimplemented, "method AddPermissionNodeToGroup not implemented") +} +func (UnimplementedPermissionServiceServer) RemovePermissionNode(context.Context, *RemovePermissionNodeRequest) (*RemovePermissionNodeResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RemovePermissionNode not implemented") +} +func (UnimplementedPermissionServiceServer) RemovePermissionNodeFromGroup(context.Context, *RemovePermissionNodeFromGroupRequest) (*RemovePermissionNodeFromGroupResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RemovePermissionNodeFromGroup not implemented") +} +func (UnimplementedPermissionServiceServer) mustEmbedUnimplementedPermissionServiceServer() {} +func (UnimplementedPermissionServiceServer) testEmbeddedByValue() {} + +// UnsafePermissionServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PermissionServiceServer will +// result in compilation errors. +type UnsafePermissionServiceServer interface { + mustEmbedUnimplementedPermissionServiceServer() +} + +func RegisterPermissionServiceServer(s grpc.ServiceRegistrar, srv PermissionServiceServer) { + // If the following call panics, it indicates UnimplementedPermissionServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&PermissionService_ServiceDesc, srv) +} + +func _PermissionService_HasPermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HasPermissionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PermissionServiceServer).HasPermission(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PermissionService_HasPermission_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PermissionServiceServer).HasPermission(ctx, req.(*HasPermissionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PermissionService_GetPermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPermissionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PermissionServiceServer).GetPermission(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PermissionService_GetPermission_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PermissionServiceServer).GetPermission(ctx, req.(*GetPermissionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PermissionService_AddPermissionNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddPermissionNodeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PermissionServiceServer).AddPermissionNode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PermissionService_AddPermissionNode_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PermissionServiceServer).AddPermissionNode(ctx, req.(*AddPermissionNodeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PermissionService_AddPermissionNodeToGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddPermissionNodeToGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PermissionServiceServer).AddPermissionNodeToGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PermissionService_AddPermissionNodeToGroup_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PermissionServiceServer).AddPermissionNodeToGroup(ctx, req.(*AddPermissionNodeToGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PermissionService_RemovePermissionNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemovePermissionNodeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PermissionServiceServer).RemovePermissionNode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PermissionService_RemovePermissionNode_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PermissionServiceServer).RemovePermissionNode(ctx, req.(*RemovePermissionNodeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PermissionService_RemovePermissionNodeFromGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemovePermissionNodeFromGroupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PermissionServiceServer).RemovePermissionNodeFromGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PermissionService_RemovePermissionNodeFromGroup_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PermissionServiceServer).RemovePermissionNodeFromGroup(ctx, req.(*RemovePermissionNodeFromGroupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// PermissionService_ServiceDesc is the grpc.ServiceDesc for PermissionService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var PermissionService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "proto.PermissionService", + HandlerType: (*PermissionServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "HasPermission", + Handler: _PermissionService_HasPermission_Handler, + }, + { + MethodName: "GetPermission", + Handler: _PermissionService_GetPermission_Handler, + }, + { + MethodName: "AddPermissionNode", + Handler: _PermissionService_AddPermissionNode_Handler, + }, + { + MethodName: "AddPermissionNodeToGroup", + Handler: _PermissionService_AddPermissionNodeToGroup_Handler, + }, + { + MethodName: "RemovePermissionNode", + Handler: _PermissionService_RemovePermissionNode_Handler, + }, + { + MethodName: "RemovePermissionNodeFromGroup", + Handler: _PermissionService_RemovePermissionNodeFromGroup_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "auth.proto", +} diff --git a/pkg/shared/proto/gen/develop.pb.go b/pkg/shared/proto/gen/develop.pb.go new file mode 100644 index 0000000..cd91a68 --- /dev/null +++ b/pkg/shared/proto/gen/develop.pb.go @@ -0,0 +1,1694 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.10 +// protoc v6.33.1 +// source: develop.proto + +package gen + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type CustomAppStatus int32 + +const ( + CustomAppStatus_CUSTOM_APP_STATUS_UNSPECIFIED CustomAppStatus = 0 + CustomAppStatus_DEVELOPING CustomAppStatus = 1 + CustomAppStatus_STAGING CustomAppStatus = 2 + CustomAppStatus_PRODUCTION CustomAppStatus = 3 + CustomAppStatus_SUSPENDED CustomAppStatus = 4 +) + +// Enum value maps for CustomAppStatus. +var ( + CustomAppStatus_name = map[int32]string{ + 0: "CUSTOM_APP_STATUS_UNSPECIFIED", + 1: "DEVELOPING", + 2: "STAGING", + 3: "PRODUCTION", + 4: "SUSPENDED", + } + CustomAppStatus_value = map[string]int32{ + "CUSTOM_APP_STATUS_UNSPECIFIED": 0, + "DEVELOPING": 1, + "STAGING": 2, + "PRODUCTION": 3, + "SUSPENDED": 4, + } +) + +func (x CustomAppStatus) Enum() *CustomAppStatus { + p := new(CustomAppStatus) + *p = x + return p +} + +func (x CustomAppStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (CustomAppStatus) Descriptor() protoreflect.EnumDescriptor { + return file_develop_proto_enumTypes[0].Descriptor() +} + +func (CustomAppStatus) Type() protoreflect.EnumType { + return &file_develop_proto_enumTypes[0] +} + +func (x CustomAppStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CustomAppStatus.Descriptor instead. +func (CustomAppStatus) EnumDescriptor() ([]byte, []int) { + return file_develop_proto_rawDescGZIP(), []int{0} +} + +type CustomAppOauthConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + ClientUri string `protobuf:"bytes,1,opt,name=client_uri,json=clientUri,proto3" json:"client_uri,omitempty"` + RedirectUris []string `protobuf:"bytes,2,rep,name=redirect_uris,json=redirectUris,proto3" json:"redirect_uris,omitempty"` + PostLogoutRedirectUris []string `protobuf:"bytes,3,rep,name=post_logout_redirect_uris,json=postLogoutRedirectUris,proto3" json:"post_logout_redirect_uris,omitempty"` + AllowedScopes []string `protobuf:"bytes,4,rep,name=allowed_scopes,json=allowedScopes,proto3" json:"allowed_scopes,omitempty"` + AllowedGrantTypes []string `protobuf:"bytes,5,rep,name=allowed_grant_types,json=allowedGrantTypes,proto3" json:"allowed_grant_types,omitempty"` + RequirePkce bool `protobuf:"varint,6,opt,name=require_pkce,json=requirePkce,proto3" json:"require_pkce,omitempty"` + AllowOfflineAccess bool `protobuf:"varint,7,opt,name=allow_offline_access,json=allowOfflineAccess,proto3" json:"allow_offline_access,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CustomAppOauthConfig) Reset() { + *x = CustomAppOauthConfig{} + mi := &file_develop_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CustomAppOauthConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CustomAppOauthConfig) ProtoMessage() {} + +func (x *CustomAppOauthConfig) ProtoReflect() protoreflect.Message { + mi := &file_develop_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CustomAppOauthConfig.ProtoReflect.Descriptor instead. +func (*CustomAppOauthConfig) Descriptor() ([]byte, []int) { + return file_develop_proto_rawDescGZIP(), []int{0} +} + +func (x *CustomAppOauthConfig) GetClientUri() string { + if x != nil { + return x.ClientUri + } + return "" +} + +func (x *CustomAppOauthConfig) GetRedirectUris() []string { + if x != nil { + return x.RedirectUris + } + return nil +} + +func (x *CustomAppOauthConfig) GetPostLogoutRedirectUris() []string { + if x != nil { + return x.PostLogoutRedirectUris + } + return nil +} + +func (x *CustomAppOauthConfig) GetAllowedScopes() []string { + if x != nil { + return x.AllowedScopes + } + return nil +} + +func (x *CustomAppOauthConfig) GetAllowedGrantTypes() []string { + if x != nil { + return x.AllowedGrantTypes + } + return nil +} + +func (x *CustomAppOauthConfig) GetRequirePkce() bool { + if x != nil { + return x.RequirePkce + } + return false +} + +func (x *CustomAppOauthConfig) GetAllowOfflineAccess() bool { + if x != nil { + return x.AllowOfflineAccess + } + return false +} + +type CustomAppLinks struct { + state protoimpl.MessageState `protogen:"open.v1"` + HomePage string `protobuf:"bytes,1,opt,name=home_page,json=homePage,proto3" json:"home_page,omitempty"` + PrivacyPolicy string `protobuf:"bytes,2,opt,name=privacy_policy,json=privacyPolicy,proto3" json:"privacy_policy,omitempty"` + TermsOfService string `protobuf:"bytes,3,opt,name=terms_of_service,json=termsOfService,proto3" json:"terms_of_service,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CustomAppLinks) Reset() { + *x = CustomAppLinks{} + mi := &file_develop_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CustomAppLinks) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CustomAppLinks) ProtoMessage() {} + +func (x *CustomAppLinks) ProtoReflect() protoreflect.Message { + mi := &file_develop_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CustomAppLinks.ProtoReflect.Descriptor instead. +func (*CustomAppLinks) Descriptor() ([]byte, []int) { + return file_develop_proto_rawDescGZIP(), []int{1} +} + +func (x *CustomAppLinks) GetHomePage() string { + if x != nil { + return x.HomePage + } + return "" +} + +func (x *CustomAppLinks) GetPrivacyPolicy() string { + if x != nil { + return x.PrivacyPolicy + } + return "" +} + +func (x *CustomAppLinks) GetTermsOfService() string { + if x != nil { + return x.TermsOfService + } + return "" +} + +type CustomApp struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Slug string `protobuf:"bytes,2,opt,name=slug,proto3" json:"slug,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + Status CustomAppStatus `protobuf:"varint,5,opt,name=status,proto3,enum=proto.CustomAppStatus" json:"status,omitempty"` + // jsonb columns represented as bytes + Picture *CloudFile `protobuf:"bytes,6,opt,name=picture,proto3" json:"picture,omitempty"` + Background *CloudFile `protobuf:"bytes,7,opt,name=background,proto3" json:"background,omitempty"` + Verification *VerificationMark `protobuf:"bytes,8,opt,name=verification,proto3" json:"verification,omitempty"` + Links *CustomAppLinks `protobuf:"bytes,9,opt,name=links,proto3" json:"links,omitempty"` + OauthConfig *CustomAppOauthConfig `protobuf:"bytes,13,opt,name=oauth_config,json=oauthConfig,proto3" json:"oauth_config,omitempty"` + ProjectId string `protobuf:"bytes,10,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CustomApp) Reset() { + *x = CustomApp{} + mi := &file_develop_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CustomApp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CustomApp) ProtoMessage() {} + +func (x *CustomApp) ProtoReflect() protoreflect.Message { + mi := &file_develop_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CustomApp.ProtoReflect.Descriptor instead. +func (*CustomApp) Descriptor() ([]byte, []int) { + return file_develop_proto_rawDescGZIP(), []int{2} +} + +func (x *CustomApp) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *CustomApp) GetSlug() string { + if x != nil { + return x.Slug + } + return "" +} + +func (x *CustomApp) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CustomApp) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *CustomApp) GetStatus() CustomAppStatus { + if x != nil { + return x.Status + } + return CustomAppStatus_CUSTOM_APP_STATUS_UNSPECIFIED +} + +func (x *CustomApp) GetPicture() *CloudFile { + if x != nil { + return x.Picture + } + return nil +} + +func (x *CustomApp) GetBackground() *CloudFile { + if x != nil { + return x.Background + } + return nil +} + +func (x *CustomApp) GetVerification() *VerificationMark { + if x != nil { + return x.Verification + } + return nil +} + +func (x *CustomApp) GetLinks() *CustomAppLinks { + if x != nil { + return x.Links + } + return nil +} + +func (x *CustomApp) GetOauthConfig() *CustomAppOauthConfig { + if x != nil { + return x.OauthConfig + } + return nil +} + +func (x *CustomApp) GetProjectId() string { + if x != nil { + return x.ProjectId + } + return "" +} + +func (x *CustomApp) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *CustomApp) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type CustomAppSecret struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Secret string `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + ExpiredAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"` + IsOidc bool `protobuf:"varint,5,opt,name=is_oidc,json=isOidc,proto3" json:"is_oidc,omitempty"` + AppId string `protobuf:"bytes,6,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CustomAppSecret) Reset() { + *x = CustomAppSecret{} + mi := &file_develop_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CustomAppSecret) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CustomAppSecret) ProtoMessage() {} + +func (x *CustomAppSecret) ProtoReflect() protoreflect.Message { + mi := &file_develop_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CustomAppSecret.ProtoReflect.Descriptor instead. +func (*CustomAppSecret) Descriptor() ([]byte, []int) { + return file_develop_proto_rawDescGZIP(), []int{3} +} + +func (x *CustomAppSecret) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *CustomAppSecret) GetSecret() string { + if x != nil { + return x.Secret + } + return "" +} + +func (x *CustomAppSecret) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *CustomAppSecret) GetExpiredAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiredAt + } + return nil +} + +func (x *CustomAppSecret) GetIsOidc() bool { + if x != nil { + return x.IsOidc + } + return false +} + +func (x *CustomAppSecret) GetAppId() string { + if x != nil { + return x.AppId + } + return "" +} + +func (x *CustomAppSecret) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *CustomAppSecret) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type GetCustomAppRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Query: + // + // *GetCustomAppRequest_Id + // *GetCustomAppRequest_Slug + Query isGetCustomAppRequest_Query `protobuf_oneof:"Query"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetCustomAppRequest) Reset() { + *x = GetCustomAppRequest{} + mi := &file_develop_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetCustomAppRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCustomAppRequest) ProtoMessage() {} + +func (x *GetCustomAppRequest) ProtoReflect() protoreflect.Message { + mi := &file_develop_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCustomAppRequest.ProtoReflect.Descriptor instead. +func (*GetCustomAppRequest) Descriptor() ([]byte, []int) { + return file_develop_proto_rawDescGZIP(), []int{4} +} + +func (x *GetCustomAppRequest) GetQuery() isGetCustomAppRequest_Query { + if x != nil { + return x.Query + } + return nil +} + +func (x *GetCustomAppRequest) GetId() string { + if x != nil { + if x, ok := x.Query.(*GetCustomAppRequest_Id); ok { + return x.Id + } + } + return "" +} + +func (x *GetCustomAppRequest) GetSlug() string { + if x != nil { + if x, ok := x.Query.(*GetCustomAppRequest_Slug); ok { + return x.Slug + } + } + return "" +} + +type isGetCustomAppRequest_Query interface { + isGetCustomAppRequest_Query() +} + +type GetCustomAppRequest_Id struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"` +} + +type GetCustomAppRequest_Slug struct { + Slug string `protobuf:"bytes,2,opt,name=slug,proto3,oneof"` +} + +func (*GetCustomAppRequest_Id) isGetCustomAppRequest_Query() {} + +func (*GetCustomAppRequest_Slug) isGetCustomAppRequest_Query() {} + +type GetCustomAppResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + App *CustomApp `protobuf:"bytes,1,opt,name=app,proto3" json:"app,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetCustomAppResponse) Reset() { + *x = GetCustomAppResponse{} + mi := &file_develop_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetCustomAppResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCustomAppResponse) ProtoMessage() {} + +func (x *GetCustomAppResponse) ProtoReflect() protoreflect.Message { + mi := &file_develop_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCustomAppResponse.ProtoReflect.Descriptor instead. +func (*GetCustomAppResponse) Descriptor() ([]byte, []int) { + return file_develop_proto_rawDescGZIP(), []int{5} +} + +func (x *GetCustomAppResponse) GetApp() *CustomApp { + if x != nil { + return x.App + } + return nil +} + +type CheckCustomAppSecretRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to SecretIdentifier: + // + // *CheckCustomAppSecretRequest_SecretId + // *CheckCustomAppSecretRequest_AppId + SecretIdentifier isCheckCustomAppSecretRequest_SecretIdentifier `protobuf_oneof:"SecretIdentifier"` + Secret string `protobuf:"bytes,3,opt,name=secret,proto3" json:"secret,omitempty"` + IsOidc *bool `protobuf:"varint,4,opt,name=is_oidc,json=isOidc,proto3,oneof" json:"is_oidc,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CheckCustomAppSecretRequest) Reset() { + *x = CheckCustomAppSecretRequest{} + mi := &file_develop_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CheckCustomAppSecretRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckCustomAppSecretRequest) ProtoMessage() {} + +func (x *CheckCustomAppSecretRequest) ProtoReflect() protoreflect.Message { + mi := &file_develop_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckCustomAppSecretRequest.ProtoReflect.Descriptor instead. +func (*CheckCustomAppSecretRequest) Descriptor() ([]byte, []int) { + return file_develop_proto_rawDescGZIP(), []int{6} +} + +func (x *CheckCustomAppSecretRequest) GetSecretIdentifier() isCheckCustomAppSecretRequest_SecretIdentifier { + if x != nil { + return x.SecretIdentifier + } + return nil +} + +func (x *CheckCustomAppSecretRequest) GetSecretId() string { + if x != nil { + if x, ok := x.SecretIdentifier.(*CheckCustomAppSecretRequest_SecretId); ok { + return x.SecretId + } + } + return "" +} + +func (x *CheckCustomAppSecretRequest) GetAppId() string { + if x != nil { + if x, ok := x.SecretIdentifier.(*CheckCustomAppSecretRequest_AppId); ok { + return x.AppId + } + } + return "" +} + +func (x *CheckCustomAppSecretRequest) GetSecret() string { + if x != nil { + return x.Secret + } + return "" +} + +func (x *CheckCustomAppSecretRequest) GetIsOidc() bool { + if x != nil && x.IsOidc != nil { + return *x.IsOidc + } + return false +} + +type isCheckCustomAppSecretRequest_SecretIdentifier interface { + isCheckCustomAppSecretRequest_SecretIdentifier() +} + +type CheckCustomAppSecretRequest_SecretId struct { + SecretId string `protobuf:"bytes,1,opt,name=secret_id,json=secretId,proto3,oneof"` +} + +type CheckCustomAppSecretRequest_AppId struct { + AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3,oneof"` +} + +func (*CheckCustomAppSecretRequest_SecretId) isCheckCustomAppSecretRequest_SecretIdentifier() {} + +func (*CheckCustomAppSecretRequest_AppId) isCheckCustomAppSecretRequest_SecretIdentifier() {} + +type CheckCustomAppSecretResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CheckCustomAppSecretResponse) Reset() { + *x = CheckCustomAppSecretResponse{} + mi := &file_develop_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CheckCustomAppSecretResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckCustomAppSecretResponse) ProtoMessage() {} + +func (x *CheckCustomAppSecretResponse) ProtoReflect() protoreflect.Message { + mi := &file_develop_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckCustomAppSecretResponse.ProtoReflect.Descriptor instead. +func (*CheckCustomAppSecretResponse) Descriptor() ([]byte, []int) { + return file_develop_proto_rawDescGZIP(), []int{7} +} + +func (x *CheckCustomAppSecretResponse) GetValid() bool { + if x != nil { + return x.Valid + } + return false +} + +// BotAccount represents a bot account in the system +// It extends the base Account with bot-specific fields +type BotAccount struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Base account information + Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + // Bot-specific information + Slug string `protobuf:"bytes,2,opt,name=slug,proto3" json:"slug,omitempty"` // Unique identifier for the bot + IsActive bool `protobuf:"varint,3,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` // Whether the bot is currently active + AutomatedId string `protobuf:"bytes,5,opt,name=automated_id,json=automatedId,proto3" json:"automated_id,omitempty"` // The bot ID + // Timestamps + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BotAccount) Reset() { + *x = BotAccount{} + mi := &file_develop_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BotAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BotAccount) ProtoMessage() {} + +func (x *BotAccount) ProtoReflect() protoreflect.Message { + mi := &file_develop_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BotAccount.ProtoReflect.Descriptor instead. +func (*BotAccount) Descriptor() ([]byte, []int) { + return file_develop_proto_rawDescGZIP(), []int{8} +} + +func (x *BotAccount) GetAccount() *Account { + if x != nil { + return x.Account + } + return nil +} + +func (x *BotAccount) GetSlug() string { + if x != nil { + return x.Slug + } + return "" +} + +func (x *BotAccount) GetIsActive() bool { + if x != nil { + return x.IsActive + } + return false +} + +func (x *BotAccount) GetAutomatedId() string { + if x != nil { + return x.AutomatedId + } + return "" +} + +func (x *BotAccount) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *BotAccount) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +// Request/Response messages for BotAccount operations +type CreateBotAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + AutomatedId string `protobuf:"bytes,2,opt,name=automated_id,json=automatedId,proto3" json:"automated_id,omitempty"` + PictureId *wrapperspb.StringValue `protobuf:"bytes,8,opt,name=picture_id,json=pictureId,proto3" json:"picture_id,omitempty"` + BackgroundId *wrapperspb.StringValue `protobuf:"bytes,9,opt,name=background_id,json=backgroundId,proto3" json:"background_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateBotAccountRequest) Reset() { + *x = CreateBotAccountRequest{} + mi := &file_develop_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateBotAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateBotAccountRequest) ProtoMessage() {} + +func (x *CreateBotAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_develop_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateBotAccountRequest.ProtoReflect.Descriptor instead. +func (*CreateBotAccountRequest) Descriptor() ([]byte, []int) { + return file_develop_proto_rawDescGZIP(), []int{9} +} + +func (x *CreateBotAccountRequest) GetAccount() *Account { + if x != nil { + return x.Account + } + return nil +} + +func (x *CreateBotAccountRequest) GetAutomatedId() string { + if x != nil { + return x.AutomatedId + } + return "" +} + +func (x *CreateBotAccountRequest) GetPictureId() *wrapperspb.StringValue { + if x != nil { + return x.PictureId + } + return nil +} + +func (x *CreateBotAccountRequest) GetBackgroundId() *wrapperspb.StringValue { + if x != nil { + return x.BackgroundId + } + return nil +} + +type CreateBotAccountResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Bot *BotAccount `protobuf:"bytes,1,opt,name=bot,proto3" json:"bot,omitempty"` // The created bot account + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateBotAccountResponse) Reset() { + *x = CreateBotAccountResponse{} + mi := &file_develop_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateBotAccountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateBotAccountResponse) ProtoMessage() {} + +func (x *CreateBotAccountResponse) ProtoReflect() protoreflect.Message { + mi := &file_develop_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateBotAccountResponse.ProtoReflect.Descriptor instead. +func (*CreateBotAccountResponse) Descriptor() ([]byte, []int) { + return file_develop_proto_rawDescGZIP(), []int{10} +} + +func (x *CreateBotAccountResponse) GetBot() *BotAccount { + if x != nil { + return x.Bot + } + return nil +} + +type UpdateBotAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AutomatedId string `protobuf:"bytes,1,opt,name=automated_id,json=automatedId,proto3" json:"automated_id,omitempty"` // ID of the bot account to update + Account *Account `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` // Updated account information + PictureId *string `protobuf:"bytes,8,opt,name=picture_id,json=pictureId,proto3,oneof" json:"picture_id,omitempty"` + BackgroundId *string `protobuf:"bytes,9,opt,name=background_id,json=backgroundId,proto3,oneof" json:"background_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateBotAccountRequest) Reset() { + *x = UpdateBotAccountRequest{} + mi := &file_develop_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateBotAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateBotAccountRequest) ProtoMessage() {} + +func (x *UpdateBotAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_develop_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateBotAccountRequest.ProtoReflect.Descriptor instead. +func (*UpdateBotAccountRequest) Descriptor() ([]byte, []int) { + return file_develop_proto_rawDescGZIP(), []int{11} +} + +func (x *UpdateBotAccountRequest) GetAutomatedId() string { + if x != nil { + return x.AutomatedId + } + return "" +} + +func (x *UpdateBotAccountRequest) GetAccount() *Account { + if x != nil { + return x.Account + } + return nil +} + +func (x *UpdateBotAccountRequest) GetPictureId() string { + if x != nil && x.PictureId != nil { + return *x.PictureId + } + return "" +} + +func (x *UpdateBotAccountRequest) GetBackgroundId() string { + if x != nil && x.BackgroundId != nil { + return *x.BackgroundId + } + return "" +} + +type UpdateBotAccountResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Bot *BotAccount `protobuf:"bytes,1,opt,name=bot,proto3" json:"bot,omitempty"` // The updated bot account + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateBotAccountResponse) Reset() { + *x = UpdateBotAccountResponse{} + mi := &file_develop_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateBotAccountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateBotAccountResponse) ProtoMessage() {} + +func (x *UpdateBotAccountResponse) ProtoReflect() protoreflect.Message { + mi := &file_develop_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateBotAccountResponse.ProtoReflect.Descriptor instead. +func (*UpdateBotAccountResponse) Descriptor() ([]byte, []int) { + return file_develop_proto_rawDescGZIP(), []int{12} +} + +func (x *UpdateBotAccountResponse) GetBot() *BotAccount { + if x != nil { + return x.Bot + } + return nil +} + +type DeleteBotAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AutomatedId string `protobuf:"bytes,1,opt,name=automated_id,json=automatedId,proto3" json:"automated_id,omitempty"` // ID of the bot account to delete + Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` // Whether to force delete (bypass soft delete) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteBotAccountRequest) Reset() { + *x = DeleteBotAccountRequest{} + mi := &file_develop_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteBotAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteBotAccountRequest) ProtoMessage() {} + +func (x *DeleteBotAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_develop_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteBotAccountRequest.ProtoReflect.Descriptor instead. +func (*DeleteBotAccountRequest) Descriptor() ([]byte, []int) { + return file_develop_proto_rawDescGZIP(), []int{13} +} + +func (x *DeleteBotAccountRequest) GetAutomatedId() string { + if x != nil { + return x.AutomatedId + } + return "" +} + +func (x *DeleteBotAccountRequest) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +type DeleteBotAccountResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // Whether the deletion was successful + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteBotAccountResponse) Reset() { + *x = DeleteBotAccountResponse{} + mi := &file_develop_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteBotAccountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteBotAccountResponse) ProtoMessage() {} + +func (x *DeleteBotAccountResponse) ProtoReflect() protoreflect.Message { + mi := &file_develop_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteBotAccountResponse.ProtoReflect.Descriptor instead. +func (*DeleteBotAccountResponse) Descriptor() ([]byte, []int) { + return file_develop_proto_rawDescGZIP(), []int{14} +} + +func (x *DeleteBotAccountResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +type ApiKey struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` + AccountId string `protobuf:"bytes,3,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + SessionId string `protobuf:"bytes,4,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + Key *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=key,proto3" json:"key,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ApiKey) Reset() { + *x = ApiKey{} + mi := &file_develop_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ApiKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApiKey) ProtoMessage() {} + +func (x *ApiKey) ProtoReflect() protoreflect.Message { + mi := &file_develop_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApiKey.ProtoReflect.Descriptor instead. +func (*ApiKey) Descriptor() ([]byte, []int) { + return file_develop_proto_rawDescGZIP(), []int{15} +} + +func (x *ApiKey) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ApiKey) GetLabel() string { + if x != nil { + return x.Label + } + return "" +} + +func (x *ApiKey) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *ApiKey) GetSessionId() string { + if x != nil { + return x.SessionId + } + return "" +} + +func (x *ApiKey) GetKey() *wrapperspb.StringValue { + if x != nil { + return x.Key + } + return nil +} + +func (x *ApiKey) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *ApiKey) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type GetApiKeyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetApiKeyRequest) Reset() { + *x = GetApiKeyRequest{} + mi := &file_develop_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetApiKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetApiKeyRequest) ProtoMessage() {} + +func (x *GetApiKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_develop_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetApiKeyRequest.ProtoReflect.Descriptor instead. +func (*GetApiKeyRequest) Descriptor() ([]byte, []int) { + return file_develop_proto_rawDescGZIP(), []int{16} +} + +func (x *GetApiKeyRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListApiKeyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AutomatedId string `protobuf:"bytes,1,opt,name=automated_id,json=automatedId,proto3" json:"automated_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListApiKeyRequest) Reset() { + *x = ListApiKeyRequest{} + mi := &file_develop_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListApiKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListApiKeyRequest) ProtoMessage() {} + +func (x *ListApiKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_develop_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListApiKeyRequest.ProtoReflect.Descriptor instead. +func (*ListApiKeyRequest) Descriptor() ([]byte, []int) { + return file_develop_proto_rawDescGZIP(), []int{17} +} + +func (x *ListApiKeyRequest) GetAutomatedId() string { + if x != nil { + return x.AutomatedId + } + return "" +} + +type GetApiKeyBatchResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Data []*ApiKey `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetApiKeyBatchResponse) Reset() { + *x = GetApiKeyBatchResponse{} + mi := &file_develop_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetApiKeyBatchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetApiKeyBatchResponse) ProtoMessage() {} + +func (x *GetApiKeyBatchResponse) ProtoReflect() protoreflect.Message { + mi := &file_develop_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetApiKeyBatchResponse.ProtoReflect.Descriptor instead. +func (*GetApiKeyBatchResponse) Descriptor() ([]byte, []int) { + return file_develop_proto_rawDescGZIP(), []int{18} +} + +func (x *GetApiKeyBatchResponse) GetData() []*ApiKey { + if x != nil { + return x.Data + } + return nil +} + +type DeleteApiKeyResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteApiKeyResponse) Reset() { + *x = DeleteApiKeyResponse{} + mi := &file_develop_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteApiKeyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteApiKeyResponse) ProtoMessage() {} + +func (x *DeleteApiKeyResponse) ProtoReflect() protoreflect.Message { + mi := &file_develop_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteApiKeyResponse.ProtoReflect.Descriptor instead. +func (*DeleteApiKeyResponse) Descriptor() ([]byte, []int) { + return file_develop_proto_rawDescGZIP(), []int{19} +} + +func (x *DeleteApiKeyResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +var File_develop_proto protoreflect.FileDescriptor + +const file_develop_proto_rawDesc = "" + + "\n" + + "\rdevelop.proto\x12\x05proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\raccount.proto\x1a\n" + + "file.proto\"\xc1\x02\n" + + "\x14CustomAppOauthConfig\x12\x1d\n" + + "\n" + + "client_uri\x18\x01 \x01(\tR\tclientUri\x12#\n" + + "\rredirect_uris\x18\x02 \x03(\tR\fredirectUris\x129\n" + + "\x19post_logout_redirect_uris\x18\x03 \x03(\tR\x16postLogoutRedirectUris\x12%\n" + + "\x0eallowed_scopes\x18\x04 \x03(\tR\rallowedScopes\x12.\n" + + "\x13allowed_grant_types\x18\x05 \x03(\tR\x11allowedGrantTypes\x12!\n" + + "\frequire_pkce\x18\x06 \x01(\bR\vrequirePkce\x120\n" + + "\x14allow_offline_access\x18\a \x01(\bR\x12allowOfflineAccess\"~\n" + + "\x0eCustomAppLinks\x12\x1b\n" + + "\thome_page\x18\x01 \x01(\tR\bhomePage\x12%\n" + + "\x0eprivacy_policy\x18\x02 \x01(\tR\rprivacyPolicy\x12(\n" + + "\x10terms_of_service\x18\x03 \x01(\tR\x0etermsOfService\"\xb2\x04\n" + + "\tCustomApp\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04slug\x18\x02 \x01(\tR\x04slug\x12\x12\n" + + "\x04name\x18\x03 \x01(\tR\x04name\x12 \n" + + "\vdescription\x18\x04 \x01(\tR\vdescription\x12.\n" + + "\x06status\x18\x05 \x01(\x0e2\x16.proto.CustomAppStatusR\x06status\x12*\n" + + "\apicture\x18\x06 \x01(\v2\x10.proto.CloudFileR\apicture\x120\n" + + "\n" + + "background\x18\a \x01(\v2\x10.proto.CloudFileR\n" + + "background\x12;\n" + + "\fverification\x18\b \x01(\v2\x17.proto.VerificationMarkR\fverification\x12+\n" + + "\x05links\x18\t \x01(\v2\x15.proto.CustomAppLinksR\x05links\x12>\n" + + "\foauth_config\x18\r \x01(\v2\x1b.proto.CustomAppOauthConfigR\voauthConfig\x12\x1d\n" + + "\n" + + "project_id\x18\n" + + " \x01(\tR\tprojectId\x129\n" + + "\n" + + "created_at\x18\v \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\f \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"\xbc\x02\n" + + "\x0fCustomAppSecret\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" + + "\x06secret\x18\x02 \x01(\tR\x06secret\x12 \n" + + "\vdescription\x18\x03 \x01(\tR\vdescription\x129\n" + + "\n" + + "expired_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\texpiredAt\x12\x17\n" + + "\ais_oidc\x18\x05 \x01(\bR\x06isOidc\x12\x15\n" + + "\x06app_id\x18\x06 \x01(\tR\x05appId\x129\n" + + "\n" + + "created_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"F\n" + + "\x13GetCustomAppRequest\x12\x10\n" + + "\x02id\x18\x01 \x01(\tH\x00R\x02id\x12\x14\n" + + "\x04slug\x18\x02 \x01(\tH\x00R\x04slugB\a\n" + + "\x05Query\":\n" + + "\x14GetCustomAppResponse\x12\"\n" + + "\x03app\x18\x01 \x01(\v2\x10.proto.CustomAppR\x03app\"\xab\x01\n" + + "\x1bCheckCustomAppSecretRequest\x12\x1d\n" + + "\tsecret_id\x18\x01 \x01(\tH\x00R\bsecretId\x12\x17\n" + + "\x06app_id\x18\x02 \x01(\tH\x00R\x05appId\x12\x16\n" + + "\x06secret\x18\x03 \x01(\tR\x06secret\x12\x1c\n" + + "\ais_oidc\x18\x04 \x01(\bH\x01R\x06isOidc\x88\x01\x01B\x12\n" + + "\x10SecretIdentifierB\n" + + "\n" + + "\b_is_oidc\"4\n" + + "\x1cCheckCustomAppSecretResponse\x12\x14\n" + + "\x05valid\x18\x01 \x01(\bR\x05valid\"\x80\x02\n" + + "\n" + + "BotAccount\x12(\n" + + "\aaccount\x18\x01 \x01(\v2\x0e.proto.AccountR\aaccount\x12\x12\n" + + "\x04slug\x18\x02 \x01(\tR\x04slug\x12\x1b\n" + + "\tis_active\x18\x03 \x01(\bR\bisActive\x12!\n" + + "\fautomated_id\x18\x05 \x01(\tR\vautomatedId\x129\n" + + "\n" + + "created_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"\xe6\x01\n" + + "\x17CreateBotAccountRequest\x12(\n" + + "\aaccount\x18\x01 \x01(\v2\x0e.proto.AccountR\aaccount\x12!\n" + + "\fautomated_id\x18\x02 \x01(\tR\vautomatedId\x12;\n" + + "\n" + + "picture_id\x18\b \x01(\v2\x1c.google.protobuf.StringValueR\tpictureId\x12A\n" + + "\rbackground_id\x18\t \x01(\v2\x1c.google.protobuf.StringValueR\fbackgroundId\"?\n" + + "\x18CreateBotAccountResponse\x12#\n" + + "\x03bot\x18\x01 \x01(\v2\x11.proto.BotAccountR\x03bot\"\xd5\x01\n" + + "\x17UpdateBotAccountRequest\x12!\n" + + "\fautomated_id\x18\x01 \x01(\tR\vautomatedId\x12(\n" + + "\aaccount\x18\x02 \x01(\v2\x0e.proto.AccountR\aaccount\x12\"\n" + + "\n" + + "picture_id\x18\b \x01(\tH\x00R\tpictureId\x88\x01\x01\x12(\n" + + "\rbackground_id\x18\t \x01(\tH\x01R\fbackgroundId\x88\x01\x01B\r\n" + + "\v_picture_idB\x10\n" + + "\x0e_background_id\"?\n" + + "\x18UpdateBotAccountResponse\x12#\n" + + "\x03bot\x18\x01 \x01(\v2\x11.proto.BotAccountR\x03bot\"R\n" + + "\x17DeleteBotAccountRequest\x12!\n" + + "\fautomated_id\x18\x01 \x01(\tR\vautomatedId\x12\x14\n" + + "\x05force\x18\x02 \x01(\bR\x05force\"4\n" + + "\x18DeleteBotAccountResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess\"\x92\x02\n" + + "\x06ApiKey\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x14\n" + + "\x05label\x18\x02 \x01(\tR\x05label\x12\x1d\n" + + "\n" + + "account_id\x18\x03 \x01(\tR\taccountId\x12\x1d\n" + + "\n" + + "session_id\x18\x04 \x01(\tR\tsessionId\x12.\n" + + "\x03key\x18\x05 \x01(\v2\x1c.google.protobuf.StringValueR\x03key\x129\n" + + "\n" + + "created_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"\"\n" + + "\x10GetApiKeyRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"6\n" + + "\x11ListApiKeyRequest\x12!\n" + + "\fautomated_id\x18\x01 \x01(\tR\vautomatedId\";\n" + + "\x16GetApiKeyBatchResponse\x12!\n" + + "\x04data\x18\x01 \x03(\v2\r.proto.ApiKeyR\x04data\"0\n" + + "\x14DeleteApiKeyResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess*p\n" + + "\x0fCustomAppStatus\x12!\n" + + "\x1dCUSTOM_APP_STATUS_UNSPECIFIED\x10\x00\x12\x0e\n" + + "\n" + + "DEVELOPING\x10\x01\x12\v\n" + + "\aSTAGING\x10\x02\x12\x0e\n" + + "\n" + + "PRODUCTION\x10\x03\x12\r\n" + + "\tSUSPENDED\x10\x042\xbc\x01\n" + + "\x10CustomAppService\x12G\n" + + "\fGetCustomApp\x12\x1a.proto.GetCustomAppRequest\x1a\x1b.proto.GetCustomAppResponse\x12_\n" + + "\x14CheckCustomAppSecret\x12\".proto.CheckCustomAppSecretRequest\x1a#.proto.CheckCustomAppSecretResponse2\xf0\x04\n" + + "\x19BotAccountReceiverService\x12S\n" + + "\x10CreateBotAccount\x12\x1e.proto.CreateBotAccountRequest\x1a\x1f.proto.CreateBotAccountResponse\x12S\n" + + "\x10UpdateBotAccount\x12\x1e.proto.UpdateBotAccountRequest\x1a\x1f.proto.UpdateBotAccountResponse\x12S\n" + + "\x10DeleteBotAccount\x12\x1e.proto.DeleteBotAccountRequest\x1a\x1f.proto.DeleteBotAccountResponse\x123\n" + + "\tGetApiKey\x12\x17.proto.GetApiKeyRequest\x1a\r.proto.ApiKey\x12E\n" + + "\n" + + "ListApiKey\x12\x18.proto.ListApiKeyRequest\x1a\x1d.proto.GetApiKeyBatchResponse\x12,\n" + + "\fCreateApiKey\x12\r.proto.ApiKey\x1a\r.proto.ApiKey\x12,\n" + + "\fUpdateApiKey\x12\r.proto.ApiKey\x1a\r.proto.ApiKey\x126\n" + + "\fRotateApiKey\x12\x17.proto.GetApiKeyRequest\x1a\r.proto.ApiKey\x12D\n" + + "\fDeleteApiKey\x12\x17.proto.GetApiKeyRequest\x1a\x1b.proto.DeleteApiKeyResponseBUZ7git.solsynth.dev/goatworks/turbine/pkg/shared/proto/gen\xaa\x02\x19DysonNetwork.Shared.Protob\x06proto3" + +var ( + file_develop_proto_rawDescOnce sync.Once + file_develop_proto_rawDescData []byte +) + +func file_develop_proto_rawDescGZIP() []byte { + file_develop_proto_rawDescOnce.Do(func() { + file_develop_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_develop_proto_rawDesc), len(file_develop_proto_rawDesc))) + }) + return file_develop_proto_rawDescData +} + +var file_develop_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_develop_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_develop_proto_goTypes = []any{ + (CustomAppStatus)(0), // 0: proto.CustomAppStatus + (*CustomAppOauthConfig)(nil), // 1: proto.CustomAppOauthConfig + (*CustomAppLinks)(nil), // 2: proto.CustomAppLinks + (*CustomApp)(nil), // 3: proto.CustomApp + (*CustomAppSecret)(nil), // 4: proto.CustomAppSecret + (*GetCustomAppRequest)(nil), // 5: proto.GetCustomAppRequest + (*GetCustomAppResponse)(nil), // 6: proto.GetCustomAppResponse + (*CheckCustomAppSecretRequest)(nil), // 7: proto.CheckCustomAppSecretRequest + (*CheckCustomAppSecretResponse)(nil), // 8: proto.CheckCustomAppSecretResponse + (*BotAccount)(nil), // 9: proto.BotAccount + (*CreateBotAccountRequest)(nil), // 10: proto.CreateBotAccountRequest + (*CreateBotAccountResponse)(nil), // 11: proto.CreateBotAccountResponse + (*UpdateBotAccountRequest)(nil), // 12: proto.UpdateBotAccountRequest + (*UpdateBotAccountResponse)(nil), // 13: proto.UpdateBotAccountResponse + (*DeleteBotAccountRequest)(nil), // 14: proto.DeleteBotAccountRequest + (*DeleteBotAccountResponse)(nil), // 15: proto.DeleteBotAccountResponse + (*ApiKey)(nil), // 16: proto.ApiKey + (*GetApiKeyRequest)(nil), // 17: proto.GetApiKeyRequest + (*ListApiKeyRequest)(nil), // 18: proto.ListApiKeyRequest + (*GetApiKeyBatchResponse)(nil), // 19: proto.GetApiKeyBatchResponse + (*DeleteApiKeyResponse)(nil), // 20: proto.DeleteApiKeyResponse + (*CloudFile)(nil), // 21: proto.CloudFile + (*VerificationMark)(nil), // 22: proto.VerificationMark + (*timestamppb.Timestamp)(nil), // 23: google.protobuf.Timestamp + (*Account)(nil), // 24: proto.Account + (*wrapperspb.StringValue)(nil), // 25: google.protobuf.StringValue +} +var file_develop_proto_depIdxs = []int32{ + 0, // 0: proto.CustomApp.status:type_name -> proto.CustomAppStatus + 21, // 1: proto.CustomApp.picture:type_name -> proto.CloudFile + 21, // 2: proto.CustomApp.background:type_name -> proto.CloudFile + 22, // 3: proto.CustomApp.verification:type_name -> proto.VerificationMark + 2, // 4: proto.CustomApp.links:type_name -> proto.CustomAppLinks + 1, // 5: proto.CustomApp.oauth_config:type_name -> proto.CustomAppOauthConfig + 23, // 6: proto.CustomApp.created_at:type_name -> google.protobuf.Timestamp + 23, // 7: proto.CustomApp.updated_at:type_name -> google.protobuf.Timestamp + 23, // 8: proto.CustomAppSecret.expired_at:type_name -> google.protobuf.Timestamp + 23, // 9: proto.CustomAppSecret.created_at:type_name -> google.protobuf.Timestamp + 23, // 10: proto.CustomAppSecret.updated_at:type_name -> google.protobuf.Timestamp + 3, // 11: proto.GetCustomAppResponse.app:type_name -> proto.CustomApp + 24, // 12: proto.BotAccount.account:type_name -> proto.Account + 23, // 13: proto.BotAccount.created_at:type_name -> google.protobuf.Timestamp + 23, // 14: proto.BotAccount.updated_at:type_name -> google.protobuf.Timestamp + 24, // 15: proto.CreateBotAccountRequest.account:type_name -> proto.Account + 25, // 16: proto.CreateBotAccountRequest.picture_id:type_name -> google.protobuf.StringValue + 25, // 17: proto.CreateBotAccountRequest.background_id:type_name -> google.protobuf.StringValue + 9, // 18: proto.CreateBotAccountResponse.bot:type_name -> proto.BotAccount + 24, // 19: proto.UpdateBotAccountRequest.account:type_name -> proto.Account + 9, // 20: proto.UpdateBotAccountResponse.bot:type_name -> proto.BotAccount + 25, // 21: proto.ApiKey.key:type_name -> google.protobuf.StringValue + 23, // 22: proto.ApiKey.created_at:type_name -> google.protobuf.Timestamp + 23, // 23: proto.ApiKey.updated_at:type_name -> google.protobuf.Timestamp + 16, // 24: proto.GetApiKeyBatchResponse.data:type_name -> proto.ApiKey + 5, // 25: proto.CustomAppService.GetCustomApp:input_type -> proto.GetCustomAppRequest + 7, // 26: proto.CustomAppService.CheckCustomAppSecret:input_type -> proto.CheckCustomAppSecretRequest + 10, // 27: proto.BotAccountReceiverService.CreateBotAccount:input_type -> proto.CreateBotAccountRequest + 12, // 28: proto.BotAccountReceiverService.UpdateBotAccount:input_type -> proto.UpdateBotAccountRequest + 14, // 29: proto.BotAccountReceiverService.DeleteBotAccount:input_type -> proto.DeleteBotAccountRequest + 17, // 30: proto.BotAccountReceiverService.GetApiKey:input_type -> proto.GetApiKeyRequest + 18, // 31: proto.BotAccountReceiverService.ListApiKey:input_type -> proto.ListApiKeyRequest + 16, // 32: proto.BotAccountReceiverService.CreateApiKey:input_type -> proto.ApiKey + 16, // 33: proto.BotAccountReceiverService.UpdateApiKey:input_type -> proto.ApiKey + 17, // 34: proto.BotAccountReceiverService.RotateApiKey:input_type -> proto.GetApiKeyRequest + 17, // 35: proto.BotAccountReceiverService.DeleteApiKey:input_type -> proto.GetApiKeyRequest + 6, // 36: proto.CustomAppService.GetCustomApp:output_type -> proto.GetCustomAppResponse + 8, // 37: proto.CustomAppService.CheckCustomAppSecret:output_type -> proto.CheckCustomAppSecretResponse + 11, // 38: proto.BotAccountReceiverService.CreateBotAccount:output_type -> proto.CreateBotAccountResponse + 13, // 39: proto.BotAccountReceiverService.UpdateBotAccount:output_type -> proto.UpdateBotAccountResponse + 15, // 40: proto.BotAccountReceiverService.DeleteBotAccount:output_type -> proto.DeleteBotAccountResponse + 16, // 41: proto.BotAccountReceiverService.GetApiKey:output_type -> proto.ApiKey + 19, // 42: proto.BotAccountReceiverService.ListApiKey:output_type -> proto.GetApiKeyBatchResponse + 16, // 43: proto.BotAccountReceiverService.CreateApiKey:output_type -> proto.ApiKey + 16, // 44: proto.BotAccountReceiverService.UpdateApiKey:output_type -> proto.ApiKey + 16, // 45: proto.BotAccountReceiverService.RotateApiKey:output_type -> proto.ApiKey + 20, // 46: proto.BotAccountReceiverService.DeleteApiKey:output_type -> proto.DeleteApiKeyResponse + 36, // [36:47] is the sub-list for method output_type + 25, // [25:36] is the sub-list for method input_type + 25, // [25:25] is the sub-list for extension type_name + 25, // [25:25] is the sub-list for extension extendee + 0, // [0:25] is the sub-list for field type_name +} + +func init() { file_develop_proto_init() } +func file_develop_proto_init() { + if File_develop_proto != nil { + return + } + file_account_proto_init() + file_file_proto_init() + file_develop_proto_msgTypes[4].OneofWrappers = []any{ + (*GetCustomAppRequest_Id)(nil), + (*GetCustomAppRequest_Slug)(nil), + } + file_develop_proto_msgTypes[6].OneofWrappers = []any{ + (*CheckCustomAppSecretRequest_SecretId)(nil), + (*CheckCustomAppSecretRequest_AppId)(nil), + } + file_develop_proto_msgTypes[11].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_develop_proto_rawDesc), len(file_develop_proto_rawDesc)), + NumEnums: 1, + NumMessages: 20, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_develop_proto_goTypes, + DependencyIndexes: file_develop_proto_depIdxs, + EnumInfos: file_develop_proto_enumTypes, + MessageInfos: file_develop_proto_msgTypes, + }.Build() + File_develop_proto = out.File + file_develop_proto_goTypes = nil + file_develop_proto_depIdxs = nil +} diff --git a/pkg/shared/proto/gen/develop_grpc.pb.go b/pkg/shared/proto/gen/develop_grpc.pb.go new file mode 100644 index 0000000..55d836e --- /dev/null +++ b/pkg/shared/proto/gen/develop_grpc.pb.go @@ -0,0 +1,570 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.0 +// - protoc v6.33.1 +// source: develop.proto + +package gen + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + CustomAppService_GetCustomApp_FullMethodName = "/proto.CustomAppService/GetCustomApp" + CustomAppService_CheckCustomAppSecret_FullMethodName = "/proto.CustomAppService/CheckCustomAppSecret" +) + +// CustomAppServiceClient is the client API for CustomAppService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type CustomAppServiceClient interface { + GetCustomApp(ctx context.Context, in *GetCustomAppRequest, opts ...grpc.CallOption) (*GetCustomAppResponse, error) + CheckCustomAppSecret(ctx context.Context, in *CheckCustomAppSecretRequest, opts ...grpc.CallOption) (*CheckCustomAppSecretResponse, error) +} + +type customAppServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewCustomAppServiceClient(cc grpc.ClientConnInterface) CustomAppServiceClient { + return &customAppServiceClient{cc} +} + +func (c *customAppServiceClient) GetCustomApp(ctx context.Context, in *GetCustomAppRequest, opts ...grpc.CallOption) (*GetCustomAppResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetCustomAppResponse) + err := c.cc.Invoke(ctx, CustomAppService_GetCustomApp_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *customAppServiceClient) CheckCustomAppSecret(ctx context.Context, in *CheckCustomAppSecretRequest, opts ...grpc.CallOption) (*CheckCustomAppSecretResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CheckCustomAppSecretResponse) + err := c.cc.Invoke(ctx, CustomAppService_CheckCustomAppSecret_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CustomAppServiceServer is the server API for CustomAppService service. +// All implementations must embed UnimplementedCustomAppServiceServer +// for forward compatibility. +type CustomAppServiceServer interface { + GetCustomApp(context.Context, *GetCustomAppRequest) (*GetCustomAppResponse, error) + CheckCustomAppSecret(context.Context, *CheckCustomAppSecretRequest) (*CheckCustomAppSecretResponse, error) + mustEmbedUnimplementedCustomAppServiceServer() +} + +// UnimplementedCustomAppServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedCustomAppServiceServer struct{} + +func (UnimplementedCustomAppServiceServer) GetCustomApp(context.Context, *GetCustomAppRequest) (*GetCustomAppResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetCustomApp not implemented") +} +func (UnimplementedCustomAppServiceServer) CheckCustomAppSecret(context.Context, *CheckCustomAppSecretRequest) (*CheckCustomAppSecretResponse, error) { + return nil, status.Error(codes.Unimplemented, "method CheckCustomAppSecret not implemented") +} +func (UnimplementedCustomAppServiceServer) mustEmbedUnimplementedCustomAppServiceServer() {} +func (UnimplementedCustomAppServiceServer) testEmbeddedByValue() {} + +// UnsafeCustomAppServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to CustomAppServiceServer will +// result in compilation errors. +type UnsafeCustomAppServiceServer interface { + mustEmbedUnimplementedCustomAppServiceServer() +} + +func RegisterCustomAppServiceServer(s grpc.ServiceRegistrar, srv CustomAppServiceServer) { + // If the following call panics, it indicates UnimplementedCustomAppServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&CustomAppService_ServiceDesc, srv) +} + +func _CustomAppService_GetCustomApp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetCustomAppRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CustomAppServiceServer).GetCustomApp(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CustomAppService_GetCustomApp_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CustomAppServiceServer).GetCustomApp(ctx, req.(*GetCustomAppRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CustomAppService_CheckCustomAppSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CheckCustomAppSecretRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CustomAppServiceServer).CheckCustomAppSecret(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: CustomAppService_CheckCustomAppSecret_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CustomAppServiceServer).CheckCustomAppSecret(ctx, req.(*CheckCustomAppSecretRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// CustomAppService_ServiceDesc is the grpc.ServiceDesc for CustomAppService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var CustomAppService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "proto.CustomAppService", + HandlerType: (*CustomAppServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetCustomApp", + Handler: _CustomAppService_GetCustomApp_Handler, + }, + { + MethodName: "CheckCustomAppSecret", + Handler: _CustomAppService_CheckCustomAppSecret_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "develop.proto", +} + +const ( + BotAccountReceiverService_CreateBotAccount_FullMethodName = "/proto.BotAccountReceiverService/CreateBotAccount" + BotAccountReceiverService_UpdateBotAccount_FullMethodName = "/proto.BotAccountReceiverService/UpdateBotAccount" + BotAccountReceiverService_DeleteBotAccount_FullMethodName = "/proto.BotAccountReceiverService/DeleteBotAccount" + BotAccountReceiverService_GetApiKey_FullMethodName = "/proto.BotAccountReceiverService/GetApiKey" + BotAccountReceiverService_ListApiKey_FullMethodName = "/proto.BotAccountReceiverService/ListApiKey" + BotAccountReceiverService_CreateApiKey_FullMethodName = "/proto.BotAccountReceiverService/CreateApiKey" + BotAccountReceiverService_UpdateApiKey_FullMethodName = "/proto.BotAccountReceiverService/UpdateApiKey" + BotAccountReceiverService_RotateApiKey_FullMethodName = "/proto.BotAccountReceiverService/RotateApiKey" + BotAccountReceiverService_DeleteApiKey_FullMethodName = "/proto.BotAccountReceiverService/DeleteApiKey" +) + +// BotAccountReceiverServiceClient is the client API for BotAccountReceiverService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// This service should be implemented by the Pass service to handle the creation, update, and deletion of bot accounts +type BotAccountReceiverServiceClient interface { + CreateBotAccount(ctx context.Context, in *CreateBotAccountRequest, opts ...grpc.CallOption) (*CreateBotAccountResponse, error) + UpdateBotAccount(ctx context.Context, in *UpdateBotAccountRequest, opts ...grpc.CallOption) (*UpdateBotAccountResponse, error) + DeleteBotAccount(ctx context.Context, in *DeleteBotAccountRequest, opts ...grpc.CallOption) (*DeleteBotAccountResponse, error) + GetApiKey(ctx context.Context, in *GetApiKeyRequest, opts ...grpc.CallOption) (*ApiKey, error) + ListApiKey(ctx context.Context, in *ListApiKeyRequest, opts ...grpc.CallOption) (*GetApiKeyBatchResponse, error) + CreateApiKey(ctx context.Context, in *ApiKey, opts ...grpc.CallOption) (*ApiKey, error) + UpdateApiKey(ctx context.Context, in *ApiKey, opts ...grpc.CallOption) (*ApiKey, error) + RotateApiKey(ctx context.Context, in *GetApiKeyRequest, opts ...grpc.CallOption) (*ApiKey, error) + DeleteApiKey(ctx context.Context, in *GetApiKeyRequest, opts ...grpc.CallOption) (*DeleteApiKeyResponse, error) +} + +type botAccountReceiverServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewBotAccountReceiverServiceClient(cc grpc.ClientConnInterface) BotAccountReceiverServiceClient { + return &botAccountReceiverServiceClient{cc} +} + +func (c *botAccountReceiverServiceClient) CreateBotAccount(ctx context.Context, in *CreateBotAccountRequest, opts ...grpc.CallOption) (*CreateBotAccountResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreateBotAccountResponse) + err := c.cc.Invoke(ctx, BotAccountReceiverService_CreateBotAccount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *botAccountReceiverServiceClient) UpdateBotAccount(ctx context.Context, in *UpdateBotAccountRequest, opts ...grpc.CallOption) (*UpdateBotAccountResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UpdateBotAccountResponse) + err := c.cc.Invoke(ctx, BotAccountReceiverService_UpdateBotAccount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *botAccountReceiverServiceClient) DeleteBotAccount(ctx context.Context, in *DeleteBotAccountRequest, opts ...grpc.CallOption) (*DeleteBotAccountResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeleteBotAccountResponse) + err := c.cc.Invoke(ctx, BotAccountReceiverService_DeleteBotAccount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *botAccountReceiverServiceClient) GetApiKey(ctx context.Context, in *GetApiKeyRequest, opts ...grpc.CallOption) (*ApiKey, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ApiKey) + err := c.cc.Invoke(ctx, BotAccountReceiverService_GetApiKey_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *botAccountReceiverServiceClient) ListApiKey(ctx context.Context, in *ListApiKeyRequest, opts ...grpc.CallOption) (*GetApiKeyBatchResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetApiKeyBatchResponse) + err := c.cc.Invoke(ctx, BotAccountReceiverService_ListApiKey_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *botAccountReceiverServiceClient) CreateApiKey(ctx context.Context, in *ApiKey, opts ...grpc.CallOption) (*ApiKey, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ApiKey) + err := c.cc.Invoke(ctx, BotAccountReceiverService_CreateApiKey_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *botAccountReceiverServiceClient) UpdateApiKey(ctx context.Context, in *ApiKey, opts ...grpc.CallOption) (*ApiKey, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ApiKey) + err := c.cc.Invoke(ctx, BotAccountReceiverService_UpdateApiKey_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *botAccountReceiverServiceClient) RotateApiKey(ctx context.Context, in *GetApiKeyRequest, opts ...grpc.CallOption) (*ApiKey, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ApiKey) + err := c.cc.Invoke(ctx, BotAccountReceiverService_RotateApiKey_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *botAccountReceiverServiceClient) DeleteApiKey(ctx context.Context, in *GetApiKeyRequest, opts ...grpc.CallOption) (*DeleteApiKeyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeleteApiKeyResponse) + err := c.cc.Invoke(ctx, BotAccountReceiverService_DeleteApiKey_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// BotAccountReceiverServiceServer is the server API for BotAccountReceiverService service. +// All implementations must embed UnimplementedBotAccountReceiverServiceServer +// for forward compatibility. +// +// This service should be implemented by the Pass service to handle the creation, update, and deletion of bot accounts +type BotAccountReceiverServiceServer interface { + CreateBotAccount(context.Context, *CreateBotAccountRequest) (*CreateBotAccountResponse, error) + UpdateBotAccount(context.Context, *UpdateBotAccountRequest) (*UpdateBotAccountResponse, error) + DeleteBotAccount(context.Context, *DeleteBotAccountRequest) (*DeleteBotAccountResponse, error) + GetApiKey(context.Context, *GetApiKeyRequest) (*ApiKey, error) + ListApiKey(context.Context, *ListApiKeyRequest) (*GetApiKeyBatchResponse, error) + CreateApiKey(context.Context, *ApiKey) (*ApiKey, error) + UpdateApiKey(context.Context, *ApiKey) (*ApiKey, error) + RotateApiKey(context.Context, *GetApiKeyRequest) (*ApiKey, error) + DeleteApiKey(context.Context, *GetApiKeyRequest) (*DeleteApiKeyResponse, error) + mustEmbedUnimplementedBotAccountReceiverServiceServer() +} + +// UnimplementedBotAccountReceiverServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedBotAccountReceiverServiceServer struct{} + +func (UnimplementedBotAccountReceiverServiceServer) CreateBotAccount(context.Context, *CreateBotAccountRequest) (*CreateBotAccountResponse, error) { + return nil, status.Error(codes.Unimplemented, "method CreateBotAccount not implemented") +} +func (UnimplementedBotAccountReceiverServiceServer) UpdateBotAccount(context.Context, *UpdateBotAccountRequest) (*UpdateBotAccountResponse, error) { + return nil, status.Error(codes.Unimplemented, "method UpdateBotAccount not implemented") +} +func (UnimplementedBotAccountReceiverServiceServer) DeleteBotAccount(context.Context, *DeleteBotAccountRequest) (*DeleteBotAccountResponse, error) { + return nil, status.Error(codes.Unimplemented, "method DeleteBotAccount not implemented") +} +func (UnimplementedBotAccountReceiverServiceServer) GetApiKey(context.Context, *GetApiKeyRequest) (*ApiKey, error) { + return nil, status.Error(codes.Unimplemented, "method GetApiKey not implemented") +} +func (UnimplementedBotAccountReceiverServiceServer) ListApiKey(context.Context, *ListApiKeyRequest) (*GetApiKeyBatchResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListApiKey not implemented") +} +func (UnimplementedBotAccountReceiverServiceServer) CreateApiKey(context.Context, *ApiKey) (*ApiKey, error) { + return nil, status.Error(codes.Unimplemented, "method CreateApiKey not implemented") +} +func (UnimplementedBotAccountReceiverServiceServer) UpdateApiKey(context.Context, *ApiKey) (*ApiKey, error) { + return nil, status.Error(codes.Unimplemented, "method UpdateApiKey not implemented") +} +func (UnimplementedBotAccountReceiverServiceServer) RotateApiKey(context.Context, *GetApiKeyRequest) (*ApiKey, error) { + return nil, status.Error(codes.Unimplemented, "method RotateApiKey not implemented") +} +func (UnimplementedBotAccountReceiverServiceServer) DeleteApiKey(context.Context, *GetApiKeyRequest) (*DeleteApiKeyResponse, error) { + return nil, status.Error(codes.Unimplemented, "method DeleteApiKey not implemented") +} +func (UnimplementedBotAccountReceiverServiceServer) mustEmbedUnimplementedBotAccountReceiverServiceServer() { +} +func (UnimplementedBotAccountReceiverServiceServer) testEmbeddedByValue() {} + +// UnsafeBotAccountReceiverServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to BotAccountReceiverServiceServer will +// result in compilation errors. +type UnsafeBotAccountReceiverServiceServer interface { + mustEmbedUnimplementedBotAccountReceiverServiceServer() +} + +func RegisterBotAccountReceiverServiceServer(s grpc.ServiceRegistrar, srv BotAccountReceiverServiceServer) { + // If the following call panics, it indicates UnimplementedBotAccountReceiverServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&BotAccountReceiverService_ServiceDesc, srv) +} + +func _BotAccountReceiverService_CreateBotAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateBotAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BotAccountReceiverServiceServer).CreateBotAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BotAccountReceiverService_CreateBotAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BotAccountReceiverServiceServer).CreateBotAccount(ctx, req.(*CreateBotAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BotAccountReceiverService_UpdateBotAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateBotAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BotAccountReceiverServiceServer).UpdateBotAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BotAccountReceiverService_UpdateBotAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BotAccountReceiverServiceServer).UpdateBotAccount(ctx, req.(*UpdateBotAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BotAccountReceiverService_DeleteBotAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteBotAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BotAccountReceiverServiceServer).DeleteBotAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BotAccountReceiverService_DeleteBotAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BotAccountReceiverServiceServer).DeleteBotAccount(ctx, req.(*DeleteBotAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BotAccountReceiverService_GetApiKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetApiKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BotAccountReceiverServiceServer).GetApiKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BotAccountReceiverService_GetApiKey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BotAccountReceiverServiceServer).GetApiKey(ctx, req.(*GetApiKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BotAccountReceiverService_ListApiKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListApiKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BotAccountReceiverServiceServer).ListApiKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BotAccountReceiverService_ListApiKey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BotAccountReceiverServiceServer).ListApiKey(ctx, req.(*ListApiKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BotAccountReceiverService_CreateApiKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ApiKey) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BotAccountReceiverServiceServer).CreateApiKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BotAccountReceiverService_CreateApiKey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BotAccountReceiverServiceServer).CreateApiKey(ctx, req.(*ApiKey)) + } + return interceptor(ctx, in, info, handler) +} + +func _BotAccountReceiverService_UpdateApiKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ApiKey) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BotAccountReceiverServiceServer).UpdateApiKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BotAccountReceiverService_UpdateApiKey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BotAccountReceiverServiceServer).UpdateApiKey(ctx, req.(*ApiKey)) + } + return interceptor(ctx, in, info, handler) +} + +func _BotAccountReceiverService_RotateApiKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetApiKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BotAccountReceiverServiceServer).RotateApiKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BotAccountReceiverService_RotateApiKey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BotAccountReceiverServiceServer).RotateApiKey(ctx, req.(*GetApiKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BotAccountReceiverService_DeleteApiKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetApiKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BotAccountReceiverServiceServer).DeleteApiKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: BotAccountReceiverService_DeleteApiKey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BotAccountReceiverServiceServer).DeleteApiKey(ctx, req.(*GetApiKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// BotAccountReceiverService_ServiceDesc is the grpc.ServiceDesc for BotAccountReceiverService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var BotAccountReceiverService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "proto.BotAccountReceiverService", + HandlerType: (*BotAccountReceiverServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateBotAccount", + Handler: _BotAccountReceiverService_CreateBotAccount_Handler, + }, + { + MethodName: "UpdateBotAccount", + Handler: _BotAccountReceiverService_UpdateBotAccount_Handler, + }, + { + MethodName: "DeleteBotAccount", + Handler: _BotAccountReceiverService_DeleteBotAccount_Handler, + }, + { + MethodName: "GetApiKey", + Handler: _BotAccountReceiverService_GetApiKey_Handler, + }, + { + MethodName: "ListApiKey", + Handler: _BotAccountReceiverService_ListApiKey_Handler, + }, + { + MethodName: "CreateApiKey", + Handler: _BotAccountReceiverService_CreateApiKey_Handler, + }, + { + MethodName: "UpdateApiKey", + Handler: _BotAccountReceiverService_UpdateApiKey_Handler, + }, + { + MethodName: "RotateApiKey", + Handler: _BotAccountReceiverService_RotateApiKey_Handler, + }, + { + MethodName: "DeleteApiKey", + Handler: _BotAccountReceiverService_DeleteApiKey_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "develop.proto", +} diff --git a/pkg/shared/proto/gen/file.pb.go b/pkg/shared/proto/gen/file.pb.go new file mode 100644 index 0000000..a2160c6 --- /dev/null +++ b/pkg/shared/proto/gen/file.pb.go @@ -0,0 +1,2357 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.10 +// protoc v6.33.1 +// source: file.proto + +package gen + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + emptypb "google.golang.org/protobuf/types/known/emptypb" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// CloudFile represents a reference to a file stored in cloud storage. +// It contains metadata about the file that won't change, helping to reduce database load. +type CloudFile struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Unique identifier for the file + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Original name of the file + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // The metadata uses JSON bytes to store to keep the data structure over gRPC + // File metadata (e.g., dimensions, duration, etc.) + FileMeta []byte `protobuf:"bytes,3,opt,name=file_meta,json=fileMeta,proto3" json:"file_meta,omitempty"` + // User-defined metadata + UserMeta []byte `protobuf:"bytes,4,opt,name=user_meta,json=userMeta,proto3" json:"user_meta,omitempty"` + SensitiveMarks []byte `protobuf:"bytes,12,opt,name=sensitive_marks,json=sensitiveMarks,proto3,oneof" json:"sensitive_marks,omitempty"` + // MIME type of the file + MimeType string `protobuf:"bytes,5,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` + // File content hash (e.g., MD5, SHA-256) + Hash string `protobuf:"bytes,6,opt,name=hash,proto3" json:"hash,omitempty"` + // File size in bytes + Size int64 `protobuf:"varint,7,opt,name=size,proto3" json:"size,omitempty"` + // Indicates if the file is stored with compression + HasCompression bool `protobuf:"varint,8,opt,name=has_compression,json=hasCompression,proto3" json:"has_compression,omitempty"` + // URL to access the file + Url string `protobuf:"bytes,9,opt,name=url,proto3" json:"url,omitempty"` + // Content type of the file + ContentType string `protobuf:"bytes,10,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` + // When the file was uploaded + UploadedAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=uploaded_at,json=uploadedAt,proto3" json:"uploaded_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CloudFile) Reset() { + *x = CloudFile{} + mi := &file_file_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CloudFile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CloudFile) ProtoMessage() {} + +func (x *CloudFile) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CloudFile.ProtoReflect.Descriptor instead. +func (*CloudFile) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{0} +} + +func (x *CloudFile) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *CloudFile) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CloudFile) GetFileMeta() []byte { + if x != nil { + return x.FileMeta + } + return nil +} + +func (x *CloudFile) GetUserMeta() []byte { + if x != nil { + return x.UserMeta + } + return nil +} + +func (x *CloudFile) GetSensitiveMarks() []byte { + if x != nil { + return x.SensitiveMarks + } + return nil +} + +func (x *CloudFile) GetMimeType() string { + if x != nil { + return x.MimeType + } + return "" +} + +func (x *CloudFile) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *CloudFile) GetSize() int64 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *CloudFile) GetHasCompression() bool { + if x != nil { + return x.HasCompression + } + return false +} + +func (x *CloudFile) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *CloudFile) GetContentType() string { + if x != nil { + return x.ContentType + } + return "" +} + +func (x *CloudFile) GetUploadedAt() *timestamppb.Timestamp { + if x != nil { + return x.UploadedAt + } + return nil +} + +// Request message for GetFile +type GetFileRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetFileRequest) Reset() { + *x = GetFileRequest{} + mi := &file_file_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetFileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFileRequest) ProtoMessage() {} + +func (x *GetFileRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFileRequest.ProtoReflect.Descriptor instead. +func (*GetFileRequest) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{1} +} + +func (x *GetFileRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetFileBatchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetFileBatchRequest) Reset() { + *x = GetFileBatchRequest{} + mi := &file_file_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetFileBatchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFileBatchRequest) ProtoMessage() {} + +func (x *GetFileBatchRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFileBatchRequest.ProtoReflect.Descriptor instead. +func (*GetFileBatchRequest) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{2} +} + +func (x *GetFileBatchRequest) GetIds() []string { + if x != nil { + return x.Ids + } + return nil +} + +type GetFileBatchResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Files []*CloudFile `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetFileBatchResponse) Reset() { + *x = GetFileBatchResponse{} + mi := &file_file_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetFileBatchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFileBatchResponse) ProtoMessage() {} + +func (x *GetFileBatchResponse) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFileBatchResponse.ProtoReflect.Descriptor instead. +func (*GetFileBatchResponse) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{3} +} + +func (x *GetFileBatchResponse) GetFiles() []*CloudFile { + if x != nil { + return x.Files + } + return nil +} + +// Request message for UpdateFile +type UpdateFileRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + File *CloudFile `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"` + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateFileRequest) Reset() { + *x = UpdateFileRequest{} + mi := &file_file_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateFileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateFileRequest) ProtoMessage() {} + +func (x *UpdateFileRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateFileRequest.ProtoReflect.Descriptor instead. +func (*UpdateFileRequest) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateFileRequest) GetFile() *CloudFile { + if x != nil { + return x.File + } + return nil +} + +func (x *UpdateFileRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +type FileMetadata struct { + state protoimpl.MessageState `protogen:"open.v1"` + FileId string `protobuf:"bytes,1,opt,name=file_id,json=fileId,proto3" json:"file_id,omitempty"` + FileName string `protobuf:"bytes,2,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"` + ContentType string `protobuf:"bytes,3,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` + AccountId string `protobuf:"bytes,4,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FileMetadata) Reset() { + *x = FileMetadata{} + mi := &file_file_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FileMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FileMetadata) ProtoMessage() {} + +func (x *FileMetadata) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FileMetadata.ProtoReflect.Descriptor instead. +func (*FileMetadata) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{5} +} + +func (x *FileMetadata) GetFileId() string { + if x != nil { + return x.FileId + } + return "" +} + +func (x *FileMetadata) GetFileName() string { + if x != nil { + return x.FileName + } + return "" +} + +func (x *FileMetadata) GetContentType() string { + if x != nil { + return x.ContentType + } + return "" +} + +func (x *FileMetadata) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +type UploadMetadata struct { + state protoimpl.MessageState `protogen:"open.v1"` + FileId string `protobuf:"bytes,1,opt,name=file_id,json=fileId,proto3" json:"file_id,omitempty"` + TargetRemote string `protobuf:"bytes,2,opt,name=target_remote,json=targetRemote,proto3" json:"target_remote,omitempty"` + Suffix string `protobuf:"bytes,3,opt,name=suffix,proto3" json:"suffix,omitempty"` + ContentType string `protobuf:"bytes,4,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UploadMetadata) Reset() { + *x = UploadMetadata{} + mi := &file_file_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UploadMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UploadMetadata) ProtoMessage() {} + +func (x *UploadMetadata) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UploadMetadata.ProtoReflect.Descriptor instead. +func (*UploadMetadata) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{6} +} + +func (x *UploadMetadata) GetFileId() string { + if x != nil { + return x.FileId + } + return "" +} + +func (x *UploadMetadata) GetTargetRemote() string { + if x != nil { + return x.TargetRemote + } + return "" +} + +func (x *UploadMetadata) GetSuffix() string { + if x != nil { + return x.Suffix + } + return "" +} + +func (x *UploadMetadata) GetContentType() string { + if x != nil { + return x.ContentType + } + return "" +} + +type DeleteFileRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Purge bool `protobuf:"varint,2,opt,name=purge,proto3" json:"purge,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteFileRequest) Reset() { + *x = DeleteFileRequest{} + mi := &file_file_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteFileRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteFileRequest) ProtoMessage() {} + +func (x *DeleteFileRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteFileRequest.ProtoReflect.Descriptor instead. +func (*DeleteFileRequest) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{7} +} + +func (x *DeleteFileRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *DeleteFileRequest) GetPurge() bool { + if x != nil { + return x.Purge + } + return false +} + +type LoadFromReferenceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ReferenceIds []string `protobuf:"bytes,1,rep,name=reference_ids,json=referenceIds,proto3" json:"reference_ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LoadFromReferenceRequest) Reset() { + *x = LoadFromReferenceRequest{} + mi := &file_file_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LoadFromReferenceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LoadFromReferenceRequest) ProtoMessage() {} + +func (x *LoadFromReferenceRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LoadFromReferenceRequest.ProtoReflect.Descriptor instead. +func (*LoadFromReferenceRequest) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{8} +} + +func (x *LoadFromReferenceRequest) GetReferenceIds() []string { + if x != nil { + return x.ReferenceIds + } + return nil +} + +type LoadFromReferenceResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Files []*CloudFile `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LoadFromReferenceResponse) Reset() { + *x = LoadFromReferenceResponse{} + mi := &file_file_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LoadFromReferenceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LoadFromReferenceResponse) ProtoMessage() {} + +func (x *LoadFromReferenceResponse) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LoadFromReferenceResponse.ProtoReflect.Descriptor instead. +func (*LoadFromReferenceResponse) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{9} +} + +func (x *LoadFromReferenceResponse) GetFiles() []*CloudFile { + if x != nil { + return x.Files + } + return nil +} + +type GetReferenceCountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + FileId string `protobuf:"bytes,1,opt,name=file_id,json=fileId,proto3" json:"file_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetReferenceCountRequest) Reset() { + *x = GetReferenceCountRequest{} + mi := &file_file_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetReferenceCountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetReferenceCountRequest) ProtoMessage() {} + +func (x *GetReferenceCountRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetReferenceCountRequest.ProtoReflect.Descriptor instead. +func (*GetReferenceCountRequest) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{10} +} + +func (x *GetReferenceCountRequest) GetFileId() string { + if x != nil { + return x.FileId + } + return "" +} + +type GetReferenceCountResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetReferenceCountResponse) Reset() { + *x = GetReferenceCountResponse{} + mi := &file_file_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetReferenceCountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetReferenceCountResponse) ProtoMessage() {} + +func (x *GetReferenceCountResponse) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetReferenceCountResponse.ProtoReflect.Descriptor instead. +func (*GetReferenceCountResponse) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{11} +} + +func (x *GetReferenceCountResponse) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +type IsReferencedRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + FileId string `protobuf:"bytes,1,opt,name=file_id,json=fileId,proto3" json:"file_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IsReferencedRequest) Reset() { + *x = IsReferencedRequest{} + mi := &file_file_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IsReferencedRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsReferencedRequest) ProtoMessage() {} + +func (x *IsReferencedRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsReferencedRequest.ProtoReflect.Descriptor instead. +func (*IsReferencedRequest) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{12} +} + +func (x *IsReferencedRequest) GetFileId() string { + if x != nil { + return x.FileId + } + return "" +} + +type IsReferencedResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + IsReferenced bool `protobuf:"varint,1,opt,name=is_referenced,json=isReferenced,proto3" json:"is_referenced,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IsReferencedResponse) Reset() { + *x = IsReferencedResponse{} + mi := &file_file_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IsReferencedResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsReferencedResponse) ProtoMessage() {} + +func (x *IsReferencedResponse) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsReferencedResponse.ProtoReflect.Descriptor instead. +func (*IsReferencedResponse) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{13} +} + +func (x *IsReferencedResponse) GetIsReferenced() bool { + if x != nil { + return x.IsReferenced + } + return false +} + +type PurgeCacheRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + FileId string `protobuf:"bytes,1,opt,name=file_id,json=fileId,proto3" json:"file_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PurgeCacheRequest) Reset() { + *x = PurgeCacheRequest{} + mi := &file_file_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PurgeCacheRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PurgeCacheRequest) ProtoMessage() {} + +func (x *PurgeCacheRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PurgeCacheRequest.ProtoReflect.Descriptor instead. +func (*PurgeCacheRequest) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{14} +} + +func (x *PurgeCacheRequest) GetFileId() string { + if x != nil { + return x.FileId + } + return "" +} + +// CloudFileReference represents a reference to a CloudFile with additional metadata +// about its usage in the system. +type CloudFileReference struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Unique identifier for the reference + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Reference to the actual file + FileId string `protobuf:"bytes,2,opt,name=file_id,json=fileId,proto3" json:"file_id,omitempty"` + // The actual file data (optional, can be populated when needed) + File *CloudFile `protobuf:"bytes,3,opt,name=file,proto3" json:"file,omitempty"` + // Description of how this file is being used + Usage string `protobuf:"bytes,4,opt,name=usage,proto3" json:"usage,omitempty"` + // ID of the resource that this file is associated with + ResourceId string `protobuf:"bytes,5,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + // Optional expiration timestamp for the reference + ExpiredAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CloudFileReference) Reset() { + *x = CloudFileReference{} + mi := &file_file_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CloudFileReference) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CloudFileReference) ProtoMessage() {} + +func (x *CloudFileReference) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CloudFileReference.ProtoReflect.Descriptor instead. +func (*CloudFileReference) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{15} +} + +func (x *CloudFileReference) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *CloudFileReference) GetFileId() string { + if x != nil { + return x.FileId + } + return "" +} + +func (x *CloudFileReference) GetFile() *CloudFile { + if x != nil { + return x.File + } + return nil +} + +func (x *CloudFileReference) GetUsage() string { + if x != nil { + return x.Usage + } + return "" +} + +func (x *CloudFileReference) GetResourceId() string { + if x != nil { + return x.ResourceId + } + return "" +} + +func (x *CloudFileReference) GetExpiredAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiredAt + } + return nil +} + +// Request/Response messages for FileReferenceService +type CreateReferenceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + FileId string `protobuf:"bytes,1,opt,name=file_id,json=fileId,proto3" json:"file_id,omitempty"` + Usage string `protobuf:"bytes,2,opt,name=usage,proto3" json:"usage,omitempty"` + ResourceId string `protobuf:"bytes,3,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + ExpiredAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=expired_at,json=expiredAt,proto3,oneof" json:"expired_at,omitempty"` + Duration *durationpb.Duration `protobuf:"bytes,5,opt,name=duration,proto3,oneof" json:"duration,omitempty"` // Alternative to expired_at + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateReferenceRequest) Reset() { + *x = CreateReferenceRequest{} + mi := &file_file_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateReferenceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateReferenceRequest) ProtoMessage() {} + +func (x *CreateReferenceRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateReferenceRequest.ProtoReflect.Descriptor instead. +func (*CreateReferenceRequest) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{16} +} + +func (x *CreateReferenceRequest) GetFileId() string { + if x != nil { + return x.FileId + } + return "" +} + +func (x *CreateReferenceRequest) GetUsage() string { + if x != nil { + return x.Usage + } + return "" +} + +func (x *CreateReferenceRequest) GetResourceId() string { + if x != nil { + return x.ResourceId + } + return "" +} + +func (x *CreateReferenceRequest) GetExpiredAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiredAt + } + return nil +} + +func (x *CreateReferenceRequest) GetDuration() *durationpb.Duration { + if x != nil { + return x.Duration + } + return nil +} + +type CreateReferenceBatchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + FilesId []string `protobuf:"bytes,1,rep,name=files_id,json=filesId,proto3" json:"files_id,omitempty"` + Usage string `protobuf:"bytes,2,opt,name=usage,proto3" json:"usage,omitempty"` + ResourceId string `protobuf:"bytes,3,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + ExpiredAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=expired_at,json=expiredAt,proto3,oneof" json:"expired_at,omitempty"` + Duration *durationpb.Duration `protobuf:"bytes,5,opt,name=duration,proto3,oneof" json:"duration,omitempty"` // Alternative to expired_at + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateReferenceBatchRequest) Reset() { + *x = CreateReferenceBatchRequest{} + mi := &file_file_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateReferenceBatchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateReferenceBatchRequest) ProtoMessage() {} + +func (x *CreateReferenceBatchRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateReferenceBatchRequest.ProtoReflect.Descriptor instead. +func (*CreateReferenceBatchRequest) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{17} +} + +func (x *CreateReferenceBatchRequest) GetFilesId() []string { + if x != nil { + return x.FilesId + } + return nil +} + +func (x *CreateReferenceBatchRequest) GetUsage() string { + if x != nil { + return x.Usage + } + return "" +} + +func (x *CreateReferenceBatchRequest) GetResourceId() string { + if x != nil { + return x.ResourceId + } + return "" +} + +func (x *CreateReferenceBatchRequest) GetExpiredAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiredAt + } + return nil +} + +func (x *CreateReferenceBatchRequest) GetDuration() *durationpb.Duration { + if x != nil { + return x.Duration + } + return nil +} + +type CreateReferenceBatchResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + References []*CloudFileReference `protobuf:"bytes,1,rep,name=references,proto3" json:"references,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateReferenceBatchResponse) Reset() { + *x = CreateReferenceBatchResponse{} + mi := &file_file_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateReferenceBatchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateReferenceBatchResponse) ProtoMessage() {} + +func (x *CreateReferenceBatchResponse) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateReferenceBatchResponse.ProtoReflect.Descriptor instead. +func (*CreateReferenceBatchResponse) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{18} +} + +func (x *CreateReferenceBatchResponse) GetReferences() []*CloudFileReference { + if x != nil { + return x.References + } + return nil +} + +type GetReferencesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + FileId string `protobuf:"bytes,1,opt,name=file_id,json=fileId,proto3" json:"file_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetReferencesRequest) Reset() { + *x = GetReferencesRequest{} + mi := &file_file_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetReferencesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetReferencesRequest) ProtoMessage() {} + +func (x *GetReferencesRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetReferencesRequest.ProtoReflect.Descriptor instead. +func (*GetReferencesRequest) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{19} +} + +func (x *GetReferencesRequest) GetFileId() string { + if x != nil { + return x.FileId + } + return "" +} + +type GetReferencesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + References []*CloudFileReference `protobuf:"bytes,1,rep,name=references,proto3" json:"references,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetReferencesResponse) Reset() { + *x = GetReferencesResponse{} + mi := &file_file_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetReferencesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetReferencesResponse) ProtoMessage() {} + +func (x *GetReferencesResponse) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetReferencesResponse.ProtoReflect.Descriptor instead. +func (*GetReferencesResponse) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{20} +} + +func (x *GetReferencesResponse) GetReferences() []*CloudFileReference { + if x != nil { + return x.References + } + return nil +} + +type GetResourceReferencesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + Usage string `protobuf:"bytes,2,opt,name=usage,proto3" json:"usage,omitempty"` // Optional + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetResourceReferencesRequest) Reset() { + *x = GetResourceReferencesRequest{} + mi := &file_file_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetResourceReferencesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetResourceReferencesRequest) ProtoMessage() {} + +func (x *GetResourceReferencesRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetResourceReferencesRequest.ProtoReflect.Descriptor instead. +func (*GetResourceReferencesRequest) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{21} +} + +func (x *GetResourceReferencesRequest) GetResourceId() string { + if x != nil { + return x.ResourceId + } + return "" +} + +func (x *GetResourceReferencesRequest) GetUsage() string { + if x != nil { + return x.Usage + } + return "" +} + +type GetResourceFilesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + Usage *string `protobuf:"bytes,2,opt,name=usage,proto3,oneof" json:"usage,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetResourceFilesRequest) Reset() { + *x = GetResourceFilesRequest{} + mi := &file_file_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetResourceFilesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetResourceFilesRequest) ProtoMessage() {} + +func (x *GetResourceFilesRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetResourceFilesRequest.ProtoReflect.Descriptor instead. +func (*GetResourceFilesRequest) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{22} +} + +func (x *GetResourceFilesRequest) GetResourceId() string { + if x != nil { + return x.ResourceId + } + return "" +} + +func (x *GetResourceFilesRequest) GetUsage() string { + if x != nil && x.Usage != nil { + return *x.Usage + } + return "" +} + +type GetResourceFilesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Files []*CloudFile `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetResourceFilesResponse) Reset() { + *x = GetResourceFilesResponse{} + mi := &file_file_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetResourceFilesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetResourceFilesResponse) ProtoMessage() {} + +func (x *GetResourceFilesResponse) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetResourceFilesResponse.ProtoReflect.Descriptor instead. +func (*GetResourceFilesResponse) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{23} +} + +func (x *GetResourceFilesResponse) GetFiles() []*CloudFile { + if x != nil { + return x.Files + } + return nil +} + +type DeleteResourceReferencesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + Usage *string `protobuf:"bytes,2,opt,name=usage,proto3,oneof" json:"usage,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteResourceReferencesRequest) Reset() { + *x = DeleteResourceReferencesRequest{} + mi := &file_file_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteResourceReferencesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteResourceReferencesRequest) ProtoMessage() {} + +func (x *DeleteResourceReferencesRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteResourceReferencesRequest.ProtoReflect.Descriptor instead. +func (*DeleteResourceReferencesRequest) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{24} +} + +func (x *DeleteResourceReferencesRequest) GetResourceId() string { + if x != nil { + return x.ResourceId + } + return "" +} + +func (x *DeleteResourceReferencesRequest) GetUsage() string { + if x != nil && x.Usage != nil { + return *x.Usage + } + return "" +} + +type DeleteResourceReferencesBatchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ResourceIds []string `protobuf:"bytes,1,rep,name=resource_ids,json=resourceIds,proto3" json:"resource_ids,omitempty"` + Usage *string `protobuf:"bytes,2,opt,name=usage,proto3,oneof" json:"usage,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteResourceReferencesBatchRequest) Reset() { + *x = DeleteResourceReferencesBatchRequest{} + mi := &file_file_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteResourceReferencesBatchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteResourceReferencesBatchRequest) ProtoMessage() {} + +func (x *DeleteResourceReferencesBatchRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteResourceReferencesBatchRequest.ProtoReflect.Descriptor instead. +func (*DeleteResourceReferencesBatchRequest) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{25} +} + +func (x *DeleteResourceReferencesBatchRequest) GetResourceIds() []string { + if x != nil { + return x.ResourceIds + } + return nil +} + +func (x *DeleteResourceReferencesBatchRequest) GetUsage() string { + if x != nil && x.Usage != nil { + return *x.Usage + } + return "" +} + +type DeleteResourceReferencesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + DeletedCount int32 `protobuf:"varint,1,opt,name=deleted_count,json=deletedCount,proto3" json:"deleted_count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteResourceReferencesResponse) Reset() { + *x = DeleteResourceReferencesResponse{} + mi := &file_file_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteResourceReferencesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteResourceReferencesResponse) ProtoMessage() {} + +func (x *DeleteResourceReferencesResponse) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteResourceReferencesResponse.ProtoReflect.Descriptor instead. +func (*DeleteResourceReferencesResponse) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{26} +} + +func (x *DeleteResourceReferencesResponse) GetDeletedCount() int32 { + if x != nil { + return x.DeletedCount + } + return 0 +} + +type DeleteReferenceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ReferenceId string `protobuf:"bytes,1,opt,name=reference_id,json=referenceId,proto3" json:"reference_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteReferenceRequest) Reset() { + *x = DeleteReferenceRequest{} + mi := &file_file_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteReferenceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteReferenceRequest) ProtoMessage() {} + +func (x *DeleteReferenceRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteReferenceRequest.ProtoReflect.Descriptor instead. +func (*DeleteReferenceRequest) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{27} +} + +func (x *DeleteReferenceRequest) GetReferenceId() string { + if x != nil { + return x.ReferenceId + } + return "" +} + +type DeleteReferenceResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteReferenceResponse) Reset() { + *x = DeleteReferenceResponse{} + mi := &file_file_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteReferenceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteReferenceResponse) ProtoMessage() {} + +func (x *DeleteReferenceResponse) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteReferenceResponse.ProtoReflect.Descriptor instead. +func (*DeleteReferenceResponse) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{28} +} + +func (x *DeleteReferenceResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +type UpdateResourceFilesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` + FileIds []string `protobuf:"bytes,2,rep,name=file_ids,json=fileIds,proto3" json:"file_ids,omitempty"` + Usage string `protobuf:"bytes,3,opt,name=usage,proto3" json:"usage,omitempty"` + ExpiredAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"` + Duration *durationpb.Duration `protobuf:"bytes,5,opt,name=duration,proto3" json:"duration,omitempty"` // Alternative to expired_at + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateResourceFilesRequest) Reset() { + *x = UpdateResourceFilesRequest{} + mi := &file_file_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateResourceFilesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateResourceFilesRequest) ProtoMessage() {} + +func (x *UpdateResourceFilesRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateResourceFilesRequest.ProtoReflect.Descriptor instead. +func (*UpdateResourceFilesRequest) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{29} +} + +func (x *UpdateResourceFilesRequest) GetResourceId() string { + if x != nil { + return x.ResourceId + } + return "" +} + +func (x *UpdateResourceFilesRequest) GetFileIds() []string { + if x != nil { + return x.FileIds + } + return nil +} + +func (x *UpdateResourceFilesRequest) GetUsage() string { + if x != nil { + return x.Usage + } + return "" +} + +func (x *UpdateResourceFilesRequest) GetExpiredAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiredAt + } + return nil +} + +func (x *UpdateResourceFilesRequest) GetDuration() *durationpb.Duration { + if x != nil { + return x.Duration + } + return nil +} + +type UpdateResourceFilesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + References []*CloudFileReference `protobuf:"bytes,1,rep,name=references,proto3" json:"references,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateResourceFilesResponse) Reset() { + *x = UpdateResourceFilesResponse{} + mi := &file_file_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateResourceFilesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateResourceFilesResponse) ProtoMessage() {} + +func (x *UpdateResourceFilesResponse) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateResourceFilesResponse.ProtoReflect.Descriptor instead. +func (*UpdateResourceFilesResponse) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{30} +} + +func (x *UpdateResourceFilesResponse) GetReferences() []*CloudFileReference { + if x != nil { + return x.References + } + return nil +} + +type SetReferenceExpirationRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ReferenceId string `protobuf:"bytes,1,opt,name=reference_id,json=referenceId,proto3" json:"reference_id,omitempty"` + ExpiredAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"` + Duration *durationpb.Duration `protobuf:"bytes,3,opt,name=duration,proto3" json:"duration,omitempty"` // Alternative to expired_at + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetReferenceExpirationRequest) Reset() { + *x = SetReferenceExpirationRequest{} + mi := &file_file_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetReferenceExpirationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetReferenceExpirationRequest) ProtoMessage() {} + +func (x *SetReferenceExpirationRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetReferenceExpirationRequest.ProtoReflect.Descriptor instead. +func (*SetReferenceExpirationRequest) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{31} +} + +func (x *SetReferenceExpirationRequest) GetReferenceId() string { + if x != nil { + return x.ReferenceId + } + return "" +} + +func (x *SetReferenceExpirationRequest) GetExpiredAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiredAt + } + return nil +} + +func (x *SetReferenceExpirationRequest) GetDuration() *durationpb.Duration { + if x != nil { + return x.Duration + } + return nil +} + +type SetReferenceExpirationResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetReferenceExpirationResponse) Reset() { + *x = SetReferenceExpirationResponse{} + mi := &file_file_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetReferenceExpirationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetReferenceExpirationResponse) ProtoMessage() {} + +func (x *SetReferenceExpirationResponse) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetReferenceExpirationResponse.ProtoReflect.Descriptor instead. +func (*SetReferenceExpirationResponse) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{32} +} + +func (x *SetReferenceExpirationResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +type SetFileReferencesExpirationRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + FileId string `protobuf:"bytes,1,opt,name=file_id,json=fileId,proto3" json:"file_id,omitempty"` + ExpiredAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetFileReferencesExpirationRequest) Reset() { + *x = SetFileReferencesExpirationRequest{} + mi := &file_file_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetFileReferencesExpirationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetFileReferencesExpirationRequest) ProtoMessage() {} + +func (x *SetFileReferencesExpirationRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetFileReferencesExpirationRequest.ProtoReflect.Descriptor instead. +func (*SetFileReferencesExpirationRequest) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{33} +} + +func (x *SetFileReferencesExpirationRequest) GetFileId() string { + if x != nil { + return x.FileId + } + return "" +} + +func (x *SetFileReferencesExpirationRequest) GetExpiredAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiredAt + } + return nil +} + +type SetFileReferencesExpirationResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + UpdatedCount int32 `protobuf:"varint,1,opt,name=updated_count,json=updatedCount,proto3" json:"updated_count,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetFileReferencesExpirationResponse) Reset() { + *x = SetFileReferencesExpirationResponse{} + mi := &file_file_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetFileReferencesExpirationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetFileReferencesExpirationResponse) ProtoMessage() {} + +func (x *SetFileReferencesExpirationResponse) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetFileReferencesExpirationResponse.ProtoReflect.Descriptor instead. +func (*SetFileReferencesExpirationResponse) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{34} +} + +func (x *SetFileReferencesExpirationResponse) GetUpdatedCount() int32 { + if x != nil { + return x.UpdatedCount + } + return 0 +} + +type HasFileReferencesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + FileId string `protobuf:"bytes,1,opt,name=file_id,json=fileId,proto3" json:"file_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HasFileReferencesRequest) Reset() { + *x = HasFileReferencesRequest{} + mi := &file_file_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HasFileReferencesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HasFileReferencesRequest) ProtoMessage() {} + +func (x *HasFileReferencesRequest) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HasFileReferencesRequest.ProtoReflect.Descriptor instead. +func (*HasFileReferencesRequest) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{35} +} + +func (x *HasFileReferencesRequest) GetFileId() string { + if x != nil { + return x.FileId + } + return "" +} + +type HasFileReferencesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + HasReferences bool `protobuf:"varint,1,opt,name=has_references,json=hasReferences,proto3" json:"has_references,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HasFileReferencesResponse) Reset() { + *x = HasFileReferencesResponse{} + mi := &file_file_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HasFileReferencesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HasFileReferencesResponse) ProtoMessage() {} + +func (x *HasFileReferencesResponse) ProtoReflect() protoreflect.Message { + mi := &file_file_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HasFileReferencesResponse.ProtoReflect.Descriptor instead. +func (*HasFileReferencesResponse) Descriptor() ([]byte, []int) { + return file_file_proto_rawDescGZIP(), []int{36} +} + +func (x *HasFileReferencesResponse) GetHasReferences() bool { + if x != nil { + return x.HasReferences + } + return false +} + +var File_file_proto protoreflect.FileDescriptor + +const file_file_proto_rawDesc = "" + + "\n" + + "\n" + + "file.proto\x12\x05proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1egoogle/protobuf/duration.proto\"\x8b\x03\n" + + "\tCloudFile\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x1b\n" + + "\tfile_meta\x18\x03 \x01(\fR\bfileMeta\x12\x1b\n" + + "\tuser_meta\x18\x04 \x01(\fR\buserMeta\x12,\n" + + "\x0fsensitive_marks\x18\f \x01(\fH\x00R\x0esensitiveMarks\x88\x01\x01\x12\x1b\n" + + "\tmime_type\x18\x05 \x01(\tR\bmimeType\x12\x12\n" + + "\x04hash\x18\x06 \x01(\tR\x04hash\x12\x12\n" + + "\x04size\x18\a \x01(\x03R\x04size\x12'\n" + + "\x0fhas_compression\x18\b \x01(\bR\x0ehasCompression\x12\x10\n" + + "\x03url\x18\t \x01(\tR\x03url\x12!\n" + + "\fcontent_type\x18\n" + + " \x01(\tR\vcontentType\x12;\n" + + "\vuploaded_at\x18\v \x01(\v2\x1a.google.protobuf.TimestampR\n" + + "uploadedAtB\x12\n" + + "\x10_sensitive_marks\" \n" + + "\x0eGetFileRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"'\n" + + "\x13GetFileBatchRequest\x12\x10\n" + + "\x03ids\x18\x01 \x03(\tR\x03ids\">\n" + + "\x14GetFileBatchResponse\x12&\n" + + "\x05files\x18\x01 \x03(\v2\x10.proto.CloudFileR\x05files\"v\n" + + "\x11UpdateFileRequest\x12$\n" + + "\x04file\x18\x01 \x01(\v2\x10.proto.CloudFileR\x04file\x12;\n" + + "\vupdate_mask\x18\x02 \x01(\v2\x1a.google.protobuf.FieldMaskR\n" + + "updateMask\"\x86\x01\n" + + "\fFileMetadata\x12\x17\n" + + "\afile_id\x18\x01 \x01(\tR\x06fileId\x12\x1b\n" + + "\tfile_name\x18\x02 \x01(\tR\bfileName\x12!\n" + + "\fcontent_type\x18\x03 \x01(\tR\vcontentType\x12\x1d\n" + + "\n" + + "account_id\x18\x04 \x01(\tR\taccountId\"\x89\x01\n" + + "\x0eUploadMetadata\x12\x17\n" + + "\afile_id\x18\x01 \x01(\tR\x06fileId\x12#\n" + + "\rtarget_remote\x18\x02 \x01(\tR\ftargetRemote\x12\x16\n" + + "\x06suffix\x18\x03 \x01(\tR\x06suffix\x12!\n" + + "\fcontent_type\x18\x04 \x01(\tR\vcontentType\"9\n" + + "\x11DeleteFileRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x14\n" + + "\x05purge\x18\x02 \x01(\bR\x05purge\"?\n" + + "\x18LoadFromReferenceRequest\x12#\n" + + "\rreference_ids\x18\x01 \x03(\tR\freferenceIds\"C\n" + + "\x19LoadFromReferenceResponse\x12&\n" + + "\x05files\x18\x01 \x03(\v2\x10.proto.CloudFileR\x05files\"3\n" + + "\x18GetReferenceCountRequest\x12\x17\n" + + "\afile_id\x18\x01 \x01(\tR\x06fileId\"1\n" + + "\x19GetReferenceCountResponse\x12\x14\n" + + "\x05count\x18\x01 \x01(\x05R\x05count\".\n" + + "\x13IsReferencedRequest\x12\x17\n" + + "\afile_id\x18\x01 \x01(\tR\x06fileId\";\n" + + "\x14IsReferencedResponse\x12#\n" + + "\ris_referenced\x18\x01 \x01(\bR\fisReferenced\",\n" + + "\x11PurgeCacheRequest\x12\x17\n" + + "\afile_id\x18\x01 \x01(\tR\x06fileId\"\xd5\x01\n" + + "\x12CloudFileReference\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x17\n" + + "\afile_id\x18\x02 \x01(\tR\x06fileId\x12$\n" + + "\x04file\x18\x03 \x01(\v2\x10.proto.CloudFileR\x04file\x12\x14\n" + + "\x05usage\x18\x04 \x01(\tR\x05usage\x12\x1f\n" + + "\vresource_id\x18\x05 \x01(\tR\n" + + "resourceId\x129\n" + + "\n" + + "expired_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\texpiredAt\"\x80\x02\n" + + "\x16CreateReferenceRequest\x12\x17\n" + + "\afile_id\x18\x01 \x01(\tR\x06fileId\x12\x14\n" + + "\x05usage\x18\x02 \x01(\tR\x05usage\x12\x1f\n" + + "\vresource_id\x18\x03 \x01(\tR\n" + + "resourceId\x12>\n" + + "\n" + + "expired_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampH\x00R\texpiredAt\x88\x01\x01\x12:\n" + + "\bduration\x18\x05 \x01(\v2\x19.google.protobuf.DurationH\x01R\bduration\x88\x01\x01B\r\n" + + "\v_expired_atB\v\n" + + "\t_duration\"\x87\x02\n" + + "\x1bCreateReferenceBatchRequest\x12\x19\n" + + "\bfiles_id\x18\x01 \x03(\tR\afilesId\x12\x14\n" + + "\x05usage\x18\x02 \x01(\tR\x05usage\x12\x1f\n" + + "\vresource_id\x18\x03 \x01(\tR\n" + + "resourceId\x12>\n" + + "\n" + + "expired_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampH\x00R\texpiredAt\x88\x01\x01\x12:\n" + + "\bduration\x18\x05 \x01(\v2\x19.google.protobuf.DurationH\x01R\bduration\x88\x01\x01B\r\n" + + "\v_expired_atB\v\n" + + "\t_duration\"Y\n" + + "\x1cCreateReferenceBatchResponse\x129\n" + + "\n" + + "references\x18\x01 \x03(\v2\x19.proto.CloudFileReferenceR\n" + + "references\"/\n" + + "\x14GetReferencesRequest\x12\x17\n" + + "\afile_id\x18\x01 \x01(\tR\x06fileId\"R\n" + + "\x15GetReferencesResponse\x129\n" + + "\n" + + "references\x18\x01 \x03(\v2\x19.proto.CloudFileReferenceR\n" + + "references\"U\n" + + "\x1cGetResourceReferencesRequest\x12\x1f\n" + + "\vresource_id\x18\x01 \x01(\tR\n" + + "resourceId\x12\x14\n" + + "\x05usage\x18\x02 \x01(\tR\x05usage\"_\n" + + "\x17GetResourceFilesRequest\x12\x1f\n" + + "\vresource_id\x18\x01 \x01(\tR\n" + + "resourceId\x12\x19\n" + + "\x05usage\x18\x02 \x01(\tH\x00R\x05usage\x88\x01\x01B\b\n" + + "\x06_usage\"B\n" + + "\x18GetResourceFilesResponse\x12&\n" + + "\x05files\x18\x01 \x03(\v2\x10.proto.CloudFileR\x05files\"g\n" + + "\x1fDeleteResourceReferencesRequest\x12\x1f\n" + + "\vresource_id\x18\x01 \x01(\tR\n" + + "resourceId\x12\x19\n" + + "\x05usage\x18\x02 \x01(\tH\x00R\x05usage\x88\x01\x01B\b\n" + + "\x06_usage\"n\n" + + "$DeleteResourceReferencesBatchRequest\x12!\n" + + "\fresource_ids\x18\x01 \x03(\tR\vresourceIds\x12\x19\n" + + "\x05usage\x18\x02 \x01(\tH\x00R\x05usage\x88\x01\x01B\b\n" + + "\x06_usage\"G\n" + + " DeleteResourceReferencesResponse\x12#\n" + + "\rdeleted_count\x18\x01 \x01(\x05R\fdeletedCount\";\n" + + "\x16DeleteReferenceRequest\x12!\n" + + "\freference_id\x18\x01 \x01(\tR\vreferenceId\"3\n" + + "\x17DeleteReferenceResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess\"\xe0\x01\n" + + "\x1aUpdateResourceFilesRequest\x12\x1f\n" + + "\vresource_id\x18\x01 \x01(\tR\n" + + "resourceId\x12\x19\n" + + "\bfile_ids\x18\x02 \x03(\tR\afileIds\x12\x14\n" + + "\x05usage\x18\x03 \x01(\tR\x05usage\x129\n" + + "\n" + + "expired_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\texpiredAt\x125\n" + + "\bduration\x18\x05 \x01(\v2\x19.google.protobuf.DurationR\bduration\"X\n" + + "\x1bUpdateResourceFilesResponse\x129\n" + + "\n" + + "references\x18\x01 \x03(\v2\x19.proto.CloudFileReferenceR\n" + + "references\"\xb4\x01\n" + + "\x1dSetReferenceExpirationRequest\x12!\n" + + "\freference_id\x18\x01 \x01(\tR\vreferenceId\x129\n" + + "\n" + + "expired_at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\texpiredAt\x125\n" + + "\bduration\x18\x03 \x01(\v2\x19.google.protobuf.DurationR\bduration\":\n" + + "\x1eSetReferenceExpirationResponse\x12\x18\n" + + "\asuccess\x18\x01 \x01(\bR\asuccess\"x\n" + + "\"SetFileReferencesExpirationRequest\x12\x17\n" + + "\afile_id\x18\x01 \x01(\tR\x06fileId\x129\n" + + "\n" + + "expired_at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\texpiredAt\"J\n" + + "#SetFileReferencesExpirationResponse\x12#\n" + + "\rupdated_count\x18\x01 \x01(\x05R\fupdatedCount\"3\n" + + "\x18HasFileReferencesRequest\x12\x17\n" + + "\afile_id\x18\x01 \x01(\tR\x06fileId\"B\n" + + "\x19HasFileReferencesResponse\x12%\n" + + "\x0ehas_references\x18\x01 \x01(\bR\rhasReferences2\xe5\x03\n" + + "\vFileService\x122\n" + + "\aGetFile\x12\x15.proto.GetFileRequest\x1a\x10.proto.CloudFile\x12G\n" + + "\fGetFileBatch\x12\x1a.proto.GetFileBatchRequest\x1a\x1b.proto.GetFileBatchResponse\x128\n" + + "\n" + + "UpdateFile\x12\x18.proto.UpdateFileRequest\x1a\x10.proto.CloudFile\x12>\n" + + "\n" + + "DeleteFile\x12\x18.proto.DeleteFileRequest\x1a\x16.google.protobuf.Empty\x12V\n" + + "\x11LoadFromReference\x12\x1f.proto.LoadFromReferenceRequest\x1a .proto.LoadFromReferenceResponse\x12G\n" + + "\fIsReferenced\x12\x1a.proto.IsReferencedRequest\x1a\x1b.proto.IsReferencedResponse\x12>\n" + + "\n" + + "PurgeCache\x12\x18.proto.PurgeCacheRequest\x1a\x16.google.protobuf.Empty2\xe2\t\n" + + "\x14FileReferenceService\x12K\n" + + "\x0fCreateReference\x12\x1d.proto.CreateReferenceRequest\x1a\x19.proto.CloudFileReference\x12_\n" + + "\x14CreateReferenceBatch\x12\".proto.CreateReferenceBatchRequest\x1a#.proto.CreateReferenceBatchResponse\x12J\n" + + "\rGetReferences\x12\x1b.proto.GetReferencesRequest\x1a\x1c.proto.GetReferencesResponse\x12V\n" + + "\x11GetReferenceCount\x12\x1f.proto.GetReferenceCountRequest\x1a .proto.GetReferenceCountResponse\x12Z\n" + + "\x15GetResourceReferences\x12#.proto.GetResourceReferencesRequest\x1a\x1c.proto.GetReferencesResponse\x12S\n" + + "\x10GetResourceFiles\x12\x1e.proto.GetResourceFilesRequest\x1a\x1f.proto.GetResourceFilesResponse\x12k\n" + + "\x18DeleteResourceReferences\x12&.proto.DeleteResourceReferencesRequest\x1a'.proto.DeleteResourceReferencesResponse\x12u\n" + + "\x1dDeleteResourceReferencesBatch\x12+.proto.DeleteResourceReferencesBatchRequest\x1a'.proto.DeleteResourceReferencesResponse\x12P\n" + + "\x0fDeleteReference\x12\x1d.proto.DeleteReferenceRequest\x1a\x1e.proto.DeleteReferenceResponse\x12\\\n" + + "\x13UpdateResourceFiles\x12!.proto.UpdateResourceFilesRequest\x1a\".proto.UpdateResourceFilesResponse\x12e\n" + + "\x16SetReferenceExpiration\x12$.proto.SetReferenceExpirationRequest\x1a%.proto.SetReferenceExpirationResponse\x12t\n" + + "\x1bSetFileReferencesExpiration\x12).proto.SetFileReferencesExpirationRequest\x1a*.proto.SetFileReferencesExpirationResponse\x12V\n" + + "\x11HasFileReferences\x12\x1f.proto.HasFileReferencesRequest\x1a .proto.HasFileReferencesResponseBUZ7git.solsynth.dev/goatworks/turbine/pkg/shared/proto/gen\xaa\x02\x19DysonNetwork.Shared.Protob\x06proto3" + +var ( + file_file_proto_rawDescOnce sync.Once + file_file_proto_rawDescData []byte +) + +func file_file_proto_rawDescGZIP() []byte { + file_file_proto_rawDescOnce.Do(func() { + file_file_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_file_proto_rawDesc), len(file_file_proto_rawDesc))) + }) + return file_file_proto_rawDescData +} + +var file_file_proto_msgTypes = make([]protoimpl.MessageInfo, 37) +var file_file_proto_goTypes = []any{ + (*CloudFile)(nil), // 0: proto.CloudFile + (*GetFileRequest)(nil), // 1: proto.GetFileRequest + (*GetFileBatchRequest)(nil), // 2: proto.GetFileBatchRequest + (*GetFileBatchResponse)(nil), // 3: proto.GetFileBatchResponse + (*UpdateFileRequest)(nil), // 4: proto.UpdateFileRequest + (*FileMetadata)(nil), // 5: proto.FileMetadata + (*UploadMetadata)(nil), // 6: proto.UploadMetadata + (*DeleteFileRequest)(nil), // 7: proto.DeleteFileRequest + (*LoadFromReferenceRequest)(nil), // 8: proto.LoadFromReferenceRequest + (*LoadFromReferenceResponse)(nil), // 9: proto.LoadFromReferenceResponse + (*GetReferenceCountRequest)(nil), // 10: proto.GetReferenceCountRequest + (*GetReferenceCountResponse)(nil), // 11: proto.GetReferenceCountResponse + (*IsReferencedRequest)(nil), // 12: proto.IsReferencedRequest + (*IsReferencedResponse)(nil), // 13: proto.IsReferencedResponse + (*PurgeCacheRequest)(nil), // 14: proto.PurgeCacheRequest + (*CloudFileReference)(nil), // 15: proto.CloudFileReference + (*CreateReferenceRequest)(nil), // 16: proto.CreateReferenceRequest + (*CreateReferenceBatchRequest)(nil), // 17: proto.CreateReferenceBatchRequest + (*CreateReferenceBatchResponse)(nil), // 18: proto.CreateReferenceBatchResponse + (*GetReferencesRequest)(nil), // 19: proto.GetReferencesRequest + (*GetReferencesResponse)(nil), // 20: proto.GetReferencesResponse + (*GetResourceReferencesRequest)(nil), // 21: proto.GetResourceReferencesRequest + (*GetResourceFilesRequest)(nil), // 22: proto.GetResourceFilesRequest + (*GetResourceFilesResponse)(nil), // 23: proto.GetResourceFilesResponse + (*DeleteResourceReferencesRequest)(nil), // 24: proto.DeleteResourceReferencesRequest + (*DeleteResourceReferencesBatchRequest)(nil), // 25: proto.DeleteResourceReferencesBatchRequest + (*DeleteResourceReferencesResponse)(nil), // 26: proto.DeleteResourceReferencesResponse + (*DeleteReferenceRequest)(nil), // 27: proto.DeleteReferenceRequest + (*DeleteReferenceResponse)(nil), // 28: proto.DeleteReferenceResponse + (*UpdateResourceFilesRequest)(nil), // 29: proto.UpdateResourceFilesRequest + (*UpdateResourceFilesResponse)(nil), // 30: proto.UpdateResourceFilesResponse + (*SetReferenceExpirationRequest)(nil), // 31: proto.SetReferenceExpirationRequest + (*SetReferenceExpirationResponse)(nil), // 32: proto.SetReferenceExpirationResponse + (*SetFileReferencesExpirationRequest)(nil), // 33: proto.SetFileReferencesExpirationRequest + (*SetFileReferencesExpirationResponse)(nil), // 34: proto.SetFileReferencesExpirationResponse + (*HasFileReferencesRequest)(nil), // 35: proto.HasFileReferencesRequest + (*HasFileReferencesResponse)(nil), // 36: proto.HasFileReferencesResponse + (*timestamppb.Timestamp)(nil), // 37: google.protobuf.Timestamp + (*fieldmaskpb.FieldMask)(nil), // 38: google.protobuf.FieldMask + (*durationpb.Duration)(nil), // 39: google.protobuf.Duration + (*emptypb.Empty)(nil), // 40: google.protobuf.Empty +} +var file_file_proto_depIdxs = []int32{ + 37, // 0: proto.CloudFile.uploaded_at:type_name -> google.protobuf.Timestamp + 0, // 1: proto.GetFileBatchResponse.files:type_name -> proto.CloudFile + 0, // 2: proto.UpdateFileRequest.file:type_name -> proto.CloudFile + 38, // 3: proto.UpdateFileRequest.update_mask:type_name -> google.protobuf.FieldMask + 0, // 4: proto.LoadFromReferenceResponse.files:type_name -> proto.CloudFile + 0, // 5: proto.CloudFileReference.file:type_name -> proto.CloudFile + 37, // 6: proto.CloudFileReference.expired_at:type_name -> google.protobuf.Timestamp + 37, // 7: proto.CreateReferenceRequest.expired_at:type_name -> google.protobuf.Timestamp + 39, // 8: proto.CreateReferenceRequest.duration:type_name -> google.protobuf.Duration + 37, // 9: proto.CreateReferenceBatchRequest.expired_at:type_name -> google.protobuf.Timestamp + 39, // 10: proto.CreateReferenceBatchRequest.duration:type_name -> google.protobuf.Duration + 15, // 11: proto.CreateReferenceBatchResponse.references:type_name -> proto.CloudFileReference + 15, // 12: proto.GetReferencesResponse.references:type_name -> proto.CloudFileReference + 0, // 13: proto.GetResourceFilesResponse.files:type_name -> proto.CloudFile + 37, // 14: proto.UpdateResourceFilesRequest.expired_at:type_name -> google.protobuf.Timestamp + 39, // 15: proto.UpdateResourceFilesRequest.duration:type_name -> google.protobuf.Duration + 15, // 16: proto.UpdateResourceFilesResponse.references:type_name -> proto.CloudFileReference + 37, // 17: proto.SetReferenceExpirationRequest.expired_at:type_name -> google.protobuf.Timestamp + 39, // 18: proto.SetReferenceExpirationRequest.duration:type_name -> google.protobuf.Duration + 37, // 19: proto.SetFileReferencesExpirationRequest.expired_at:type_name -> google.protobuf.Timestamp + 1, // 20: proto.FileService.GetFile:input_type -> proto.GetFileRequest + 2, // 21: proto.FileService.GetFileBatch:input_type -> proto.GetFileBatchRequest + 4, // 22: proto.FileService.UpdateFile:input_type -> proto.UpdateFileRequest + 7, // 23: proto.FileService.DeleteFile:input_type -> proto.DeleteFileRequest + 8, // 24: proto.FileService.LoadFromReference:input_type -> proto.LoadFromReferenceRequest + 12, // 25: proto.FileService.IsReferenced:input_type -> proto.IsReferencedRequest + 14, // 26: proto.FileService.PurgeCache:input_type -> proto.PurgeCacheRequest + 16, // 27: proto.FileReferenceService.CreateReference:input_type -> proto.CreateReferenceRequest + 17, // 28: proto.FileReferenceService.CreateReferenceBatch:input_type -> proto.CreateReferenceBatchRequest + 19, // 29: proto.FileReferenceService.GetReferences:input_type -> proto.GetReferencesRequest + 10, // 30: proto.FileReferenceService.GetReferenceCount:input_type -> proto.GetReferenceCountRequest + 21, // 31: proto.FileReferenceService.GetResourceReferences:input_type -> proto.GetResourceReferencesRequest + 22, // 32: proto.FileReferenceService.GetResourceFiles:input_type -> proto.GetResourceFilesRequest + 24, // 33: proto.FileReferenceService.DeleteResourceReferences:input_type -> proto.DeleteResourceReferencesRequest + 25, // 34: proto.FileReferenceService.DeleteResourceReferencesBatch:input_type -> proto.DeleteResourceReferencesBatchRequest + 27, // 35: proto.FileReferenceService.DeleteReference:input_type -> proto.DeleteReferenceRequest + 29, // 36: proto.FileReferenceService.UpdateResourceFiles:input_type -> proto.UpdateResourceFilesRequest + 31, // 37: proto.FileReferenceService.SetReferenceExpiration:input_type -> proto.SetReferenceExpirationRequest + 33, // 38: proto.FileReferenceService.SetFileReferencesExpiration:input_type -> proto.SetFileReferencesExpirationRequest + 35, // 39: proto.FileReferenceService.HasFileReferences:input_type -> proto.HasFileReferencesRequest + 0, // 40: proto.FileService.GetFile:output_type -> proto.CloudFile + 3, // 41: proto.FileService.GetFileBatch:output_type -> proto.GetFileBatchResponse + 0, // 42: proto.FileService.UpdateFile:output_type -> proto.CloudFile + 40, // 43: proto.FileService.DeleteFile:output_type -> google.protobuf.Empty + 9, // 44: proto.FileService.LoadFromReference:output_type -> proto.LoadFromReferenceResponse + 13, // 45: proto.FileService.IsReferenced:output_type -> proto.IsReferencedResponse + 40, // 46: proto.FileService.PurgeCache:output_type -> google.protobuf.Empty + 15, // 47: proto.FileReferenceService.CreateReference:output_type -> proto.CloudFileReference + 18, // 48: proto.FileReferenceService.CreateReferenceBatch:output_type -> proto.CreateReferenceBatchResponse + 20, // 49: proto.FileReferenceService.GetReferences:output_type -> proto.GetReferencesResponse + 11, // 50: proto.FileReferenceService.GetReferenceCount:output_type -> proto.GetReferenceCountResponse + 20, // 51: proto.FileReferenceService.GetResourceReferences:output_type -> proto.GetReferencesResponse + 23, // 52: proto.FileReferenceService.GetResourceFiles:output_type -> proto.GetResourceFilesResponse + 26, // 53: proto.FileReferenceService.DeleteResourceReferences:output_type -> proto.DeleteResourceReferencesResponse + 26, // 54: proto.FileReferenceService.DeleteResourceReferencesBatch:output_type -> proto.DeleteResourceReferencesResponse + 28, // 55: proto.FileReferenceService.DeleteReference:output_type -> proto.DeleteReferenceResponse + 30, // 56: proto.FileReferenceService.UpdateResourceFiles:output_type -> proto.UpdateResourceFilesResponse + 32, // 57: proto.FileReferenceService.SetReferenceExpiration:output_type -> proto.SetReferenceExpirationResponse + 34, // 58: proto.FileReferenceService.SetFileReferencesExpiration:output_type -> proto.SetFileReferencesExpirationResponse + 36, // 59: proto.FileReferenceService.HasFileReferences:output_type -> proto.HasFileReferencesResponse + 40, // [40:60] is the sub-list for method output_type + 20, // [20:40] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name +} + +func init() { file_file_proto_init() } +func file_file_proto_init() { + if File_file_proto != nil { + return + } + file_file_proto_msgTypes[0].OneofWrappers = []any{} + file_file_proto_msgTypes[16].OneofWrappers = []any{} + file_file_proto_msgTypes[17].OneofWrappers = []any{} + file_file_proto_msgTypes[22].OneofWrappers = []any{} + file_file_proto_msgTypes[24].OneofWrappers = []any{} + file_file_proto_msgTypes[25].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_file_proto_rawDesc), len(file_file_proto_rawDesc)), + NumEnums: 0, + NumMessages: 37, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_file_proto_goTypes, + DependencyIndexes: file_file_proto_depIdxs, + MessageInfos: file_file_proto_msgTypes, + }.Build() + File_file_proto = out.File + file_file_proto_goTypes = nil + file_file_proto_depIdxs = nil +} diff --git a/pkg/shared/proto/gen/file_grpc.pb.go b/pkg/shared/proto/gen/file_grpc.pb.go new file mode 100644 index 0000000..2be02b2 --- /dev/null +++ b/pkg/shared/proto/gen/file_grpc.pb.go @@ -0,0 +1,952 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.0 +// - protoc v6.33.1 +// source: file.proto + +package gen + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + FileService_GetFile_FullMethodName = "/proto.FileService/GetFile" + FileService_GetFileBatch_FullMethodName = "/proto.FileService/GetFileBatch" + FileService_UpdateFile_FullMethodName = "/proto.FileService/UpdateFile" + FileService_DeleteFile_FullMethodName = "/proto.FileService/DeleteFile" + FileService_LoadFromReference_FullMethodName = "/proto.FileService/LoadFromReference" + FileService_IsReferenced_FullMethodName = "/proto.FileService/IsReferenced" + FileService_PurgeCache_FullMethodName = "/proto.FileService/PurgeCache" +) + +// FileServiceClient is the client API for FileService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Service for file operations +type FileServiceClient interface { + // Get file reference by ID + GetFile(ctx context.Context, in *GetFileRequest, opts ...grpc.CallOption) (*CloudFile, error) + GetFileBatch(ctx context.Context, in *GetFileBatchRequest, opts ...grpc.CallOption) (*GetFileBatchResponse, error) + // Update an existing file reference + UpdateFile(ctx context.Context, in *UpdateFileRequest, opts ...grpc.CallOption) (*CloudFile, error) + // Delete a file reference + DeleteFile(ctx context.Context, in *DeleteFileRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Load files from references + LoadFromReference(ctx context.Context, in *LoadFromReferenceRequest, opts ...grpc.CallOption) (*LoadFromReferenceResponse, error) + // Check if a file is referenced by any resource + IsReferenced(ctx context.Context, in *IsReferencedRequest, opts ...grpc.CallOption) (*IsReferencedResponse, error) + // Purge cache for a file + PurgeCache(ctx context.Context, in *PurgeCacheRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type fileServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewFileServiceClient(cc grpc.ClientConnInterface) FileServiceClient { + return &fileServiceClient{cc} +} + +func (c *fileServiceClient) GetFile(ctx context.Context, in *GetFileRequest, opts ...grpc.CallOption) (*CloudFile, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CloudFile) + err := c.cc.Invoke(ctx, FileService_GetFile_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *fileServiceClient) GetFileBatch(ctx context.Context, in *GetFileBatchRequest, opts ...grpc.CallOption) (*GetFileBatchResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetFileBatchResponse) + err := c.cc.Invoke(ctx, FileService_GetFileBatch_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *fileServiceClient) UpdateFile(ctx context.Context, in *UpdateFileRequest, opts ...grpc.CallOption) (*CloudFile, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CloudFile) + err := c.cc.Invoke(ctx, FileService_UpdateFile_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *fileServiceClient) DeleteFile(ctx context.Context, in *DeleteFileRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, FileService_DeleteFile_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *fileServiceClient) LoadFromReference(ctx context.Context, in *LoadFromReferenceRequest, opts ...grpc.CallOption) (*LoadFromReferenceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(LoadFromReferenceResponse) + err := c.cc.Invoke(ctx, FileService_LoadFromReference_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *fileServiceClient) IsReferenced(ctx context.Context, in *IsReferencedRequest, opts ...grpc.CallOption) (*IsReferencedResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(IsReferencedResponse) + err := c.cc.Invoke(ctx, FileService_IsReferenced_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *fileServiceClient) PurgeCache(ctx context.Context, in *PurgeCacheRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, FileService_PurgeCache_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// FileServiceServer is the server API for FileService service. +// All implementations must embed UnimplementedFileServiceServer +// for forward compatibility. +// +// Service for file operations +type FileServiceServer interface { + // Get file reference by ID + GetFile(context.Context, *GetFileRequest) (*CloudFile, error) + GetFileBatch(context.Context, *GetFileBatchRequest) (*GetFileBatchResponse, error) + // Update an existing file reference + UpdateFile(context.Context, *UpdateFileRequest) (*CloudFile, error) + // Delete a file reference + DeleteFile(context.Context, *DeleteFileRequest) (*emptypb.Empty, error) + // Load files from references + LoadFromReference(context.Context, *LoadFromReferenceRequest) (*LoadFromReferenceResponse, error) + // Check if a file is referenced by any resource + IsReferenced(context.Context, *IsReferencedRequest) (*IsReferencedResponse, error) + // Purge cache for a file + PurgeCache(context.Context, *PurgeCacheRequest) (*emptypb.Empty, error) + mustEmbedUnimplementedFileServiceServer() +} + +// UnimplementedFileServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedFileServiceServer struct{} + +func (UnimplementedFileServiceServer) GetFile(context.Context, *GetFileRequest) (*CloudFile, error) { + return nil, status.Error(codes.Unimplemented, "method GetFile not implemented") +} +func (UnimplementedFileServiceServer) GetFileBatch(context.Context, *GetFileBatchRequest) (*GetFileBatchResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetFileBatch not implemented") +} +func (UnimplementedFileServiceServer) UpdateFile(context.Context, *UpdateFileRequest) (*CloudFile, error) { + return nil, status.Error(codes.Unimplemented, "method UpdateFile not implemented") +} +func (UnimplementedFileServiceServer) DeleteFile(context.Context, *DeleteFileRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method DeleteFile not implemented") +} +func (UnimplementedFileServiceServer) LoadFromReference(context.Context, *LoadFromReferenceRequest) (*LoadFromReferenceResponse, error) { + return nil, status.Error(codes.Unimplemented, "method LoadFromReference not implemented") +} +func (UnimplementedFileServiceServer) IsReferenced(context.Context, *IsReferencedRequest) (*IsReferencedResponse, error) { + return nil, status.Error(codes.Unimplemented, "method IsReferenced not implemented") +} +func (UnimplementedFileServiceServer) PurgeCache(context.Context, *PurgeCacheRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method PurgeCache not implemented") +} +func (UnimplementedFileServiceServer) mustEmbedUnimplementedFileServiceServer() {} +func (UnimplementedFileServiceServer) testEmbeddedByValue() {} + +// UnsafeFileServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to FileServiceServer will +// result in compilation errors. +type UnsafeFileServiceServer interface { + mustEmbedUnimplementedFileServiceServer() +} + +func RegisterFileServiceServer(s grpc.ServiceRegistrar, srv FileServiceServer) { + // If the following call panics, it indicates UnimplementedFileServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&FileService_ServiceDesc, srv) +} + +func _FileService_GetFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetFileRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FileServiceServer).GetFile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FileService_GetFile_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FileServiceServer).GetFile(ctx, req.(*GetFileRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FileService_GetFileBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetFileBatchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FileServiceServer).GetFileBatch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FileService_GetFileBatch_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FileServiceServer).GetFileBatch(ctx, req.(*GetFileBatchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FileService_UpdateFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateFileRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FileServiceServer).UpdateFile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FileService_UpdateFile_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FileServiceServer).UpdateFile(ctx, req.(*UpdateFileRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FileService_DeleteFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteFileRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FileServiceServer).DeleteFile(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FileService_DeleteFile_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FileServiceServer).DeleteFile(ctx, req.(*DeleteFileRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FileService_LoadFromReference_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LoadFromReferenceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FileServiceServer).LoadFromReference(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FileService_LoadFromReference_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FileServiceServer).LoadFromReference(ctx, req.(*LoadFromReferenceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FileService_IsReferenced_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IsReferencedRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FileServiceServer).IsReferenced(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FileService_IsReferenced_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FileServiceServer).IsReferenced(ctx, req.(*IsReferencedRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FileService_PurgeCache_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PurgeCacheRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FileServiceServer).PurgeCache(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FileService_PurgeCache_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FileServiceServer).PurgeCache(ctx, req.(*PurgeCacheRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// FileService_ServiceDesc is the grpc.ServiceDesc for FileService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var FileService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "proto.FileService", + HandlerType: (*FileServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetFile", + Handler: _FileService_GetFile_Handler, + }, + { + MethodName: "GetFileBatch", + Handler: _FileService_GetFileBatch_Handler, + }, + { + MethodName: "UpdateFile", + Handler: _FileService_UpdateFile_Handler, + }, + { + MethodName: "DeleteFile", + Handler: _FileService_DeleteFile_Handler, + }, + { + MethodName: "LoadFromReference", + Handler: _FileService_LoadFromReference_Handler, + }, + { + MethodName: "IsReferenced", + Handler: _FileService_IsReferenced_Handler, + }, + { + MethodName: "PurgeCache", + Handler: _FileService_PurgeCache_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "file.proto", +} + +const ( + FileReferenceService_CreateReference_FullMethodName = "/proto.FileReferenceService/CreateReference" + FileReferenceService_CreateReferenceBatch_FullMethodName = "/proto.FileReferenceService/CreateReferenceBatch" + FileReferenceService_GetReferences_FullMethodName = "/proto.FileReferenceService/GetReferences" + FileReferenceService_GetReferenceCount_FullMethodName = "/proto.FileReferenceService/GetReferenceCount" + FileReferenceService_GetResourceReferences_FullMethodName = "/proto.FileReferenceService/GetResourceReferences" + FileReferenceService_GetResourceFiles_FullMethodName = "/proto.FileReferenceService/GetResourceFiles" + FileReferenceService_DeleteResourceReferences_FullMethodName = "/proto.FileReferenceService/DeleteResourceReferences" + FileReferenceService_DeleteResourceReferencesBatch_FullMethodName = "/proto.FileReferenceService/DeleteResourceReferencesBatch" + FileReferenceService_DeleteReference_FullMethodName = "/proto.FileReferenceService/DeleteReference" + FileReferenceService_UpdateResourceFiles_FullMethodName = "/proto.FileReferenceService/UpdateResourceFiles" + FileReferenceService_SetReferenceExpiration_FullMethodName = "/proto.FileReferenceService/SetReferenceExpiration" + FileReferenceService_SetFileReferencesExpiration_FullMethodName = "/proto.FileReferenceService/SetFileReferencesExpiration" + FileReferenceService_HasFileReferences_FullMethodName = "/proto.FileReferenceService/HasFileReferences" +) + +// FileReferenceServiceClient is the client API for FileReferenceService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// Service for managing file references +type FileReferenceServiceClient interface { + // Creates a new reference to a file for a specific resource + CreateReference(ctx context.Context, in *CreateReferenceRequest, opts ...grpc.CallOption) (*CloudFileReference, error) + CreateReferenceBatch(ctx context.Context, in *CreateReferenceBatchRequest, opts ...grpc.CallOption) (*CreateReferenceBatchResponse, error) + // Gets all references to a file + GetReferences(ctx context.Context, in *GetReferencesRequest, opts ...grpc.CallOption) (*GetReferencesResponse, error) + // Gets the number of references to a file + GetReferenceCount(ctx context.Context, in *GetReferenceCountRequest, opts ...grpc.CallOption) (*GetReferenceCountResponse, error) + // Gets all references for a specific resource and optional usage + GetResourceReferences(ctx context.Context, in *GetResourceReferencesRequest, opts ...grpc.CallOption) (*GetReferencesResponse, error) + // Gets all files referenced by a resource with optional usage filter + GetResourceFiles(ctx context.Context, in *GetResourceFilesRequest, opts ...grpc.CallOption) (*GetResourceFilesResponse, error) + // Deletes references for a specific resource and optional usage + DeleteResourceReferences(ctx context.Context, in *DeleteResourceReferencesRequest, opts ...grpc.CallOption) (*DeleteResourceReferencesResponse, error) + // Deletes references for multiple specific resources and optional usage + DeleteResourceReferencesBatch(ctx context.Context, in *DeleteResourceReferencesBatchRequest, opts ...grpc.CallOption) (*DeleteResourceReferencesResponse, error) + // Deletes a specific file reference + DeleteReference(ctx context.Context, in *DeleteReferenceRequest, opts ...grpc.CallOption) (*DeleteReferenceResponse, error) + // Updates the files referenced by a resource + UpdateResourceFiles(ctx context.Context, in *UpdateResourceFilesRequest, opts ...grpc.CallOption) (*UpdateResourceFilesResponse, error) + // Updates the expiration time for a file reference + SetReferenceExpiration(ctx context.Context, in *SetReferenceExpirationRequest, opts ...grpc.CallOption) (*SetReferenceExpirationResponse, error) + // Updates the expiration time for all references to a file + SetFileReferencesExpiration(ctx context.Context, in *SetFileReferencesExpirationRequest, opts ...grpc.CallOption) (*SetFileReferencesExpirationResponse, error) + // Checks if a file has any references + HasFileReferences(ctx context.Context, in *HasFileReferencesRequest, opts ...grpc.CallOption) (*HasFileReferencesResponse, error) +} + +type fileReferenceServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewFileReferenceServiceClient(cc grpc.ClientConnInterface) FileReferenceServiceClient { + return &fileReferenceServiceClient{cc} +} + +func (c *fileReferenceServiceClient) CreateReference(ctx context.Context, in *CreateReferenceRequest, opts ...grpc.CallOption) (*CloudFileReference, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CloudFileReference) + err := c.cc.Invoke(ctx, FileReferenceService_CreateReference_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *fileReferenceServiceClient) CreateReferenceBatch(ctx context.Context, in *CreateReferenceBatchRequest, opts ...grpc.CallOption) (*CreateReferenceBatchResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreateReferenceBatchResponse) + err := c.cc.Invoke(ctx, FileReferenceService_CreateReferenceBatch_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *fileReferenceServiceClient) GetReferences(ctx context.Context, in *GetReferencesRequest, opts ...grpc.CallOption) (*GetReferencesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetReferencesResponse) + err := c.cc.Invoke(ctx, FileReferenceService_GetReferences_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *fileReferenceServiceClient) GetReferenceCount(ctx context.Context, in *GetReferenceCountRequest, opts ...grpc.CallOption) (*GetReferenceCountResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetReferenceCountResponse) + err := c.cc.Invoke(ctx, FileReferenceService_GetReferenceCount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *fileReferenceServiceClient) GetResourceReferences(ctx context.Context, in *GetResourceReferencesRequest, opts ...grpc.CallOption) (*GetReferencesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetReferencesResponse) + err := c.cc.Invoke(ctx, FileReferenceService_GetResourceReferences_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *fileReferenceServiceClient) GetResourceFiles(ctx context.Context, in *GetResourceFilesRequest, opts ...grpc.CallOption) (*GetResourceFilesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetResourceFilesResponse) + err := c.cc.Invoke(ctx, FileReferenceService_GetResourceFiles_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *fileReferenceServiceClient) DeleteResourceReferences(ctx context.Context, in *DeleteResourceReferencesRequest, opts ...grpc.CallOption) (*DeleteResourceReferencesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeleteResourceReferencesResponse) + err := c.cc.Invoke(ctx, FileReferenceService_DeleteResourceReferences_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *fileReferenceServiceClient) DeleteResourceReferencesBatch(ctx context.Context, in *DeleteResourceReferencesBatchRequest, opts ...grpc.CallOption) (*DeleteResourceReferencesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeleteResourceReferencesResponse) + err := c.cc.Invoke(ctx, FileReferenceService_DeleteResourceReferencesBatch_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *fileReferenceServiceClient) DeleteReference(ctx context.Context, in *DeleteReferenceRequest, opts ...grpc.CallOption) (*DeleteReferenceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeleteReferenceResponse) + err := c.cc.Invoke(ctx, FileReferenceService_DeleteReference_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *fileReferenceServiceClient) UpdateResourceFiles(ctx context.Context, in *UpdateResourceFilesRequest, opts ...grpc.CallOption) (*UpdateResourceFilesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UpdateResourceFilesResponse) + err := c.cc.Invoke(ctx, FileReferenceService_UpdateResourceFiles_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *fileReferenceServiceClient) SetReferenceExpiration(ctx context.Context, in *SetReferenceExpirationRequest, opts ...grpc.CallOption) (*SetReferenceExpirationResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetReferenceExpirationResponse) + err := c.cc.Invoke(ctx, FileReferenceService_SetReferenceExpiration_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *fileReferenceServiceClient) SetFileReferencesExpiration(ctx context.Context, in *SetFileReferencesExpirationRequest, opts ...grpc.CallOption) (*SetFileReferencesExpirationResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetFileReferencesExpirationResponse) + err := c.cc.Invoke(ctx, FileReferenceService_SetFileReferencesExpiration_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *fileReferenceServiceClient) HasFileReferences(ctx context.Context, in *HasFileReferencesRequest, opts ...grpc.CallOption) (*HasFileReferencesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(HasFileReferencesResponse) + err := c.cc.Invoke(ctx, FileReferenceService_HasFileReferences_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// FileReferenceServiceServer is the server API for FileReferenceService service. +// All implementations must embed UnimplementedFileReferenceServiceServer +// for forward compatibility. +// +// Service for managing file references +type FileReferenceServiceServer interface { + // Creates a new reference to a file for a specific resource + CreateReference(context.Context, *CreateReferenceRequest) (*CloudFileReference, error) + CreateReferenceBatch(context.Context, *CreateReferenceBatchRequest) (*CreateReferenceBatchResponse, error) + // Gets all references to a file + GetReferences(context.Context, *GetReferencesRequest) (*GetReferencesResponse, error) + // Gets the number of references to a file + GetReferenceCount(context.Context, *GetReferenceCountRequest) (*GetReferenceCountResponse, error) + // Gets all references for a specific resource and optional usage + GetResourceReferences(context.Context, *GetResourceReferencesRequest) (*GetReferencesResponse, error) + // Gets all files referenced by a resource with optional usage filter + GetResourceFiles(context.Context, *GetResourceFilesRequest) (*GetResourceFilesResponse, error) + // Deletes references for a specific resource and optional usage + DeleteResourceReferences(context.Context, *DeleteResourceReferencesRequest) (*DeleteResourceReferencesResponse, error) + // Deletes references for multiple specific resources and optional usage + DeleteResourceReferencesBatch(context.Context, *DeleteResourceReferencesBatchRequest) (*DeleteResourceReferencesResponse, error) + // Deletes a specific file reference + DeleteReference(context.Context, *DeleteReferenceRequest) (*DeleteReferenceResponse, error) + // Updates the files referenced by a resource + UpdateResourceFiles(context.Context, *UpdateResourceFilesRequest) (*UpdateResourceFilesResponse, error) + // Updates the expiration time for a file reference + SetReferenceExpiration(context.Context, *SetReferenceExpirationRequest) (*SetReferenceExpirationResponse, error) + // Updates the expiration time for all references to a file + SetFileReferencesExpiration(context.Context, *SetFileReferencesExpirationRequest) (*SetFileReferencesExpirationResponse, error) + // Checks if a file has any references + HasFileReferences(context.Context, *HasFileReferencesRequest) (*HasFileReferencesResponse, error) + mustEmbedUnimplementedFileReferenceServiceServer() +} + +// UnimplementedFileReferenceServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedFileReferenceServiceServer struct{} + +func (UnimplementedFileReferenceServiceServer) CreateReference(context.Context, *CreateReferenceRequest) (*CloudFileReference, error) { + return nil, status.Error(codes.Unimplemented, "method CreateReference not implemented") +} +func (UnimplementedFileReferenceServiceServer) CreateReferenceBatch(context.Context, *CreateReferenceBatchRequest) (*CreateReferenceBatchResponse, error) { + return nil, status.Error(codes.Unimplemented, "method CreateReferenceBatch not implemented") +} +func (UnimplementedFileReferenceServiceServer) GetReferences(context.Context, *GetReferencesRequest) (*GetReferencesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetReferences not implemented") +} +func (UnimplementedFileReferenceServiceServer) GetReferenceCount(context.Context, *GetReferenceCountRequest) (*GetReferenceCountResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetReferenceCount not implemented") +} +func (UnimplementedFileReferenceServiceServer) GetResourceReferences(context.Context, *GetResourceReferencesRequest) (*GetReferencesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetResourceReferences not implemented") +} +func (UnimplementedFileReferenceServiceServer) GetResourceFiles(context.Context, *GetResourceFilesRequest) (*GetResourceFilesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetResourceFiles not implemented") +} +func (UnimplementedFileReferenceServiceServer) DeleteResourceReferences(context.Context, *DeleteResourceReferencesRequest) (*DeleteResourceReferencesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method DeleteResourceReferences not implemented") +} +func (UnimplementedFileReferenceServiceServer) DeleteResourceReferencesBatch(context.Context, *DeleteResourceReferencesBatchRequest) (*DeleteResourceReferencesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method DeleteResourceReferencesBatch not implemented") +} +func (UnimplementedFileReferenceServiceServer) DeleteReference(context.Context, *DeleteReferenceRequest) (*DeleteReferenceResponse, error) { + return nil, status.Error(codes.Unimplemented, "method DeleteReference not implemented") +} +func (UnimplementedFileReferenceServiceServer) UpdateResourceFiles(context.Context, *UpdateResourceFilesRequest) (*UpdateResourceFilesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method UpdateResourceFiles not implemented") +} +func (UnimplementedFileReferenceServiceServer) SetReferenceExpiration(context.Context, *SetReferenceExpirationRequest) (*SetReferenceExpirationResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SetReferenceExpiration not implemented") +} +func (UnimplementedFileReferenceServiceServer) SetFileReferencesExpiration(context.Context, *SetFileReferencesExpirationRequest) (*SetFileReferencesExpirationResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SetFileReferencesExpiration not implemented") +} +func (UnimplementedFileReferenceServiceServer) HasFileReferences(context.Context, *HasFileReferencesRequest) (*HasFileReferencesResponse, error) { + return nil, status.Error(codes.Unimplemented, "method HasFileReferences not implemented") +} +func (UnimplementedFileReferenceServiceServer) mustEmbedUnimplementedFileReferenceServiceServer() {} +func (UnimplementedFileReferenceServiceServer) testEmbeddedByValue() {} + +// UnsafeFileReferenceServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to FileReferenceServiceServer will +// result in compilation errors. +type UnsafeFileReferenceServiceServer interface { + mustEmbedUnimplementedFileReferenceServiceServer() +} + +func RegisterFileReferenceServiceServer(s grpc.ServiceRegistrar, srv FileReferenceServiceServer) { + // If the following call panics, it indicates UnimplementedFileReferenceServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&FileReferenceService_ServiceDesc, srv) +} + +func _FileReferenceService_CreateReference_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateReferenceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FileReferenceServiceServer).CreateReference(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FileReferenceService_CreateReference_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FileReferenceServiceServer).CreateReference(ctx, req.(*CreateReferenceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FileReferenceService_CreateReferenceBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateReferenceBatchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FileReferenceServiceServer).CreateReferenceBatch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FileReferenceService_CreateReferenceBatch_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FileReferenceServiceServer).CreateReferenceBatch(ctx, req.(*CreateReferenceBatchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FileReferenceService_GetReferences_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetReferencesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FileReferenceServiceServer).GetReferences(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FileReferenceService_GetReferences_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FileReferenceServiceServer).GetReferences(ctx, req.(*GetReferencesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FileReferenceService_GetReferenceCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetReferenceCountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FileReferenceServiceServer).GetReferenceCount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FileReferenceService_GetReferenceCount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FileReferenceServiceServer).GetReferenceCount(ctx, req.(*GetReferenceCountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FileReferenceService_GetResourceReferences_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetResourceReferencesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FileReferenceServiceServer).GetResourceReferences(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FileReferenceService_GetResourceReferences_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FileReferenceServiceServer).GetResourceReferences(ctx, req.(*GetResourceReferencesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FileReferenceService_GetResourceFiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetResourceFilesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FileReferenceServiceServer).GetResourceFiles(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FileReferenceService_GetResourceFiles_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FileReferenceServiceServer).GetResourceFiles(ctx, req.(*GetResourceFilesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FileReferenceService_DeleteResourceReferences_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteResourceReferencesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FileReferenceServiceServer).DeleteResourceReferences(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FileReferenceService_DeleteResourceReferences_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FileReferenceServiceServer).DeleteResourceReferences(ctx, req.(*DeleteResourceReferencesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FileReferenceService_DeleteResourceReferencesBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteResourceReferencesBatchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FileReferenceServiceServer).DeleteResourceReferencesBatch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FileReferenceService_DeleteResourceReferencesBatch_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FileReferenceServiceServer).DeleteResourceReferencesBatch(ctx, req.(*DeleteResourceReferencesBatchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FileReferenceService_DeleteReference_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteReferenceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FileReferenceServiceServer).DeleteReference(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FileReferenceService_DeleteReference_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FileReferenceServiceServer).DeleteReference(ctx, req.(*DeleteReferenceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FileReferenceService_UpdateResourceFiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateResourceFilesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FileReferenceServiceServer).UpdateResourceFiles(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FileReferenceService_UpdateResourceFiles_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FileReferenceServiceServer).UpdateResourceFiles(ctx, req.(*UpdateResourceFilesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FileReferenceService_SetReferenceExpiration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetReferenceExpirationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FileReferenceServiceServer).SetReferenceExpiration(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FileReferenceService_SetReferenceExpiration_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FileReferenceServiceServer).SetReferenceExpiration(ctx, req.(*SetReferenceExpirationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FileReferenceService_SetFileReferencesExpiration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetFileReferencesExpirationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FileReferenceServiceServer).SetFileReferencesExpiration(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FileReferenceService_SetFileReferencesExpiration_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FileReferenceServiceServer).SetFileReferencesExpiration(ctx, req.(*SetFileReferencesExpirationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FileReferenceService_HasFileReferences_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HasFileReferencesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FileReferenceServiceServer).HasFileReferences(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: FileReferenceService_HasFileReferences_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FileReferenceServiceServer).HasFileReferences(ctx, req.(*HasFileReferencesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// FileReferenceService_ServiceDesc is the grpc.ServiceDesc for FileReferenceService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var FileReferenceService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "proto.FileReferenceService", + HandlerType: (*FileReferenceServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateReference", + Handler: _FileReferenceService_CreateReference_Handler, + }, + { + MethodName: "CreateReferenceBatch", + Handler: _FileReferenceService_CreateReferenceBatch_Handler, + }, + { + MethodName: "GetReferences", + Handler: _FileReferenceService_GetReferences_Handler, + }, + { + MethodName: "GetReferenceCount", + Handler: _FileReferenceService_GetReferenceCount_Handler, + }, + { + MethodName: "GetResourceReferences", + Handler: _FileReferenceService_GetResourceReferences_Handler, + }, + { + MethodName: "GetResourceFiles", + Handler: _FileReferenceService_GetResourceFiles_Handler, + }, + { + MethodName: "DeleteResourceReferences", + Handler: _FileReferenceService_DeleteResourceReferences_Handler, + }, + { + MethodName: "DeleteResourceReferencesBatch", + Handler: _FileReferenceService_DeleteResourceReferencesBatch_Handler, + }, + { + MethodName: "DeleteReference", + Handler: _FileReferenceService_DeleteReference_Handler, + }, + { + MethodName: "UpdateResourceFiles", + Handler: _FileReferenceService_UpdateResourceFiles_Handler, + }, + { + MethodName: "SetReferenceExpiration", + Handler: _FileReferenceService_SetReferenceExpiration_Handler, + }, + { + MethodName: "SetFileReferencesExpiration", + Handler: _FileReferenceService_SetFileReferencesExpiration_Handler, + }, + { + MethodName: "HasFileReferences", + Handler: _FileReferenceService_HasFileReferences_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "file.proto", +} diff --git a/pkg/shared/proto/gen/leveling.pb.go b/pkg/shared/proto/gen/leveling.pb.go new file mode 100644 index 0000000..ee03d37 --- /dev/null +++ b/pkg/shared/proto/gen/leveling.pb.go @@ -0,0 +1,573 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.10 +// protoc v6.33.1 +// source: leveling.proto + +package gen + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// SocialCreditRecord represents a record of social credit changes for an account +type SocialCreditRecord struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // UUID string + ReasonType string `protobuf:"bytes,2,opt,name=reason_type,json=reasonType,proto3" json:"reason_type,omitempty"` + Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"` + Delta float64 `protobuf:"fixed64,4,opt,name=delta,proto3" json:"delta,omitempty"` + AccountId string `protobuf:"bytes,5,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // UUID string + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SocialCreditRecord) Reset() { + *x = SocialCreditRecord{} + mi := &file_leveling_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SocialCreditRecord) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SocialCreditRecord) ProtoMessage() {} + +func (x *SocialCreditRecord) ProtoReflect() protoreflect.Message { + mi := &file_leveling_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SocialCreditRecord.ProtoReflect.Descriptor instead. +func (*SocialCreditRecord) Descriptor() ([]byte, []int) { + return file_leveling_proto_rawDescGZIP(), []int{0} +} + +func (x *SocialCreditRecord) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *SocialCreditRecord) GetReasonType() string { + if x != nil { + return x.ReasonType + } + return "" +} + +func (x *SocialCreditRecord) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +func (x *SocialCreditRecord) GetDelta() float64 { + if x != nil { + return x.Delta + } + return 0 +} + +func (x *SocialCreditRecord) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *SocialCreditRecord) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *SocialCreditRecord) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +// ExperienceRecord represents a record of experience points gained by an account +type ExperienceRecord struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // UUID string + ReasonType string `protobuf:"bytes,2,opt,name=reason_type,json=reasonType,proto3" json:"reason_type,omitempty"` + Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"` + Delta int64 `protobuf:"varint,4,opt,name=delta,proto3" json:"delta,omitempty"` + BonusMultiplier float64 `protobuf:"fixed64,5,opt,name=bonus_multiplier,json=bonusMultiplier,proto3" json:"bonus_multiplier,omitempty"` + AccountId string `protobuf:"bytes,6,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // UUID string + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ExperienceRecord) Reset() { + *x = ExperienceRecord{} + mi := &file_leveling_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ExperienceRecord) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExperienceRecord) ProtoMessage() {} + +func (x *ExperienceRecord) ProtoReflect() protoreflect.Message { + mi := &file_leveling_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExperienceRecord.ProtoReflect.Descriptor instead. +func (*ExperienceRecord) Descriptor() ([]byte, []int) { + return file_leveling_proto_rawDescGZIP(), []int{1} +} + +func (x *ExperienceRecord) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ExperienceRecord) GetReasonType() string { + if x != nil { + return x.ReasonType + } + return "" +} + +func (x *ExperienceRecord) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +func (x *ExperienceRecord) GetDelta() int64 { + if x != nil { + return x.Delta + } + return 0 +} + +func (x *ExperienceRecord) GetBonusMultiplier() float64 { + if x != nil { + return x.BonusMultiplier + } + return 0 +} + +func (x *ExperienceRecord) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *ExperienceRecord) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *ExperienceRecord) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +// Social Credit Requests/Responses +type AddSocialCreditRecordRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ReasonType string `protobuf:"bytes,1,opt,name=reason_type,json=reasonType,proto3" json:"reason_type,omitempty"` + Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` + Delta float64 `protobuf:"fixed64,3,opt,name=delta,proto3" json:"delta,omitempty"` + AccountId string `protobuf:"bytes,4,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // UUID string + ExpiredAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddSocialCreditRecordRequest) Reset() { + *x = AddSocialCreditRecordRequest{} + mi := &file_leveling_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddSocialCreditRecordRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddSocialCreditRecordRequest) ProtoMessage() {} + +func (x *AddSocialCreditRecordRequest) ProtoReflect() protoreflect.Message { + mi := &file_leveling_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddSocialCreditRecordRequest.ProtoReflect.Descriptor instead. +func (*AddSocialCreditRecordRequest) Descriptor() ([]byte, []int) { + return file_leveling_proto_rawDescGZIP(), []int{2} +} + +func (x *AddSocialCreditRecordRequest) GetReasonType() string { + if x != nil { + return x.ReasonType + } + return "" +} + +func (x *AddSocialCreditRecordRequest) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +func (x *AddSocialCreditRecordRequest) GetDelta() float64 { + if x != nil { + return x.Delta + } + return 0 +} + +func (x *AddSocialCreditRecordRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *AddSocialCreditRecordRequest) GetExpiredAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiredAt + } + return nil +} + +type GetSocialCreditRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // UUID string + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSocialCreditRequest) Reset() { + *x = GetSocialCreditRequest{} + mi := &file_leveling_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSocialCreditRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSocialCreditRequest) ProtoMessage() {} + +func (x *GetSocialCreditRequest) ProtoReflect() protoreflect.Message { + mi := &file_leveling_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSocialCreditRequest.ProtoReflect.Descriptor instead. +func (*GetSocialCreditRequest) Descriptor() ([]byte, []int) { + return file_leveling_proto_rawDescGZIP(), []int{3} +} + +func (x *GetSocialCreditRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +type SocialCreditResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Amount float64 `protobuf:"fixed64,1,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SocialCreditResponse) Reset() { + *x = SocialCreditResponse{} + mi := &file_leveling_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SocialCreditResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SocialCreditResponse) ProtoMessage() {} + +func (x *SocialCreditResponse) ProtoReflect() protoreflect.Message { + mi := &file_leveling_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SocialCreditResponse.ProtoReflect.Descriptor instead. +func (*SocialCreditResponse) Descriptor() ([]byte, []int) { + return file_leveling_proto_rawDescGZIP(), []int{4} +} + +func (x *SocialCreditResponse) GetAmount() float64 { + if x != nil { + return x.Amount + } + return 0 +} + +// Experience Requests/Responses +type AddExperienceRecordRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ReasonType string `protobuf:"bytes,1,opt,name=reason_type,json=reasonType,proto3" json:"reason_type,omitempty"` + Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` + Delta int64 `protobuf:"varint,3,opt,name=delta,proto3" json:"delta,omitempty"` + AccountId string `protobuf:"bytes,4,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // UUID string + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddExperienceRecordRequest) Reset() { + *x = AddExperienceRecordRequest{} + mi := &file_leveling_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddExperienceRecordRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddExperienceRecordRequest) ProtoMessage() {} + +func (x *AddExperienceRecordRequest) ProtoReflect() protoreflect.Message { + mi := &file_leveling_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddExperienceRecordRequest.ProtoReflect.Descriptor instead. +func (*AddExperienceRecordRequest) Descriptor() ([]byte, []int) { + return file_leveling_proto_rawDescGZIP(), []int{5} +} + +func (x *AddExperienceRecordRequest) GetReasonType() string { + if x != nil { + return x.ReasonType + } + return "" +} + +func (x *AddExperienceRecordRequest) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +func (x *AddExperienceRecordRequest) GetDelta() int64 { + if x != nil { + return x.Delta + } + return 0 +} + +func (x *AddExperienceRecordRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +var File_leveling_proto protoreflect.FileDescriptor + +const file_leveling_proto_rawDesc = "" + + "\n" + + "\x0eleveling.proto\x12\x05proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x88\x02\n" + + "\x12SocialCreditRecord\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n" + + "\vreason_type\x18\x02 \x01(\tR\n" + + "reasonType\x12\x16\n" + + "\x06reason\x18\x03 \x01(\tR\x06reason\x12\x14\n" + + "\x05delta\x18\x04 \x01(\x01R\x05delta\x12\x1d\n" + + "\n" + + "account_id\x18\x05 \x01(\tR\taccountId\x129\n" + + "\n" + + "created_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"\xb1\x02\n" + + "\x10ExperienceRecord\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n" + + "\vreason_type\x18\x02 \x01(\tR\n" + + "reasonType\x12\x16\n" + + "\x06reason\x18\x03 \x01(\tR\x06reason\x12\x14\n" + + "\x05delta\x18\x04 \x01(\x03R\x05delta\x12)\n" + + "\x10bonus_multiplier\x18\x05 \x01(\x01R\x0fbonusMultiplier\x12\x1d\n" + + "\n" + + "account_id\x18\x06 \x01(\tR\taccountId\x129\n" + + "\n" + + "created_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"\xc7\x01\n" + + "\x1cAddSocialCreditRecordRequest\x12\x1f\n" + + "\vreason_type\x18\x01 \x01(\tR\n" + + "reasonType\x12\x16\n" + + "\x06reason\x18\x02 \x01(\tR\x06reason\x12\x14\n" + + "\x05delta\x18\x03 \x01(\x01R\x05delta\x12\x1d\n" + + "\n" + + "account_id\x18\x04 \x01(\tR\taccountId\x129\n" + + "\n" + + "expired_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\texpiredAt\"7\n" + + "\x16GetSocialCreditRequest\x12\x1d\n" + + "\n" + + "account_id\x18\x01 \x01(\tR\taccountId\".\n" + + "\x14SocialCreditResponse\x12\x16\n" + + "\x06amount\x18\x01 \x01(\x01R\x06amount\"\x8a\x01\n" + + "\x1aAddExperienceRecordRequest\x12\x1f\n" + + "\vreason_type\x18\x01 \x01(\tR\n" + + "reasonType\x12\x16\n" + + "\x06reason\x18\x02 \x01(\tR\x06reason\x12\x14\n" + + "\x05delta\x18\x03 \x01(\x03R\x05delta\x12\x1d\n" + + "\n" + + "account_id\x18\x04 \x01(\tR\taccountId2\xb1\x01\n" + + "\x13SocialCreditService\x12K\n" + + "\tAddRecord\x12#.proto.AddSocialCreditRecordRequest\x1a\x19.proto.SocialCreditRecord\x12M\n" + + "\x0fGetSocialCredit\x12\x1d.proto.GetSocialCreditRequest\x1a\x1b.proto.SocialCreditResponse2\\\n" + + "\x11ExperienceService\x12G\n" + + "\tAddRecord\x12!.proto.AddExperienceRecordRequest\x1a\x17.proto.ExperienceRecordBUZ7git.solsynth.dev/goatworks/turbine/pkg/shared/proto/gen\xaa\x02\x19DysonNetwork.Shared.Protob\x06proto3" + +var ( + file_leveling_proto_rawDescOnce sync.Once + file_leveling_proto_rawDescData []byte +) + +func file_leveling_proto_rawDescGZIP() []byte { + file_leveling_proto_rawDescOnce.Do(func() { + file_leveling_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_leveling_proto_rawDesc), len(file_leveling_proto_rawDesc))) + }) + return file_leveling_proto_rawDescData +} + +var file_leveling_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_leveling_proto_goTypes = []any{ + (*SocialCreditRecord)(nil), // 0: proto.SocialCreditRecord + (*ExperienceRecord)(nil), // 1: proto.ExperienceRecord + (*AddSocialCreditRecordRequest)(nil), // 2: proto.AddSocialCreditRecordRequest + (*GetSocialCreditRequest)(nil), // 3: proto.GetSocialCreditRequest + (*SocialCreditResponse)(nil), // 4: proto.SocialCreditResponse + (*AddExperienceRecordRequest)(nil), // 5: proto.AddExperienceRecordRequest + (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp +} +var file_leveling_proto_depIdxs = []int32{ + 6, // 0: proto.SocialCreditRecord.created_at:type_name -> google.protobuf.Timestamp + 6, // 1: proto.SocialCreditRecord.updated_at:type_name -> google.protobuf.Timestamp + 6, // 2: proto.ExperienceRecord.created_at:type_name -> google.protobuf.Timestamp + 6, // 3: proto.ExperienceRecord.updated_at:type_name -> google.protobuf.Timestamp + 6, // 4: proto.AddSocialCreditRecordRequest.expired_at:type_name -> google.protobuf.Timestamp + 2, // 5: proto.SocialCreditService.AddRecord:input_type -> proto.AddSocialCreditRecordRequest + 3, // 6: proto.SocialCreditService.GetSocialCredit:input_type -> proto.GetSocialCreditRequest + 5, // 7: proto.ExperienceService.AddRecord:input_type -> proto.AddExperienceRecordRequest + 0, // 8: proto.SocialCreditService.AddRecord:output_type -> proto.SocialCreditRecord + 4, // 9: proto.SocialCreditService.GetSocialCredit:output_type -> proto.SocialCreditResponse + 1, // 10: proto.ExperienceService.AddRecord:output_type -> proto.ExperienceRecord + 8, // [8:11] is the sub-list for method output_type + 5, // [5:8] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_leveling_proto_init() } +func file_leveling_proto_init() { + if File_leveling_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_leveling_proto_rawDesc), len(file_leveling_proto_rawDesc)), + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_leveling_proto_goTypes, + DependencyIndexes: file_leveling_proto_depIdxs, + MessageInfos: file_leveling_proto_msgTypes, + }.Build() + File_leveling_proto = out.File + file_leveling_proto_goTypes = nil + file_leveling_proto_depIdxs = nil +} diff --git a/pkg/shared/proto/gen/leveling_grpc.pb.go b/pkg/shared/proto/gen/leveling_grpc.pb.go new file mode 100644 index 0000000..e29c1c7 --- /dev/null +++ b/pkg/shared/proto/gen/leveling_grpc.pb.go @@ -0,0 +1,275 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.0 +// - protoc v6.33.1 +// source: leveling.proto + +package gen + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + SocialCreditService_AddRecord_FullMethodName = "/proto.SocialCreditService/AddRecord" + SocialCreditService_GetSocialCredit_FullMethodName = "/proto.SocialCreditService/GetSocialCredit" +) + +// SocialCreditServiceClient is the client API for SocialCreditService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// SocialCreditService provides operations for managing social credit scores +type SocialCreditServiceClient interface { + // Adds a new social credit record for an account + AddRecord(ctx context.Context, in *AddSocialCreditRecordRequest, opts ...grpc.CallOption) (*SocialCreditRecord, error) + // Gets the current social credit score for an account + GetSocialCredit(ctx context.Context, in *GetSocialCreditRequest, opts ...grpc.CallOption) (*SocialCreditResponse, error) +} + +type socialCreditServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewSocialCreditServiceClient(cc grpc.ClientConnInterface) SocialCreditServiceClient { + return &socialCreditServiceClient{cc} +} + +func (c *socialCreditServiceClient) AddRecord(ctx context.Context, in *AddSocialCreditRecordRequest, opts ...grpc.CallOption) (*SocialCreditRecord, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SocialCreditRecord) + err := c.cc.Invoke(ctx, SocialCreditService_AddRecord_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *socialCreditServiceClient) GetSocialCredit(ctx context.Context, in *GetSocialCreditRequest, opts ...grpc.CallOption) (*SocialCreditResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SocialCreditResponse) + err := c.cc.Invoke(ctx, SocialCreditService_GetSocialCredit_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SocialCreditServiceServer is the server API for SocialCreditService service. +// All implementations must embed UnimplementedSocialCreditServiceServer +// for forward compatibility. +// +// SocialCreditService provides operations for managing social credit scores +type SocialCreditServiceServer interface { + // Adds a new social credit record for an account + AddRecord(context.Context, *AddSocialCreditRecordRequest) (*SocialCreditRecord, error) + // Gets the current social credit score for an account + GetSocialCredit(context.Context, *GetSocialCreditRequest) (*SocialCreditResponse, error) + mustEmbedUnimplementedSocialCreditServiceServer() +} + +// UnimplementedSocialCreditServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedSocialCreditServiceServer struct{} + +func (UnimplementedSocialCreditServiceServer) AddRecord(context.Context, *AddSocialCreditRecordRequest) (*SocialCreditRecord, error) { + return nil, status.Error(codes.Unimplemented, "method AddRecord not implemented") +} +func (UnimplementedSocialCreditServiceServer) GetSocialCredit(context.Context, *GetSocialCreditRequest) (*SocialCreditResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetSocialCredit not implemented") +} +func (UnimplementedSocialCreditServiceServer) mustEmbedUnimplementedSocialCreditServiceServer() {} +func (UnimplementedSocialCreditServiceServer) testEmbeddedByValue() {} + +// UnsafeSocialCreditServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SocialCreditServiceServer will +// result in compilation errors. +type UnsafeSocialCreditServiceServer interface { + mustEmbedUnimplementedSocialCreditServiceServer() +} + +func RegisterSocialCreditServiceServer(s grpc.ServiceRegistrar, srv SocialCreditServiceServer) { + // If the following call panics, it indicates UnimplementedSocialCreditServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&SocialCreditService_ServiceDesc, srv) +} + +func _SocialCreditService_AddRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddSocialCreditRecordRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SocialCreditServiceServer).AddRecord(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SocialCreditService_AddRecord_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SocialCreditServiceServer).AddRecord(ctx, req.(*AddSocialCreditRecordRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SocialCreditService_GetSocialCredit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSocialCreditRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SocialCreditServiceServer).GetSocialCredit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SocialCreditService_GetSocialCredit_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SocialCreditServiceServer).GetSocialCredit(ctx, req.(*GetSocialCreditRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// SocialCreditService_ServiceDesc is the grpc.ServiceDesc for SocialCreditService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var SocialCreditService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "proto.SocialCreditService", + HandlerType: (*SocialCreditServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "AddRecord", + Handler: _SocialCreditService_AddRecord_Handler, + }, + { + MethodName: "GetSocialCredit", + Handler: _SocialCreditService_GetSocialCredit_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "leveling.proto", +} + +const ( + ExperienceService_AddRecord_FullMethodName = "/proto.ExperienceService/AddRecord" +) + +// ExperienceServiceClient is the client API for ExperienceService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// ExperienceService provides operations for managing experience points +type ExperienceServiceClient interface { + // Adds a new experience record for an account + AddRecord(ctx context.Context, in *AddExperienceRecordRequest, opts ...grpc.CallOption) (*ExperienceRecord, error) +} + +type experienceServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewExperienceServiceClient(cc grpc.ClientConnInterface) ExperienceServiceClient { + return &experienceServiceClient{cc} +} + +func (c *experienceServiceClient) AddRecord(ctx context.Context, in *AddExperienceRecordRequest, opts ...grpc.CallOption) (*ExperienceRecord, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ExperienceRecord) + err := c.cc.Invoke(ctx, ExperienceService_AddRecord_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ExperienceServiceServer is the server API for ExperienceService service. +// All implementations must embed UnimplementedExperienceServiceServer +// for forward compatibility. +// +// ExperienceService provides operations for managing experience points +type ExperienceServiceServer interface { + // Adds a new experience record for an account + AddRecord(context.Context, *AddExperienceRecordRequest) (*ExperienceRecord, error) + mustEmbedUnimplementedExperienceServiceServer() +} + +// UnimplementedExperienceServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedExperienceServiceServer struct{} + +func (UnimplementedExperienceServiceServer) AddRecord(context.Context, *AddExperienceRecordRequest) (*ExperienceRecord, error) { + return nil, status.Error(codes.Unimplemented, "method AddRecord not implemented") +} +func (UnimplementedExperienceServiceServer) mustEmbedUnimplementedExperienceServiceServer() {} +func (UnimplementedExperienceServiceServer) testEmbeddedByValue() {} + +// UnsafeExperienceServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ExperienceServiceServer will +// result in compilation errors. +type UnsafeExperienceServiceServer interface { + mustEmbedUnimplementedExperienceServiceServer() +} + +func RegisterExperienceServiceServer(s grpc.ServiceRegistrar, srv ExperienceServiceServer) { + // If the following call panics, it indicates UnimplementedExperienceServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&ExperienceService_ServiceDesc, srv) +} + +func _ExperienceService_AddRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddExperienceRecordRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExperienceServiceServer).AddRecord(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ExperienceService_AddRecord_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExperienceServiceServer).AddRecord(ctx, req.(*AddExperienceRecordRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ExperienceService_ServiceDesc is the grpc.ServiceDesc for ExperienceService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ExperienceService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "proto.ExperienceService", + HandlerType: (*ExperienceServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "AddRecord", + Handler: _ExperienceService_AddRecord_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "leveling.proto", +} diff --git a/pkg/shared/proto/gen/post.pb.go b/pkg/shared/proto/gen/post.pb.go new file mode 100644 index 0000000..900701c --- /dev/null +++ b/pkg/shared/proto/gen/post.pb.go @@ -0,0 +1,2409 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.10 +// protoc v6.33.1 +// source: post.proto + +package gen + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Enums +type PostType int32 + +const ( + PostType_POST_TYPE_UNSPECIFIED PostType = 0 + PostType_MOMENT PostType = 1 + PostType_ARTICLE PostType = 2 +) + +// Enum value maps for PostType. +var ( + PostType_name = map[int32]string{ + 0: "POST_TYPE_UNSPECIFIED", + 1: "MOMENT", + 2: "ARTICLE", + } + PostType_value = map[string]int32{ + "POST_TYPE_UNSPECIFIED": 0, + "MOMENT": 1, + "ARTICLE": 2, + } +) + +func (x PostType) Enum() *PostType { + p := new(PostType) + *p = x + return p +} + +func (x PostType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PostType) Descriptor() protoreflect.EnumDescriptor { + return file_post_proto_enumTypes[0].Descriptor() +} + +func (PostType) Type() protoreflect.EnumType { + return &file_post_proto_enumTypes[0] +} + +func (x PostType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PostType.Descriptor instead. +func (PostType) EnumDescriptor() ([]byte, []int) { + return file_post_proto_rawDescGZIP(), []int{0} +} + +type PostVisibility int32 + +const ( + PostVisibility_VISIBILITY_UNSPECIFIED PostVisibility = 0 + PostVisibility_PUBLIC PostVisibility = 1 + PostVisibility_FRIENDS PostVisibility = 2 + PostVisibility_UNLISTED PostVisibility = 3 + PostVisibility_PRIVATE PostVisibility = 4 +) + +// Enum value maps for PostVisibility. +var ( + PostVisibility_name = map[int32]string{ + 0: "VISIBILITY_UNSPECIFIED", + 1: "PUBLIC", + 2: "FRIENDS", + 3: "UNLISTED", + 4: "PRIVATE", + } + PostVisibility_value = map[string]int32{ + "VISIBILITY_UNSPECIFIED": 0, + "PUBLIC": 1, + "FRIENDS": 2, + "UNLISTED": 3, + "PRIVATE": 4, + } +) + +func (x PostVisibility) Enum() *PostVisibility { + p := new(PostVisibility) + *p = x + return p +} + +func (x PostVisibility) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PostVisibility) Descriptor() protoreflect.EnumDescriptor { + return file_post_proto_enumTypes[1].Descriptor() +} + +func (PostVisibility) Type() protoreflect.EnumType { + return &file_post_proto_enumTypes[1] +} + +func (x PostVisibility) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PostVisibility.Descriptor instead. +func (PostVisibility) EnumDescriptor() ([]byte, []int) { + return file_post_proto_rawDescGZIP(), []int{1} +} + +type PostPinMode int32 + +const ( + PostPinMode_PIN_MODE_UNSPECIFIED PostPinMode = 0 + PostPinMode_PUBLISHER_PAGE PostPinMode = 1 + PostPinMode_REALM_PAGE PostPinMode = 2 + PostPinMode_REPLY_PAGE PostPinMode = 3 +) + +// Enum value maps for PostPinMode. +var ( + PostPinMode_name = map[int32]string{ + 0: "PIN_MODE_UNSPECIFIED", + 1: "PUBLISHER_PAGE", + 2: "REALM_PAGE", + 3: "REPLY_PAGE", + } + PostPinMode_value = map[string]int32{ + "PIN_MODE_UNSPECIFIED": 0, + "PUBLISHER_PAGE": 1, + "REALM_PAGE": 2, + "REPLY_PAGE": 3, + } +) + +func (x PostPinMode) Enum() *PostPinMode { + p := new(PostPinMode) + *p = x + return p +} + +func (x PostPinMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PostPinMode) Descriptor() protoreflect.EnumDescriptor { + return file_post_proto_enumTypes[2].Descriptor() +} + +func (PostPinMode) Type() protoreflect.EnumType { + return &file_post_proto_enumTypes[2] +} + +func (x PostPinMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PostPinMode.Descriptor instead. +func (PostPinMode) EnumDescriptor() ([]byte, []int) { + return file_post_proto_rawDescGZIP(), []int{2} +} + +type ContentSensitiveMark int32 + +const ( + ContentSensitiveMark_SENSITIVE_MARK_UNSPECIFIED ContentSensitiveMark = 0 + ContentSensitiveMark_LANGUAGE ContentSensitiveMark = 1 + ContentSensitiveMark_SEXUAL_CONTENT ContentSensitiveMark = 2 + ContentSensitiveMark_VIOLENCE ContentSensitiveMark = 3 + ContentSensitiveMark_PROFANITY ContentSensitiveMark = 4 + ContentSensitiveMark_HATE_SPEECH ContentSensitiveMark = 5 + ContentSensitiveMark_RACISM ContentSensitiveMark = 6 + ContentSensitiveMark_ADULT_CONTENT ContentSensitiveMark = 7 + ContentSensitiveMark_DRUG_ABUSE ContentSensitiveMark = 8 + ContentSensitiveMark_ALCOHOL_ABUSE ContentSensitiveMark = 9 + ContentSensitiveMark_GAMBLING ContentSensitiveMark = 10 + ContentSensitiveMark_SELF_HARM ContentSensitiveMark = 11 + ContentSensitiveMark_CHILD_ABUSE ContentSensitiveMark = 12 + ContentSensitiveMark_OTHER ContentSensitiveMark = 13 +) + +// Enum value maps for ContentSensitiveMark. +var ( + ContentSensitiveMark_name = map[int32]string{ + 0: "SENSITIVE_MARK_UNSPECIFIED", + 1: "LANGUAGE", + 2: "SEXUAL_CONTENT", + 3: "VIOLENCE", + 4: "PROFANITY", + 5: "HATE_SPEECH", + 6: "RACISM", + 7: "ADULT_CONTENT", + 8: "DRUG_ABUSE", + 9: "ALCOHOL_ABUSE", + 10: "GAMBLING", + 11: "SELF_HARM", + 12: "CHILD_ABUSE", + 13: "OTHER", + } + ContentSensitiveMark_value = map[string]int32{ + "SENSITIVE_MARK_UNSPECIFIED": 0, + "LANGUAGE": 1, + "SEXUAL_CONTENT": 2, + "VIOLENCE": 3, + "PROFANITY": 4, + "HATE_SPEECH": 5, + "RACISM": 6, + "ADULT_CONTENT": 7, + "DRUG_ABUSE": 8, + "ALCOHOL_ABUSE": 9, + "GAMBLING": 10, + "SELF_HARM": 11, + "CHILD_ABUSE": 12, + "OTHER": 13, + } +) + +func (x ContentSensitiveMark) Enum() *ContentSensitiveMark { + p := new(ContentSensitiveMark) + *p = x + return p +} + +func (x ContentSensitiveMark) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ContentSensitiveMark) Descriptor() protoreflect.EnumDescriptor { + return file_post_proto_enumTypes[3].Descriptor() +} + +func (ContentSensitiveMark) Type() protoreflect.EnumType { + return &file_post_proto_enumTypes[3] +} + +func (x ContentSensitiveMark) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ContentSensitiveMark.Descriptor instead. +func (ContentSensitiveMark) EnumDescriptor() ([]byte, []int) { + return file_post_proto_rawDescGZIP(), []int{3} +} + +type PostReactionAttitude int32 + +const ( + PostReactionAttitude_ATTITUDE_UNSPECIFIED PostReactionAttitude = 0 + PostReactionAttitude_POST_ATTITUDE_POSITIVE PostReactionAttitude = 1 + PostReactionAttitude_POST_ATTITUDE_NEUTRAL PostReactionAttitude = 2 + PostReactionAttitude_POST_ATTITUDE_NEGATIVE PostReactionAttitude = 3 +) + +// Enum value maps for PostReactionAttitude. +var ( + PostReactionAttitude_name = map[int32]string{ + 0: "ATTITUDE_UNSPECIFIED", + 1: "POST_ATTITUDE_POSITIVE", + 2: "POST_ATTITUDE_NEUTRAL", + 3: "POST_ATTITUDE_NEGATIVE", + } + PostReactionAttitude_value = map[string]int32{ + "ATTITUDE_UNSPECIFIED": 0, + "POST_ATTITUDE_POSITIVE": 1, + "POST_ATTITUDE_NEUTRAL": 2, + "POST_ATTITUDE_NEGATIVE": 3, + } +) + +func (x PostReactionAttitude) Enum() *PostReactionAttitude { + p := new(PostReactionAttitude) + *p = x + return p +} + +func (x PostReactionAttitude) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PostReactionAttitude) Descriptor() protoreflect.EnumDescriptor { + return file_post_proto_enumTypes[4].Descriptor() +} + +func (PostReactionAttitude) Type() protoreflect.EnumType { + return &file_post_proto_enumTypes[4] +} + +func (x PostReactionAttitude) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PostReactionAttitude.Descriptor instead. +func (PostReactionAttitude) EnumDescriptor() ([]byte, []int) { + return file_post_proto_rawDescGZIP(), []int{4} +} + +type PostEmbedViewRenderer int32 + +const ( + PostEmbedViewRenderer_RENDERER_UNSPECIFIED PostEmbedViewRenderer = 0 + PostEmbedViewRenderer_WEBVIEW PostEmbedViewRenderer = 1 +) + +// Enum value maps for PostEmbedViewRenderer. +var ( + PostEmbedViewRenderer_name = map[int32]string{ + 0: "RENDERER_UNSPECIFIED", + 1: "WEBVIEW", + } + PostEmbedViewRenderer_value = map[string]int32{ + "RENDERER_UNSPECIFIED": 0, + "WEBVIEW": 1, + } +) + +func (x PostEmbedViewRenderer) Enum() *PostEmbedViewRenderer { + p := new(PostEmbedViewRenderer) + *p = x + return p +} + +func (x PostEmbedViewRenderer) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PostEmbedViewRenderer) Descriptor() protoreflect.EnumDescriptor { + return file_post_proto_enumTypes[5].Descriptor() +} + +func (PostEmbedViewRenderer) Type() protoreflect.EnumType { + return &file_post_proto_enumTypes[5] +} + +func (x PostEmbedViewRenderer) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PostEmbedViewRenderer.Descriptor instead. +func (PostEmbedViewRenderer) EnumDescriptor() ([]byte, []int) { + return file_post_proto_rawDescGZIP(), []int{5} +} + +type PostEmbedView struct { + state protoimpl.MessageState `protogen:"open.v1"` + Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` + AspectRatio *float64 `protobuf:"fixed64,2,opt,name=aspect_ratio,json=aspectRatio,proto3,oneof" json:"aspect_ratio,omitempty"` + Renderer PostEmbedViewRenderer `protobuf:"varint,3,opt,name=renderer,proto3,enum=proto.PostEmbedViewRenderer" json:"renderer,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PostEmbedView) Reset() { + *x = PostEmbedView{} + mi := &file_post_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PostEmbedView) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostEmbedView) ProtoMessage() {} + +func (x *PostEmbedView) ProtoReflect() protoreflect.Message { + mi := &file_post_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostEmbedView.ProtoReflect.Descriptor instead. +func (*PostEmbedView) Descriptor() ([]byte, []int) { + return file_post_proto_rawDescGZIP(), []int{0} +} + +func (x *PostEmbedView) GetUri() string { + if x != nil { + return x.Uri + } + return "" +} + +func (x *PostEmbedView) GetAspectRatio() float64 { + if x != nil && x.AspectRatio != nil { + return *x.AspectRatio + } + return 0 +} + +func (x *PostEmbedView) GetRenderer() PostEmbedViewRenderer { + if x != nil { + return x.Renderer + } + return PostEmbedViewRenderer_RENDERER_UNSPECIFIED +} + +type Post struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Slug string `protobuf:"bytes,4,opt,name=slug,proto3" json:"slug,omitempty"` + EditedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=edited_at,json=editedAt,proto3,oneof" json:"edited_at,omitempty"` + PublishedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=published_at,json=publishedAt,proto3,oneof" json:"published_at,omitempty"` + Visibility PostVisibility `protobuf:"varint,7,opt,name=visibility,proto3,enum=proto.PostVisibility" json:"visibility,omitempty"` + Content *string `protobuf:"bytes,8,opt,name=content,proto3,oneof" json:"content,omitempty"` + Type PostType `protobuf:"varint,9,opt,name=type,proto3,enum=proto.PostType" json:"type,omitempty"` + PinMode *PostPinMode `protobuf:"varint,10,opt,name=pin_mode,json=pinMode,proto3,enum=proto.PostPinMode,oneof" json:"pin_mode,omitempty"` + Meta []byte `protobuf:"bytes,11,opt,name=meta,proto3,oneof" json:"meta,omitempty"` // Dictionary + SensitiveMarks []byte `protobuf:"bytes,12,opt,name=sensitive_marks,json=sensitiveMarks,proto3,oneof" json:"sensitive_marks,omitempty"` // List + EmbedView *PostEmbedView `protobuf:"bytes,13,opt,name=embed_view,json=embedView,proto3,oneof" json:"embed_view,omitempty"` + ViewsUnique int32 `protobuf:"varint,14,opt,name=views_unique,json=viewsUnique,proto3" json:"views_unique,omitempty"` + ViewsTotal int32 `protobuf:"varint,15,opt,name=views_total,json=viewsTotal,proto3" json:"views_total,omitempty"` + Upvotes int32 `protobuf:"varint,16,opt,name=upvotes,proto3" json:"upvotes,omitempty"` + Downvotes int32 `protobuf:"varint,17,opt,name=downvotes,proto3" json:"downvotes,omitempty"` + AwardedScore float64 `protobuf:"fixed64,18,opt,name=awarded_score,json=awardedScore,proto3" json:"awarded_score,omitempty"` + // Not mapped fields: handled client-side + ReactionsCount map[string]int32 `protobuf:"bytes,19,rep,name=reactions_count,json=reactionsCount,proto3" json:"reactions_count,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` // Dictionary + RepliesCount int32 `protobuf:"varint,20,opt,name=replies_count,json=repliesCount,proto3" json:"replies_count,omitempty"` + ReactionsMade map[string]bool `protobuf:"bytes,21,rep,name=reactions_made,json=reactionsMade,proto3" json:"reactions_made,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` // Dictionary + RepliedGone bool `protobuf:"varint,22,opt,name=replied_gone,json=repliedGone,proto3" json:"replied_gone,omitempty"` + ForwardedGone bool `protobuf:"varint,23,opt,name=forwarded_gone,json=forwardedGone,proto3" json:"forwarded_gone,omitempty"` + RepliedPostId *string `protobuf:"bytes,24,opt,name=replied_post_id,json=repliedPostId,proto3,oneof" json:"replied_post_id,omitempty"` + RepliedPost *Post `protobuf:"bytes,25,opt,name=replied_post,json=repliedPost,proto3,oneof" json:"replied_post,omitempty"` // full if populated + ForwardedPostId *string `protobuf:"bytes,26,opt,name=forwarded_post_id,json=forwardedPostId,proto3,oneof" json:"forwarded_post_id,omitempty"` + ForwardedPost *Post `protobuf:"bytes,27,opt,name=forwarded_post,json=forwardedPost,proto3,oneof" json:"forwarded_post,omitempty"` // full if populated + RealmId *string `protobuf:"bytes,28,opt,name=realm_id,json=realmId,proto3,oneof" json:"realm_id,omitempty"` + Realm *Realm `protobuf:"bytes,29,opt,name=realm,proto3,oneof" json:"realm,omitempty"` // full if populated + Attachments []*CloudFile `protobuf:"bytes,30,rep,name=attachments,proto3" json:"attachments,omitempty"` // List + PublisherId string `protobuf:"bytes,31,opt,name=publisher_id,json=publisherId,proto3" json:"publisher_id,omitempty"` + Publisher *Publisher `protobuf:"bytes,32,opt,name=publisher,proto3" json:"publisher,omitempty"` + Awards []*PostAward `protobuf:"bytes,33,rep,name=awards,proto3" json:"awards,omitempty"` + Reactions []*PostReaction `protobuf:"bytes,34,rep,name=reactions,proto3" json:"reactions,omitempty"` + Tags []*PostTag `protobuf:"bytes,35,rep,name=tags,proto3" json:"tags,omitempty"` + Categories []*PostCategory `protobuf:"bytes,36,rep,name=categories,proto3" json:"categories,omitempty"` + FeaturedRecords []*PostFeaturedRecord `protobuf:"bytes,37,rep,name=featured_records,json=featuredRecords,proto3" json:"featured_records,omitempty"` + // Added for ToActivity + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,38,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,39,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + DeletedAt *timestamppb.Timestamp `protobuf:"bytes,40,opt,name=deleted_at,json=deletedAt,proto3,oneof" json:"deleted_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Post) Reset() { + *x = Post{} + mi := &file_post_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Post) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Post) ProtoMessage() {} + +func (x *Post) ProtoReflect() protoreflect.Message { + mi := &file_post_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Post.ProtoReflect.Descriptor instead. +func (*Post) Descriptor() ([]byte, []int) { + return file_post_proto_rawDescGZIP(), []int{1} +} + +func (x *Post) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Post) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *Post) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Post) GetSlug() string { + if x != nil { + return x.Slug + } + return "" +} + +func (x *Post) GetEditedAt() *timestamppb.Timestamp { + if x != nil { + return x.EditedAt + } + return nil +} + +func (x *Post) GetPublishedAt() *timestamppb.Timestamp { + if x != nil { + return x.PublishedAt + } + return nil +} + +func (x *Post) GetVisibility() PostVisibility { + if x != nil { + return x.Visibility + } + return PostVisibility_VISIBILITY_UNSPECIFIED +} + +func (x *Post) GetContent() string { + if x != nil && x.Content != nil { + return *x.Content + } + return "" +} + +func (x *Post) GetType() PostType { + if x != nil { + return x.Type + } + return PostType_POST_TYPE_UNSPECIFIED +} + +func (x *Post) GetPinMode() PostPinMode { + if x != nil && x.PinMode != nil { + return *x.PinMode + } + return PostPinMode_PIN_MODE_UNSPECIFIED +} + +func (x *Post) GetMeta() []byte { + if x != nil { + return x.Meta + } + return nil +} + +func (x *Post) GetSensitiveMarks() []byte { + if x != nil { + return x.SensitiveMarks + } + return nil +} + +func (x *Post) GetEmbedView() *PostEmbedView { + if x != nil { + return x.EmbedView + } + return nil +} + +func (x *Post) GetViewsUnique() int32 { + if x != nil { + return x.ViewsUnique + } + return 0 +} + +func (x *Post) GetViewsTotal() int32 { + if x != nil { + return x.ViewsTotal + } + return 0 +} + +func (x *Post) GetUpvotes() int32 { + if x != nil { + return x.Upvotes + } + return 0 +} + +func (x *Post) GetDownvotes() int32 { + if x != nil { + return x.Downvotes + } + return 0 +} + +func (x *Post) GetAwardedScore() float64 { + if x != nil { + return x.AwardedScore + } + return 0 +} + +func (x *Post) GetReactionsCount() map[string]int32 { + if x != nil { + return x.ReactionsCount + } + return nil +} + +func (x *Post) GetRepliesCount() int32 { + if x != nil { + return x.RepliesCount + } + return 0 +} + +func (x *Post) GetReactionsMade() map[string]bool { + if x != nil { + return x.ReactionsMade + } + return nil +} + +func (x *Post) GetRepliedGone() bool { + if x != nil { + return x.RepliedGone + } + return false +} + +func (x *Post) GetForwardedGone() bool { + if x != nil { + return x.ForwardedGone + } + return false +} + +func (x *Post) GetRepliedPostId() string { + if x != nil && x.RepliedPostId != nil { + return *x.RepliedPostId + } + return "" +} + +func (x *Post) GetRepliedPost() *Post { + if x != nil { + return x.RepliedPost + } + return nil +} + +func (x *Post) GetForwardedPostId() string { + if x != nil && x.ForwardedPostId != nil { + return *x.ForwardedPostId + } + return "" +} + +func (x *Post) GetForwardedPost() *Post { + if x != nil { + return x.ForwardedPost + } + return nil +} + +func (x *Post) GetRealmId() string { + if x != nil && x.RealmId != nil { + return *x.RealmId + } + return "" +} + +func (x *Post) GetRealm() *Realm { + if x != nil { + return x.Realm + } + return nil +} + +func (x *Post) GetAttachments() []*CloudFile { + if x != nil { + return x.Attachments + } + return nil +} + +func (x *Post) GetPublisherId() string { + if x != nil { + return x.PublisherId + } + return "" +} + +func (x *Post) GetPublisher() *Publisher { + if x != nil { + return x.Publisher + } + return nil +} + +func (x *Post) GetAwards() []*PostAward { + if x != nil { + return x.Awards + } + return nil +} + +func (x *Post) GetReactions() []*PostReaction { + if x != nil { + return x.Reactions + } + return nil +} + +func (x *Post) GetTags() []*PostTag { + if x != nil { + return x.Tags + } + return nil +} + +func (x *Post) GetCategories() []*PostCategory { + if x != nil { + return x.Categories + } + return nil +} + +func (x *Post) GetFeaturedRecords() []*PostFeaturedRecord { + if x != nil { + return x.FeaturedRecords + } + return nil +} + +func (x *Post) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Post) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +func (x *Post) GetDeletedAt() *timestamppb.Timestamp { + if x != nil { + return x.DeletedAt + } + return nil +} + +type PostTag struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Slug string `protobuf:"bytes,2,opt,name=slug,proto3" json:"slug,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PostTag) Reset() { + *x = PostTag{} + mi := &file_post_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PostTag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostTag) ProtoMessage() {} + +func (x *PostTag) ProtoReflect() protoreflect.Message { + mi := &file_post_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostTag.ProtoReflect.Descriptor instead. +func (*PostTag) Descriptor() ([]byte, []int) { + return file_post_proto_rawDescGZIP(), []int{2} +} + +func (x *PostTag) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *PostTag) GetSlug() string { + if x != nil { + return x.Slug + } + return "" +} + +func (x *PostTag) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PostTag) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *PostTag) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type PostCategory struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Slug string `protobuf:"bytes,2,opt,name=slug,proto3" json:"slug,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PostCategory) Reset() { + *x = PostCategory{} + mi := &file_post_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PostCategory) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostCategory) ProtoMessage() {} + +func (x *PostCategory) ProtoReflect() protoreflect.Message { + mi := &file_post_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostCategory.ProtoReflect.Descriptor instead. +func (*PostCategory) Descriptor() ([]byte, []int) { + return file_post_proto_rawDescGZIP(), []int{3} +} + +func (x *PostCategory) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *PostCategory) GetSlug() string { + if x != nil { + return x.Slug + } + return "" +} + +func (x *PostCategory) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PostCategory) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *PostCategory) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type PostCategorySubscription struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + AccountId string `protobuf:"bytes,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + CategoryId *string `protobuf:"bytes,3,opt,name=category_id,json=categoryId,proto3,oneof" json:"category_id,omitempty"` + Category *PostCategory `protobuf:"bytes,4,opt,name=category,proto3,oneof" json:"category,omitempty"` + TagId *string `protobuf:"bytes,5,opt,name=tag_id,json=tagId,proto3,oneof" json:"tag_id,omitempty"` + Tag *PostTag `protobuf:"bytes,6,opt,name=tag,proto3,oneof" json:"tag,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PostCategorySubscription) Reset() { + *x = PostCategorySubscription{} + mi := &file_post_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PostCategorySubscription) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostCategorySubscription) ProtoMessage() {} + +func (x *PostCategorySubscription) ProtoReflect() protoreflect.Message { + mi := &file_post_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostCategorySubscription.ProtoReflect.Descriptor instead. +func (*PostCategorySubscription) Descriptor() ([]byte, []int) { + return file_post_proto_rawDescGZIP(), []int{4} +} + +func (x *PostCategorySubscription) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *PostCategorySubscription) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *PostCategorySubscription) GetCategoryId() string { + if x != nil && x.CategoryId != nil { + return *x.CategoryId + } + return "" +} + +func (x *PostCategorySubscription) GetCategory() *PostCategory { + if x != nil { + return x.Category + } + return nil +} + +func (x *PostCategorySubscription) GetTagId() string { + if x != nil && x.TagId != nil { + return *x.TagId + } + return "" +} + +func (x *PostCategorySubscription) GetTag() *PostTag { + if x != nil { + return x.Tag + } + return nil +} + +func (x *PostCategorySubscription) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *PostCategorySubscription) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type PostCollection struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Slug string `protobuf:"bytes,2,opt,name=slug,proto3" json:"slug,omitempty"` + Name *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=name,proto3,oneof" json:"name,omitempty"` + Description *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=description,proto3,oneof" json:"description,omitempty"` + Publisher *Publisher `protobuf:"bytes,5,opt,name=publisher,proto3" json:"publisher,omitempty"` + PublisherId *string `protobuf:"bytes,6,opt,name=publisher_id,json=publisherId,proto3,oneof" json:"publisher_id,omitempty"` // for cases where full publisher not needed + Posts []*Post `protobuf:"bytes,7,rep,name=posts,proto3" json:"posts,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PostCollection) Reset() { + *x = PostCollection{} + mi := &file_post_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PostCollection) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostCollection) ProtoMessage() {} + +func (x *PostCollection) ProtoReflect() protoreflect.Message { + mi := &file_post_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostCollection.ProtoReflect.Descriptor instead. +func (*PostCollection) Descriptor() ([]byte, []int) { + return file_post_proto_rawDescGZIP(), []int{5} +} + +func (x *PostCollection) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *PostCollection) GetSlug() string { + if x != nil { + return x.Slug + } + return "" +} + +func (x *PostCollection) GetName() *wrapperspb.StringValue { + if x != nil { + return x.Name + } + return nil +} + +func (x *PostCollection) GetDescription() *wrapperspb.StringValue { + if x != nil { + return x.Description + } + return nil +} + +func (x *PostCollection) GetPublisher() *Publisher { + if x != nil { + return x.Publisher + } + return nil +} + +func (x *PostCollection) GetPublisherId() string { + if x != nil && x.PublisherId != nil { + return *x.PublisherId + } + return "" +} + +func (x *PostCollection) GetPosts() []*Post { + if x != nil { + return x.Posts + } + return nil +} + +func (x *PostCollection) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *PostCollection) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type PostFeaturedRecord struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + PostId string `protobuf:"bytes,2,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"` + FeaturedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=featured_at,json=featuredAt,proto3,oneof" json:"featured_at,omitempty"` + SocialCredits int32 `protobuf:"varint,4,opt,name=social_credits,json=socialCredits,proto3" json:"social_credits,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PostFeaturedRecord) Reset() { + *x = PostFeaturedRecord{} + mi := &file_post_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PostFeaturedRecord) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostFeaturedRecord) ProtoMessage() {} + +func (x *PostFeaturedRecord) ProtoReflect() protoreflect.Message { + mi := &file_post_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostFeaturedRecord.ProtoReflect.Descriptor instead. +func (*PostFeaturedRecord) Descriptor() ([]byte, []int) { + return file_post_proto_rawDescGZIP(), []int{6} +} + +func (x *PostFeaturedRecord) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *PostFeaturedRecord) GetPostId() string { + if x != nil { + return x.PostId + } + return "" +} + +func (x *PostFeaturedRecord) GetFeaturedAt() *timestamppb.Timestamp { + if x != nil { + return x.FeaturedAt + } + return nil +} + +func (x *PostFeaturedRecord) GetSocialCredits() int32 { + if x != nil { + return x.SocialCredits + } + return 0 +} + +func (x *PostFeaturedRecord) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *PostFeaturedRecord) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type PostReaction struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` + Attitude PostReactionAttitude `protobuf:"varint,3,opt,name=attitude,proto3,enum=proto.PostReactionAttitude" json:"attitude,omitempty"` + PostId string `protobuf:"bytes,4,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"` + AccountId string `protobuf:"bytes,5,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + Account *Account `protobuf:"bytes,6,opt,name=account,proto3,oneof" json:"account,omitempty"` // optional full account + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PostReaction) Reset() { + *x = PostReaction{} + mi := &file_post_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PostReaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostReaction) ProtoMessage() {} + +func (x *PostReaction) ProtoReflect() protoreflect.Message { + mi := &file_post_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostReaction.ProtoReflect.Descriptor instead. +func (*PostReaction) Descriptor() ([]byte, []int) { + return file_post_proto_rawDescGZIP(), []int{7} +} + +func (x *PostReaction) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *PostReaction) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *PostReaction) GetAttitude() PostReactionAttitude { + if x != nil { + return x.Attitude + } + return PostReactionAttitude_ATTITUDE_UNSPECIFIED +} + +func (x *PostReaction) GetPostId() string { + if x != nil { + return x.PostId + } + return "" +} + +func (x *PostReaction) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *PostReaction) GetAccount() *Account { + if x != nil { + return x.Account + } + return nil +} + +func (x *PostReaction) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *PostReaction) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type PostAward struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Amount float64 `protobuf:"fixed64,2,opt,name=amount,proto3" json:"amount,omitempty"` + Attitude PostReactionAttitude `protobuf:"varint,3,opt,name=attitude,proto3,enum=proto.PostReactionAttitude" json:"attitude,omitempty"` + Message *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=message,proto3,oneof" json:"message,omitempty"` + PostId string `protobuf:"bytes,5,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"` + AccountId string `protobuf:"bytes,6,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PostAward) Reset() { + *x = PostAward{} + mi := &file_post_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PostAward) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostAward) ProtoMessage() {} + +func (x *PostAward) ProtoReflect() protoreflect.Message { + mi := &file_post_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostAward.ProtoReflect.Descriptor instead. +func (*PostAward) Descriptor() ([]byte, []int) { + return file_post_proto_rawDescGZIP(), []int{8} +} + +func (x *PostAward) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *PostAward) GetAmount() float64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *PostAward) GetAttitude() PostReactionAttitude { + if x != nil { + return x.Attitude + } + return PostReactionAttitude_ATTITUDE_UNSPECIFIED +} + +func (x *PostAward) GetMessage() *wrapperspb.StringValue { + if x != nil { + return x.Message + } + return nil +} + +func (x *PostAward) GetPostId() string { + if x != nil { + return x.PostId + } + return "" +} + +func (x *PostAward) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *PostAward) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *PostAward) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type GetPostRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Identifier: + // + // *GetPostRequest_Id + // *GetPostRequest_Slug + Identifier isGetPostRequest_Identifier `protobuf_oneof:"identifier"` + PublisherId *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=publisher_id,json=publisherId,proto3" json:"publisher_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPostRequest) Reset() { + *x = GetPostRequest{} + mi := &file_post_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPostRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPostRequest) ProtoMessage() {} + +func (x *GetPostRequest) ProtoReflect() protoreflect.Message { + mi := &file_post_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPostRequest.ProtoReflect.Descriptor instead. +func (*GetPostRequest) Descriptor() ([]byte, []int) { + return file_post_proto_rawDescGZIP(), []int{9} +} + +func (x *GetPostRequest) GetIdentifier() isGetPostRequest_Identifier { + if x != nil { + return x.Identifier + } + return nil +} + +func (x *GetPostRequest) GetId() string { + if x != nil { + if x, ok := x.Identifier.(*GetPostRequest_Id); ok { + return x.Id + } + } + return "" +} + +func (x *GetPostRequest) GetSlug() string { + if x != nil { + if x, ok := x.Identifier.(*GetPostRequest_Slug); ok { + return x.Slug + } + } + return "" +} + +func (x *GetPostRequest) GetPublisherId() *wrapperspb.StringValue { + if x != nil { + return x.PublisherId + } + return nil +} + +type isGetPostRequest_Identifier interface { + isGetPostRequest_Identifier() +} + +type GetPostRequest_Id struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"` +} + +type GetPostRequest_Slug struct { + Slug string `protobuf:"bytes,2,opt,name=slug,proto3,oneof"` +} + +func (*GetPostRequest_Id) isGetPostRequest_Identifier() {} + +func (*GetPostRequest_Slug) isGetPostRequest_Identifier() {} + +type GetPostBatchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPostBatchRequest) Reset() { + *x = GetPostBatchRequest{} + mi := &file_post_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPostBatchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPostBatchRequest) ProtoMessage() {} + +func (x *GetPostBatchRequest) ProtoReflect() protoreflect.Message { + mi := &file_post_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPostBatchRequest.ProtoReflect.Descriptor instead. +func (*GetPostBatchRequest) Descriptor() ([]byte, []int) { + return file_post_proto_rawDescGZIP(), []int{10} +} + +func (x *GetPostBatchRequest) GetIds() []string { + if x != nil { + return x.Ids + } + return nil +} + +type GetPostBatchResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPostBatchResponse) Reset() { + *x = GetPostBatchResponse{} + mi := &file_post_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPostBatchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPostBatchResponse) ProtoMessage() {} + +func (x *GetPostBatchResponse) ProtoReflect() protoreflect.Message { + mi := &file_post_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPostBatchResponse.ProtoReflect.Descriptor instead. +func (*GetPostBatchResponse) Descriptor() ([]byte, []int) { + return file_post_proto_rawDescGZIP(), []int{11} +} + +func (x *GetPostBatchResponse) GetPosts() []*Post { + if x != nil { + return x.Posts + } + return nil +} + +type SearchPostsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + PublisherId string `protobuf:"bytes,2,opt,name=publisher_id,json=publisherId,proto3" json:"publisher_id,omitempty"` + RealmId string `protobuf:"bytes,3,opt,name=realm_id,json=realmId,proto3" json:"realm_id,omitempty"` + PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,5,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + OrderBy string `protobuf:"bytes,6,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SearchPostsRequest) Reset() { + *x = SearchPostsRequest{} + mi := &file_post_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SearchPostsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchPostsRequest) ProtoMessage() {} + +func (x *SearchPostsRequest) ProtoReflect() protoreflect.Message { + mi := &file_post_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchPostsRequest.ProtoReflect.Descriptor instead. +func (*SearchPostsRequest) Descriptor() ([]byte, []int) { + return file_post_proto_rawDescGZIP(), []int{12} +} + +func (x *SearchPostsRequest) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +func (x *SearchPostsRequest) GetPublisherId() string { + if x != nil { + return x.PublisherId + } + return "" +} + +func (x *SearchPostsRequest) GetRealmId() string { + if x != nil { + return x.RealmId + } + return "" +} + +func (x *SearchPostsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *SearchPostsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *SearchPostsRequest) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +type SearchPostsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SearchPostsResponse) Reset() { + *x = SearchPostsResponse{} + mi := &file_post_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SearchPostsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchPostsResponse) ProtoMessage() {} + +func (x *SearchPostsResponse) ProtoReflect() protoreflect.Message { + mi := &file_post_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchPostsResponse.ProtoReflect.Descriptor instead. +func (*SearchPostsResponse) Descriptor() ([]byte, []int) { + return file_post_proto_rawDescGZIP(), []int{13} +} + +func (x *SearchPostsResponse) GetPosts() []*Post { + if x != nil { + return x.Posts + } + return nil +} + +func (x *SearchPostsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *SearchPostsResponse) GetTotalSize() int32 { + if x != nil { + return x.TotalSize + } + return 0 +} + +type ListPostsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PublisherId *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=publisher_id,json=publisherId,proto3" json:"publisher_id,omitempty"` + RealmId *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=realm_id,json=realmId,proto3" json:"realm_id,omitempty"` + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + OrderBy *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` + OrderDesc bool `protobuf:"varint,16,opt,name=order_desc,json=orderDesc,proto3" json:"order_desc,omitempty"` + Categories []string `protobuf:"bytes,6,rep,name=categories,proto3" json:"categories,omitempty"` + Tags []string `protobuf:"bytes,7,rep,name=tags,proto3" json:"tags,omitempty"` + Query *wrapperspb.StringValue `protobuf:"bytes,8,opt,name=query,proto3" json:"query,omitempty"` + Types []PostType `protobuf:"varint,9,rep,packed,name=types,proto3,enum=proto.PostType" json:"types,omitempty"` + After *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=after,proto3,oneof" json:"after,omitempty"` // Filter posts created after this timestamp + Before *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=before,proto3,oneof" json:"before,omitempty"` // Filter posts created before this timestamp + IncludeReplies bool `protobuf:"varint,12,opt,name=include_replies,json=includeReplies,proto3" json:"include_replies,omitempty"` // Include reply posts + Pinned *PostPinMode `protobuf:"varint,13,opt,name=pinned,proto3,enum=proto.PostPinMode,oneof" json:"pinned,omitempty"` // Filter by pinned mode (if present, null means not pinned) + OnlyMedia bool `protobuf:"varint,14,opt,name=only_media,json=onlyMedia,proto3" json:"only_media,omitempty"` // Only return posts with attachments + Shuffle bool `protobuf:"varint,15,opt,name=shuffle,proto3" json:"shuffle,omitempty"` // Random order + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListPostsRequest) Reset() { + *x = ListPostsRequest{} + mi := &file_post_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListPostsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPostsRequest) ProtoMessage() {} + +func (x *ListPostsRequest) ProtoReflect() protoreflect.Message { + mi := &file_post_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPostsRequest.ProtoReflect.Descriptor instead. +func (*ListPostsRequest) Descriptor() ([]byte, []int) { + return file_post_proto_rawDescGZIP(), []int{14} +} + +func (x *ListPostsRequest) GetPublisherId() *wrapperspb.StringValue { + if x != nil { + return x.PublisherId + } + return nil +} + +func (x *ListPostsRequest) GetRealmId() *wrapperspb.StringValue { + if x != nil { + return x.RealmId + } + return nil +} + +func (x *ListPostsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListPostsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListPostsRequest) GetOrderBy() *wrapperspb.StringValue { + if x != nil { + return x.OrderBy + } + return nil +} + +func (x *ListPostsRequest) GetOrderDesc() bool { + if x != nil { + return x.OrderDesc + } + return false +} + +func (x *ListPostsRequest) GetCategories() []string { + if x != nil { + return x.Categories + } + return nil +} + +func (x *ListPostsRequest) GetTags() []string { + if x != nil { + return x.Tags + } + return nil +} + +func (x *ListPostsRequest) GetQuery() *wrapperspb.StringValue { + if x != nil { + return x.Query + } + return nil +} + +func (x *ListPostsRequest) GetTypes() []PostType { + if x != nil { + return x.Types + } + return nil +} + +func (x *ListPostsRequest) GetAfter() *timestamppb.Timestamp { + if x != nil { + return x.After + } + return nil +} + +func (x *ListPostsRequest) GetBefore() *timestamppb.Timestamp { + if x != nil { + return x.Before + } + return nil +} + +func (x *ListPostsRequest) GetIncludeReplies() bool { + if x != nil { + return x.IncludeReplies + } + return false +} + +func (x *ListPostsRequest) GetPinned() PostPinMode { + if x != nil && x.Pinned != nil { + return *x.Pinned + } + return PostPinMode_PIN_MODE_UNSPECIFIED +} + +func (x *ListPostsRequest) GetOnlyMedia() bool { + if x != nil { + return x.OnlyMedia + } + return false +} + +func (x *ListPostsRequest) GetShuffle() bool { + if x != nil { + return x.Shuffle + } + return false +} + +type ListPostsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListPostsResponse) Reset() { + *x = ListPostsResponse{} + mi := &file_post_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListPostsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPostsResponse) ProtoMessage() {} + +func (x *ListPostsResponse) ProtoReflect() protoreflect.Message { + mi := &file_post_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPostsResponse.ProtoReflect.Descriptor instead. +func (*ListPostsResponse) Descriptor() ([]byte, []int) { + return file_post_proto_rawDescGZIP(), []int{15} +} + +func (x *ListPostsResponse) GetPosts() []*Post { + if x != nil { + return x.Posts + } + return nil +} + +func (x *ListPostsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListPostsResponse) GetTotalSize() int32 { + if x != nil { + return x.TotalSize + } + return 0 +} + +var File_post_proto protoreflect.FileDescriptor + +const file_post_proto_rawDesc = "" + + "\n" + + "\n" + + "post.proto\x12\x05proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\n" + + "file.proto\x1a\vrealm.proto\x1a\x0fpublisher.proto\x1a\raccount.proto\"\x94\x01\n" + + "\rPostEmbedView\x12\x10\n" + + "\x03uri\x18\x01 \x01(\tR\x03uri\x12&\n" + + "\faspect_ratio\x18\x02 \x01(\x01H\x00R\vaspectRatio\x88\x01\x01\x128\n" + + "\brenderer\x18\x03 \x01(\x0e2\x1c.proto.PostEmbedViewRendererR\brendererB\x0f\n" + + "\r_aspect_ratio\"\xe0\x10\n" + + "\x04Post\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x14\n" + + "\x05title\x18\x02 \x01(\tR\x05title\x12 \n" + + "\vdescription\x18\x03 \x01(\tR\vdescription\x12\x12\n" + + "\x04slug\x18\x04 \x01(\tR\x04slug\x12<\n" + + "\tedited_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampH\x00R\beditedAt\x88\x01\x01\x12B\n" + + "\fpublished_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampH\x01R\vpublishedAt\x88\x01\x01\x125\n" + + "\n" + + "visibility\x18\a \x01(\x0e2\x15.proto.PostVisibilityR\n" + + "visibility\x12\x1d\n" + + "\acontent\x18\b \x01(\tH\x02R\acontent\x88\x01\x01\x12#\n" + + "\x04type\x18\t \x01(\x0e2\x0f.proto.PostTypeR\x04type\x122\n" + + "\bpin_mode\x18\n" + + " \x01(\x0e2\x12.proto.PostPinModeH\x03R\apinMode\x88\x01\x01\x12\x17\n" + + "\x04meta\x18\v \x01(\fH\x04R\x04meta\x88\x01\x01\x12,\n" + + "\x0fsensitive_marks\x18\f \x01(\fH\x05R\x0esensitiveMarks\x88\x01\x01\x128\n" + + "\n" + + "embed_view\x18\r \x01(\v2\x14.proto.PostEmbedViewH\x06R\tembedView\x88\x01\x01\x12!\n" + + "\fviews_unique\x18\x0e \x01(\x05R\vviewsUnique\x12\x1f\n" + + "\vviews_total\x18\x0f \x01(\x05R\n" + + "viewsTotal\x12\x18\n" + + "\aupvotes\x18\x10 \x01(\x05R\aupvotes\x12\x1c\n" + + "\tdownvotes\x18\x11 \x01(\x05R\tdownvotes\x12#\n" + + "\rawarded_score\x18\x12 \x01(\x01R\fawardedScore\x12H\n" + + "\x0freactions_count\x18\x13 \x03(\v2\x1f.proto.Post.ReactionsCountEntryR\x0ereactionsCount\x12#\n" + + "\rreplies_count\x18\x14 \x01(\x05R\frepliesCount\x12E\n" + + "\x0ereactions_made\x18\x15 \x03(\v2\x1e.proto.Post.ReactionsMadeEntryR\rreactionsMade\x12!\n" + + "\freplied_gone\x18\x16 \x01(\bR\vrepliedGone\x12%\n" + + "\x0eforwarded_gone\x18\x17 \x01(\bR\rforwardedGone\x12+\n" + + "\x0freplied_post_id\x18\x18 \x01(\tH\aR\rrepliedPostId\x88\x01\x01\x123\n" + + "\freplied_post\x18\x19 \x01(\v2\v.proto.PostH\bR\vrepliedPost\x88\x01\x01\x12/\n" + + "\x11forwarded_post_id\x18\x1a \x01(\tH\tR\x0fforwardedPostId\x88\x01\x01\x127\n" + + "\x0eforwarded_post\x18\x1b \x01(\v2\v.proto.PostH\n" + + "R\rforwardedPost\x88\x01\x01\x12\x1e\n" + + "\brealm_id\x18\x1c \x01(\tH\vR\arealmId\x88\x01\x01\x12'\n" + + "\x05realm\x18\x1d \x01(\v2\f.proto.RealmH\fR\x05realm\x88\x01\x01\x122\n" + + "\vattachments\x18\x1e \x03(\v2\x10.proto.CloudFileR\vattachments\x12!\n" + + "\fpublisher_id\x18\x1f \x01(\tR\vpublisherId\x12.\n" + + "\tpublisher\x18 \x01(\v2\x10.proto.PublisherR\tpublisher\x12(\n" + + "\x06awards\x18! \x03(\v2\x10.proto.PostAwardR\x06awards\x121\n" + + "\treactions\x18\" \x03(\v2\x13.proto.PostReactionR\treactions\x12\"\n" + + "\x04tags\x18# \x03(\v2\x0e.proto.PostTagR\x04tags\x123\n" + + "\n" + + "categories\x18$ \x03(\v2\x13.proto.PostCategoryR\n" + + "categories\x12D\n" + + "\x10featured_records\x18% \x03(\v2\x19.proto.PostFeaturedRecordR\x0ffeaturedRecords\x129\n" + + "\n" + + "created_at\x18& \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18' \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x12>\n" + + "\n" + + "deleted_at\x18( \x01(\v2\x1a.google.protobuf.TimestampH\rR\tdeletedAt\x88\x01\x01\x1aA\n" + + "\x13ReactionsCountEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x05R\x05value:\x028\x01\x1a@\n" + + "\x12ReactionsMadeEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\bR\x05value:\x028\x01B\f\n" + + "\n" + + "_edited_atB\x0f\n" + + "\r_published_atB\n" + + "\n" + + "\b_contentB\v\n" + + "\t_pin_modeB\a\n" + + "\x05_metaB\x12\n" + + "\x10_sensitive_marksB\r\n" + + "\v_embed_viewB\x12\n" + + "\x10_replied_post_idB\x0f\n" + + "\r_replied_postB\x14\n" + + "\x12_forwarded_post_idB\x11\n" + + "\x0f_forwarded_postB\v\n" + + "\t_realm_idB\b\n" + + "\x06_realmB\r\n" + + "\v_deleted_at\"\xb7\x01\n" + + "\aPostTag\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04slug\x18\x02 \x01(\tR\x04slug\x12\x12\n" + + "\x04name\x18\x03 \x01(\tR\x04name\x129\n" + + "\n" + + "created_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"\xbc\x01\n" + + "\fPostCategory\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04slug\x18\x02 \x01(\tR\x04slug\x12\x12\n" + + "\x04name\x18\x03 \x01(\tR\x04name\x129\n" + + "\n" + + "created_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"\x8e\x03\n" + + "\x18PostCategorySubscription\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n" + + "\n" + + "account_id\x18\x02 \x01(\tR\taccountId\x12$\n" + + "\vcategory_id\x18\x03 \x01(\tH\x00R\n" + + "categoryId\x88\x01\x01\x124\n" + + "\bcategory\x18\x04 \x01(\v2\x13.proto.PostCategoryH\x01R\bcategory\x88\x01\x01\x12\x1a\n" + + "\x06tag_id\x18\x05 \x01(\tH\x02R\x05tagId\x88\x01\x01\x12%\n" + + "\x03tag\x18\x06 \x01(\v2\x0e.proto.PostTagH\x03R\x03tag\x88\x01\x01\x129\n" + + "\n" + + "created_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAtB\x0e\n" + + "\f_category_idB\v\n" + + "\t_categoryB\t\n" + + "\a_tag_idB\x06\n" + + "\x04_tag\"\xcb\x03\n" + + "\x0ePostCollection\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04slug\x18\x02 \x01(\tR\x04slug\x125\n" + + "\x04name\x18\x03 \x01(\v2\x1c.google.protobuf.StringValueH\x00R\x04name\x88\x01\x01\x12C\n" + + "\vdescription\x18\x04 \x01(\v2\x1c.google.protobuf.StringValueH\x01R\vdescription\x88\x01\x01\x12.\n" + + "\tpublisher\x18\x05 \x01(\v2\x10.proto.PublisherR\tpublisher\x12&\n" + + "\fpublisher_id\x18\x06 \x01(\tH\x02R\vpublisherId\x88\x01\x01\x12!\n" + + "\x05posts\x18\a \x03(\v2\v.proto.PostR\x05posts\x129\n" + + "\n" + + "created_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAtB\a\n" + + "\x05_nameB\x0e\n" + + "\f_descriptionB\x0f\n" + + "\r_publisher_id\"\xac\x02\n" + + "\x12PostFeaturedRecord\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x17\n" + + "\apost_id\x18\x02 \x01(\tR\x06postId\x12@\n" + + "\vfeatured_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampH\x00R\n" + + "featuredAt\x88\x01\x01\x12%\n" + + "\x0esocial_credits\x18\x04 \x01(\x05R\rsocialCredits\x129\n" + + "\n" + + "created_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAtB\x0e\n" + + "\f_featured_at\"\xd8\x02\n" + + "\fPostReaction\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" + + "\x06symbol\x18\x02 \x01(\tR\x06symbol\x127\n" + + "\battitude\x18\x03 \x01(\x0e2\x1b.proto.PostReactionAttitudeR\battitude\x12\x17\n" + + "\apost_id\x18\x04 \x01(\tR\x06postId\x12\x1d\n" + + "\n" + + "account_id\x18\x05 \x01(\tR\taccountId\x12-\n" + + "\aaccount\x18\x06 \x01(\v2\x0e.proto.AccountH\x00R\aaccount\x88\x01\x01\x129\n" + + "\n" + + "created_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAtB\n" + + "\n" + + "\b_account\"\xe3\x02\n" + + "\tPostAward\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x01R\x06amount\x127\n" + + "\battitude\x18\x03 \x01(\x0e2\x1b.proto.PostReactionAttitudeR\battitude\x12;\n" + + "\amessage\x18\x04 \x01(\v2\x1c.google.protobuf.StringValueH\x00R\amessage\x88\x01\x01\x12\x17\n" + + "\apost_id\x18\x05 \x01(\tR\x06postId\x12\x1d\n" + + "\n" + + "account_id\x18\x06 \x01(\tR\taccountId\x129\n" + + "\n" + + "created_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAtB\n" + + "\n" + + "\b_message\"\x87\x01\n" + + "\x0eGetPostRequest\x12\x10\n" + + "\x02id\x18\x01 \x01(\tH\x00R\x02id\x12\x14\n" + + "\x04slug\x18\x02 \x01(\tH\x00R\x04slug\x12?\n" + + "\fpublisher_id\x18\x03 \x01(\v2\x1c.google.protobuf.StringValueR\vpublisherIdB\f\n" + + "\n" + + "identifier\"'\n" + + "\x13GetPostBatchRequest\x12\x10\n" + + "\x03ids\x18\x01 \x03(\tR\x03ids\"9\n" + + "\x14GetPostBatchResponse\x12!\n" + + "\x05posts\x18\x01 \x03(\v2\v.proto.PostR\x05posts\"\xbf\x01\n" + + "\x12SearchPostsRequest\x12\x14\n" + + "\x05query\x18\x01 \x01(\tR\x05query\x12!\n" + + "\fpublisher_id\x18\x02 \x01(\tR\vpublisherId\x12\x19\n" + + "\brealm_id\x18\x03 \x01(\tR\arealmId\x12\x1b\n" + + "\tpage_size\x18\x04 \x01(\x05R\bpageSize\x12\x1d\n" + + "\n" + + "page_token\x18\x05 \x01(\tR\tpageToken\x12\x19\n" + + "\border_by\x18\x06 \x01(\tR\aorderBy\"\x7f\n" + + "\x13SearchPostsResponse\x12!\n" + + "\x05posts\x18\x01 \x03(\v2\v.proto.PostR\x05posts\x12&\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x12\x1d\n" + + "\n" + + "total_size\x18\x03 \x01(\x05R\ttotalSize\"\xd2\x05\n" + + "\x10ListPostsRequest\x12?\n" + + "\fpublisher_id\x18\x01 \x01(\v2\x1c.google.protobuf.StringValueR\vpublisherId\x127\n" + + "\brealm_id\x18\x02 \x01(\v2\x1c.google.protobuf.StringValueR\arealmId\x12\x1b\n" + + "\tpage_size\x18\x03 \x01(\x05R\bpageSize\x12\x1d\n" + + "\n" + + "page_token\x18\x04 \x01(\tR\tpageToken\x127\n" + + "\border_by\x18\x05 \x01(\v2\x1c.google.protobuf.StringValueR\aorderBy\x12\x1d\n" + + "\n" + + "order_desc\x18\x10 \x01(\bR\torderDesc\x12\x1e\n" + + "\n" + + "categories\x18\x06 \x03(\tR\n" + + "categories\x12\x12\n" + + "\x04tags\x18\a \x03(\tR\x04tags\x122\n" + + "\x05query\x18\b \x01(\v2\x1c.google.protobuf.StringValueR\x05query\x12%\n" + + "\x05types\x18\t \x03(\x0e2\x0f.proto.PostTypeR\x05types\x125\n" + + "\x05after\x18\n" + + " \x01(\v2\x1a.google.protobuf.TimestampH\x00R\x05after\x88\x01\x01\x127\n" + + "\x06before\x18\v \x01(\v2\x1a.google.protobuf.TimestampH\x01R\x06before\x88\x01\x01\x12'\n" + + "\x0finclude_replies\x18\f \x01(\bR\x0eincludeReplies\x12/\n" + + "\x06pinned\x18\r \x01(\x0e2\x12.proto.PostPinModeH\x02R\x06pinned\x88\x01\x01\x12\x1d\n" + + "\n" + + "only_media\x18\x0e \x01(\bR\tonlyMedia\x12\x18\n" + + "\ashuffle\x18\x0f \x01(\bR\ashuffleB\b\n" + + "\x06_afterB\t\n" + + "\a_beforeB\t\n" + + "\a_pinned\"}\n" + + "\x11ListPostsResponse\x12!\n" + + "\x05posts\x18\x01 \x03(\v2\v.proto.PostR\x05posts\x12&\n" + + "\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\x12\x1d\n" + + "\n" + + "total_size\x18\x03 \x01(\x05R\ttotalSize*>\n" + + "\bPostType\x12\x19\n" + + "\x15POST_TYPE_UNSPECIFIED\x10\x00\x12\n" + + "\n" + + "\x06MOMENT\x10\x01\x12\v\n" + + "\aARTICLE\x10\x02*`\n" + + "\x0ePostVisibility\x12\x1a\n" + + "\x16VISIBILITY_UNSPECIFIED\x10\x00\x12\n" + + "\n" + + "\x06PUBLIC\x10\x01\x12\v\n" + + "\aFRIENDS\x10\x02\x12\f\n" + + "\bUNLISTED\x10\x03\x12\v\n" + + "\aPRIVATE\x10\x04*[\n" + + "\vPostPinMode\x12\x18\n" + + "\x14PIN_MODE_UNSPECIFIED\x10\x00\x12\x12\n" + + "\x0ePUBLISHER_PAGE\x10\x01\x12\x0e\n" + + "\n" + + "REALM_PAGE\x10\x02\x12\x0e\n" + + "\n" + + "REPLY_PAGE\x10\x03*\x81\x02\n" + + "\x14ContentSensitiveMark\x12\x1e\n" + + "\x1aSENSITIVE_MARK_UNSPECIFIED\x10\x00\x12\f\n" + + "\bLANGUAGE\x10\x01\x12\x12\n" + + "\x0eSEXUAL_CONTENT\x10\x02\x12\f\n" + + "\bVIOLENCE\x10\x03\x12\r\n" + + "\tPROFANITY\x10\x04\x12\x0f\n" + + "\vHATE_SPEECH\x10\x05\x12\n" + + "\n" + + "\x06RACISM\x10\x06\x12\x11\n" + + "\rADULT_CONTENT\x10\a\x12\x0e\n" + + "\n" + + "DRUG_ABUSE\x10\b\x12\x11\n" + + "\rALCOHOL_ABUSE\x10\t\x12\f\n" + + "\bGAMBLING\x10\n" + + "\x12\r\n" + + "\tSELF_HARM\x10\v\x12\x0f\n" + + "\vCHILD_ABUSE\x10\f\x12\t\n" + + "\x05OTHER\x10\r*\x83\x01\n" + + "\x14PostReactionAttitude\x12\x18\n" + + "\x14ATTITUDE_UNSPECIFIED\x10\x00\x12\x1a\n" + + "\x16POST_ATTITUDE_POSITIVE\x10\x01\x12\x19\n" + + "\x15POST_ATTITUDE_NEUTRAL\x10\x02\x12\x1a\n" + + "\x16POST_ATTITUDE_NEGATIVE\x10\x03*>\n" + + "\x15PostEmbedViewRenderer\x12\x18\n" + + "\x14RENDERER_UNSPECIFIED\x10\x00\x12\v\n" + + "\aWEBVIEW\x10\x012\x8b\x02\n" + + "\vPostService\x12-\n" + + "\aGetPost\x12\x15.proto.GetPostRequest\x1a\v.proto.Post\x12G\n" + + "\fGetPostBatch\x12\x1a.proto.GetPostBatchRequest\x1a\x1b.proto.GetPostBatchResponse\x12D\n" + + "\vSearchPosts\x12\x19.proto.SearchPostsRequest\x1a\x1a.proto.SearchPostsResponse\x12>\n" + + "\tListPosts\x12\x17.proto.ListPostsRequest\x1a\x18.proto.ListPostsResponseBUZ7git.solsynth.dev/goatworks/turbine/pkg/shared/proto/gen\xaa\x02\x19DysonNetwork.Shared.Protob\x06proto3" + +var ( + file_post_proto_rawDescOnce sync.Once + file_post_proto_rawDescData []byte +) + +func file_post_proto_rawDescGZIP() []byte { + file_post_proto_rawDescOnce.Do(func() { + file_post_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_post_proto_rawDesc), len(file_post_proto_rawDesc))) + }) + return file_post_proto_rawDescData +} + +var file_post_proto_enumTypes = make([]protoimpl.EnumInfo, 6) +var file_post_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_post_proto_goTypes = []any{ + (PostType)(0), // 0: proto.PostType + (PostVisibility)(0), // 1: proto.PostVisibility + (PostPinMode)(0), // 2: proto.PostPinMode + (ContentSensitiveMark)(0), // 3: proto.ContentSensitiveMark + (PostReactionAttitude)(0), // 4: proto.PostReactionAttitude + (PostEmbedViewRenderer)(0), // 5: proto.PostEmbedViewRenderer + (*PostEmbedView)(nil), // 6: proto.PostEmbedView + (*Post)(nil), // 7: proto.Post + (*PostTag)(nil), // 8: proto.PostTag + (*PostCategory)(nil), // 9: proto.PostCategory + (*PostCategorySubscription)(nil), // 10: proto.PostCategorySubscription + (*PostCollection)(nil), // 11: proto.PostCollection + (*PostFeaturedRecord)(nil), // 12: proto.PostFeaturedRecord + (*PostReaction)(nil), // 13: proto.PostReaction + (*PostAward)(nil), // 14: proto.PostAward + (*GetPostRequest)(nil), // 15: proto.GetPostRequest + (*GetPostBatchRequest)(nil), // 16: proto.GetPostBatchRequest + (*GetPostBatchResponse)(nil), // 17: proto.GetPostBatchResponse + (*SearchPostsRequest)(nil), // 18: proto.SearchPostsRequest + (*SearchPostsResponse)(nil), // 19: proto.SearchPostsResponse + (*ListPostsRequest)(nil), // 20: proto.ListPostsRequest + (*ListPostsResponse)(nil), // 21: proto.ListPostsResponse + nil, // 22: proto.Post.ReactionsCountEntry + nil, // 23: proto.Post.ReactionsMadeEntry + (*timestamppb.Timestamp)(nil), // 24: google.protobuf.Timestamp + (*Realm)(nil), // 25: proto.Realm + (*CloudFile)(nil), // 26: proto.CloudFile + (*Publisher)(nil), // 27: proto.Publisher + (*wrapperspb.StringValue)(nil), // 28: google.protobuf.StringValue + (*Account)(nil), // 29: proto.Account +} +var file_post_proto_depIdxs = []int32{ + 5, // 0: proto.PostEmbedView.renderer:type_name -> proto.PostEmbedViewRenderer + 24, // 1: proto.Post.edited_at:type_name -> google.protobuf.Timestamp + 24, // 2: proto.Post.published_at:type_name -> google.protobuf.Timestamp + 1, // 3: proto.Post.visibility:type_name -> proto.PostVisibility + 0, // 4: proto.Post.type:type_name -> proto.PostType + 2, // 5: proto.Post.pin_mode:type_name -> proto.PostPinMode + 6, // 6: proto.Post.embed_view:type_name -> proto.PostEmbedView + 22, // 7: proto.Post.reactions_count:type_name -> proto.Post.ReactionsCountEntry + 23, // 8: proto.Post.reactions_made:type_name -> proto.Post.ReactionsMadeEntry + 7, // 9: proto.Post.replied_post:type_name -> proto.Post + 7, // 10: proto.Post.forwarded_post:type_name -> proto.Post + 25, // 11: proto.Post.realm:type_name -> proto.Realm + 26, // 12: proto.Post.attachments:type_name -> proto.CloudFile + 27, // 13: proto.Post.publisher:type_name -> proto.Publisher + 14, // 14: proto.Post.awards:type_name -> proto.PostAward + 13, // 15: proto.Post.reactions:type_name -> proto.PostReaction + 8, // 16: proto.Post.tags:type_name -> proto.PostTag + 9, // 17: proto.Post.categories:type_name -> proto.PostCategory + 12, // 18: proto.Post.featured_records:type_name -> proto.PostFeaturedRecord + 24, // 19: proto.Post.created_at:type_name -> google.protobuf.Timestamp + 24, // 20: proto.Post.updated_at:type_name -> google.protobuf.Timestamp + 24, // 21: proto.Post.deleted_at:type_name -> google.protobuf.Timestamp + 24, // 22: proto.PostTag.created_at:type_name -> google.protobuf.Timestamp + 24, // 23: proto.PostTag.updated_at:type_name -> google.protobuf.Timestamp + 24, // 24: proto.PostCategory.created_at:type_name -> google.protobuf.Timestamp + 24, // 25: proto.PostCategory.updated_at:type_name -> google.protobuf.Timestamp + 9, // 26: proto.PostCategorySubscription.category:type_name -> proto.PostCategory + 8, // 27: proto.PostCategorySubscription.tag:type_name -> proto.PostTag + 24, // 28: proto.PostCategorySubscription.created_at:type_name -> google.protobuf.Timestamp + 24, // 29: proto.PostCategorySubscription.updated_at:type_name -> google.protobuf.Timestamp + 28, // 30: proto.PostCollection.name:type_name -> google.protobuf.StringValue + 28, // 31: proto.PostCollection.description:type_name -> google.protobuf.StringValue + 27, // 32: proto.PostCollection.publisher:type_name -> proto.Publisher + 7, // 33: proto.PostCollection.posts:type_name -> proto.Post + 24, // 34: proto.PostCollection.created_at:type_name -> google.protobuf.Timestamp + 24, // 35: proto.PostCollection.updated_at:type_name -> google.protobuf.Timestamp + 24, // 36: proto.PostFeaturedRecord.featured_at:type_name -> google.protobuf.Timestamp + 24, // 37: proto.PostFeaturedRecord.created_at:type_name -> google.protobuf.Timestamp + 24, // 38: proto.PostFeaturedRecord.updated_at:type_name -> google.protobuf.Timestamp + 4, // 39: proto.PostReaction.attitude:type_name -> proto.PostReactionAttitude + 29, // 40: proto.PostReaction.account:type_name -> proto.Account + 24, // 41: proto.PostReaction.created_at:type_name -> google.protobuf.Timestamp + 24, // 42: proto.PostReaction.updated_at:type_name -> google.protobuf.Timestamp + 4, // 43: proto.PostAward.attitude:type_name -> proto.PostReactionAttitude + 28, // 44: proto.PostAward.message:type_name -> google.protobuf.StringValue + 24, // 45: proto.PostAward.created_at:type_name -> google.protobuf.Timestamp + 24, // 46: proto.PostAward.updated_at:type_name -> google.protobuf.Timestamp + 28, // 47: proto.GetPostRequest.publisher_id:type_name -> google.protobuf.StringValue + 7, // 48: proto.GetPostBatchResponse.posts:type_name -> proto.Post + 7, // 49: proto.SearchPostsResponse.posts:type_name -> proto.Post + 28, // 50: proto.ListPostsRequest.publisher_id:type_name -> google.protobuf.StringValue + 28, // 51: proto.ListPostsRequest.realm_id:type_name -> google.protobuf.StringValue + 28, // 52: proto.ListPostsRequest.order_by:type_name -> google.protobuf.StringValue + 28, // 53: proto.ListPostsRequest.query:type_name -> google.protobuf.StringValue + 0, // 54: proto.ListPostsRequest.types:type_name -> proto.PostType + 24, // 55: proto.ListPostsRequest.after:type_name -> google.protobuf.Timestamp + 24, // 56: proto.ListPostsRequest.before:type_name -> google.protobuf.Timestamp + 2, // 57: proto.ListPostsRequest.pinned:type_name -> proto.PostPinMode + 7, // 58: proto.ListPostsResponse.posts:type_name -> proto.Post + 15, // 59: proto.PostService.GetPost:input_type -> proto.GetPostRequest + 16, // 60: proto.PostService.GetPostBatch:input_type -> proto.GetPostBatchRequest + 18, // 61: proto.PostService.SearchPosts:input_type -> proto.SearchPostsRequest + 20, // 62: proto.PostService.ListPosts:input_type -> proto.ListPostsRequest + 7, // 63: proto.PostService.GetPost:output_type -> proto.Post + 17, // 64: proto.PostService.GetPostBatch:output_type -> proto.GetPostBatchResponse + 19, // 65: proto.PostService.SearchPosts:output_type -> proto.SearchPostsResponse + 21, // 66: proto.PostService.ListPosts:output_type -> proto.ListPostsResponse + 63, // [63:67] is the sub-list for method output_type + 59, // [59:63] is the sub-list for method input_type + 59, // [59:59] is the sub-list for extension type_name + 59, // [59:59] is the sub-list for extension extendee + 0, // [0:59] is the sub-list for field type_name +} + +func init() { file_post_proto_init() } +func file_post_proto_init() { + if File_post_proto != nil { + return + } + file_file_proto_init() + file_realm_proto_init() + file_publisher_proto_init() + file_account_proto_init() + file_post_proto_msgTypes[0].OneofWrappers = []any{} + file_post_proto_msgTypes[1].OneofWrappers = []any{} + file_post_proto_msgTypes[4].OneofWrappers = []any{} + file_post_proto_msgTypes[5].OneofWrappers = []any{} + file_post_proto_msgTypes[6].OneofWrappers = []any{} + file_post_proto_msgTypes[7].OneofWrappers = []any{} + file_post_proto_msgTypes[8].OneofWrappers = []any{} + file_post_proto_msgTypes[9].OneofWrappers = []any{ + (*GetPostRequest_Id)(nil), + (*GetPostRequest_Slug)(nil), + } + file_post_proto_msgTypes[14].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_post_proto_rawDesc), len(file_post_proto_rawDesc)), + NumEnums: 6, + NumMessages: 18, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_post_proto_goTypes, + DependencyIndexes: file_post_proto_depIdxs, + EnumInfos: file_post_proto_enumTypes, + MessageInfos: file_post_proto_msgTypes, + }.Build() + File_post_proto = out.File + file_post_proto_goTypes = nil + file_post_proto_depIdxs = nil +} diff --git a/pkg/shared/proto/gen/post_grpc.pb.go b/pkg/shared/proto/gen/post_grpc.pb.go new file mode 100644 index 0000000..6c3f087 --- /dev/null +++ b/pkg/shared/proto/gen/post_grpc.pb.go @@ -0,0 +1,243 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.0 +// - protoc v6.33.1 +// source: post.proto + +package gen + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + PostService_GetPost_FullMethodName = "/proto.PostService/GetPost" + PostService_GetPostBatch_FullMethodName = "/proto.PostService/GetPostBatch" + PostService_SearchPosts_FullMethodName = "/proto.PostService/SearchPosts" + PostService_ListPosts_FullMethodName = "/proto.PostService/ListPosts" +) + +// PostServiceClient is the client API for PostService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type PostServiceClient interface { + // Get a single post by id + GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*Post, error) + // Get multiple posts by ids + GetPostBatch(ctx context.Context, in *GetPostBatchRequest, opts ...grpc.CallOption) (*GetPostBatchResponse, error) + // Search posts + SearchPosts(ctx context.Context, in *SearchPostsRequest, opts ...grpc.CallOption) (*SearchPostsResponse, error) + // List posts with filters + ListPosts(ctx context.Context, in *ListPostsRequest, opts ...grpc.CallOption) (*ListPostsResponse, error) +} + +type postServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewPostServiceClient(cc grpc.ClientConnInterface) PostServiceClient { + return &postServiceClient{cc} +} + +func (c *postServiceClient) GetPost(ctx context.Context, in *GetPostRequest, opts ...grpc.CallOption) (*Post, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Post) + err := c.cc.Invoke(ctx, PostService_GetPost_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *postServiceClient) GetPostBatch(ctx context.Context, in *GetPostBatchRequest, opts ...grpc.CallOption) (*GetPostBatchResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetPostBatchResponse) + err := c.cc.Invoke(ctx, PostService_GetPostBatch_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *postServiceClient) SearchPosts(ctx context.Context, in *SearchPostsRequest, opts ...grpc.CallOption) (*SearchPostsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SearchPostsResponse) + err := c.cc.Invoke(ctx, PostService_SearchPosts_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *postServiceClient) ListPosts(ctx context.Context, in *ListPostsRequest, opts ...grpc.CallOption) (*ListPostsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListPostsResponse) + err := c.cc.Invoke(ctx, PostService_ListPosts_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PostServiceServer is the server API for PostService service. +// All implementations must embed UnimplementedPostServiceServer +// for forward compatibility. +type PostServiceServer interface { + // Get a single post by id + GetPost(context.Context, *GetPostRequest) (*Post, error) + // Get multiple posts by ids + GetPostBatch(context.Context, *GetPostBatchRequest) (*GetPostBatchResponse, error) + // Search posts + SearchPosts(context.Context, *SearchPostsRequest) (*SearchPostsResponse, error) + // List posts with filters + ListPosts(context.Context, *ListPostsRequest) (*ListPostsResponse, error) + mustEmbedUnimplementedPostServiceServer() +} + +// UnimplementedPostServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedPostServiceServer struct{} + +func (UnimplementedPostServiceServer) GetPost(context.Context, *GetPostRequest) (*Post, error) { + return nil, status.Error(codes.Unimplemented, "method GetPost not implemented") +} +func (UnimplementedPostServiceServer) GetPostBatch(context.Context, *GetPostBatchRequest) (*GetPostBatchResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetPostBatch not implemented") +} +func (UnimplementedPostServiceServer) SearchPosts(context.Context, *SearchPostsRequest) (*SearchPostsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SearchPosts not implemented") +} +func (UnimplementedPostServiceServer) ListPosts(context.Context, *ListPostsRequest) (*ListPostsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListPosts not implemented") +} +func (UnimplementedPostServiceServer) mustEmbedUnimplementedPostServiceServer() {} +func (UnimplementedPostServiceServer) testEmbeddedByValue() {} + +// UnsafePostServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PostServiceServer will +// result in compilation errors. +type UnsafePostServiceServer interface { + mustEmbedUnimplementedPostServiceServer() +} + +func RegisterPostServiceServer(s grpc.ServiceRegistrar, srv PostServiceServer) { + // If the following call panics, it indicates UnimplementedPostServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&PostService_ServiceDesc, srv) +} + +func _PostService_GetPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPostRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PostServiceServer).GetPost(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PostService_GetPost_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PostServiceServer).GetPost(ctx, req.(*GetPostRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PostService_GetPostBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPostBatchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PostServiceServer).GetPostBatch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PostService_GetPostBatch_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PostServiceServer).GetPostBatch(ctx, req.(*GetPostBatchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PostService_SearchPosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchPostsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PostServiceServer).SearchPosts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PostService_SearchPosts_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PostServiceServer).SearchPosts(ctx, req.(*SearchPostsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PostService_ListPosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPostsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PostServiceServer).ListPosts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PostService_ListPosts_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PostServiceServer).ListPosts(ctx, req.(*ListPostsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// PostService_ServiceDesc is the grpc.ServiceDesc for PostService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var PostService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "proto.PostService", + HandlerType: (*PostServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetPost", + Handler: _PostService_GetPost_Handler, + }, + { + MethodName: "GetPostBatch", + Handler: _PostService_GetPostBatch_Handler, + }, + { + MethodName: "SearchPosts", + Handler: _PostService_SearchPosts_Handler, + }, + { + MethodName: "ListPosts", + Handler: _PostService_ListPosts_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "post.proto", +} diff --git a/pkg/shared/proto/gen/publisher.pb.go b/pkg/shared/proto/gen/publisher.pb.go new file mode 100644 index 0000000..5cac2df --- /dev/null +++ b/pkg/shared/proto/gen/publisher.pb.go @@ -0,0 +1,1246 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.10 +// protoc v6.33.1 +// source: publisher.proto + +package gen + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PublisherType int32 + +const ( + PublisherType_PUBLISHER_TYPE_UNSPECIFIED PublisherType = 0 + PublisherType_PUB_INDIVIDUAL PublisherType = 1 + PublisherType_PUB_ORGANIZATIONAL PublisherType = 2 +) + +// Enum value maps for PublisherType. +var ( + PublisherType_name = map[int32]string{ + 0: "PUBLISHER_TYPE_UNSPECIFIED", + 1: "PUB_INDIVIDUAL", + 2: "PUB_ORGANIZATIONAL", + } + PublisherType_value = map[string]int32{ + "PUBLISHER_TYPE_UNSPECIFIED": 0, + "PUB_INDIVIDUAL": 1, + "PUB_ORGANIZATIONAL": 2, + } +) + +func (x PublisherType) Enum() *PublisherType { + p := new(PublisherType) + *p = x + return p +} + +func (x PublisherType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PublisherType) Descriptor() protoreflect.EnumDescriptor { + return file_publisher_proto_enumTypes[0].Descriptor() +} + +func (PublisherType) Type() protoreflect.EnumType { + return &file_publisher_proto_enumTypes[0] +} + +func (x PublisherType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PublisherType.Descriptor instead. +func (PublisherType) EnumDescriptor() ([]byte, []int) { + return file_publisher_proto_rawDescGZIP(), []int{0} +} + +type PublisherMemberRole int32 + +const ( + PublisherMemberRole_PUBLISHER_MEMBER_ROLE_UNSPECIFIED PublisherMemberRole = 0 + PublisherMemberRole_OWNER PublisherMemberRole = 100 + PublisherMemberRole_MANAGER PublisherMemberRole = 75 + PublisherMemberRole_EDITOR PublisherMemberRole = 50 + PublisherMemberRole_VIEWER PublisherMemberRole = 25 +) + +// Enum value maps for PublisherMemberRole. +var ( + PublisherMemberRole_name = map[int32]string{ + 0: "PUBLISHER_MEMBER_ROLE_UNSPECIFIED", + 100: "OWNER", + 75: "MANAGER", + 50: "EDITOR", + 25: "VIEWER", + } + PublisherMemberRole_value = map[string]int32{ + "PUBLISHER_MEMBER_ROLE_UNSPECIFIED": 0, + "OWNER": 100, + "MANAGER": 75, + "EDITOR": 50, + "VIEWER": 25, + } +) + +func (x PublisherMemberRole) Enum() *PublisherMemberRole { + p := new(PublisherMemberRole) + *p = x + return p +} + +func (x PublisherMemberRole) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PublisherMemberRole) Descriptor() protoreflect.EnumDescriptor { + return file_publisher_proto_enumTypes[1].Descriptor() +} + +func (PublisherMemberRole) Type() protoreflect.EnumType { + return &file_publisher_proto_enumTypes[1] +} + +func (x PublisherMemberRole) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PublisherMemberRole.Descriptor instead. +func (PublisherMemberRole) EnumDescriptor() ([]byte, []int) { + return file_publisher_proto_rawDescGZIP(), []int{1} +} + +type PublisherFeature struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Flag string `protobuf:"bytes,2,opt,name=flag,proto3" json:"flag,omitempty"` + ExpiredAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"` + PublisherId string `protobuf:"bytes,4,opt,name=publisher_id,json=publisherId,proto3" json:"publisher_id,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublisherFeature) Reset() { + *x = PublisherFeature{} + mi := &file_publisher_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublisherFeature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublisherFeature) ProtoMessage() {} + +func (x *PublisherFeature) ProtoReflect() protoreflect.Message { + mi := &file_publisher_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublisherFeature.ProtoReflect.Descriptor instead. +func (*PublisherFeature) Descriptor() ([]byte, []int) { + return file_publisher_proto_rawDescGZIP(), []int{0} +} + +func (x *PublisherFeature) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *PublisherFeature) GetFlag() string { + if x != nil { + return x.Flag + } + return "" +} + +func (x *PublisherFeature) GetExpiredAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiredAt + } + return nil +} + +func (x *PublisherFeature) GetPublisherId() string { + if x != nil { + return x.PublisherId + } + return "" +} + +func (x *PublisherFeature) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *PublisherFeature) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type PublisherMember struct { + state protoimpl.MessageState `protogen:"open.v1"` + PublisherId string `protobuf:"bytes,1,opt,name=publisher_id,json=publisherId,proto3" json:"publisher_id,omitempty"` + AccountId string `protobuf:"bytes,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + Role PublisherMemberRole `protobuf:"varint,3,opt,name=role,proto3,enum=proto.PublisherMemberRole" json:"role,omitempty"` + JoinedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=joined_at,json=joinedAt,proto3" json:"joined_at,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PublisherMember) Reset() { + *x = PublisherMember{} + mi := &file_publisher_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PublisherMember) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublisherMember) ProtoMessage() {} + +func (x *PublisherMember) ProtoReflect() protoreflect.Message { + mi := &file_publisher_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublisherMember.ProtoReflect.Descriptor instead. +func (*PublisherMember) Descriptor() ([]byte, []int) { + return file_publisher_proto_rawDescGZIP(), []int{1} +} + +func (x *PublisherMember) GetPublisherId() string { + if x != nil { + return x.PublisherId + } + return "" +} + +func (x *PublisherMember) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *PublisherMember) GetRole() PublisherMemberRole { + if x != nil { + return x.Role + } + return PublisherMemberRole_PUBLISHER_MEMBER_ROLE_UNSPECIFIED +} + +func (x *PublisherMember) GetJoinedAt() *timestamppb.Timestamp { + if x != nil { + return x.JoinedAt + } + return nil +} + +func (x *PublisherMember) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *PublisherMember) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type Publisher struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Type PublisherType `protobuf:"varint,2,opt,name=type,proto3,enum=proto.PublisherType" json:"type,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Nick string `protobuf:"bytes,4,opt,name=nick,proto3" json:"nick,omitempty"` + Bio *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=bio,proto3" json:"bio,omitempty"` + Picture *CloudFile `protobuf:"bytes,8,opt,name=picture,proto3" json:"picture,omitempty"` + Background *CloudFile `protobuf:"bytes,9,opt,name=background,proto3" json:"background,omitempty"` + VerificationMark *VerificationMark `protobuf:"bytes,10,opt,name=verification_mark,json=verificationMark,proto3,oneof" json:"verification_mark,omitempty"` + AccountId string `protobuf:"bytes,11,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + RealmId *string `protobuf:"bytes,12,opt,name=realm_id,json=realmId,proto3,oneof" json:"realm_id,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,14,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Publisher) Reset() { + *x = Publisher{} + mi := &file_publisher_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Publisher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Publisher) ProtoMessage() {} + +func (x *Publisher) ProtoReflect() protoreflect.Message { + mi := &file_publisher_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Publisher.ProtoReflect.Descriptor instead. +func (*Publisher) Descriptor() ([]byte, []int) { + return file_publisher_proto_rawDescGZIP(), []int{2} +} + +func (x *Publisher) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Publisher) GetType() PublisherType { + if x != nil { + return x.Type + } + return PublisherType_PUBLISHER_TYPE_UNSPECIFIED +} + +func (x *Publisher) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Publisher) GetNick() string { + if x != nil { + return x.Nick + } + return "" +} + +func (x *Publisher) GetBio() *wrapperspb.StringValue { + if x != nil { + return x.Bio + } + return nil +} + +func (x *Publisher) GetPicture() *CloudFile { + if x != nil { + return x.Picture + } + return nil +} + +func (x *Publisher) GetBackground() *CloudFile { + if x != nil { + return x.Background + } + return nil +} + +func (x *Publisher) GetVerificationMark() *VerificationMark { + if x != nil { + return x.VerificationMark + } + return nil +} + +func (x *Publisher) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *Publisher) GetRealmId() string { + if x != nil && x.RealmId != nil { + return *x.RealmId + } + return "" +} + +func (x *Publisher) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Publisher) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type GetPublisherRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Query: + // + // *GetPublisherRequest_Name + // *GetPublisherRequest_Id + Query isGetPublisherRequest_Query `protobuf_oneof:"query"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPublisherRequest) Reset() { + *x = GetPublisherRequest{} + mi := &file_publisher_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPublisherRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPublisherRequest) ProtoMessage() {} + +func (x *GetPublisherRequest) ProtoReflect() protoreflect.Message { + mi := &file_publisher_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPublisherRequest.ProtoReflect.Descriptor instead. +func (*GetPublisherRequest) Descriptor() ([]byte, []int) { + return file_publisher_proto_rawDescGZIP(), []int{3} +} + +func (x *GetPublisherRequest) GetQuery() isGetPublisherRequest_Query { + if x != nil { + return x.Query + } + return nil +} + +func (x *GetPublisherRequest) GetName() string { + if x != nil { + if x, ok := x.Query.(*GetPublisherRequest_Name); ok { + return x.Name + } + } + return "" +} + +func (x *GetPublisherRequest) GetId() string { + if x != nil { + if x, ok := x.Query.(*GetPublisherRequest_Id); ok { + return x.Id + } + } + return "" +} + +type isGetPublisherRequest_Query interface { + isGetPublisherRequest_Query() +} + +type GetPublisherRequest_Name struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3,oneof"` +} + +type GetPublisherRequest_Id struct { + Id string `protobuf:"bytes,2,opt,name=id,proto3,oneof"` +} + +func (*GetPublisherRequest_Name) isGetPublisherRequest_Query() {} + +func (*GetPublisherRequest_Id) isGetPublisherRequest_Query() {} + +type GetPublisherResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Publisher *Publisher `protobuf:"bytes,1,opt,name=publisher,proto3" json:"publisher,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPublisherResponse) Reset() { + *x = GetPublisherResponse{} + mi := &file_publisher_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPublisherResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPublisherResponse) ProtoMessage() {} + +func (x *GetPublisherResponse) ProtoReflect() protoreflect.Message { + mi := &file_publisher_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPublisherResponse.ProtoReflect.Descriptor instead. +func (*GetPublisherResponse) Descriptor() ([]byte, []int) { + return file_publisher_proto_rawDescGZIP(), []int{4} +} + +func (x *GetPublisherResponse) GetPublisher() *Publisher { + if x != nil { + return x.Publisher + } + return nil +} + +type GetPublisherBatchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPublisherBatchRequest) Reset() { + *x = GetPublisherBatchRequest{} + mi := &file_publisher_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPublisherBatchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPublisherBatchRequest) ProtoMessage() {} + +func (x *GetPublisherBatchRequest) ProtoReflect() protoreflect.Message { + mi := &file_publisher_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPublisherBatchRequest.ProtoReflect.Descriptor instead. +func (*GetPublisherBatchRequest) Descriptor() ([]byte, []int) { + return file_publisher_proto_rawDescGZIP(), []int{5} +} + +func (x *GetPublisherBatchRequest) GetIds() []string { + if x != nil { + return x.Ids + } + return nil +} + +type ListPublishersRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` // filter by owner/member account + RealmId string `protobuf:"bytes,2,opt,name=realm_id,json=realmId,proto3" json:"realm_id,omitempty"` // filter by realm + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListPublishersRequest) Reset() { + *x = ListPublishersRequest{} + mi := &file_publisher_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListPublishersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPublishersRequest) ProtoMessage() {} + +func (x *ListPublishersRequest) ProtoReflect() protoreflect.Message { + mi := &file_publisher_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPublishersRequest.ProtoReflect.Descriptor instead. +func (*ListPublishersRequest) Descriptor() ([]byte, []int) { + return file_publisher_proto_rawDescGZIP(), []int{6} +} + +func (x *ListPublishersRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *ListPublishersRequest) GetRealmId() string { + if x != nil { + return x.RealmId + } + return "" +} + +type ListPublishersResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Publishers []*Publisher `protobuf:"bytes,1,rep,name=publishers,proto3" json:"publishers,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListPublishersResponse) Reset() { + *x = ListPublishersResponse{} + mi := &file_publisher_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListPublishersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPublishersResponse) ProtoMessage() {} + +func (x *ListPublishersResponse) ProtoReflect() protoreflect.Message { + mi := &file_publisher_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPublishersResponse.ProtoReflect.Descriptor instead. +func (*ListPublishersResponse) Descriptor() ([]byte, []int) { + return file_publisher_proto_rawDescGZIP(), []int{7} +} + +func (x *ListPublishersResponse) GetPublishers() []*Publisher { + if x != nil { + return x.Publishers + } + return nil +} + +type ListPublisherMembersRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PublisherId string `protobuf:"bytes,1,opt,name=publisher_id,json=publisherId,proto3" json:"publisher_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListPublisherMembersRequest) Reset() { + *x = ListPublisherMembersRequest{} + mi := &file_publisher_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListPublisherMembersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPublisherMembersRequest) ProtoMessage() {} + +func (x *ListPublisherMembersRequest) ProtoReflect() protoreflect.Message { + mi := &file_publisher_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPublisherMembersRequest.ProtoReflect.Descriptor instead. +func (*ListPublisherMembersRequest) Descriptor() ([]byte, []int) { + return file_publisher_proto_rawDescGZIP(), []int{8} +} + +func (x *ListPublisherMembersRequest) GetPublisherId() string { + if x != nil { + return x.PublisherId + } + return "" +} + +type ListPublisherMembersResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Members []*PublisherMember `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListPublisherMembersResponse) Reset() { + *x = ListPublisherMembersResponse{} + mi := &file_publisher_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListPublisherMembersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPublisherMembersResponse) ProtoMessage() {} + +func (x *ListPublisherMembersResponse) ProtoReflect() protoreflect.Message { + mi := &file_publisher_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPublisherMembersResponse.ProtoReflect.Descriptor instead. +func (*ListPublisherMembersResponse) Descriptor() ([]byte, []int) { + return file_publisher_proto_rawDescGZIP(), []int{9} +} + +func (x *ListPublisherMembersResponse) GetMembers() []*PublisherMember { + if x != nil { + return x.Members + } + return nil +} + +type SetPublisherFeatureFlagRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PublisherId string `protobuf:"bytes,1,opt,name=publisher_id,json=publisherId,proto3" json:"publisher_id,omitempty"` + Flag string `protobuf:"bytes,2,opt,name=flag,proto3" json:"flag,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetPublisherFeatureFlagRequest) Reset() { + *x = SetPublisherFeatureFlagRequest{} + mi := &file_publisher_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetPublisherFeatureFlagRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetPublisherFeatureFlagRequest) ProtoMessage() {} + +func (x *SetPublisherFeatureFlagRequest) ProtoReflect() protoreflect.Message { + mi := &file_publisher_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetPublisherFeatureFlagRequest.ProtoReflect.Descriptor instead. +func (*SetPublisherFeatureFlagRequest) Descriptor() ([]byte, []int) { + return file_publisher_proto_rawDescGZIP(), []int{10} +} + +func (x *SetPublisherFeatureFlagRequest) GetPublisherId() string { + if x != nil { + return x.PublisherId + } + return "" +} + +func (x *SetPublisherFeatureFlagRequest) GetFlag() string { + if x != nil { + return x.Flag + } + return "" +} + +type HasPublisherFeatureRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PublisherId string `protobuf:"bytes,1,opt,name=publisher_id,json=publisherId,proto3" json:"publisher_id,omitempty"` + Flag string `protobuf:"bytes,2,opt,name=flag,proto3" json:"flag,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HasPublisherFeatureRequest) Reset() { + *x = HasPublisherFeatureRequest{} + mi := &file_publisher_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HasPublisherFeatureRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HasPublisherFeatureRequest) ProtoMessage() {} + +func (x *HasPublisherFeatureRequest) ProtoReflect() protoreflect.Message { + mi := &file_publisher_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HasPublisherFeatureRequest.ProtoReflect.Descriptor instead. +func (*HasPublisherFeatureRequest) Descriptor() ([]byte, []int) { + return file_publisher_proto_rawDescGZIP(), []int{11} +} + +func (x *HasPublisherFeatureRequest) GetPublisherId() string { + if x != nil { + return x.PublisherId + } + return "" +} + +func (x *HasPublisherFeatureRequest) GetFlag() string { + if x != nil { + return x.Flag + } + return "" +} + +type HasPublisherFeatureResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HasPublisherFeatureResponse) Reset() { + *x = HasPublisherFeatureResponse{} + mi := &file_publisher_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HasPublisherFeatureResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HasPublisherFeatureResponse) ProtoMessage() {} + +func (x *HasPublisherFeatureResponse) ProtoReflect() protoreflect.Message { + mi := &file_publisher_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HasPublisherFeatureResponse.ProtoReflect.Descriptor instead. +func (*HasPublisherFeatureResponse) Descriptor() ([]byte, []int) { + return file_publisher_proto_rawDescGZIP(), []int{12} +} + +func (x *HasPublisherFeatureResponse) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +type IsPublisherMemberRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PublisherId string `protobuf:"bytes,1,opt,name=publisher_id,json=publisherId,proto3" json:"publisher_id,omitempty"` + AccountId string `protobuf:"bytes,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + Role PublisherMemberRole `protobuf:"varint,3,opt,name=role,proto3,enum=proto.PublisherMemberRole" json:"role,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IsPublisherMemberRequest) Reset() { + *x = IsPublisherMemberRequest{} + mi := &file_publisher_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IsPublisherMemberRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsPublisherMemberRequest) ProtoMessage() {} + +func (x *IsPublisherMemberRequest) ProtoReflect() protoreflect.Message { + mi := &file_publisher_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsPublisherMemberRequest.ProtoReflect.Descriptor instead. +func (*IsPublisherMemberRequest) Descriptor() ([]byte, []int) { + return file_publisher_proto_rawDescGZIP(), []int{13} +} + +func (x *IsPublisherMemberRequest) GetPublisherId() string { + if x != nil { + return x.PublisherId + } + return "" +} + +func (x *IsPublisherMemberRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *IsPublisherMemberRequest) GetRole() PublisherMemberRole { + if x != nil { + return x.Role + } + return PublisherMemberRole_PUBLISHER_MEMBER_ROLE_UNSPECIFIED +} + +type IsPublisherMemberResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IsPublisherMemberResponse) Reset() { + *x = IsPublisherMemberResponse{} + mi := &file_publisher_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IsPublisherMemberResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsPublisherMemberResponse) ProtoMessage() {} + +func (x *IsPublisherMemberResponse) ProtoReflect() protoreflect.Message { + mi := &file_publisher_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsPublisherMemberResponse.ProtoReflect.Descriptor instead. +func (*IsPublisherMemberResponse) Descriptor() ([]byte, []int) { + return file_publisher_proto_rawDescGZIP(), []int{14} +} + +func (x *IsPublisherMemberResponse) GetValid() bool { + if x != nil { + return x.Valid + } + return false +} + +var File_publisher_proto protoreflect.FileDescriptor + +const file_publisher_proto_rawDesc = "" + + "\n" + + "\x0fpublisher.proto\x12\x05proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\n" + + "file.proto\x1a\raccount.proto\"\x8a\x02\n" + + "\x10PublisherFeature\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04flag\x18\x02 \x01(\tR\x04flag\x129\n" + + "\n" + + "expired_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\texpiredAt\x12!\n" + + "\fpublisher_id\x18\x04 \x01(\tR\vpublisherId\x129\n" + + "\n" + + "created_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"\xb2\x02\n" + + "\x0fPublisherMember\x12!\n" + + "\fpublisher_id\x18\x01 \x01(\tR\vpublisherId\x12\x1d\n" + + "\n" + + "account_id\x18\x02 \x01(\tR\taccountId\x12.\n" + + "\x04role\x18\x03 \x01(\x0e2\x1a.proto.PublisherMemberRoleR\x04role\x127\n" + + "\tjoined_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\bjoinedAt\x129\n" + + "\n" + + "created_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"\x9e\x04\n" + + "\tPublisher\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12(\n" + + "\x04type\x18\x02 \x01(\x0e2\x14.proto.PublisherTypeR\x04type\x12\x12\n" + + "\x04name\x18\x03 \x01(\tR\x04name\x12\x12\n" + + "\x04nick\x18\x04 \x01(\tR\x04nick\x12.\n" + + "\x03bio\x18\x05 \x01(\v2\x1c.google.protobuf.StringValueR\x03bio\x12*\n" + + "\apicture\x18\b \x01(\v2\x10.proto.CloudFileR\apicture\x120\n" + + "\n" + + "background\x18\t \x01(\v2\x10.proto.CloudFileR\n" + + "background\x12I\n" + + "\x11verification_mark\x18\n" + + " \x01(\v2\x17.proto.VerificationMarkH\x00R\x10verificationMark\x88\x01\x01\x12\x1d\n" + + "\n" + + "account_id\x18\v \x01(\tR\taccountId\x12\x1e\n" + + "\brealm_id\x18\f \x01(\tH\x01R\arealmId\x88\x01\x01\x129\n" + + "\n" + + "created_at\x18\r \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\x0e \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAtB\x14\n" + + "\x12_verification_markB\v\n" + + "\t_realm_id\"F\n" + + "\x13GetPublisherRequest\x12\x14\n" + + "\x04name\x18\x01 \x01(\tH\x00R\x04name\x12\x10\n" + + "\x02id\x18\x02 \x01(\tH\x00R\x02idB\a\n" + + "\x05query\"F\n" + + "\x14GetPublisherResponse\x12.\n" + + "\tpublisher\x18\x01 \x01(\v2\x10.proto.PublisherR\tpublisher\",\n" + + "\x18GetPublisherBatchRequest\x12\x10\n" + + "\x03ids\x18\x01 \x03(\tR\x03ids\"Q\n" + + "\x15ListPublishersRequest\x12\x1d\n" + + "\n" + + "account_id\x18\x01 \x01(\tR\taccountId\x12\x19\n" + + "\brealm_id\x18\x02 \x01(\tR\arealmId\"J\n" + + "\x16ListPublishersResponse\x120\n" + + "\n" + + "publishers\x18\x01 \x03(\v2\x10.proto.PublisherR\n" + + "publishers\"@\n" + + "\x1bListPublisherMembersRequest\x12!\n" + + "\fpublisher_id\x18\x01 \x01(\tR\vpublisherId\"P\n" + + "\x1cListPublisherMembersResponse\x120\n" + + "\amembers\x18\x01 \x03(\v2\x16.proto.PublisherMemberR\amembers\"W\n" + + "\x1eSetPublisherFeatureFlagRequest\x12!\n" + + "\fpublisher_id\x18\x01 \x01(\tR\vpublisherId\x12\x12\n" + + "\x04flag\x18\x02 \x01(\tR\x04flag\"S\n" + + "\x1aHasPublisherFeatureRequest\x12!\n" + + "\fpublisher_id\x18\x01 \x01(\tR\vpublisherId\x12\x12\n" + + "\x04flag\x18\x02 \x01(\tR\x04flag\"7\n" + + "\x1bHasPublisherFeatureResponse\x12\x18\n" + + "\aenabled\x18\x01 \x01(\bR\aenabled\"\x8c\x01\n" + + "\x18IsPublisherMemberRequest\x12!\n" + + "\fpublisher_id\x18\x01 \x01(\tR\vpublisherId\x12\x1d\n" + + "\n" + + "account_id\x18\x02 \x01(\tR\taccountId\x12.\n" + + "\x04role\x18\x03 \x01(\x0e2\x1a.proto.PublisherMemberRoleR\x04role\"1\n" + + "\x19IsPublisherMemberResponse\x12\x14\n" + + "\x05valid\x18\x01 \x01(\bR\x05valid*[\n" + + "\rPublisherType\x12\x1e\n" + + "\x1aPUBLISHER_TYPE_UNSPECIFIED\x10\x00\x12\x12\n" + + "\x0ePUB_INDIVIDUAL\x10\x01\x12\x16\n" + + "\x12PUB_ORGANIZATIONAL\x10\x02*l\n" + + "\x13PublisherMemberRole\x12%\n" + + "!PUBLISHER_MEMBER_ROLE_UNSPECIFIED\x10\x00\x12\t\n" + + "\x05OWNER\x10d\x12\v\n" + + "\aMANAGER\x10K\x12\n" + + "\n" + + "\x06EDITOR\x102\x12\n" + + "\n" + + "\x06VIEWER\x10\x192\xf6\x04\n" + + "\x10PublisherService\x12G\n" + + "\fGetPublisher\x12\x1a.proto.GetPublisherRequest\x1a\x1b.proto.GetPublisherResponse\x12S\n" + + "\x11GetPublisherBatch\x12\x1f.proto.GetPublisherBatchRequest\x1a\x1d.proto.ListPublishersResponse\x12M\n" + + "\x0eListPublishers\x12\x1c.proto.ListPublishersRequest\x1a\x1d.proto.ListPublishersResponse\x12_\n" + + "\x14ListPublisherMembers\x12\".proto.ListPublisherMembersRequest\x1a#.proto.ListPublisherMembersResponse\x12^\n" + + "\x17SetPublisherFeatureFlag\x12%.proto.SetPublisherFeatureFlagRequest\x1a\x1c.google.protobuf.StringValue\x12\\\n" + + "\x13HasPublisherFeature\x12!.proto.HasPublisherFeatureRequest\x1a\".proto.HasPublisherFeatureResponse\x12V\n" + + "\x11IsPublisherMember\x12\x1f.proto.IsPublisherMemberRequest\x1a .proto.IsPublisherMemberResponseBUZ7git.solsynth.dev/goatworks/turbine/pkg/shared/proto/gen\xaa\x02\x19DysonNetwork.Shared.Protob\x06proto3" + +var ( + file_publisher_proto_rawDescOnce sync.Once + file_publisher_proto_rawDescData []byte +) + +func file_publisher_proto_rawDescGZIP() []byte { + file_publisher_proto_rawDescOnce.Do(func() { + file_publisher_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_publisher_proto_rawDesc), len(file_publisher_proto_rawDesc))) + }) + return file_publisher_proto_rawDescData +} + +var file_publisher_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_publisher_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_publisher_proto_goTypes = []any{ + (PublisherType)(0), // 0: proto.PublisherType + (PublisherMemberRole)(0), // 1: proto.PublisherMemberRole + (*PublisherFeature)(nil), // 2: proto.PublisherFeature + (*PublisherMember)(nil), // 3: proto.PublisherMember + (*Publisher)(nil), // 4: proto.Publisher + (*GetPublisherRequest)(nil), // 5: proto.GetPublisherRequest + (*GetPublisherResponse)(nil), // 6: proto.GetPublisherResponse + (*GetPublisherBatchRequest)(nil), // 7: proto.GetPublisherBatchRequest + (*ListPublishersRequest)(nil), // 8: proto.ListPublishersRequest + (*ListPublishersResponse)(nil), // 9: proto.ListPublishersResponse + (*ListPublisherMembersRequest)(nil), // 10: proto.ListPublisherMembersRequest + (*ListPublisherMembersResponse)(nil), // 11: proto.ListPublisherMembersResponse + (*SetPublisherFeatureFlagRequest)(nil), // 12: proto.SetPublisherFeatureFlagRequest + (*HasPublisherFeatureRequest)(nil), // 13: proto.HasPublisherFeatureRequest + (*HasPublisherFeatureResponse)(nil), // 14: proto.HasPublisherFeatureResponse + (*IsPublisherMemberRequest)(nil), // 15: proto.IsPublisherMemberRequest + (*IsPublisherMemberResponse)(nil), // 16: proto.IsPublisherMemberResponse + (*timestamppb.Timestamp)(nil), // 17: google.protobuf.Timestamp + (*wrapperspb.StringValue)(nil), // 18: google.protobuf.StringValue + (*CloudFile)(nil), // 19: proto.CloudFile + (*VerificationMark)(nil), // 20: proto.VerificationMark +} +var file_publisher_proto_depIdxs = []int32{ + 17, // 0: proto.PublisherFeature.expired_at:type_name -> google.protobuf.Timestamp + 17, // 1: proto.PublisherFeature.created_at:type_name -> google.protobuf.Timestamp + 17, // 2: proto.PublisherFeature.updated_at:type_name -> google.protobuf.Timestamp + 1, // 3: proto.PublisherMember.role:type_name -> proto.PublisherMemberRole + 17, // 4: proto.PublisherMember.joined_at:type_name -> google.protobuf.Timestamp + 17, // 5: proto.PublisherMember.created_at:type_name -> google.protobuf.Timestamp + 17, // 6: proto.PublisherMember.updated_at:type_name -> google.protobuf.Timestamp + 0, // 7: proto.Publisher.type:type_name -> proto.PublisherType + 18, // 8: proto.Publisher.bio:type_name -> google.protobuf.StringValue + 19, // 9: proto.Publisher.picture:type_name -> proto.CloudFile + 19, // 10: proto.Publisher.background:type_name -> proto.CloudFile + 20, // 11: proto.Publisher.verification_mark:type_name -> proto.VerificationMark + 17, // 12: proto.Publisher.created_at:type_name -> google.protobuf.Timestamp + 17, // 13: proto.Publisher.updated_at:type_name -> google.protobuf.Timestamp + 4, // 14: proto.GetPublisherResponse.publisher:type_name -> proto.Publisher + 4, // 15: proto.ListPublishersResponse.publishers:type_name -> proto.Publisher + 3, // 16: proto.ListPublisherMembersResponse.members:type_name -> proto.PublisherMember + 1, // 17: proto.IsPublisherMemberRequest.role:type_name -> proto.PublisherMemberRole + 5, // 18: proto.PublisherService.GetPublisher:input_type -> proto.GetPublisherRequest + 7, // 19: proto.PublisherService.GetPublisherBatch:input_type -> proto.GetPublisherBatchRequest + 8, // 20: proto.PublisherService.ListPublishers:input_type -> proto.ListPublishersRequest + 10, // 21: proto.PublisherService.ListPublisherMembers:input_type -> proto.ListPublisherMembersRequest + 12, // 22: proto.PublisherService.SetPublisherFeatureFlag:input_type -> proto.SetPublisherFeatureFlagRequest + 13, // 23: proto.PublisherService.HasPublisherFeature:input_type -> proto.HasPublisherFeatureRequest + 15, // 24: proto.PublisherService.IsPublisherMember:input_type -> proto.IsPublisherMemberRequest + 6, // 25: proto.PublisherService.GetPublisher:output_type -> proto.GetPublisherResponse + 9, // 26: proto.PublisherService.GetPublisherBatch:output_type -> proto.ListPublishersResponse + 9, // 27: proto.PublisherService.ListPublishers:output_type -> proto.ListPublishersResponse + 11, // 28: proto.PublisherService.ListPublisherMembers:output_type -> proto.ListPublisherMembersResponse + 18, // 29: proto.PublisherService.SetPublisherFeatureFlag:output_type -> google.protobuf.StringValue + 14, // 30: proto.PublisherService.HasPublisherFeature:output_type -> proto.HasPublisherFeatureResponse + 16, // 31: proto.PublisherService.IsPublisherMember:output_type -> proto.IsPublisherMemberResponse + 25, // [25:32] is the sub-list for method output_type + 18, // [18:25] is the sub-list for method input_type + 18, // [18:18] is the sub-list for extension type_name + 18, // [18:18] is the sub-list for extension extendee + 0, // [0:18] is the sub-list for field type_name +} + +func init() { file_publisher_proto_init() } +func file_publisher_proto_init() { + if File_publisher_proto != nil { + return + } + file_file_proto_init() + file_account_proto_init() + file_publisher_proto_msgTypes[2].OneofWrappers = []any{} + file_publisher_proto_msgTypes[3].OneofWrappers = []any{ + (*GetPublisherRequest_Name)(nil), + (*GetPublisherRequest_Id)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_publisher_proto_rawDesc), len(file_publisher_proto_rawDesc)), + NumEnums: 2, + NumMessages: 15, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_publisher_proto_goTypes, + DependencyIndexes: file_publisher_proto_depIdxs, + EnumInfos: file_publisher_proto_enumTypes, + MessageInfos: file_publisher_proto_msgTypes, + }.Build() + File_publisher_proto = out.File + file_publisher_proto_goTypes = nil + file_publisher_proto_depIdxs = nil +} diff --git a/pkg/shared/proto/gen/publisher_grpc.pb.go b/pkg/shared/proto/gen/publisher_grpc.pb.go new file mode 100644 index 0000000..6e3fef5 --- /dev/null +++ b/pkg/shared/proto/gen/publisher_grpc.pb.go @@ -0,0 +1,350 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.0 +// - protoc v6.33.1 +// source: publisher.proto + +package gen + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + PublisherService_GetPublisher_FullMethodName = "/proto.PublisherService/GetPublisher" + PublisherService_GetPublisherBatch_FullMethodName = "/proto.PublisherService/GetPublisherBatch" + PublisherService_ListPublishers_FullMethodName = "/proto.PublisherService/ListPublishers" + PublisherService_ListPublisherMembers_FullMethodName = "/proto.PublisherService/ListPublisherMembers" + PublisherService_SetPublisherFeatureFlag_FullMethodName = "/proto.PublisherService/SetPublisherFeatureFlag" + PublisherService_HasPublisherFeature_FullMethodName = "/proto.PublisherService/HasPublisherFeature" + PublisherService_IsPublisherMember_FullMethodName = "/proto.PublisherService/IsPublisherMember" +) + +// PublisherServiceClient is the client API for PublisherService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type PublisherServiceClient interface { + GetPublisher(ctx context.Context, in *GetPublisherRequest, opts ...grpc.CallOption) (*GetPublisherResponse, error) + GetPublisherBatch(ctx context.Context, in *GetPublisherBatchRequest, opts ...grpc.CallOption) (*ListPublishersResponse, error) + ListPublishers(ctx context.Context, in *ListPublishersRequest, opts ...grpc.CallOption) (*ListPublishersResponse, error) + ListPublisherMembers(ctx context.Context, in *ListPublisherMembersRequest, opts ...grpc.CallOption) (*ListPublisherMembersResponse, error) + SetPublisherFeatureFlag(ctx context.Context, in *SetPublisherFeatureFlagRequest, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) + HasPublisherFeature(ctx context.Context, in *HasPublisherFeatureRequest, opts ...grpc.CallOption) (*HasPublisherFeatureResponse, error) + IsPublisherMember(ctx context.Context, in *IsPublisherMemberRequest, opts ...grpc.CallOption) (*IsPublisherMemberResponse, error) +} + +type publisherServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewPublisherServiceClient(cc grpc.ClientConnInterface) PublisherServiceClient { + return &publisherServiceClient{cc} +} + +func (c *publisherServiceClient) GetPublisher(ctx context.Context, in *GetPublisherRequest, opts ...grpc.CallOption) (*GetPublisherResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetPublisherResponse) + err := c.cc.Invoke(ctx, PublisherService_GetPublisher_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *publisherServiceClient) GetPublisherBatch(ctx context.Context, in *GetPublisherBatchRequest, opts ...grpc.CallOption) (*ListPublishersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListPublishersResponse) + err := c.cc.Invoke(ctx, PublisherService_GetPublisherBatch_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *publisherServiceClient) ListPublishers(ctx context.Context, in *ListPublishersRequest, opts ...grpc.CallOption) (*ListPublishersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListPublishersResponse) + err := c.cc.Invoke(ctx, PublisherService_ListPublishers_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *publisherServiceClient) ListPublisherMembers(ctx context.Context, in *ListPublisherMembersRequest, opts ...grpc.CallOption) (*ListPublisherMembersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListPublisherMembersResponse) + err := c.cc.Invoke(ctx, PublisherService_ListPublisherMembers_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *publisherServiceClient) SetPublisherFeatureFlag(ctx context.Context, in *SetPublisherFeatureFlagRequest, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(wrapperspb.StringValue) + err := c.cc.Invoke(ctx, PublisherService_SetPublisherFeatureFlag_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *publisherServiceClient) HasPublisherFeature(ctx context.Context, in *HasPublisherFeatureRequest, opts ...grpc.CallOption) (*HasPublisherFeatureResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(HasPublisherFeatureResponse) + err := c.cc.Invoke(ctx, PublisherService_HasPublisherFeature_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *publisherServiceClient) IsPublisherMember(ctx context.Context, in *IsPublisherMemberRequest, opts ...grpc.CallOption) (*IsPublisherMemberResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(IsPublisherMemberResponse) + err := c.cc.Invoke(ctx, PublisherService_IsPublisherMember_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PublisherServiceServer is the server API for PublisherService service. +// All implementations must embed UnimplementedPublisherServiceServer +// for forward compatibility. +type PublisherServiceServer interface { + GetPublisher(context.Context, *GetPublisherRequest) (*GetPublisherResponse, error) + GetPublisherBatch(context.Context, *GetPublisherBatchRequest) (*ListPublishersResponse, error) + ListPublishers(context.Context, *ListPublishersRequest) (*ListPublishersResponse, error) + ListPublisherMembers(context.Context, *ListPublisherMembersRequest) (*ListPublisherMembersResponse, error) + SetPublisherFeatureFlag(context.Context, *SetPublisherFeatureFlagRequest) (*wrapperspb.StringValue, error) + HasPublisherFeature(context.Context, *HasPublisherFeatureRequest) (*HasPublisherFeatureResponse, error) + IsPublisherMember(context.Context, *IsPublisherMemberRequest) (*IsPublisherMemberResponse, error) + mustEmbedUnimplementedPublisherServiceServer() +} + +// UnimplementedPublisherServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedPublisherServiceServer struct{} + +func (UnimplementedPublisherServiceServer) GetPublisher(context.Context, *GetPublisherRequest) (*GetPublisherResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetPublisher not implemented") +} +func (UnimplementedPublisherServiceServer) GetPublisherBatch(context.Context, *GetPublisherBatchRequest) (*ListPublishersResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetPublisherBatch not implemented") +} +func (UnimplementedPublisherServiceServer) ListPublishers(context.Context, *ListPublishersRequest) (*ListPublishersResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListPublishers not implemented") +} +func (UnimplementedPublisherServiceServer) ListPublisherMembers(context.Context, *ListPublisherMembersRequest) (*ListPublisherMembersResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListPublisherMembers not implemented") +} +func (UnimplementedPublisherServiceServer) SetPublisherFeatureFlag(context.Context, *SetPublisherFeatureFlagRequest) (*wrapperspb.StringValue, error) { + return nil, status.Error(codes.Unimplemented, "method SetPublisherFeatureFlag not implemented") +} +func (UnimplementedPublisherServiceServer) HasPublisherFeature(context.Context, *HasPublisherFeatureRequest) (*HasPublisherFeatureResponse, error) { + return nil, status.Error(codes.Unimplemented, "method HasPublisherFeature not implemented") +} +func (UnimplementedPublisherServiceServer) IsPublisherMember(context.Context, *IsPublisherMemberRequest) (*IsPublisherMemberResponse, error) { + return nil, status.Error(codes.Unimplemented, "method IsPublisherMember not implemented") +} +func (UnimplementedPublisherServiceServer) mustEmbedUnimplementedPublisherServiceServer() {} +func (UnimplementedPublisherServiceServer) testEmbeddedByValue() {} + +// UnsafePublisherServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PublisherServiceServer will +// result in compilation errors. +type UnsafePublisherServiceServer interface { + mustEmbedUnimplementedPublisherServiceServer() +} + +func RegisterPublisherServiceServer(s grpc.ServiceRegistrar, srv PublisherServiceServer) { + // If the following call panics, it indicates UnimplementedPublisherServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&PublisherService_ServiceDesc, srv) +} + +func _PublisherService_GetPublisher_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPublisherRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PublisherServiceServer).GetPublisher(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PublisherService_GetPublisher_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublisherServiceServer).GetPublisher(ctx, req.(*GetPublisherRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PublisherService_GetPublisherBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPublisherBatchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PublisherServiceServer).GetPublisherBatch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PublisherService_GetPublisherBatch_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublisherServiceServer).GetPublisherBatch(ctx, req.(*GetPublisherBatchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PublisherService_ListPublishers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPublishersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PublisherServiceServer).ListPublishers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PublisherService_ListPublishers_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublisherServiceServer).ListPublishers(ctx, req.(*ListPublishersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PublisherService_ListPublisherMembers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPublisherMembersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PublisherServiceServer).ListPublisherMembers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PublisherService_ListPublisherMembers_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublisherServiceServer).ListPublisherMembers(ctx, req.(*ListPublisherMembersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PublisherService_SetPublisherFeatureFlag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetPublisherFeatureFlagRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PublisherServiceServer).SetPublisherFeatureFlag(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PublisherService_SetPublisherFeatureFlag_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublisherServiceServer).SetPublisherFeatureFlag(ctx, req.(*SetPublisherFeatureFlagRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PublisherService_HasPublisherFeature_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HasPublisherFeatureRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PublisherServiceServer).HasPublisherFeature(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PublisherService_HasPublisherFeature_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublisherServiceServer).HasPublisherFeature(ctx, req.(*HasPublisherFeatureRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PublisherService_IsPublisherMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IsPublisherMemberRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PublisherServiceServer).IsPublisherMember(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PublisherService_IsPublisherMember_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PublisherServiceServer).IsPublisherMember(ctx, req.(*IsPublisherMemberRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// PublisherService_ServiceDesc is the grpc.ServiceDesc for PublisherService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var PublisherService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "proto.PublisherService", + HandlerType: (*PublisherServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetPublisher", + Handler: _PublisherService_GetPublisher_Handler, + }, + { + MethodName: "GetPublisherBatch", + Handler: _PublisherService_GetPublisherBatch_Handler, + }, + { + MethodName: "ListPublishers", + Handler: _PublisherService_ListPublishers_Handler, + }, + { + MethodName: "ListPublisherMembers", + Handler: _PublisherService_ListPublisherMembers_Handler, + }, + { + MethodName: "SetPublisherFeatureFlag", + Handler: _PublisherService_SetPublisherFeatureFlag_Handler, + }, + { + MethodName: "HasPublisherFeature", + Handler: _PublisherService_HasPublisherFeature_Handler, + }, + { + MethodName: "IsPublisherMember", + Handler: _PublisherService_IsPublisherMember_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "publisher.proto", +} diff --git a/pkg/shared/proto/gen/realm.pb.go b/pkg/shared/proto/gen/realm.pb.go new file mode 100644 index 0000000..91afb39 --- /dev/null +++ b/pkg/shared/proto/gen/realm.pb.go @@ -0,0 +1,1060 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.10 +// protoc v6.33.1 +// source: realm.proto + +package gen + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Realm struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Slug string `protobuf:"bytes,3,opt,name=slug,proto3" json:"slug,omitempty"` + IsCommunity bool `protobuf:"varint,4,opt,name=is_community,json=isCommunity,proto3" json:"is_community,omitempty"` + IsPublic bool `protobuf:"varint,5,opt,name=is_public,json=isPublic,proto3" json:"is_public,omitempty"` + Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` + Picture *CloudFile `protobuf:"bytes,7,opt,name=picture,proto3,oneof" json:"picture,omitempty"` + Background *CloudFile `protobuf:"bytes,8,opt,name=background,proto3,oneof" json:"background,omitempty"` + Verification *VerificationMark `protobuf:"bytes,9,opt,name=verification,proto3,oneof" json:"verification,omitempty"` + AccountId string `protobuf:"bytes,10,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Realm) Reset() { + *x = Realm{} + mi := &file_realm_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Realm) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Realm) ProtoMessage() {} + +func (x *Realm) ProtoReflect() protoreflect.Message { + mi := &file_realm_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Realm.ProtoReflect.Descriptor instead. +func (*Realm) Descriptor() ([]byte, []int) { + return file_realm_proto_rawDescGZIP(), []int{0} +} + +func (x *Realm) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Realm) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Realm) GetSlug() string { + if x != nil { + return x.Slug + } + return "" +} + +func (x *Realm) GetIsCommunity() bool { + if x != nil { + return x.IsCommunity + } + return false +} + +func (x *Realm) GetIsPublic() bool { + if x != nil { + return x.IsPublic + } + return false +} + +func (x *Realm) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Realm) GetPicture() *CloudFile { + if x != nil { + return x.Picture + } + return nil +} + +func (x *Realm) GetBackground() *CloudFile { + if x != nil { + return x.Background + } + return nil +} + +func (x *Realm) GetVerification() *VerificationMark { + if x != nil { + return x.Verification + } + return nil +} + +func (x *Realm) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +type RealmMember struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + RealmId string `protobuf:"bytes,2,opt,name=realm_id,json=realmId,proto3" json:"realm_id,omitempty"` + Role int32 `protobuf:"varint,3,opt,name=role,proto3" json:"role,omitempty"` + JoinedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=joined_at,json=joinedAt,proto3,oneof" json:"joined_at,omitempty"` + LeaveAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=leave_at,json=leaveAt,proto3,oneof" json:"leave_at,omitempty"` + Account *Account `protobuf:"bytes,6,opt,name=account,proto3,oneof" json:"account,omitempty"` + Realm *Realm `protobuf:"bytes,7,opt,name=realm,proto3,oneof" json:"realm,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RealmMember) Reset() { + *x = RealmMember{} + mi := &file_realm_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RealmMember) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RealmMember) ProtoMessage() {} + +func (x *RealmMember) ProtoReflect() protoreflect.Message { + mi := &file_realm_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RealmMember.ProtoReflect.Descriptor instead. +func (*RealmMember) Descriptor() ([]byte, []int) { + return file_realm_proto_rawDescGZIP(), []int{1} +} + +func (x *RealmMember) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *RealmMember) GetRealmId() string { + if x != nil { + return x.RealmId + } + return "" +} + +func (x *RealmMember) GetRole() int32 { + if x != nil { + return x.Role + } + return 0 +} + +func (x *RealmMember) GetJoinedAt() *timestamppb.Timestamp { + if x != nil { + return x.JoinedAt + } + return nil +} + +func (x *RealmMember) GetLeaveAt() *timestamppb.Timestamp { + if x != nil { + return x.LeaveAt + } + return nil +} + +func (x *RealmMember) GetAccount() *Account { + if x != nil { + return x.Account + } + return nil +} + +func (x *RealmMember) GetRealm() *Realm { + if x != nil { + return x.Realm + } + return nil +} + +type GetRealmRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Query: + // + // *GetRealmRequest_Id + // *GetRealmRequest_Slug + Query isGetRealmRequest_Query `protobuf_oneof:"query"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetRealmRequest) Reset() { + *x = GetRealmRequest{} + mi := &file_realm_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetRealmRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRealmRequest) ProtoMessage() {} + +func (x *GetRealmRequest) ProtoReflect() protoreflect.Message { + mi := &file_realm_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRealmRequest.ProtoReflect.Descriptor instead. +func (*GetRealmRequest) Descriptor() ([]byte, []int) { + return file_realm_proto_rawDescGZIP(), []int{2} +} + +func (x *GetRealmRequest) GetQuery() isGetRealmRequest_Query { + if x != nil { + return x.Query + } + return nil +} + +func (x *GetRealmRequest) GetId() string { + if x != nil { + if x, ok := x.Query.(*GetRealmRequest_Id); ok { + return x.Id + } + } + return "" +} + +func (x *GetRealmRequest) GetSlug() string { + if x != nil { + if x, ok := x.Query.(*GetRealmRequest_Slug); ok { + return x.Slug + } + } + return "" +} + +type isGetRealmRequest_Query interface { + isGetRealmRequest_Query() +} + +type GetRealmRequest_Id struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3,oneof"` +} + +type GetRealmRequest_Slug struct { + Slug string `protobuf:"bytes,2,opt,name=slug,proto3,oneof"` +} + +func (*GetRealmRequest_Id) isGetRealmRequest_Query() {} + +func (*GetRealmRequest_Slug) isGetRealmRequest_Query() {} + +type GetUserRealmsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetUserRealmsRequest) Reset() { + *x = GetUserRealmsRequest{} + mi := &file_realm_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetUserRealmsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUserRealmsRequest) ProtoMessage() {} + +func (x *GetUserRealmsRequest) ProtoReflect() protoreflect.Message { + mi := &file_realm_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUserRealmsRequest.ProtoReflect.Descriptor instead. +func (*GetUserRealmsRequest) Descriptor() ([]byte, []int) { + return file_realm_proto_rawDescGZIP(), []int{3} +} + +func (x *GetUserRealmsRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +type GetRealmBatchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetRealmBatchRequest) Reset() { + *x = GetRealmBatchRequest{} + mi := &file_realm_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetRealmBatchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRealmBatchRequest) ProtoMessage() {} + +func (x *GetRealmBatchRequest) ProtoReflect() protoreflect.Message { + mi := &file_realm_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRealmBatchRequest.ProtoReflect.Descriptor instead. +func (*GetRealmBatchRequest) Descriptor() ([]byte, []int) { + return file_realm_proto_rawDescGZIP(), []int{4} +} + +func (x *GetRealmBatchRequest) GetIds() []string { + if x != nil { + return x.Ids + } + return nil +} + +type GetRealmBatchResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Realms []*Realm `protobuf:"bytes,1,rep,name=realms,proto3" json:"realms,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetRealmBatchResponse) Reset() { + *x = GetRealmBatchResponse{} + mi := &file_realm_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetRealmBatchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRealmBatchResponse) ProtoMessage() {} + +func (x *GetRealmBatchResponse) ProtoReflect() protoreflect.Message { + mi := &file_realm_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetRealmBatchResponse.ProtoReflect.Descriptor instead. +func (*GetRealmBatchResponse) Descriptor() ([]byte, []int) { + return file_realm_proto_rawDescGZIP(), []int{5} +} + +func (x *GetRealmBatchResponse) GetRealms() []*Realm { + if x != nil { + return x.Realms + } + return nil +} + +type GetUserRealmsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + RealmIds []string `protobuf:"bytes,1,rep,name=realm_ids,json=realmIds,proto3" json:"realm_ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetUserRealmsResponse) Reset() { + *x = GetUserRealmsResponse{} + mi := &file_realm_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetUserRealmsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetUserRealmsResponse) ProtoMessage() {} + +func (x *GetUserRealmsResponse) ProtoReflect() protoreflect.Message { + mi := &file_realm_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetUserRealmsResponse.ProtoReflect.Descriptor instead. +func (*GetUserRealmsResponse) Descriptor() ([]byte, []int) { + return file_realm_proto_rawDescGZIP(), []int{6} +} + +func (x *GetUserRealmsResponse) GetRealmIds() []string { + if x != nil { + return x.RealmIds + } + return nil +} + +type GetPublicRealmsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrderBy *string `protobuf:"bytes,1,opt,name=order_by,json=orderBy,proto3,oneof" json:"order_by,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPublicRealmsRequest) Reset() { + *x = GetPublicRealmsRequest{} + mi := &file_realm_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPublicRealmsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPublicRealmsRequest) ProtoMessage() {} + +func (x *GetPublicRealmsRequest) ProtoReflect() protoreflect.Message { + mi := &file_realm_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPublicRealmsRequest.ProtoReflect.Descriptor instead. +func (*GetPublicRealmsRequest) Descriptor() ([]byte, []int) { + return file_realm_proto_rawDescGZIP(), []int{7} +} + +func (x *GetPublicRealmsRequest) GetOrderBy() string { + if x != nil && x.OrderBy != nil { + return *x.OrderBy + } + return "" +} + +type GetPublicRealmsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Realms []*Realm `protobuf:"bytes,1,rep,name=realms,proto3" json:"realms,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetPublicRealmsResponse) Reset() { + *x = GetPublicRealmsResponse{} + mi := &file_realm_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetPublicRealmsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPublicRealmsResponse) ProtoMessage() {} + +func (x *GetPublicRealmsResponse) ProtoReflect() protoreflect.Message { + mi := &file_realm_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetPublicRealmsResponse.ProtoReflect.Descriptor instead. +func (*GetPublicRealmsResponse) Descriptor() ([]byte, []int) { + return file_realm_proto_rawDescGZIP(), []int{8} +} + +func (x *GetPublicRealmsResponse) GetRealms() []*Realm { + if x != nil { + return x.Realms + } + return nil +} + +type SearchRealmsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SearchRealmsRequest) Reset() { + *x = SearchRealmsRequest{} + mi := &file_realm_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SearchRealmsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchRealmsRequest) ProtoMessage() {} + +func (x *SearchRealmsRequest) ProtoReflect() protoreflect.Message { + mi := &file_realm_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchRealmsRequest.ProtoReflect.Descriptor instead. +func (*SearchRealmsRequest) Descriptor() ([]byte, []int) { + return file_realm_proto_rawDescGZIP(), []int{9} +} + +func (x *SearchRealmsRequest) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +func (x *SearchRealmsRequest) GetLimit() int32 { + if x != nil { + return x.Limit + } + return 0 +} + +type SendInviteNotifyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Member *RealmMember `protobuf:"bytes,1,opt,name=member,proto3" json:"member,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SendInviteNotifyRequest) Reset() { + *x = SendInviteNotifyRequest{} + mi := &file_realm_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SendInviteNotifyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendInviteNotifyRequest) ProtoMessage() {} + +func (x *SendInviteNotifyRequest) ProtoReflect() protoreflect.Message { + mi := &file_realm_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendInviteNotifyRequest.ProtoReflect.Descriptor instead. +func (*SendInviteNotifyRequest) Descriptor() ([]byte, []int) { + return file_realm_proto_rawDescGZIP(), []int{10} +} + +func (x *SendInviteNotifyRequest) GetMember() *RealmMember { + if x != nil { + return x.Member + } + return nil +} + +type IsMemberWithRoleRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + RealmId string `protobuf:"bytes,1,opt,name=realm_id,json=realmId,proto3" json:"realm_id,omitempty"` + AccountId string `protobuf:"bytes,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + RequiredRoles []int32 `protobuf:"varint,3,rep,packed,name=required_roles,json=requiredRoles,proto3" json:"required_roles,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IsMemberWithRoleRequest) Reset() { + *x = IsMemberWithRoleRequest{} + mi := &file_realm_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IsMemberWithRoleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsMemberWithRoleRequest) ProtoMessage() {} + +func (x *IsMemberWithRoleRequest) ProtoReflect() protoreflect.Message { + mi := &file_realm_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsMemberWithRoleRequest.ProtoReflect.Descriptor instead. +func (*IsMemberWithRoleRequest) Descriptor() ([]byte, []int) { + return file_realm_proto_rawDescGZIP(), []int{11} +} + +func (x *IsMemberWithRoleRequest) GetRealmId() string { + if x != nil { + return x.RealmId + } + return "" +} + +func (x *IsMemberWithRoleRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *IsMemberWithRoleRequest) GetRequiredRoles() []int32 { + if x != nil { + return x.RequiredRoles + } + return nil +} + +type LoadMemberAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Member *RealmMember `protobuf:"bytes,1,opt,name=member,proto3" json:"member,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LoadMemberAccountRequest) Reset() { + *x = LoadMemberAccountRequest{} + mi := &file_realm_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LoadMemberAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LoadMemberAccountRequest) ProtoMessage() {} + +func (x *LoadMemberAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_realm_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LoadMemberAccountRequest.ProtoReflect.Descriptor instead. +func (*LoadMemberAccountRequest) Descriptor() ([]byte, []int) { + return file_realm_proto_rawDescGZIP(), []int{12} +} + +func (x *LoadMemberAccountRequest) GetMember() *RealmMember { + if x != nil { + return x.Member + } + return nil +} + +type LoadMemberAccountsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Members []*RealmMember `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LoadMemberAccountsRequest) Reset() { + *x = LoadMemberAccountsRequest{} + mi := &file_realm_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LoadMemberAccountsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LoadMemberAccountsRequest) ProtoMessage() {} + +func (x *LoadMemberAccountsRequest) ProtoReflect() protoreflect.Message { + mi := &file_realm_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LoadMemberAccountsRequest.ProtoReflect.Descriptor instead. +func (*LoadMemberAccountsRequest) Descriptor() ([]byte, []int) { + return file_realm_proto_rawDescGZIP(), []int{13} +} + +func (x *LoadMemberAccountsRequest) GetMembers() []*RealmMember { + if x != nil { + return x.Members + } + return nil +} + +type LoadMemberAccountsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Members []*RealmMember `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LoadMemberAccountsResponse) Reset() { + *x = LoadMemberAccountsResponse{} + mi := &file_realm_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LoadMemberAccountsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LoadMemberAccountsResponse) ProtoMessage() {} + +func (x *LoadMemberAccountsResponse) ProtoReflect() protoreflect.Message { + mi := &file_realm_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LoadMemberAccountsResponse.ProtoReflect.Descriptor instead. +func (*LoadMemberAccountsResponse) Descriptor() ([]byte, []int) { + return file_realm_proto_rawDescGZIP(), []int{14} +} + +func (x *LoadMemberAccountsResponse) GetMembers() []*RealmMember { + if x != nil { + return x.Members + } + return nil +} + +var File_realm_proto protoreflect.FileDescriptor + +const file_realm_proto_rawDesc = "" + + "\n" + + "\vrealm.proto\x12\x05proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\raccount.proto\x1a\n" + + "file.proto\"\x96\x03\n" + + "\x05Realm\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n" + + "\x04slug\x18\x03 \x01(\tR\x04slug\x12!\n" + + "\fis_community\x18\x04 \x01(\bR\visCommunity\x12\x1b\n" + + "\tis_public\x18\x05 \x01(\bR\bisPublic\x12 \n" + + "\vdescription\x18\x06 \x01(\tR\vdescription\x12/\n" + + "\apicture\x18\a \x01(\v2\x10.proto.CloudFileH\x00R\apicture\x88\x01\x01\x125\n" + + "\n" + + "background\x18\b \x01(\v2\x10.proto.CloudFileH\x01R\n" + + "background\x88\x01\x01\x12@\n" + + "\fverification\x18\t \x01(\v2\x17.proto.VerificationMarkH\x02R\fverification\x88\x01\x01\x12\x1d\n" + + "\n" + + "account_id\x18\n" + + " \x01(\tR\taccountIdB\n" + + "\n" + + "\b_pictureB\r\n" + + "\v_backgroundB\x0f\n" + + "\r_verification\"\xde\x02\n" + + "\vRealmMember\x12\x1d\n" + + "\n" + + "account_id\x18\x01 \x01(\tR\taccountId\x12\x19\n" + + "\brealm_id\x18\x02 \x01(\tR\arealmId\x12\x12\n" + + "\x04role\x18\x03 \x01(\x05R\x04role\x12<\n" + + "\tjoined_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampH\x00R\bjoinedAt\x88\x01\x01\x12:\n" + + "\bleave_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampH\x01R\aleaveAt\x88\x01\x01\x12-\n" + + "\aaccount\x18\x06 \x01(\v2\x0e.proto.AccountH\x02R\aaccount\x88\x01\x01\x12'\n" + + "\x05realm\x18\a \x01(\v2\f.proto.RealmH\x03R\x05realm\x88\x01\x01B\f\n" + + "\n" + + "_joined_atB\v\n" + + "\t_leave_atB\n" + + "\n" + + "\b_accountB\b\n" + + "\x06_realm\"B\n" + + "\x0fGetRealmRequest\x12\x10\n" + + "\x02id\x18\x01 \x01(\tH\x00R\x02id\x12\x14\n" + + "\x04slug\x18\x02 \x01(\tH\x00R\x04slugB\a\n" + + "\x05query\"5\n" + + "\x14GetUserRealmsRequest\x12\x1d\n" + + "\n" + + "account_id\x18\x01 \x01(\tR\taccountId\"(\n" + + "\x14GetRealmBatchRequest\x12\x10\n" + + "\x03ids\x18\x01 \x03(\tR\x03ids\"=\n" + + "\x15GetRealmBatchResponse\x12$\n" + + "\x06realms\x18\x01 \x03(\v2\f.proto.RealmR\x06realms\"4\n" + + "\x15GetUserRealmsResponse\x12\x1b\n" + + "\trealm_ids\x18\x01 \x03(\tR\brealmIds\"E\n" + + "\x16GetPublicRealmsRequest\x12\x1e\n" + + "\border_by\x18\x01 \x01(\tH\x00R\aorderBy\x88\x01\x01B\v\n" + + "\t_order_by\"?\n" + + "\x17GetPublicRealmsResponse\x12$\n" + + "\x06realms\x18\x01 \x03(\v2\f.proto.RealmR\x06realms\"A\n" + + "\x13SearchRealmsRequest\x12\x14\n" + + "\x05query\x18\x01 \x01(\tR\x05query\x12\x14\n" + + "\x05limit\x18\x02 \x01(\x05R\x05limit\"E\n" + + "\x17SendInviteNotifyRequest\x12*\n" + + "\x06member\x18\x01 \x01(\v2\x12.proto.RealmMemberR\x06member\"z\n" + + "\x17IsMemberWithRoleRequest\x12\x19\n" + + "\brealm_id\x18\x01 \x01(\tR\arealmId\x12\x1d\n" + + "\n" + + "account_id\x18\x02 \x01(\tR\taccountId\x12%\n" + + "\x0erequired_roles\x18\x03 \x03(\x05R\rrequiredRoles\"F\n" + + "\x18LoadMemberAccountRequest\x12*\n" + + "\x06member\x18\x01 \x01(\v2\x12.proto.RealmMemberR\x06member\"I\n" + + "\x19LoadMemberAccountsRequest\x12,\n" + + "\amembers\x18\x01 \x03(\v2\x12.proto.RealmMemberR\amembers\"J\n" + + "\x1aLoadMemberAccountsResponse\x12,\n" + + "\amembers\x18\x01 \x03(\v2\x12.proto.RealmMemberR\amembers2\xc9\x05\n" + + "\fRealmService\x122\n" + + "\bGetRealm\x12\x16.proto.GetRealmRequest\x1a\f.proto.Realm\"\x00\x12L\n" + + "\rGetRealmBatch\x12\x1b.proto.GetRealmBatchRequest\x1a\x1c.proto.GetRealmBatchResponse\"\x00\x12L\n" + + "\rGetUserRealms\x12\x1b.proto.GetUserRealmsRequest\x1a\x1c.proto.GetUserRealmsResponse\"\x00\x12R\n" + + "\x0fGetPublicRealms\x12\x1d.proto.GetPublicRealmsRequest\x1a\x1e.proto.GetPublicRealmsResponse\"\x00\x12L\n" + + "\fSearchRealms\x12\x1a.proto.SearchRealmsRequest\x1a\x1e.proto.GetPublicRealmsResponse\"\x00\x12L\n" + + "\x10SendInviteNotify\x12\x1e.proto.SendInviteNotifyRequest\x1a\x16.google.protobuf.Empty\"\x00\x12P\n" + + "\x10IsMemberWithRole\x12\x1e.proto.IsMemberWithRoleRequest\x1a\x1a.google.protobuf.BoolValue\"\x00\x12J\n" + + "\x11LoadMemberAccount\x12\x1f.proto.LoadMemberAccountRequest\x1a\x12.proto.RealmMember\"\x00\x12[\n" + + "\x12LoadMemberAccounts\x12 .proto.LoadMemberAccountsRequest\x1a!.proto.LoadMemberAccountsResponse\"\x00BUZ7git.solsynth.dev/goatworks/turbine/pkg/shared/proto/gen\xaa\x02\x19DysonNetwork.Shared.Protob\x06proto3" + +var ( + file_realm_proto_rawDescOnce sync.Once + file_realm_proto_rawDescData []byte +) + +func file_realm_proto_rawDescGZIP() []byte { + file_realm_proto_rawDescOnce.Do(func() { + file_realm_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_realm_proto_rawDesc), len(file_realm_proto_rawDesc))) + }) + return file_realm_proto_rawDescData +} + +var file_realm_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_realm_proto_goTypes = []any{ + (*Realm)(nil), // 0: proto.Realm + (*RealmMember)(nil), // 1: proto.RealmMember + (*GetRealmRequest)(nil), // 2: proto.GetRealmRequest + (*GetUserRealmsRequest)(nil), // 3: proto.GetUserRealmsRequest + (*GetRealmBatchRequest)(nil), // 4: proto.GetRealmBatchRequest + (*GetRealmBatchResponse)(nil), // 5: proto.GetRealmBatchResponse + (*GetUserRealmsResponse)(nil), // 6: proto.GetUserRealmsResponse + (*GetPublicRealmsRequest)(nil), // 7: proto.GetPublicRealmsRequest + (*GetPublicRealmsResponse)(nil), // 8: proto.GetPublicRealmsResponse + (*SearchRealmsRequest)(nil), // 9: proto.SearchRealmsRequest + (*SendInviteNotifyRequest)(nil), // 10: proto.SendInviteNotifyRequest + (*IsMemberWithRoleRequest)(nil), // 11: proto.IsMemberWithRoleRequest + (*LoadMemberAccountRequest)(nil), // 12: proto.LoadMemberAccountRequest + (*LoadMemberAccountsRequest)(nil), // 13: proto.LoadMemberAccountsRequest + (*LoadMemberAccountsResponse)(nil), // 14: proto.LoadMemberAccountsResponse + (*CloudFile)(nil), // 15: proto.CloudFile + (*VerificationMark)(nil), // 16: proto.VerificationMark + (*timestamppb.Timestamp)(nil), // 17: google.protobuf.Timestamp + (*Account)(nil), // 18: proto.Account + (*emptypb.Empty)(nil), // 19: google.protobuf.Empty + (*wrapperspb.BoolValue)(nil), // 20: google.protobuf.BoolValue +} +var file_realm_proto_depIdxs = []int32{ + 15, // 0: proto.Realm.picture:type_name -> proto.CloudFile + 15, // 1: proto.Realm.background:type_name -> proto.CloudFile + 16, // 2: proto.Realm.verification:type_name -> proto.VerificationMark + 17, // 3: proto.RealmMember.joined_at:type_name -> google.protobuf.Timestamp + 17, // 4: proto.RealmMember.leave_at:type_name -> google.protobuf.Timestamp + 18, // 5: proto.RealmMember.account:type_name -> proto.Account + 0, // 6: proto.RealmMember.realm:type_name -> proto.Realm + 0, // 7: proto.GetRealmBatchResponse.realms:type_name -> proto.Realm + 0, // 8: proto.GetPublicRealmsResponse.realms:type_name -> proto.Realm + 1, // 9: proto.SendInviteNotifyRequest.member:type_name -> proto.RealmMember + 1, // 10: proto.LoadMemberAccountRequest.member:type_name -> proto.RealmMember + 1, // 11: proto.LoadMemberAccountsRequest.members:type_name -> proto.RealmMember + 1, // 12: proto.LoadMemberAccountsResponse.members:type_name -> proto.RealmMember + 2, // 13: proto.RealmService.GetRealm:input_type -> proto.GetRealmRequest + 4, // 14: proto.RealmService.GetRealmBatch:input_type -> proto.GetRealmBatchRequest + 3, // 15: proto.RealmService.GetUserRealms:input_type -> proto.GetUserRealmsRequest + 7, // 16: proto.RealmService.GetPublicRealms:input_type -> proto.GetPublicRealmsRequest + 9, // 17: proto.RealmService.SearchRealms:input_type -> proto.SearchRealmsRequest + 10, // 18: proto.RealmService.SendInviteNotify:input_type -> proto.SendInviteNotifyRequest + 11, // 19: proto.RealmService.IsMemberWithRole:input_type -> proto.IsMemberWithRoleRequest + 12, // 20: proto.RealmService.LoadMemberAccount:input_type -> proto.LoadMemberAccountRequest + 13, // 21: proto.RealmService.LoadMemberAccounts:input_type -> proto.LoadMemberAccountsRequest + 0, // 22: proto.RealmService.GetRealm:output_type -> proto.Realm + 5, // 23: proto.RealmService.GetRealmBatch:output_type -> proto.GetRealmBatchResponse + 6, // 24: proto.RealmService.GetUserRealms:output_type -> proto.GetUserRealmsResponse + 8, // 25: proto.RealmService.GetPublicRealms:output_type -> proto.GetPublicRealmsResponse + 8, // 26: proto.RealmService.SearchRealms:output_type -> proto.GetPublicRealmsResponse + 19, // 27: proto.RealmService.SendInviteNotify:output_type -> google.protobuf.Empty + 20, // 28: proto.RealmService.IsMemberWithRole:output_type -> google.protobuf.BoolValue + 1, // 29: proto.RealmService.LoadMemberAccount:output_type -> proto.RealmMember + 14, // 30: proto.RealmService.LoadMemberAccounts:output_type -> proto.LoadMemberAccountsResponse + 22, // [22:31] is the sub-list for method output_type + 13, // [13:22] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name +} + +func init() { file_realm_proto_init() } +func file_realm_proto_init() { + if File_realm_proto != nil { + return + } + file_account_proto_init() + file_file_proto_init() + file_realm_proto_msgTypes[0].OneofWrappers = []any{} + file_realm_proto_msgTypes[1].OneofWrappers = []any{} + file_realm_proto_msgTypes[2].OneofWrappers = []any{ + (*GetRealmRequest_Id)(nil), + (*GetRealmRequest_Slug)(nil), + } + file_realm_proto_msgTypes[7].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_realm_proto_rawDesc), len(file_realm_proto_rawDesc)), + NumEnums: 0, + NumMessages: 15, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_realm_proto_goTypes, + DependencyIndexes: file_realm_proto_depIdxs, + MessageInfos: file_realm_proto_msgTypes, + }.Build() + File_realm_proto = out.File + file_realm_proto_goTypes = nil + file_realm_proto_depIdxs = nil +} diff --git a/pkg/shared/proto/gen/realm_grpc.pb.go b/pkg/shared/proto/gen/realm_grpc.pb.go new file mode 100644 index 0000000..ef6aca1 --- /dev/null +++ b/pkg/shared/proto/gen/realm_grpc.pb.go @@ -0,0 +1,445 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.0 +// - protoc v6.33.1 +// source: realm.proto + +package gen + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + RealmService_GetRealm_FullMethodName = "/proto.RealmService/GetRealm" + RealmService_GetRealmBatch_FullMethodName = "/proto.RealmService/GetRealmBatch" + RealmService_GetUserRealms_FullMethodName = "/proto.RealmService/GetUserRealms" + RealmService_GetPublicRealms_FullMethodName = "/proto.RealmService/GetPublicRealms" + RealmService_SearchRealms_FullMethodName = "/proto.RealmService/SearchRealms" + RealmService_SendInviteNotify_FullMethodName = "/proto.RealmService/SendInviteNotify" + RealmService_IsMemberWithRole_FullMethodName = "/proto.RealmService/IsMemberWithRole" + RealmService_LoadMemberAccount_FullMethodName = "/proto.RealmService/LoadMemberAccount" + RealmService_LoadMemberAccounts_FullMethodName = "/proto.RealmService/LoadMemberAccounts" +) + +// RealmServiceClient is the client API for RealmService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type RealmServiceClient interface { + // Get realm by id or slug + GetRealm(ctx context.Context, in *GetRealmRequest, opts ...grpc.CallOption) (*Realm, error) + // Get realm batch by ids + GetRealmBatch(ctx context.Context, in *GetRealmBatchRequest, opts ...grpc.CallOption) (*GetRealmBatchResponse, error) + // Get realms for a user + GetUserRealms(ctx context.Context, in *GetUserRealmsRequest, opts ...grpc.CallOption) (*GetUserRealmsResponse, error) + // Get public realms + GetPublicRealms(ctx context.Context, in *GetPublicRealmsRequest, opts ...grpc.CallOption) (*GetPublicRealmsResponse, error) + // Search public realms + SearchRealms(ctx context.Context, in *SearchRealmsRequest, opts ...grpc.CallOption) (*GetPublicRealmsResponse, error) + // Send invitation notification + SendInviteNotify(ctx context.Context, in *SendInviteNotifyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Check if member has required role + IsMemberWithRole(ctx context.Context, in *IsMemberWithRoleRequest, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) + // Load account for a member + LoadMemberAccount(ctx context.Context, in *LoadMemberAccountRequest, opts ...grpc.CallOption) (*RealmMember, error) + // Load accounts for members + LoadMemberAccounts(ctx context.Context, in *LoadMemberAccountsRequest, opts ...grpc.CallOption) (*LoadMemberAccountsResponse, error) +} + +type realmServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewRealmServiceClient(cc grpc.ClientConnInterface) RealmServiceClient { + return &realmServiceClient{cc} +} + +func (c *realmServiceClient) GetRealm(ctx context.Context, in *GetRealmRequest, opts ...grpc.CallOption) (*Realm, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Realm) + err := c.cc.Invoke(ctx, RealmService_GetRealm_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *realmServiceClient) GetRealmBatch(ctx context.Context, in *GetRealmBatchRequest, opts ...grpc.CallOption) (*GetRealmBatchResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetRealmBatchResponse) + err := c.cc.Invoke(ctx, RealmService_GetRealmBatch_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *realmServiceClient) GetUserRealms(ctx context.Context, in *GetUserRealmsRequest, opts ...grpc.CallOption) (*GetUserRealmsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetUserRealmsResponse) + err := c.cc.Invoke(ctx, RealmService_GetUserRealms_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *realmServiceClient) GetPublicRealms(ctx context.Context, in *GetPublicRealmsRequest, opts ...grpc.CallOption) (*GetPublicRealmsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetPublicRealmsResponse) + err := c.cc.Invoke(ctx, RealmService_GetPublicRealms_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *realmServiceClient) SearchRealms(ctx context.Context, in *SearchRealmsRequest, opts ...grpc.CallOption) (*GetPublicRealmsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetPublicRealmsResponse) + err := c.cc.Invoke(ctx, RealmService_SearchRealms_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *realmServiceClient) SendInviteNotify(ctx context.Context, in *SendInviteNotifyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RealmService_SendInviteNotify_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *realmServiceClient) IsMemberWithRole(ctx context.Context, in *IsMemberWithRoleRequest, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(wrapperspb.BoolValue) + err := c.cc.Invoke(ctx, RealmService_IsMemberWithRole_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *realmServiceClient) LoadMemberAccount(ctx context.Context, in *LoadMemberAccountRequest, opts ...grpc.CallOption) (*RealmMember, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RealmMember) + err := c.cc.Invoke(ctx, RealmService_LoadMemberAccount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *realmServiceClient) LoadMemberAccounts(ctx context.Context, in *LoadMemberAccountsRequest, opts ...grpc.CallOption) (*LoadMemberAccountsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(LoadMemberAccountsResponse) + err := c.cc.Invoke(ctx, RealmService_LoadMemberAccounts_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RealmServiceServer is the server API for RealmService service. +// All implementations must embed UnimplementedRealmServiceServer +// for forward compatibility. +type RealmServiceServer interface { + // Get realm by id or slug + GetRealm(context.Context, *GetRealmRequest) (*Realm, error) + // Get realm batch by ids + GetRealmBatch(context.Context, *GetRealmBatchRequest) (*GetRealmBatchResponse, error) + // Get realms for a user + GetUserRealms(context.Context, *GetUserRealmsRequest) (*GetUserRealmsResponse, error) + // Get public realms + GetPublicRealms(context.Context, *GetPublicRealmsRequest) (*GetPublicRealmsResponse, error) + // Search public realms + SearchRealms(context.Context, *SearchRealmsRequest) (*GetPublicRealmsResponse, error) + // Send invitation notification + SendInviteNotify(context.Context, *SendInviteNotifyRequest) (*emptypb.Empty, error) + // Check if member has required role + IsMemberWithRole(context.Context, *IsMemberWithRoleRequest) (*wrapperspb.BoolValue, error) + // Load account for a member + LoadMemberAccount(context.Context, *LoadMemberAccountRequest) (*RealmMember, error) + // Load accounts for members + LoadMemberAccounts(context.Context, *LoadMemberAccountsRequest) (*LoadMemberAccountsResponse, error) + mustEmbedUnimplementedRealmServiceServer() +} + +// UnimplementedRealmServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedRealmServiceServer struct{} + +func (UnimplementedRealmServiceServer) GetRealm(context.Context, *GetRealmRequest) (*Realm, error) { + return nil, status.Error(codes.Unimplemented, "method GetRealm not implemented") +} +func (UnimplementedRealmServiceServer) GetRealmBatch(context.Context, *GetRealmBatchRequest) (*GetRealmBatchResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetRealmBatch not implemented") +} +func (UnimplementedRealmServiceServer) GetUserRealms(context.Context, *GetUserRealmsRequest) (*GetUserRealmsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetUserRealms not implemented") +} +func (UnimplementedRealmServiceServer) GetPublicRealms(context.Context, *GetPublicRealmsRequest) (*GetPublicRealmsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetPublicRealms not implemented") +} +func (UnimplementedRealmServiceServer) SearchRealms(context.Context, *SearchRealmsRequest) (*GetPublicRealmsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method SearchRealms not implemented") +} +func (UnimplementedRealmServiceServer) SendInviteNotify(context.Context, *SendInviteNotifyRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method SendInviteNotify not implemented") +} +func (UnimplementedRealmServiceServer) IsMemberWithRole(context.Context, *IsMemberWithRoleRequest) (*wrapperspb.BoolValue, error) { + return nil, status.Error(codes.Unimplemented, "method IsMemberWithRole not implemented") +} +func (UnimplementedRealmServiceServer) LoadMemberAccount(context.Context, *LoadMemberAccountRequest) (*RealmMember, error) { + return nil, status.Error(codes.Unimplemented, "method LoadMemberAccount not implemented") +} +func (UnimplementedRealmServiceServer) LoadMemberAccounts(context.Context, *LoadMemberAccountsRequest) (*LoadMemberAccountsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method LoadMemberAccounts not implemented") +} +func (UnimplementedRealmServiceServer) mustEmbedUnimplementedRealmServiceServer() {} +func (UnimplementedRealmServiceServer) testEmbeddedByValue() {} + +// UnsafeRealmServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RealmServiceServer will +// result in compilation errors. +type UnsafeRealmServiceServer interface { + mustEmbedUnimplementedRealmServiceServer() +} + +func RegisterRealmServiceServer(s grpc.ServiceRegistrar, srv RealmServiceServer) { + // If the following call panics, it indicates UnimplementedRealmServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&RealmService_ServiceDesc, srv) +} + +func _RealmService_GetRealm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRealmRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RealmServiceServer).GetRealm(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RealmService_GetRealm_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RealmServiceServer).GetRealm(ctx, req.(*GetRealmRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RealmService_GetRealmBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRealmBatchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RealmServiceServer).GetRealmBatch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RealmService_GetRealmBatch_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RealmServiceServer).GetRealmBatch(ctx, req.(*GetRealmBatchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RealmService_GetUserRealms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUserRealmsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RealmServiceServer).GetUserRealms(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RealmService_GetUserRealms_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RealmServiceServer).GetUserRealms(ctx, req.(*GetUserRealmsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RealmService_GetPublicRealms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPublicRealmsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RealmServiceServer).GetPublicRealms(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RealmService_GetPublicRealms_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RealmServiceServer).GetPublicRealms(ctx, req.(*GetPublicRealmsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RealmService_SearchRealms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchRealmsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RealmServiceServer).SearchRealms(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RealmService_SearchRealms_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RealmServiceServer).SearchRealms(ctx, req.(*SearchRealmsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RealmService_SendInviteNotify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SendInviteNotifyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RealmServiceServer).SendInviteNotify(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RealmService_SendInviteNotify_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RealmServiceServer).SendInviteNotify(ctx, req.(*SendInviteNotifyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RealmService_IsMemberWithRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IsMemberWithRoleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RealmServiceServer).IsMemberWithRole(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RealmService_IsMemberWithRole_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RealmServiceServer).IsMemberWithRole(ctx, req.(*IsMemberWithRoleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RealmService_LoadMemberAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LoadMemberAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RealmServiceServer).LoadMemberAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RealmService_LoadMemberAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RealmServiceServer).LoadMemberAccount(ctx, req.(*LoadMemberAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RealmService_LoadMemberAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LoadMemberAccountsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RealmServiceServer).LoadMemberAccounts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RealmService_LoadMemberAccounts_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RealmServiceServer).LoadMemberAccounts(ctx, req.(*LoadMemberAccountsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// RealmService_ServiceDesc is the grpc.ServiceDesc for RealmService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var RealmService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "proto.RealmService", + HandlerType: (*RealmServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetRealm", + Handler: _RealmService_GetRealm_Handler, + }, + { + MethodName: "GetRealmBatch", + Handler: _RealmService_GetRealmBatch_Handler, + }, + { + MethodName: "GetUserRealms", + Handler: _RealmService_GetUserRealms_Handler, + }, + { + MethodName: "GetPublicRealms", + Handler: _RealmService_GetPublicRealms_Handler, + }, + { + MethodName: "SearchRealms", + Handler: _RealmService_SearchRealms_Handler, + }, + { + MethodName: "SendInviteNotify", + Handler: _RealmService_SendInviteNotify_Handler, + }, + { + MethodName: "IsMemberWithRole", + Handler: _RealmService_IsMemberWithRole_Handler, + }, + { + MethodName: "LoadMemberAccount", + Handler: _RealmService_LoadMemberAccount_Handler, + }, + { + MethodName: "LoadMemberAccounts", + Handler: _RealmService_LoadMemberAccounts_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "realm.proto", +} diff --git a/pkg/shared/proto/gen/ring.pb.go b/pkg/shared/proto/gen/ring.pb.go new file mode 100644 index 0000000..936337c --- /dev/null +++ b/pkg/shared/proto/gen/ring.pb.go @@ -0,0 +1,1322 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.10 +// protoc v6.33.1 +// source: ring.proto + +package gen + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Represents an email message. +type EmailMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + ToName string `protobuf:"bytes,1,opt,name=to_name,json=toName,proto3" json:"to_name,omitempty"` + ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` + Body string `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EmailMessage) Reset() { + *x = EmailMessage{} + mi := &file_ring_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EmailMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmailMessage) ProtoMessage() {} + +func (x *EmailMessage) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EmailMessage.ProtoReflect.Descriptor instead. +func (*EmailMessage) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{0} +} + +func (x *EmailMessage) GetToName() string { + if x != nil { + return x.ToName + } + return "" +} + +func (x *EmailMessage) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *EmailMessage) GetSubject() string { + if x != nil { + return x.Subject + } + return "" +} + +func (x *EmailMessage) GetBody() string { + if x != nil { + return x.Body + } + return "" +} + +type SendEmailRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Email *EmailMessage `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SendEmailRequest) Reset() { + *x = SendEmailRequest{} + mi := &file_ring_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SendEmailRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendEmailRequest) ProtoMessage() {} + +func (x *SendEmailRequest) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendEmailRequest.ProtoReflect.Descriptor instead. +func (*SendEmailRequest) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{1} +} + +func (x *SendEmailRequest) GetEmail() *EmailMessage { + if x != nil { + return x.Email + } + return nil +} + +// Represents a WebSocket packet. +type WebSocketPacket struct { + state protoimpl.MessageState `protogen:"open.v1"` + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + ErrorMessage *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WebSocketPacket) Reset() { + *x = WebSocketPacket{} + mi := &file_ring_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WebSocketPacket) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WebSocketPacket) ProtoMessage() {} + +func (x *WebSocketPacket) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WebSocketPacket.ProtoReflect.Descriptor instead. +func (*WebSocketPacket) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{2} +} + +func (x *WebSocketPacket) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *WebSocketPacket) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *WebSocketPacket) GetErrorMessage() *wrapperspb.StringValue { + if x != nil { + return x.ErrorMessage + } + return nil +} + +type PushWebSocketPacketRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Packet *WebSocketPacket `protobuf:"bytes,2,opt,name=packet,proto3" json:"packet,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PushWebSocketPacketRequest) Reset() { + *x = PushWebSocketPacketRequest{} + mi := &file_ring_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PushWebSocketPacketRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PushWebSocketPacketRequest) ProtoMessage() {} + +func (x *PushWebSocketPacketRequest) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PushWebSocketPacketRequest.ProtoReflect.Descriptor instead. +func (*PushWebSocketPacketRequest) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{3} +} + +func (x *PushWebSocketPacketRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *PushWebSocketPacketRequest) GetPacket() *WebSocketPacket { + if x != nil { + return x.Packet + } + return nil +} + +type PushWebSocketPacketToUsersRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserIds []string `protobuf:"bytes,1,rep,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty"` + Packet *WebSocketPacket `protobuf:"bytes,2,opt,name=packet,proto3" json:"packet,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PushWebSocketPacketToUsersRequest) Reset() { + *x = PushWebSocketPacketToUsersRequest{} + mi := &file_ring_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PushWebSocketPacketToUsersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PushWebSocketPacketToUsersRequest) ProtoMessage() {} + +func (x *PushWebSocketPacketToUsersRequest) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PushWebSocketPacketToUsersRequest.ProtoReflect.Descriptor instead. +func (*PushWebSocketPacketToUsersRequest) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{4} +} + +func (x *PushWebSocketPacketToUsersRequest) GetUserIds() []string { + if x != nil { + return x.UserIds + } + return nil +} + +func (x *PushWebSocketPacketToUsersRequest) GetPacket() *WebSocketPacket { + if x != nil { + return x.Packet + } + return nil +} + +type PushWebSocketPacketToDeviceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + DeviceId string `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"` + Packet *WebSocketPacket `protobuf:"bytes,2,opt,name=packet,proto3" json:"packet,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PushWebSocketPacketToDeviceRequest) Reset() { + *x = PushWebSocketPacketToDeviceRequest{} + mi := &file_ring_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PushWebSocketPacketToDeviceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PushWebSocketPacketToDeviceRequest) ProtoMessage() {} + +func (x *PushWebSocketPacketToDeviceRequest) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PushWebSocketPacketToDeviceRequest.ProtoReflect.Descriptor instead. +func (*PushWebSocketPacketToDeviceRequest) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{5} +} + +func (x *PushWebSocketPacketToDeviceRequest) GetDeviceId() string { + if x != nil { + return x.DeviceId + } + return "" +} + +func (x *PushWebSocketPacketToDeviceRequest) GetPacket() *WebSocketPacket { + if x != nil { + return x.Packet + } + return nil +} + +type PushWebSocketPacketToDevicesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + DeviceIds []string `protobuf:"bytes,1,rep,name=device_ids,json=deviceIds,proto3" json:"device_ids,omitempty"` + Packet *WebSocketPacket `protobuf:"bytes,2,opt,name=packet,proto3" json:"packet,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PushWebSocketPacketToDevicesRequest) Reset() { + *x = PushWebSocketPacketToDevicesRequest{} + mi := &file_ring_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PushWebSocketPacketToDevicesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PushWebSocketPacketToDevicesRequest) ProtoMessage() {} + +func (x *PushWebSocketPacketToDevicesRequest) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PushWebSocketPacketToDevicesRequest.ProtoReflect.Descriptor instead. +func (*PushWebSocketPacketToDevicesRequest) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{6} +} + +func (x *PushWebSocketPacketToDevicesRequest) GetDeviceIds() []string { + if x != nil { + return x.DeviceIds + } + return nil +} + +func (x *PushWebSocketPacketToDevicesRequest) GetPacket() *WebSocketPacket { + if x != nil { + return x.Packet + } + return nil +} + +// Represents a push notification. +type PushNotification struct { + state protoimpl.MessageState `protogen:"open.v1"` + Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + Subtitle string `protobuf:"bytes,3,opt,name=subtitle,proto3" json:"subtitle,omitempty"` + Body string `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` + Meta []byte `protobuf:"bytes,5,opt,name=meta,proto3,oneof" json:"meta,omitempty"` + ActionUri *string `protobuf:"bytes,6,opt,name=action_uri,json=actionUri,proto3,oneof" json:"action_uri,omitempty"` + IsSilent bool `protobuf:"varint,7,opt,name=is_silent,json=isSilent,proto3" json:"is_silent,omitempty"` + IsSavable bool `protobuf:"varint,8,opt,name=is_savable,json=isSavable,proto3" json:"is_savable,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PushNotification) Reset() { + *x = PushNotification{} + mi := &file_ring_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PushNotification) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PushNotification) ProtoMessage() {} + +func (x *PushNotification) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PushNotification.ProtoReflect.Descriptor instead. +func (*PushNotification) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{7} +} + +func (x *PushNotification) GetTopic() string { + if x != nil { + return x.Topic + } + return "" +} + +func (x *PushNotification) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *PushNotification) GetSubtitle() string { + if x != nil { + return x.Subtitle + } + return "" +} + +func (x *PushNotification) GetBody() string { + if x != nil { + return x.Body + } + return "" +} + +func (x *PushNotification) GetMeta() []byte { + if x != nil { + return x.Meta + } + return nil +} + +func (x *PushNotification) GetActionUri() string { + if x != nil && x.ActionUri != nil { + return *x.ActionUri + } + return "" +} + +func (x *PushNotification) GetIsSilent() bool { + if x != nil { + return x.IsSilent + } + return false +} + +func (x *PushNotification) GetIsSavable() bool { + if x != nil { + return x.IsSavable + } + return false +} + +type SendPushNotificationToUserRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Notification *PushNotification `protobuf:"bytes,2,opt,name=notification,proto3" json:"notification,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SendPushNotificationToUserRequest) Reset() { + *x = SendPushNotificationToUserRequest{} + mi := &file_ring_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SendPushNotificationToUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendPushNotificationToUserRequest) ProtoMessage() {} + +func (x *SendPushNotificationToUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendPushNotificationToUserRequest.ProtoReflect.Descriptor instead. +func (*SendPushNotificationToUserRequest) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{8} +} + +func (x *SendPushNotificationToUserRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *SendPushNotificationToUserRequest) GetNotification() *PushNotification { + if x != nil { + return x.Notification + } + return nil +} + +type SendPushNotificationToUsersRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserIds []string `protobuf:"bytes,1,rep,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty"` + Notification *PushNotification `protobuf:"bytes,2,opt,name=notification,proto3" json:"notification,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SendPushNotificationToUsersRequest) Reset() { + *x = SendPushNotificationToUsersRequest{} + mi := &file_ring_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SendPushNotificationToUsersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendPushNotificationToUsersRequest) ProtoMessage() {} + +func (x *SendPushNotificationToUsersRequest) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendPushNotificationToUsersRequest.ProtoReflect.Descriptor instead. +func (*SendPushNotificationToUsersRequest) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{9} +} + +func (x *SendPushNotificationToUsersRequest) GetUserIds() []string { + if x != nil { + return x.UserIds + } + return nil +} + +func (x *SendPushNotificationToUsersRequest) GetNotification() *PushNotification { + if x != nil { + return x.Notification + } + return nil +} + +type UnsubscribePushNotificationsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + DeviceId string `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UnsubscribePushNotificationsRequest) Reset() { + *x = UnsubscribePushNotificationsRequest{} + mi := &file_ring_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UnsubscribePushNotificationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnsubscribePushNotificationsRequest) ProtoMessage() {} + +func (x *UnsubscribePushNotificationsRequest) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnsubscribePushNotificationsRequest.ProtoReflect.Descriptor instead. +func (*UnsubscribePushNotificationsRequest) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{10} +} + +func (x *UnsubscribePushNotificationsRequest) GetDeviceId() string { + if x != nil { + return x.DeviceId + } + return "" +} + +type GetWebsocketConnectionStatusRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Id: + // + // *GetWebsocketConnectionStatusRequest_DeviceId + // *GetWebsocketConnectionStatusRequest_UserId + Id isGetWebsocketConnectionStatusRequest_Id `protobuf_oneof:"id"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetWebsocketConnectionStatusRequest) Reset() { + *x = GetWebsocketConnectionStatusRequest{} + mi := &file_ring_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetWebsocketConnectionStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWebsocketConnectionStatusRequest) ProtoMessage() {} + +func (x *GetWebsocketConnectionStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetWebsocketConnectionStatusRequest.ProtoReflect.Descriptor instead. +func (*GetWebsocketConnectionStatusRequest) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{11} +} + +func (x *GetWebsocketConnectionStatusRequest) GetId() isGetWebsocketConnectionStatusRequest_Id { + if x != nil { + return x.Id + } + return nil +} + +func (x *GetWebsocketConnectionStatusRequest) GetDeviceId() string { + if x != nil { + if x, ok := x.Id.(*GetWebsocketConnectionStatusRequest_DeviceId); ok { + return x.DeviceId + } + } + return "" +} + +func (x *GetWebsocketConnectionStatusRequest) GetUserId() string { + if x != nil { + if x, ok := x.Id.(*GetWebsocketConnectionStatusRequest_UserId); ok { + return x.UserId + } + } + return "" +} + +type isGetWebsocketConnectionStatusRequest_Id interface { + isGetWebsocketConnectionStatusRequest_Id() +} + +type GetWebsocketConnectionStatusRequest_DeviceId struct { + DeviceId string `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3,oneof"` +} + +type GetWebsocketConnectionStatusRequest_UserId struct { + UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3,oneof"` +} + +func (*GetWebsocketConnectionStatusRequest_DeviceId) isGetWebsocketConnectionStatusRequest_Id() {} + +func (*GetWebsocketConnectionStatusRequest_UserId) isGetWebsocketConnectionStatusRequest_Id() {} + +type GetWebsocketConnectionStatusResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + IsConnected bool `protobuf:"varint,1,opt,name=is_connected,json=isConnected,proto3" json:"is_connected,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetWebsocketConnectionStatusResponse) Reset() { + *x = GetWebsocketConnectionStatusResponse{} + mi := &file_ring_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetWebsocketConnectionStatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWebsocketConnectionStatusResponse) ProtoMessage() {} + +func (x *GetWebsocketConnectionStatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetWebsocketConnectionStatusResponse.ProtoReflect.Descriptor instead. +func (*GetWebsocketConnectionStatusResponse) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{12} +} + +func (x *GetWebsocketConnectionStatusResponse) GetIsConnected() bool { + if x != nil { + return x.IsConnected + } + return false +} + +type GetWebsocketConnectionStatusBatchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UsersId []string `protobuf:"bytes,1,rep,name=users_id,json=usersId,proto3" json:"users_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetWebsocketConnectionStatusBatchRequest) Reset() { + *x = GetWebsocketConnectionStatusBatchRequest{} + mi := &file_ring_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetWebsocketConnectionStatusBatchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWebsocketConnectionStatusBatchRequest) ProtoMessage() {} + +func (x *GetWebsocketConnectionStatusBatchRequest) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetWebsocketConnectionStatusBatchRequest.ProtoReflect.Descriptor instead. +func (*GetWebsocketConnectionStatusBatchRequest) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{13} +} + +func (x *GetWebsocketConnectionStatusBatchRequest) GetUsersId() []string { + if x != nil { + return x.UsersId + } + return nil +} + +type GetWebsocketConnectionStatusBatchResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + IsConnected map[string]bool `protobuf:"bytes,1,rep,name=is_connected,json=isConnected,proto3" json:"is_connected,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetWebsocketConnectionStatusBatchResponse) Reset() { + *x = GetWebsocketConnectionStatusBatchResponse{} + mi := &file_ring_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetWebsocketConnectionStatusBatchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWebsocketConnectionStatusBatchResponse) ProtoMessage() {} + +func (x *GetWebsocketConnectionStatusBatchResponse) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetWebsocketConnectionStatusBatchResponse.ProtoReflect.Descriptor instead. +func (*GetWebsocketConnectionStatusBatchResponse) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{14} +} + +func (x *GetWebsocketConnectionStatusBatchResponse) GetIsConnected() map[string]bool { + if x != nil { + return x.IsConnected + } + return nil +} + +type ReceiveWebSocketPacketRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Packet *WebSocketPacket `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet,omitempty"` + Account *Account `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` + DeviceId string `protobuf:"bytes,3,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ReceiveWebSocketPacketRequest) Reset() { + *x = ReceiveWebSocketPacketRequest{} + mi := &file_ring_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ReceiveWebSocketPacketRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReceiveWebSocketPacketRequest) ProtoMessage() {} + +func (x *ReceiveWebSocketPacketRequest) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReceiveWebSocketPacketRequest.ProtoReflect.Descriptor instead. +func (*ReceiveWebSocketPacketRequest) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{15} +} + +func (x *ReceiveWebSocketPacketRequest) GetPacket() *WebSocketPacket { + if x != nil { + return x.Packet + } + return nil +} + +func (x *ReceiveWebSocketPacketRequest) GetAccount() *Account { + if x != nil { + return x.Account + } + return nil +} + +func (x *ReceiveWebSocketPacketRequest) GetDeviceId() string { + if x != nil { + return x.DeviceId + } + return "" +} + +// WebSocket event messages for NATS publishing +type WebSocketConnectedEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountId *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + DeviceId string `protobuf:"bytes,2,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"` + IsOffline bool `protobuf:"varint,3,opt,name=is_offline,json=isOffline,proto3" json:"is_offline,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WebSocketConnectedEvent) Reset() { + *x = WebSocketConnectedEvent{} + mi := &file_ring_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WebSocketConnectedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WebSocketConnectedEvent) ProtoMessage() {} + +func (x *WebSocketConnectedEvent) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WebSocketConnectedEvent.ProtoReflect.Descriptor instead. +func (*WebSocketConnectedEvent) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{16} +} + +func (x *WebSocketConnectedEvent) GetAccountId() *wrapperspb.StringValue { + if x != nil { + return x.AccountId + } + return nil +} + +func (x *WebSocketConnectedEvent) GetDeviceId() string { + if x != nil { + return x.DeviceId + } + return "" +} + +func (x *WebSocketConnectedEvent) GetIsOffline() bool { + if x != nil { + return x.IsOffline + } + return false +} + +type WebSocketDisconnectedEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountId *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + DeviceId string `protobuf:"bytes,2,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"` + IsOffline bool `protobuf:"varint,3,opt,name=is_offline,json=isOffline,proto3" json:"is_offline,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WebSocketDisconnectedEvent) Reset() { + *x = WebSocketDisconnectedEvent{} + mi := &file_ring_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WebSocketDisconnectedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WebSocketDisconnectedEvent) ProtoMessage() {} + +func (x *WebSocketDisconnectedEvent) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WebSocketDisconnectedEvent.ProtoReflect.Descriptor instead. +func (*WebSocketDisconnectedEvent) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{17} +} + +func (x *WebSocketDisconnectedEvent) GetAccountId() *wrapperspb.StringValue { + if x != nil { + return x.AccountId + } + return nil +} + +func (x *WebSocketDisconnectedEvent) GetDeviceId() string { + if x != nil { + return x.DeviceId + } + return "" +} + +func (x *WebSocketDisconnectedEvent) GetIsOffline() bool { + if x != nil { + return x.IsOffline + } + return false +} + +type WebSocketPacketEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountId *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + DeviceId string `protobuf:"bytes,2,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"` + PacketBytes []byte `protobuf:"bytes,3,opt,name=packet_bytes,json=packetBytes,proto3" json:"packet_bytes,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WebSocketPacketEvent) Reset() { + *x = WebSocketPacketEvent{} + mi := &file_ring_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WebSocketPacketEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WebSocketPacketEvent) ProtoMessage() {} + +func (x *WebSocketPacketEvent) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WebSocketPacketEvent.ProtoReflect.Descriptor instead. +func (*WebSocketPacketEvent) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{18} +} + +func (x *WebSocketPacketEvent) GetAccountId() *wrapperspb.StringValue { + if x != nil { + return x.AccountId + } + return nil +} + +func (x *WebSocketPacketEvent) GetDeviceId() string { + if x != nil { + return x.DeviceId + } + return "" +} + +func (x *WebSocketPacketEvent) GetPacketBytes() []byte { + if x != nil { + return x.PacketBytes + } + return nil +} + +var File_ring_proto protoreflect.FileDescriptor + +const file_ring_proto_rawDesc = "" + + "\n" + + "\n" + + "ring.proto\x12\x05proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\raccount.proto\"t\n" + + "\fEmailMessage\x12\x17\n" + + "\ato_name\x18\x01 \x01(\tR\x06toName\x12\x1d\n" + + "\n" + + "to_address\x18\x02 \x01(\tR\ttoAddress\x12\x18\n" + + "\asubject\x18\x03 \x01(\tR\asubject\x12\x12\n" + + "\x04body\x18\x04 \x01(\tR\x04body\"=\n" + + "\x10SendEmailRequest\x12)\n" + + "\x05email\x18\x01 \x01(\v2\x13.proto.EmailMessageR\x05email\"|\n" + + "\x0fWebSocketPacket\x12\x12\n" + + "\x04type\x18\x01 \x01(\tR\x04type\x12\x12\n" + + "\x04data\x18\x02 \x01(\fR\x04data\x12A\n" + + "\rerror_message\x18\x03 \x01(\v2\x1c.google.protobuf.StringValueR\ferrorMessage\"e\n" + + "\x1aPushWebSocketPacketRequest\x12\x17\n" + + "\auser_id\x18\x01 \x01(\tR\x06userId\x12.\n" + + "\x06packet\x18\x02 \x01(\v2\x16.proto.WebSocketPacketR\x06packet\"n\n" + + "!PushWebSocketPacketToUsersRequest\x12\x19\n" + + "\buser_ids\x18\x01 \x03(\tR\auserIds\x12.\n" + + "\x06packet\x18\x02 \x01(\v2\x16.proto.WebSocketPacketR\x06packet\"q\n" + + "\"PushWebSocketPacketToDeviceRequest\x12\x1b\n" + + "\tdevice_id\x18\x01 \x01(\tR\bdeviceId\x12.\n" + + "\x06packet\x18\x02 \x01(\v2\x16.proto.WebSocketPacketR\x06packet\"t\n" + + "#PushWebSocketPacketToDevicesRequest\x12\x1d\n" + + "\n" + + "device_ids\x18\x01 \x03(\tR\tdeviceIds\x12.\n" + + "\x06packet\x18\x02 \x01(\v2\x16.proto.WebSocketPacketR\x06packet\"\xff\x01\n" + + "\x10PushNotification\x12\x14\n" + + "\x05topic\x18\x01 \x01(\tR\x05topic\x12\x14\n" + + "\x05title\x18\x02 \x01(\tR\x05title\x12\x1a\n" + + "\bsubtitle\x18\x03 \x01(\tR\bsubtitle\x12\x12\n" + + "\x04body\x18\x04 \x01(\tR\x04body\x12\x17\n" + + "\x04meta\x18\x05 \x01(\fH\x00R\x04meta\x88\x01\x01\x12\"\n" + + "\n" + + "action_uri\x18\x06 \x01(\tH\x01R\tactionUri\x88\x01\x01\x12\x1b\n" + + "\tis_silent\x18\a \x01(\bR\bisSilent\x12\x1d\n" + + "\n" + + "is_savable\x18\b \x01(\bR\tisSavableB\a\n" + + "\x05_metaB\r\n" + + "\v_action_uri\"y\n" + + "!SendPushNotificationToUserRequest\x12\x17\n" + + "\auser_id\x18\x01 \x01(\tR\x06userId\x12;\n" + + "\fnotification\x18\x02 \x01(\v2\x17.proto.PushNotificationR\fnotification\"|\n" + + "\"SendPushNotificationToUsersRequest\x12\x19\n" + + "\buser_ids\x18\x01 \x03(\tR\auserIds\x12;\n" + + "\fnotification\x18\x02 \x01(\v2\x17.proto.PushNotificationR\fnotification\"B\n" + + "#UnsubscribePushNotificationsRequest\x12\x1b\n" + + "\tdevice_id\x18\x01 \x01(\tR\bdeviceId\"e\n" + + "#GetWebsocketConnectionStatusRequest\x12\x1d\n" + + "\tdevice_id\x18\x01 \x01(\tH\x00R\bdeviceId\x12\x19\n" + + "\auser_id\x18\x02 \x01(\tH\x00R\x06userIdB\x04\n" + + "\x02id\"I\n" + + "$GetWebsocketConnectionStatusResponse\x12!\n" + + "\fis_connected\x18\x01 \x01(\bR\visConnected\"E\n" + + "(GetWebsocketConnectionStatusBatchRequest\x12\x19\n" + + "\busers_id\x18\x01 \x03(\tR\ausersId\"\xd1\x01\n" + + ")GetWebsocketConnectionStatusBatchResponse\x12d\n" + + "\fis_connected\x18\x01 \x03(\v2A.proto.GetWebsocketConnectionStatusBatchResponse.IsConnectedEntryR\visConnected\x1a>\n" + + "\x10IsConnectedEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\bR\x05value:\x028\x01\"\x96\x01\n" + + "\x1dReceiveWebSocketPacketRequest\x12.\n" + + "\x06packet\x18\x01 \x01(\v2\x16.proto.WebSocketPacketR\x06packet\x12(\n" + + "\aaccount\x18\x02 \x01(\v2\x0e.proto.AccountR\aaccount\x12\x1b\n" + + "\tdevice_id\x18\x03 \x01(\tR\bdeviceId\"\x92\x01\n" + + "\x17WebSocketConnectedEvent\x12;\n" + + "\n" + + "account_id\x18\x01 \x01(\v2\x1c.google.protobuf.StringValueR\taccountId\x12\x1b\n" + + "\tdevice_id\x18\x02 \x01(\tR\bdeviceId\x12\x1d\n" + + "\n" + + "is_offline\x18\x03 \x01(\bR\tisOffline\"\x95\x01\n" + + "\x1aWebSocketDisconnectedEvent\x12;\n" + + "\n" + + "account_id\x18\x01 \x01(\v2\x1c.google.protobuf.StringValueR\taccountId\x12\x1b\n" + + "\tdevice_id\x18\x02 \x01(\tR\bdeviceId\x12\x1d\n" + + "\n" + + "is_offline\x18\x03 \x01(\bR\tisOffline\"\x93\x01\n" + + "\x14WebSocketPacketEvent\x12;\n" + + "\n" + + "account_id\x18\x01 \x01(\v2\x1c.google.protobuf.StringValueR\taccountId\x12\x1b\n" + + "\tdevice_id\x18\x02 \x01(\tR\bdeviceId\x12!\n" + + "\fpacket_bytes\x18\x03 \x01(\fR\vpacketBytes2\xff\a\n" + + "\vRingService\x12>\n" + + "\tSendEmail\x12\x17.proto.SendEmailRequest\x1a\x16.google.protobuf.Empty\"\x00\x12R\n" + + "\x13PushWebSocketPacket\x12!.proto.PushWebSocketPacketRequest\x1a\x16.google.protobuf.Empty\"\x00\x12`\n" + + "\x1aPushWebSocketPacketToUsers\x12(.proto.PushWebSocketPacketToUsersRequest\x1a\x16.google.protobuf.Empty\"\x00\x12b\n" + + "\x1bPushWebSocketPacketToDevice\x12).proto.PushWebSocketPacketToDeviceRequest\x1a\x16.google.protobuf.Empty\"\x00\x12d\n" + + "\x1cPushWebSocketPacketToDevices\x12*.proto.PushWebSocketPacketToDevicesRequest\x1a\x16.google.protobuf.Empty\"\x00\x12`\n" + + "\x1aSendPushNotificationToUser\x12(.proto.SendPushNotificationToUserRequest\x1a\x16.google.protobuf.Empty\"\x00\x12b\n" + + "\x1bSendPushNotificationToUsers\x12).proto.SendPushNotificationToUsersRequest\x1a\x16.google.protobuf.Empty\"\x00\x12d\n" + + "\x1cUnsubscribePushNotifications\x12*.proto.UnsubscribePushNotificationsRequest\x1a\x16.google.protobuf.Empty\"\x00\x12y\n" + + "\x1cGetWebsocketConnectionStatus\x12*.proto.GetWebsocketConnectionStatusRequest\x1a+.proto.GetWebsocketConnectionStatusResponse\"\x00\x12\x88\x01\n" + + "!GetWebsocketConnectionStatusBatch\x12/.proto.GetWebsocketConnectionStatusBatchRequest\x1a0.proto.GetWebsocketConnectionStatusBatchResponse\"\x002n\n" + + "\x12RingHandlerService\x12X\n" + + "\x16ReceiveWebSocketPacket\x12$.proto.ReceiveWebSocketPacketRequest\x1a\x16.google.protobuf.Empty\"\x00BUZ7git.solsynth.dev/goatworks/turbine/pkg/shared/proto/gen\xaa\x02\x19DysonNetwork.Shared.Protob\x06proto3" + +var ( + file_ring_proto_rawDescOnce sync.Once + file_ring_proto_rawDescData []byte +) + +func file_ring_proto_rawDescGZIP() []byte { + file_ring_proto_rawDescOnce.Do(func() { + file_ring_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ring_proto_rawDesc), len(file_ring_proto_rawDesc))) + }) + return file_ring_proto_rawDescData +} + +var file_ring_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_ring_proto_goTypes = []any{ + (*EmailMessage)(nil), // 0: proto.EmailMessage + (*SendEmailRequest)(nil), // 1: proto.SendEmailRequest + (*WebSocketPacket)(nil), // 2: proto.WebSocketPacket + (*PushWebSocketPacketRequest)(nil), // 3: proto.PushWebSocketPacketRequest + (*PushWebSocketPacketToUsersRequest)(nil), // 4: proto.PushWebSocketPacketToUsersRequest + (*PushWebSocketPacketToDeviceRequest)(nil), // 5: proto.PushWebSocketPacketToDeviceRequest + (*PushWebSocketPacketToDevicesRequest)(nil), // 6: proto.PushWebSocketPacketToDevicesRequest + (*PushNotification)(nil), // 7: proto.PushNotification + (*SendPushNotificationToUserRequest)(nil), // 8: proto.SendPushNotificationToUserRequest + (*SendPushNotificationToUsersRequest)(nil), // 9: proto.SendPushNotificationToUsersRequest + (*UnsubscribePushNotificationsRequest)(nil), // 10: proto.UnsubscribePushNotificationsRequest + (*GetWebsocketConnectionStatusRequest)(nil), // 11: proto.GetWebsocketConnectionStatusRequest + (*GetWebsocketConnectionStatusResponse)(nil), // 12: proto.GetWebsocketConnectionStatusResponse + (*GetWebsocketConnectionStatusBatchRequest)(nil), // 13: proto.GetWebsocketConnectionStatusBatchRequest + (*GetWebsocketConnectionStatusBatchResponse)(nil), // 14: proto.GetWebsocketConnectionStatusBatchResponse + (*ReceiveWebSocketPacketRequest)(nil), // 15: proto.ReceiveWebSocketPacketRequest + (*WebSocketConnectedEvent)(nil), // 16: proto.WebSocketConnectedEvent + (*WebSocketDisconnectedEvent)(nil), // 17: proto.WebSocketDisconnectedEvent + (*WebSocketPacketEvent)(nil), // 18: proto.WebSocketPacketEvent + nil, // 19: proto.GetWebsocketConnectionStatusBatchResponse.IsConnectedEntry + (*wrapperspb.StringValue)(nil), // 20: google.protobuf.StringValue + (*Account)(nil), // 21: proto.Account + (*emptypb.Empty)(nil), // 22: google.protobuf.Empty +} +var file_ring_proto_depIdxs = []int32{ + 0, // 0: proto.SendEmailRequest.email:type_name -> proto.EmailMessage + 20, // 1: proto.WebSocketPacket.error_message:type_name -> google.protobuf.StringValue + 2, // 2: proto.PushWebSocketPacketRequest.packet:type_name -> proto.WebSocketPacket + 2, // 3: proto.PushWebSocketPacketToUsersRequest.packet:type_name -> proto.WebSocketPacket + 2, // 4: proto.PushWebSocketPacketToDeviceRequest.packet:type_name -> proto.WebSocketPacket + 2, // 5: proto.PushWebSocketPacketToDevicesRequest.packet:type_name -> proto.WebSocketPacket + 7, // 6: proto.SendPushNotificationToUserRequest.notification:type_name -> proto.PushNotification + 7, // 7: proto.SendPushNotificationToUsersRequest.notification:type_name -> proto.PushNotification + 19, // 8: proto.GetWebsocketConnectionStatusBatchResponse.is_connected:type_name -> proto.GetWebsocketConnectionStatusBatchResponse.IsConnectedEntry + 2, // 9: proto.ReceiveWebSocketPacketRequest.packet:type_name -> proto.WebSocketPacket + 21, // 10: proto.ReceiveWebSocketPacketRequest.account:type_name -> proto.Account + 20, // 11: proto.WebSocketConnectedEvent.account_id:type_name -> google.protobuf.StringValue + 20, // 12: proto.WebSocketDisconnectedEvent.account_id:type_name -> google.protobuf.StringValue + 20, // 13: proto.WebSocketPacketEvent.account_id:type_name -> google.protobuf.StringValue + 1, // 14: proto.RingService.SendEmail:input_type -> proto.SendEmailRequest + 3, // 15: proto.RingService.PushWebSocketPacket:input_type -> proto.PushWebSocketPacketRequest + 4, // 16: proto.RingService.PushWebSocketPacketToUsers:input_type -> proto.PushWebSocketPacketToUsersRequest + 5, // 17: proto.RingService.PushWebSocketPacketToDevice:input_type -> proto.PushWebSocketPacketToDeviceRequest + 6, // 18: proto.RingService.PushWebSocketPacketToDevices:input_type -> proto.PushWebSocketPacketToDevicesRequest + 8, // 19: proto.RingService.SendPushNotificationToUser:input_type -> proto.SendPushNotificationToUserRequest + 9, // 20: proto.RingService.SendPushNotificationToUsers:input_type -> proto.SendPushNotificationToUsersRequest + 10, // 21: proto.RingService.UnsubscribePushNotifications:input_type -> proto.UnsubscribePushNotificationsRequest + 11, // 22: proto.RingService.GetWebsocketConnectionStatus:input_type -> proto.GetWebsocketConnectionStatusRequest + 13, // 23: proto.RingService.GetWebsocketConnectionStatusBatch:input_type -> proto.GetWebsocketConnectionStatusBatchRequest + 15, // 24: proto.RingHandlerService.ReceiveWebSocketPacket:input_type -> proto.ReceiveWebSocketPacketRequest + 22, // 25: proto.RingService.SendEmail:output_type -> google.protobuf.Empty + 22, // 26: proto.RingService.PushWebSocketPacket:output_type -> google.protobuf.Empty + 22, // 27: proto.RingService.PushWebSocketPacketToUsers:output_type -> google.protobuf.Empty + 22, // 28: proto.RingService.PushWebSocketPacketToDevice:output_type -> google.protobuf.Empty + 22, // 29: proto.RingService.PushWebSocketPacketToDevices:output_type -> google.protobuf.Empty + 22, // 30: proto.RingService.SendPushNotificationToUser:output_type -> google.protobuf.Empty + 22, // 31: proto.RingService.SendPushNotificationToUsers:output_type -> google.protobuf.Empty + 22, // 32: proto.RingService.UnsubscribePushNotifications:output_type -> google.protobuf.Empty + 12, // 33: proto.RingService.GetWebsocketConnectionStatus:output_type -> proto.GetWebsocketConnectionStatusResponse + 14, // 34: proto.RingService.GetWebsocketConnectionStatusBatch:output_type -> proto.GetWebsocketConnectionStatusBatchResponse + 22, // 35: proto.RingHandlerService.ReceiveWebSocketPacket:output_type -> google.protobuf.Empty + 25, // [25:36] is the sub-list for method output_type + 14, // [14:25] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name +} + +func init() { file_ring_proto_init() } +func file_ring_proto_init() { + if File_ring_proto != nil { + return + } + file_account_proto_init() + file_ring_proto_msgTypes[7].OneofWrappers = []any{} + file_ring_proto_msgTypes[11].OneofWrappers = []any{ + (*GetWebsocketConnectionStatusRequest_DeviceId)(nil), + (*GetWebsocketConnectionStatusRequest_UserId)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_ring_proto_rawDesc), len(file_ring_proto_rawDesc)), + NumEnums: 0, + NumMessages: 20, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_ring_proto_goTypes, + DependencyIndexes: file_ring_proto_depIdxs, + MessageInfos: file_ring_proto_msgTypes, + }.Build() + File_ring_proto = out.File + file_ring_proto_goTypes = nil + file_ring_proto_depIdxs = nil +} diff --git a/pkg/shared/proto/gen/ring_grpc.pb.go b/pkg/shared/proto/gen/ring_grpc.pb.go new file mode 100644 index 0000000..579ffa3 --- /dev/null +++ b/pkg/shared/proto/gen/ring_grpc.pb.go @@ -0,0 +1,588 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.0 +// - protoc v6.33.1 +// source: ring.proto + +package gen + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + RingService_SendEmail_FullMethodName = "/proto.RingService/SendEmail" + RingService_PushWebSocketPacket_FullMethodName = "/proto.RingService/PushWebSocketPacket" + RingService_PushWebSocketPacketToUsers_FullMethodName = "/proto.RingService/PushWebSocketPacketToUsers" + RingService_PushWebSocketPacketToDevice_FullMethodName = "/proto.RingService/PushWebSocketPacketToDevice" + RingService_PushWebSocketPacketToDevices_FullMethodName = "/proto.RingService/PushWebSocketPacketToDevices" + RingService_SendPushNotificationToUser_FullMethodName = "/proto.RingService/SendPushNotificationToUser" + RingService_SendPushNotificationToUsers_FullMethodName = "/proto.RingService/SendPushNotificationToUsers" + RingService_UnsubscribePushNotifications_FullMethodName = "/proto.RingService/UnsubscribePushNotifications" + RingService_GetWebsocketConnectionStatus_FullMethodName = "/proto.RingService/GetWebsocketConnectionStatus" + RingService_GetWebsocketConnectionStatusBatch_FullMethodName = "/proto.RingService/GetWebsocketConnectionStatusBatch" +) + +// RingServiceClient is the client API for RingService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// RingService provides methods to send various types of notifications. +type RingServiceClient interface { + // Sends an email. + SendEmail(ctx context.Context, in *SendEmailRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Pushes a packet to a user via WebSocket. + PushWebSocketPacket(ctx context.Context, in *PushWebSocketPacketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Pushes a packet to a list of users via WebSocket. + PushWebSocketPacketToUsers(ctx context.Context, in *PushWebSocketPacketToUsersRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Pushes a packet to a device via WebSocket. + PushWebSocketPacketToDevice(ctx context.Context, in *PushWebSocketPacketToDeviceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Pushes a packet to a list of devices via WebSocket. + PushWebSocketPacketToDevices(ctx context.Context, in *PushWebSocketPacketToDevicesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Sends a push notification to a user. + SendPushNotificationToUser(ctx context.Context, in *SendPushNotificationToUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Sends a push notification to a list of users. + SendPushNotificationToUsers(ctx context.Context, in *SendPushNotificationToUsersRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Unsubscribes a device from push notifications. + UnsubscribePushNotifications(ctx context.Context, in *UnsubscribePushNotificationsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Gets the WebSocket connection status for a device or user. + GetWebsocketConnectionStatus(ctx context.Context, in *GetWebsocketConnectionStatusRequest, opts ...grpc.CallOption) (*GetWebsocketConnectionStatusResponse, error) + GetWebsocketConnectionStatusBatch(ctx context.Context, in *GetWebsocketConnectionStatusBatchRequest, opts ...grpc.CallOption) (*GetWebsocketConnectionStatusBatchResponse, error) +} + +type ringServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewRingServiceClient(cc grpc.ClientConnInterface) RingServiceClient { + return &ringServiceClient{cc} +} + +func (c *ringServiceClient) SendEmail(ctx context.Context, in *SendEmailRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RingService_SendEmail_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *ringServiceClient) PushWebSocketPacket(ctx context.Context, in *PushWebSocketPacketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RingService_PushWebSocketPacket_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *ringServiceClient) PushWebSocketPacketToUsers(ctx context.Context, in *PushWebSocketPacketToUsersRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RingService_PushWebSocketPacketToUsers_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *ringServiceClient) PushWebSocketPacketToDevice(ctx context.Context, in *PushWebSocketPacketToDeviceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RingService_PushWebSocketPacketToDevice_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *ringServiceClient) PushWebSocketPacketToDevices(ctx context.Context, in *PushWebSocketPacketToDevicesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RingService_PushWebSocketPacketToDevices_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *ringServiceClient) SendPushNotificationToUser(ctx context.Context, in *SendPushNotificationToUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RingService_SendPushNotificationToUser_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *ringServiceClient) SendPushNotificationToUsers(ctx context.Context, in *SendPushNotificationToUsersRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RingService_SendPushNotificationToUsers_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *ringServiceClient) UnsubscribePushNotifications(ctx context.Context, in *UnsubscribePushNotificationsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RingService_UnsubscribePushNotifications_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *ringServiceClient) GetWebsocketConnectionStatus(ctx context.Context, in *GetWebsocketConnectionStatusRequest, opts ...grpc.CallOption) (*GetWebsocketConnectionStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetWebsocketConnectionStatusResponse) + err := c.cc.Invoke(ctx, RingService_GetWebsocketConnectionStatus_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *ringServiceClient) GetWebsocketConnectionStatusBatch(ctx context.Context, in *GetWebsocketConnectionStatusBatchRequest, opts ...grpc.CallOption) (*GetWebsocketConnectionStatusBatchResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetWebsocketConnectionStatusBatchResponse) + err := c.cc.Invoke(ctx, RingService_GetWebsocketConnectionStatusBatch_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RingServiceServer is the server API for RingService service. +// All implementations must embed UnimplementedRingServiceServer +// for forward compatibility. +// +// RingService provides methods to send various types of notifications. +type RingServiceServer interface { + // Sends an email. + SendEmail(context.Context, *SendEmailRequest) (*emptypb.Empty, error) + // Pushes a packet to a user via WebSocket. + PushWebSocketPacket(context.Context, *PushWebSocketPacketRequest) (*emptypb.Empty, error) + // Pushes a packet to a list of users via WebSocket. + PushWebSocketPacketToUsers(context.Context, *PushWebSocketPacketToUsersRequest) (*emptypb.Empty, error) + // Pushes a packet to a device via WebSocket. + PushWebSocketPacketToDevice(context.Context, *PushWebSocketPacketToDeviceRequest) (*emptypb.Empty, error) + // Pushes a packet to a list of devices via WebSocket. + PushWebSocketPacketToDevices(context.Context, *PushWebSocketPacketToDevicesRequest) (*emptypb.Empty, error) + // Sends a push notification to a user. + SendPushNotificationToUser(context.Context, *SendPushNotificationToUserRequest) (*emptypb.Empty, error) + // Sends a push notification to a list of users. + SendPushNotificationToUsers(context.Context, *SendPushNotificationToUsersRequest) (*emptypb.Empty, error) + // Unsubscribes a device from push notifications. + UnsubscribePushNotifications(context.Context, *UnsubscribePushNotificationsRequest) (*emptypb.Empty, error) + // Gets the WebSocket connection status for a device or user. + GetWebsocketConnectionStatus(context.Context, *GetWebsocketConnectionStatusRequest) (*GetWebsocketConnectionStatusResponse, error) + GetWebsocketConnectionStatusBatch(context.Context, *GetWebsocketConnectionStatusBatchRequest) (*GetWebsocketConnectionStatusBatchResponse, error) + mustEmbedUnimplementedRingServiceServer() +} + +// UnimplementedRingServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedRingServiceServer struct{} + +func (UnimplementedRingServiceServer) SendEmail(context.Context, *SendEmailRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method SendEmail not implemented") +} +func (UnimplementedRingServiceServer) PushWebSocketPacket(context.Context, *PushWebSocketPacketRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method PushWebSocketPacket not implemented") +} +func (UnimplementedRingServiceServer) PushWebSocketPacketToUsers(context.Context, *PushWebSocketPacketToUsersRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method PushWebSocketPacketToUsers not implemented") +} +func (UnimplementedRingServiceServer) PushWebSocketPacketToDevice(context.Context, *PushWebSocketPacketToDeviceRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method PushWebSocketPacketToDevice not implemented") +} +func (UnimplementedRingServiceServer) PushWebSocketPacketToDevices(context.Context, *PushWebSocketPacketToDevicesRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method PushWebSocketPacketToDevices not implemented") +} +func (UnimplementedRingServiceServer) SendPushNotificationToUser(context.Context, *SendPushNotificationToUserRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method SendPushNotificationToUser not implemented") +} +func (UnimplementedRingServiceServer) SendPushNotificationToUsers(context.Context, *SendPushNotificationToUsersRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method SendPushNotificationToUsers not implemented") +} +func (UnimplementedRingServiceServer) UnsubscribePushNotifications(context.Context, *UnsubscribePushNotificationsRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method UnsubscribePushNotifications not implemented") +} +func (UnimplementedRingServiceServer) GetWebsocketConnectionStatus(context.Context, *GetWebsocketConnectionStatusRequest) (*GetWebsocketConnectionStatusResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetWebsocketConnectionStatus not implemented") +} +func (UnimplementedRingServiceServer) GetWebsocketConnectionStatusBatch(context.Context, *GetWebsocketConnectionStatusBatchRequest) (*GetWebsocketConnectionStatusBatchResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetWebsocketConnectionStatusBatch not implemented") +} +func (UnimplementedRingServiceServer) mustEmbedUnimplementedRingServiceServer() {} +func (UnimplementedRingServiceServer) testEmbeddedByValue() {} + +// UnsafeRingServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RingServiceServer will +// result in compilation errors. +type UnsafeRingServiceServer interface { + mustEmbedUnimplementedRingServiceServer() +} + +func RegisterRingServiceServer(s grpc.ServiceRegistrar, srv RingServiceServer) { + // If the following call panics, it indicates UnimplementedRingServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&RingService_ServiceDesc, srv) +} + +func _RingService_SendEmail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SendEmailRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RingServiceServer).SendEmail(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RingService_SendEmail_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RingServiceServer).SendEmail(ctx, req.(*SendEmailRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RingService_PushWebSocketPacket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PushWebSocketPacketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RingServiceServer).PushWebSocketPacket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RingService_PushWebSocketPacket_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RingServiceServer).PushWebSocketPacket(ctx, req.(*PushWebSocketPacketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RingService_PushWebSocketPacketToUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PushWebSocketPacketToUsersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RingServiceServer).PushWebSocketPacketToUsers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RingService_PushWebSocketPacketToUsers_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RingServiceServer).PushWebSocketPacketToUsers(ctx, req.(*PushWebSocketPacketToUsersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RingService_PushWebSocketPacketToDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PushWebSocketPacketToDeviceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RingServiceServer).PushWebSocketPacketToDevice(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RingService_PushWebSocketPacketToDevice_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RingServiceServer).PushWebSocketPacketToDevice(ctx, req.(*PushWebSocketPacketToDeviceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RingService_PushWebSocketPacketToDevices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PushWebSocketPacketToDevicesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RingServiceServer).PushWebSocketPacketToDevices(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RingService_PushWebSocketPacketToDevices_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RingServiceServer).PushWebSocketPacketToDevices(ctx, req.(*PushWebSocketPacketToDevicesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RingService_SendPushNotificationToUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SendPushNotificationToUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RingServiceServer).SendPushNotificationToUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RingService_SendPushNotificationToUser_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RingServiceServer).SendPushNotificationToUser(ctx, req.(*SendPushNotificationToUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RingService_SendPushNotificationToUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SendPushNotificationToUsersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RingServiceServer).SendPushNotificationToUsers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RingService_SendPushNotificationToUsers_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RingServiceServer).SendPushNotificationToUsers(ctx, req.(*SendPushNotificationToUsersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RingService_UnsubscribePushNotifications_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnsubscribePushNotificationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RingServiceServer).UnsubscribePushNotifications(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RingService_UnsubscribePushNotifications_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RingServiceServer).UnsubscribePushNotifications(ctx, req.(*UnsubscribePushNotificationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RingService_GetWebsocketConnectionStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetWebsocketConnectionStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RingServiceServer).GetWebsocketConnectionStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RingService_GetWebsocketConnectionStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RingServiceServer).GetWebsocketConnectionStatus(ctx, req.(*GetWebsocketConnectionStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RingService_GetWebsocketConnectionStatusBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetWebsocketConnectionStatusBatchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RingServiceServer).GetWebsocketConnectionStatusBatch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RingService_GetWebsocketConnectionStatusBatch_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RingServiceServer).GetWebsocketConnectionStatusBatch(ctx, req.(*GetWebsocketConnectionStatusBatchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// RingService_ServiceDesc is the grpc.ServiceDesc for RingService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var RingService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "proto.RingService", + HandlerType: (*RingServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SendEmail", + Handler: _RingService_SendEmail_Handler, + }, + { + MethodName: "PushWebSocketPacket", + Handler: _RingService_PushWebSocketPacket_Handler, + }, + { + MethodName: "PushWebSocketPacketToUsers", + Handler: _RingService_PushWebSocketPacketToUsers_Handler, + }, + { + MethodName: "PushWebSocketPacketToDevice", + Handler: _RingService_PushWebSocketPacketToDevice_Handler, + }, + { + MethodName: "PushWebSocketPacketToDevices", + Handler: _RingService_PushWebSocketPacketToDevices_Handler, + }, + { + MethodName: "SendPushNotificationToUser", + Handler: _RingService_SendPushNotificationToUser_Handler, + }, + { + MethodName: "SendPushNotificationToUsers", + Handler: _RingService_SendPushNotificationToUsers_Handler, + }, + { + MethodName: "UnsubscribePushNotifications", + Handler: _RingService_UnsubscribePushNotifications_Handler, + }, + { + MethodName: "GetWebsocketConnectionStatus", + Handler: _RingService_GetWebsocketConnectionStatus_Handler, + }, + { + MethodName: "GetWebsocketConnectionStatusBatch", + Handler: _RingService_GetWebsocketConnectionStatusBatch_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "ring.proto", +} + +const ( + RingHandlerService_ReceiveWebSocketPacket_FullMethodName = "/proto.RingHandlerService/ReceiveWebSocketPacket" +) + +// RingHandlerServiceClient is the client API for RingHandlerService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type RingHandlerServiceClient interface { + ReceiveWebSocketPacket(ctx context.Context, in *ReceiveWebSocketPacketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type ringHandlerServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewRingHandlerServiceClient(cc grpc.ClientConnInterface) RingHandlerServiceClient { + return &ringHandlerServiceClient{cc} +} + +func (c *ringHandlerServiceClient) ReceiveWebSocketPacket(ctx context.Context, in *ReceiveWebSocketPacketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RingHandlerService_ReceiveWebSocketPacket_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RingHandlerServiceServer is the server API for RingHandlerService service. +// All implementations must embed UnimplementedRingHandlerServiceServer +// for forward compatibility. +type RingHandlerServiceServer interface { + ReceiveWebSocketPacket(context.Context, *ReceiveWebSocketPacketRequest) (*emptypb.Empty, error) + mustEmbedUnimplementedRingHandlerServiceServer() +} + +// UnimplementedRingHandlerServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedRingHandlerServiceServer struct{} + +func (UnimplementedRingHandlerServiceServer) ReceiveWebSocketPacket(context.Context, *ReceiveWebSocketPacketRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method ReceiveWebSocketPacket not implemented") +} +func (UnimplementedRingHandlerServiceServer) mustEmbedUnimplementedRingHandlerServiceServer() {} +func (UnimplementedRingHandlerServiceServer) testEmbeddedByValue() {} + +// UnsafeRingHandlerServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RingHandlerServiceServer will +// result in compilation errors. +type UnsafeRingHandlerServiceServer interface { + mustEmbedUnimplementedRingHandlerServiceServer() +} + +func RegisterRingHandlerServiceServer(s grpc.ServiceRegistrar, srv RingHandlerServiceServer) { + // If the following call panics, it indicates UnimplementedRingHandlerServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&RingHandlerService_ServiceDesc, srv) +} + +func _RingHandlerService_ReceiveWebSocketPacket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReceiveWebSocketPacketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RingHandlerServiceServer).ReceiveWebSocketPacket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RingHandlerService_ReceiveWebSocketPacket_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RingHandlerServiceServer).ReceiveWebSocketPacket(ctx, req.(*ReceiveWebSocketPacketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// RingHandlerService_ServiceDesc is the grpc.ServiceDesc for RingHandlerService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var RingHandlerService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "proto.RingHandlerService", + HandlerType: (*RingHandlerServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ReceiveWebSocketPacket", + Handler: _RingHandlerService_ReceiveWebSocketPacket_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "ring.proto", +} diff --git a/pkg/shared/proto/gen/wallet.pb.go b/pkg/shared/proto/gen/wallet.pb.go new file mode 100644 index 0000000..3120c81 --- /dev/null +++ b/pkg/shared/proto/gen/wallet.pb.go @@ -0,0 +1,2809 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.10 +// protoc v6.33.1 +// source: wallet.proto + +package gen + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type FundSplitType int32 + +const ( + FundSplitType_FUND_SPLIT_TYPE_UNSPECIFIED FundSplitType = 0 + FundSplitType_FUND_SPLIT_TYPE_EVEN FundSplitType = 1 + FundSplitType_FUND_SPLIT_TYPE_RANDOM FundSplitType = 2 +) + +// Enum value maps for FundSplitType. +var ( + FundSplitType_name = map[int32]string{ + 0: "FUND_SPLIT_TYPE_UNSPECIFIED", + 1: "FUND_SPLIT_TYPE_EVEN", + 2: "FUND_SPLIT_TYPE_RANDOM", + } + FundSplitType_value = map[string]int32{ + "FUND_SPLIT_TYPE_UNSPECIFIED": 0, + "FUND_SPLIT_TYPE_EVEN": 1, + "FUND_SPLIT_TYPE_RANDOM": 2, + } +) + +func (x FundSplitType) Enum() *FundSplitType { + p := new(FundSplitType) + *p = x + return p +} + +func (x FundSplitType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FundSplitType) Descriptor() protoreflect.EnumDescriptor { + return file_wallet_proto_enumTypes[0].Descriptor() +} + +func (FundSplitType) Type() protoreflect.EnumType { + return &file_wallet_proto_enumTypes[0] +} + +func (x FundSplitType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FundSplitType.Descriptor instead. +func (FundSplitType) EnumDescriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{0} +} + +type FundStatus int32 + +const ( + FundStatus_FUND_STATUS_UNSPECIFIED FundStatus = 0 + FundStatus_FUND_STATUS_CREATED FundStatus = 1 + FundStatus_FUND_STATUS_PARTIALLY_RECEIVED FundStatus = 2 + FundStatus_FUND_STATUS_FULLY_RECEIVED FundStatus = 3 + FundStatus_FUND_STATUS_EXPIRED FundStatus = 4 + FundStatus_FUND_STATUS_REFUNDED FundStatus = 5 +) + +// Enum value maps for FundStatus. +var ( + FundStatus_name = map[int32]string{ + 0: "FUND_STATUS_UNSPECIFIED", + 1: "FUND_STATUS_CREATED", + 2: "FUND_STATUS_PARTIALLY_RECEIVED", + 3: "FUND_STATUS_FULLY_RECEIVED", + 4: "FUND_STATUS_EXPIRED", + 5: "FUND_STATUS_REFUNDED", + } + FundStatus_value = map[string]int32{ + "FUND_STATUS_UNSPECIFIED": 0, + "FUND_STATUS_CREATED": 1, + "FUND_STATUS_PARTIALLY_RECEIVED": 2, + "FUND_STATUS_FULLY_RECEIVED": 3, + "FUND_STATUS_EXPIRED": 4, + "FUND_STATUS_REFUNDED": 5, + } +) + +func (x FundStatus) Enum() *FundStatus { + p := new(FundStatus) + *p = x + return p +} + +func (x FundStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FundStatus) Descriptor() protoreflect.EnumDescriptor { + return file_wallet_proto_enumTypes[1].Descriptor() +} + +func (FundStatus) Type() protoreflect.EnumType { + return &file_wallet_proto_enumTypes[1] +} + +func (x FundStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FundStatus.Descriptor instead. +func (FundStatus) EnumDescriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{1} +} + +type SubscriptionStatus int32 + +const ( + // Using proto3 enum naming convention + SubscriptionStatus_SUBSCRIPTION_STATUS_UNSPECIFIED SubscriptionStatus = 0 + SubscriptionStatus_SUBSCRIPTION_STATUS_UNPAID SubscriptionStatus = 1 + SubscriptionStatus_SUBSCRIPTION_STATUS_ACTIVE SubscriptionStatus = 2 + SubscriptionStatus_SUBSCRIPTION_STATUS_EXPIRED SubscriptionStatus = 3 + SubscriptionStatus_SUBSCRIPTION_STATUS_CANCELLED SubscriptionStatus = 4 +) + +// Enum value maps for SubscriptionStatus. +var ( + SubscriptionStatus_name = map[int32]string{ + 0: "SUBSCRIPTION_STATUS_UNSPECIFIED", + 1: "SUBSCRIPTION_STATUS_UNPAID", + 2: "SUBSCRIPTION_STATUS_ACTIVE", + 3: "SUBSCRIPTION_STATUS_EXPIRED", + 4: "SUBSCRIPTION_STATUS_CANCELLED", + } + SubscriptionStatus_value = map[string]int32{ + "SUBSCRIPTION_STATUS_UNSPECIFIED": 0, + "SUBSCRIPTION_STATUS_UNPAID": 1, + "SUBSCRIPTION_STATUS_ACTIVE": 2, + "SUBSCRIPTION_STATUS_EXPIRED": 3, + "SUBSCRIPTION_STATUS_CANCELLED": 4, + } +) + +func (x SubscriptionStatus) Enum() *SubscriptionStatus { + p := new(SubscriptionStatus) + *p = x + return p +} + +func (x SubscriptionStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SubscriptionStatus) Descriptor() protoreflect.EnumDescriptor { + return file_wallet_proto_enumTypes[2].Descriptor() +} + +func (SubscriptionStatus) Type() protoreflect.EnumType { + return &file_wallet_proto_enumTypes[2] +} + +func (x SubscriptionStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SubscriptionStatus.Descriptor instead. +func (SubscriptionStatus) EnumDescriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{2} +} + +type GiftStatus int32 + +const ( + // Using proto3 enum naming convention + GiftStatus_GIFT_STATUS_UNSPECIFIED GiftStatus = 0 + GiftStatus_GIFT_STATUS_CREATED GiftStatus = 1 + GiftStatus_GIFT_STATUS_SENT GiftStatus = 2 + GiftStatus_GIFT_STATUS_REDEEMED GiftStatus = 3 + GiftStatus_GIFT_STATUS_EXPIRED GiftStatus = 4 + GiftStatus_GIFT_STATUS_CANCELLED GiftStatus = 5 +) + +// Enum value maps for GiftStatus. +var ( + GiftStatus_name = map[int32]string{ + 0: "GIFT_STATUS_UNSPECIFIED", + 1: "GIFT_STATUS_CREATED", + 2: "GIFT_STATUS_SENT", + 3: "GIFT_STATUS_REDEEMED", + 4: "GIFT_STATUS_EXPIRED", + 5: "GIFT_STATUS_CANCELLED", + } + GiftStatus_value = map[string]int32{ + "GIFT_STATUS_UNSPECIFIED": 0, + "GIFT_STATUS_CREATED": 1, + "GIFT_STATUS_SENT": 2, + "GIFT_STATUS_REDEEMED": 3, + "GIFT_STATUS_EXPIRED": 4, + "GIFT_STATUS_CANCELLED": 5, + } +) + +func (x GiftStatus) Enum() *GiftStatus { + p := new(GiftStatus) + *p = x + return p +} + +func (x GiftStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GiftStatus) Descriptor() protoreflect.EnumDescriptor { + return file_wallet_proto_enumTypes[3].Descriptor() +} + +func (GiftStatus) Type() protoreflect.EnumType { + return &file_wallet_proto_enumTypes[3] +} + +func (x GiftStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GiftStatus.Descriptor instead. +func (GiftStatus) EnumDescriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{3} +} + +type OrderStatus int32 + +const ( + OrderStatus_ORDER_STATUS_UNSPECIFIED OrderStatus = 0 + OrderStatus_ORDER_STATUS_UNPAID OrderStatus = 1 + OrderStatus_ORDER_STATUS_PAID OrderStatus = 2 + OrderStatus_ORDER_STATUS_EXPIRED OrderStatus = 3 + OrderStatus_ORDER_STATUS_CANCELLED OrderStatus = 4 + OrderStatus_ORDER_STATUS_FINISHED OrderStatus = 5 +) + +// Enum value maps for OrderStatus. +var ( + OrderStatus_name = map[int32]string{ + 0: "ORDER_STATUS_UNSPECIFIED", + 1: "ORDER_STATUS_UNPAID", + 2: "ORDER_STATUS_PAID", + 3: "ORDER_STATUS_EXPIRED", + 4: "ORDER_STATUS_CANCELLED", + 5: "ORDER_STATUS_FINISHED", + } + OrderStatus_value = map[string]int32{ + "ORDER_STATUS_UNSPECIFIED": 0, + "ORDER_STATUS_UNPAID": 1, + "ORDER_STATUS_PAID": 2, + "ORDER_STATUS_EXPIRED": 3, + "ORDER_STATUS_CANCELLED": 4, + "ORDER_STATUS_FINISHED": 5, + } +) + +func (x OrderStatus) Enum() *OrderStatus { + p := new(OrderStatus) + *p = x + return p +} + +func (x OrderStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (OrderStatus) Descriptor() protoreflect.EnumDescriptor { + return file_wallet_proto_enumTypes[4].Descriptor() +} + +func (OrderStatus) Type() protoreflect.EnumType { + return &file_wallet_proto_enumTypes[4] +} + +func (x OrderStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use OrderStatus.Descriptor instead. +func (OrderStatus) EnumDescriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{4} +} + +type TransactionType int32 + +const ( + TransactionType_TRANSACTION_TYPE_UNSPECIFIED TransactionType = 0 + TransactionType_TRANSACTION_TYPE_SYSTEM TransactionType = 1 + TransactionType_TRANSACTION_TYPE_ORDER TransactionType = 2 + TransactionType_TRANSACTION_TYPE_TRANSFER TransactionType = 3 +) + +// Enum value maps for TransactionType. +var ( + TransactionType_name = map[int32]string{ + 0: "TRANSACTION_TYPE_UNSPECIFIED", + 1: "TRANSACTION_TYPE_SYSTEM", + 2: "TRANSACTION_TYPE_ORDER", + 3: "TRANSACTION_TYPE_TRANSFER", + } + TransactionType_value = map[string]int32{ + "TRANSACTION_TYPE_UNSPECIFIED": 0, + "TRANSACTION_TYPE_SYSTEM": 1, + "TRANSACTION_TYPE_ORDER": 2, + "TRANSACTION_TYPE_TRANSFER": 3, + } +) + +func (x TransactionType) Enum() *TransactionType { + p := new(TransactionType) + *p = x + return p +} + +func (x TransactionType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TransactionType) Descriptor() protoreflect.EnumDescriptor { + return file_wallet_proto_enumTypes[5].Descriptor() +} + +func (TransactionType) Type() protoreflect.EnumType { + return &file_wallet_proto_enumTypes[5] +} + +func (x TransactionType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TransactionType.Descriptor instead. +func (TransactionType) EnumDescriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{5} +} + +type Wallet struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Pockets []*WalletPocket `protobuf:"bytes,2,rep,name=pockets,proto3" json:"pockets,omitempty"` + AccountId string `protobuf:"bytes,3,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Wallet) Reset() { + *x = Wallet{} + mi := &file_wallet_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Wallet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Wallet) ProtoMessage() {} + +func (x *Wallet) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Wallet.ProtoReflect.Descriptor instead. +func (*Wallet) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{0} +} + +func (x *Wallet) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Wallet) GetPockets() []*WalletPocket { + if x != nil { + return x.Pockets + } + return nil +} + +func (x *Wallet) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +type WalletPocket struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Currency string `protobuf:"bytes,2,opt,name=currency,proto3" json:"currency,omitempty"` + // Using string for decimal to avoid precision loss. + Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + WalletId string `protobuf:"bytes,4,opt,name=wallet_id,json=walletId,proto3" json:"wallet_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WalletPocket) Reset() { + *x = WalletPocket{} + mi := &file_wallet_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WalletPocket) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WalletPocket) ProtoMessage() {} + +func (x *WalletPocket) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WalletPocket.ProtoReflect.Descriptor instead. +func (*WalletPocket) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{1} +} + +func (x *WalletPocket) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *WalletPocket) GetCurrency() string { + if x != nil { + return x.Currency + } + return "" +} + +func (x *WalletPocket) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *WalletPocket) GetWalletId() string { + if x != nil { + return x.WalletId + } + return "" +} + +type WalletFund struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Currency string `protobuf:"bytes,2,opt,name=currency,proto3" json:"currency,omitempty"` + TotalAmount string `protobuf:"bytes,3,opt,name=total_amount,json=totalAmount,proto3" json:"total_amount,omitempty"` + RemainingAmount string `protobuf:"bytes,10,opt,name=remaining_amount,json=remainingAmount,proto3" json:"remaining_amount,omitempty"` + SplitType FundSplitType `protobuf:"varint,4,opt,name=split_type,json=splitType,proto3,enum=proto.FundSplitType" json:"split_type,omitempty"` + Status FundStatus `protobuf:"varint,5,opt,name=status,proto3,enum=proto.FundStatus" json:"status,omitempty"` + Message *wrapperspb.StringValue `protobuf:"bytes,6,opt,name=message,proto3" json:"message,omitempty"` + CreatorAccountId string `protobuf:"bytes,7,opt,name=creator_account_id,json=creatorAccountId,proto3" json:"creator_account_id,omitempty"` + ExpiredAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"` + Recipients []*WalletFundRecipient `protobuf:"bytes,9,rep,name=recipients,proto3" json:"recipients,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WalletFund) Reset() { + *x = WalletFund{} + mi := &file_wallet_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WalletFund) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WalletFund) ProtoMessage() {} + +func (x *WalletFund) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WalletFund.ProtoReflect.Descriptor instead. +func (*WalletFund) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{2} +} + +func (x *WalletFund) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *WalletFund) GetCurrency() string { + if x != nil { + return x.Currency + } + return "" +} + +func (x *WalletFund) GetTotalAmount() string { + if x != nil { + return x.TotalAmount + } + return "" +} + +func (x *WalletFund) GetRemainingAmount() string { + if x != nil { + return x.RemainingAmount + } + return "" +} + +func (x *WalletFund) GetSplitType() FundSplitType { + if x != nil { + return x.SplitType + } + return FundSplitType_FUND_SPLIT_TYPE_UNSPECIFIED +} + +func (x *WalletFund) GetStatus() FundStatus { + if x != nil { + return x.Status + } + return FundStatus_FUND_STATUS_UNSPECIFIED +} + +func (x *WalletFund) GetMessage() *wrapperspb.StringValue { + if x != nil { + return x.Message + } + return nil +} + +func (x *WalletFund) GetCreatorAccountId() string { + if x != nil { + return x.CreatorAccountId + } + return "" +} + +func (x *WalletFund) GetExpiredAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiredAt + } + return nil +} + +func (x *WalletFund) GetRecipients() []*WalletFundRecipient { + if x != nil { + return x.Recipients + } + return nil +} + +type WalletFundRecipient struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + FundId string `protobuf:"bytes,2,opt,name=fund_id,json=fundId,proto3" json:"fund_id,omitempty"` + RecipientAccountId string `protobuf:"bytes,3,opt,name=recipient_account_id,json=recipientAccountId,proto3" json:"recipient_account_id,omitempty"` + Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` + IsReceived bool `protobuf:"varint,5,opt,name=is_received,json=isReceived,proto3" json:"is_received,omitempty"` + ReceivedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=received_at,json=receivedAt,proto3,oneof" json:"received_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WalletFundRecipient) Reset() { + *x = WalletFundRecipient{} + mi := &file_wallet_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WalletFundRecipient) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WalletFundRecipient) ProtoMessage() {} + +func (x *WalletFundRecipient) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WalletFundRecipient.ProtoReflect.Descriptor instead. +func (*WalletFundRecipient) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{3} +} + +func (x *WalletFundRecipient) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *WalletFundRecipient) GetFundId() string { + if x != nil { + return x.FundId + } + return "" +} + +func (x *WalletFundRecipient) GetRecipientAccountId() string { + if x != nil { + return x.RecipientAccountId + } + return "" +} + +func (x *WalletFundRecipient) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *WalletFundRecipient) GetIsReceived() bool { + if x != nil { + return x.IsReceived + } + return false +} + +func (x *WalletFundRecipient) GetReceivedAt() *timestamppb.Timestamp { + if x != nil { + return x.ReceivedAt + } + return nil +} + +type Subscription struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + BegunAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=begun_at,json=begunAt,proto3" json:"begun_at,omitempty"` + EndedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=ended_at,json=endedAt,proto3,oneof" json:"ended_at,omitempty"` + Identifier string `protobuf:"bytes,4,opt,name=identifier,proto3" json:"identifier,omitempty"` + IsActive bool `protobuf:"varint,5,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` + IsFreeTrial bool `protobuf:"varint,6,opt,name=is_free_trial,json=isFreeTrial,proto3" json:"is_free_trial,omitempty"` + Status SubscriptionStatus `protobuf:"varint,7,opt,name=status,proto3,enum=proto.SubscriptionStatus" json:"status,omitempty"` + PaymentMethod string `protobuf:"bytes,8,opt,name=payment_method,json=paymentMethod,proto3" json:"payment_method,omitempty"` + PaymentDetails *PaymentDetails `protobuf:"bytes,9,opt,name=payment_details,json=paymentDetails,proto3" json:"payment_details,omitempty"` + // Using string for decimal to avoid precision loss. + BasePrice string `protobuf:"bytes,10,opt,name=base_price,json=basePrice,proto3" json:"base_price,omitempty"` + CouponId *string `protobuf:"bytes,11,opt,name=coupon_id,json=couponId,proto3,oneof" json:"coupon_id,omitempty"` + Coupon *Coupon `protobuf:"bytes,12,opt,name=coupon,proto3,oneof" json:"coupon,omitempty"` + RenewalAt *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=renewal_at,json=renewalAt,proto3,oneof" json:"renewal_at,omitempty"` + AccountId string `protobuf:"bytes,14,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + IsAvailable bool `protobuf:"varint,15,opt,name=is_available,json=isAvailable,proto3" json:"is_available,omitempty"` + // Using string for decimal to avoid precision loss. + FinalPrice string `protobuf:"bytes,16,opt,name=final_price,json=finalPrice,proto3" json:"final_price,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,17,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,18,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Subscription) Reset() { + *x = Subscription{} + mi := &file_wallet_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Subscription) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Subscription) ProtoMessage() {} + +func (x *Subscription) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Subscription.ProtoReflect.Descriptor instead. +func (*Subscription) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{4} +} + +func (x *Subscription) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Subscription) GetBegunAt() *timestamppb.Timestamp { + if x != nil { + return x.BegunAt + } + return nil +} + +func (x *Subscription) GetEndedAt() *timestamppb.Timestamp { + if x != nil { + return x.EndedAt + } + return nil +} + +func (x *Subscription) GetIdentifier() string { + if x != nil { + return x.Identifier + } + return "" +} + +func (x *Subscription) GetIsActive() bool { + if x != nil { + return x.IsActive + } + return false +} + +func (x *Subscription) GetIsFreeTrial() bool { + if x != nil { + return x.IsFreeTrial + } + return false +} + +func (x *Subscription) GetStatus() SubscriptionStatus { + if x != nil { + return x.Status + } + return SubscriptionStatus_SUBSCRIPTION_STATUS_UNSPECIFIED +} + +func (x *Subscription) GetPaymentMethod() string { + if x != nil { + return x.PaymentMethod + } + return "" +} + +func (x *Subscription) GetPaymentDetails() *PaymentDetails { + if x != nil { + return x.PaymentDetails + } + return nil +} + +func (x *Subscription) GetBasePrice() string { + if x != nil { + return x.BasePrice + } + return "" +} + +func (x *Subscription) GetCouponId() string { + if x != nil && x.CouponId != nil { + return *x.CouponId + } + return "" +} + +func (x *Subscription) GetCoupon() *Coupon { + if x != nil { + return x.Coupon + } + return nil +} + +func (x *Subscription) GetRenewalAt() *timestamppb.Timestamp { + if x != nil { + return x.RenewalAt + } + return nil +} + +func (x *Subscription) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *Subscription) GetIsAvailable() bool { + if x != nil { + return x.IsAvailable + } + return false +} + +func (x *Subscription) GetFinalPrice() string { + if x != nil { + return x.FinalPrice + } + return "" +} + +func (x *Subscription) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Subscription) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type SubscriptionReferenceObject struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Identifier string `protobuf:"bytes,2,opt,name=identifier,proto3" json:"identifier,omitempty"` + BegunAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=begun_at,json=begunAt,proto3" json:"begun_at,omitempty"` + EndedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=ended_at,json=endedAt,proto3,oneof" json:"ended_at,omitempty"` + IsActive bool `protobuf:"varint,5,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` + IsAvailable bool `protobuf:"varint,6,opt,name=is_available,json=isAvailable,proto3" json:"is_available,omitempty"` + IsFreeTrial bool `protobuf:"varint,7,opt,name=is_free_trial,json=isFreeTrial,proto3" json:"is_free_trial,omitempty"` + Status SubscriptionStatus `protobuf:"varint,8,opt,name=status,proto3,enum=proto.SubscriptionStatus" json:"status,omitempty"` + // Using string for decimal to avoid precision loss. + BasePrice string `protobuf:"bytes,9,opt,name=base_price,json=basePrice,proto3" json:"base_price,omitempty"` + // Using string for decimal to avoid precision loss. + FinalPrice string `protobuf:"bytes,10,opt,name=final_price,json=finalPrice,proto3" json:"final_price,omitempty"` + RenewalAt *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=renewal_at,json=renewalAt,proto3,oneof" json:"renewal_at,omitempty"` + AccountId string `protobuf:"bytes,12,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + DisplayName *string `protobuf:"bytes,13,opt,name=display_name,json=displayName,proto3,oneof" json:"display_name,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,14,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SubscriptionReferenceObject) Reset() { + *x = SubscriptionReferenceObject{} + mi := &file_wallet_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SubscriptionReferenceObject) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubscriptionReferenceObject) ProtoMessage() {} + +func (x *SubscriptionReferenceObject) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubscriptionReferenceObject.ProtoReflect.Descriptor instead. +func (*SubscriptionReferenceObject) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{5} +} + +func (x *SubscriptionReferenceObject) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *SubscriptionReferenceObject) GetIdentifier() string { + if x != nil { + return x.Identifier + } + return "" +} + +func (x *SubscriptionReferenceObject) GetBegunAt() *timestamppb.Timestamp { + if x != nil { + return x.BegunAt + } + return nil +} + +func (x *SubscriptionReferenceObject) GetEndedAt() *timestamppb.Timestamp { + if x != nil { + return x.EndedAt + } + return nil +} + +func (x *SubscriptionReferenceObject) GetIsActive() bool { + if x != nil { + return x.IsActive + } + return false +} + +func (x *SubscriptionReferenceObject) GetIsAvailable() bool { + if x != nil { + return x.IsAvailable + } + return false +} + +func (x *SubscriptionReferenceObject) GetIsFreeTrial() bool { + if x != nil { + return x.IsFreeTrial + } + return false +} + +func (x *SubscriptionReferenceObject) GetStatus() SubscriptionStatus { + if x != nil { + return x.Status + } + return SubscriptionStatus_SUBSCRIPTION_STATUS_UNSPECIFIED +} + +func (x *SubscriptionReferenceObject) GetBasePrice() string { + if x != nil { + return x.BasePrice + } + return "" +} + +func (x *SubscriptionReferenceObject) GetFinalPrice() string { + if x != nil { + return x.FinalPrice + } + return "" +} + +func (x *SubscriptionReferenceObject) GetRenewalAt() *timestamppb.Timestamp { + if x != nil { + return x.RenewalAt + } + return nil +} + +func (x *SubscriptionReferenceObject) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +func (x *SubscriptionReferenceObject) GetDisplayName() string { + if x != nil && x.DisplayName != nil { + return *x.DisplayName + } + return "" +} + +func (x *SubscriptionReferenceObject) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *SubscriptionReferenceObject) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type PaymentDetails struct { + state protoimpl.MessageState `protogen:"open.v1"` + Currency string `protobuf:"bytes,1,opt,name=currency,proto3" json:"currency,omitempty"` + OrderId *string `protobuf:"bytes,2,opt,name=order_id,json=orderId,proto3,oneof" json:"order_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PaymentDetails) Reset() { + *x = PaymentDetails{} + mi := &file_wallet_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PaymentDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PaymentDetails) ProtoMessage() {} + +func (x *PaymentDetails) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PaymentDetails.ProtoReflect.Descriptor instead. +func (*PaymentDetails) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{6} +} + +func (x *PaymentDetails) GetCurrency() string { + if x != nil { + return x.Currency + } + return "" +} + +func (x *PaymentDetails) GetOrderId() string { + if x != nil && x.OrderId != nil { + return *x.OrderId + } + return "" +} + +type Coupon struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Identifier *string `protobuf:"bytes,2,opt,name=identifier,proto3,oneof" json:"identifier,omitempty"` + Code *string `protobuf:"bytes,3,opt,name=code,proto3,oneof" json:"code,omitempty"` + AffectedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=affected_at,json=affectedAt,proto3,oneof" json:"affected_at,omitempty"` + ExpiredAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=expired_at,json=expiredAt,proto3,oneof" json:"expired_at,omitempty"` + // Using string for decimal to avoid precision loss. + DiscountAmount *string `protobuf:"bytes,6,opt,name=discount_amount,json=discountAmount,proto3,oneof" json:"discount_amount,omitempty"` + DiscountRate *wrapperspb.DoubleValue `protobuf:"bytes,7,opt,name=discount_rate,json=discountRate,proto3,oneof" json:"discount_rate,omitempty"` + MaxUsage *wrapperspb.Int32Value `protobuf:"bytes,8,opt,name=max_usage,json=maxUsage,proto3,oneof" json:"max_usage,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Coupon) Reset() { + *x = Coupon{} + mi := &file_wallet_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Coupon) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Coupon) ProtoMessage() {} + +func (x *Coupon) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Coupon.ProtoReflect.Descriptor instead. +func (*Coupon) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{7} +} + +func (x *Coupon) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Coupon) GetIdentifier() string { + if x != nil && x.Identifier != nil { + return *x.Identifier + } + return "" +} + +func (x *Coupon) GetCode() string { + if x != nil && x.Code != nil { + return *x.Code + } + return "" +} + +func (x *Coupon) GetAffectedAt() *timestamppb.Timestamp { + if x != nil { + return x.AffectedAt + } + return nil +} + +func (x *Coupon) GetExpiredAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiredAt + } + return nil +} + +func (x *Coupon) GetDiscountAmount() string { + if x != nil && x.DiscountAmount != nil { + return *x.DiscountAmount + } + return "" +} + +func (x *Coupon) GetDiscountRate() *wrapperspb.DoubleValue { + if x != nil { + return x.DiscountRate + } + return nil +} + +func (x *Coupon) GetMaxUsage() *wrapperspb.Int32Value { + if x != nil { + return x.MaxUsage + } + return nil +} + +func (x *Coupon) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Coupon) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type Gift struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + GifterId string `protobuf:"bytes,2,opt,name=gifter_id,json=gifterId,proto3" json:"gifter_id,omitempty"` + RecipientId *string `protobuf:"bytes,3,opt,name=recipient_id,json=recipientId,proto3,oneof" json:"recipient_id,omitempty"` + GiftCode string `protobuf:"bytes,4,opt,name=gift_code,json=giftCode,proto3" json:"gift_code,omitempty"` + Message *string `protobuf:"bytes,5,opt,name=message,proto3,oneof" json:"message,omitempty"` + SubscriptionIdentifier string `protobuf:"bytes,6,opt,name=subscription_identifier,json=subscriptionIdentifier,proto3" json:"subscription_identifier,omitempty"` + BasePrice string `protobuf:"bytes,7,opt,name=base_price,json=basePrice,proto3" json:"base_price,omitempty"` + FinalPrice string `protobuf:"bytes,8,opt,name=final_price,json=finalPrice,proto3" json:"final_price,omitempty"` + Status GiftStatus `protobuf:"varint,9,opt,name=status,proto3,enum=proto.GiftStatus" json:"status,omitempty"` + RedeemedAt *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=redeemed_at,json=redeemedAt,proto3,oneof" json:"redeemed_at,omitempty"` + RedeemerId *string `protobuf:"bytes,11,opt,name=redeemer_id,json=redeemerId,proto3,oneof" json:"redeemer_id,omitempty"` + SubscriptionId *string `protobuf:"bytes,12,opt,name=subscription_id,json=subscriptionId,proto3,oneof" json:"subscription_id,omitempty"` + ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` + IsOpenGift bool `protobuf:"varint,14,opt,name=is_open_gift,json=isOpenGift,proto3" json:"is_open_gift,omitempty"` + PaymentMethod string `protobuf:"bytes,15,opt,name=payment_method,json=paymentMethod,proto3" json:"payment_method,omitempty"` + PaymentDetails *PaymentDetails `protobuf:"bytes,16,opt,name=payment_details,json=paymentDetails,proto3" json:"payment_details,omitempty"` + CouponId *string `protobuf:"bytes,17,opt,name=coupon_id,json=couponId,proto3,oneof" json:"coupon_id,omitempty"` + Coupon *Coupon `protobuf:"bytes,18,opt,name=coupon,proto3,oneof" json:"coupon,omitempty"` + IsRedeemable bool `protobuf:"varint,19,opt,name=is_redeemable,json=isRedeemable,proto3" json:"is_redeemable,omitempty"` + IsExpired bool `protobuf:"varint,20,opt,name=is_expired,json=isExpired,proto3" json:"is_expired,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,21,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,22,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Gift) Reset() { + *x = Gift{} + mi := &file_wallet_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Gift) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Gift) ProtoMessage() {} + +func (x *Gift) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Gift.ProtoReflect.Descriptor instead. +func (*Gift) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{8} +} + +func (x *Gift) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Gift) GetGifterId() string { + if x != nil { + return x.GifterId + } + return "" +} + +func (x *Gift) GetRecipientId() string { + if x != nil && x.RecipientId != nil { + return *x.RecipientId + } + return "" +} + +func (x *Gift) GetGiftCode() string { + if x != nil { + return x.GiftCode + } + return "" +} + +func (x *Gift) GetMessage() string { + if x != nil && x.Message != nil { + return *x.Message + } + return "" +} + +func (x *Gift) GetSubscriptionIdentifier() string { + if x != nil { + return x.SubscriptionIdentifier + } + return "" +} + +func (x *Gift) GetBasePrice() string { + if x != nil { + return x.BasePrice + } + return "" +} + +func (x *Gift) GetFinalPrice() string { + if x != nil { + return x.FinalPrice + } + return "" +} + +func (x *Gift) GetStatus() GiftStatus { + if x != nil { + return x.Status + } + return GiftStatus_GIFT_STATUS_UNSPECIFIED +} + +func (x *Gift) GetRedeemedAt() *timestamppb.Timestamp { + if x != nil { + return x.RedeemedAt + } + return nil +} + +func (x *Gift) GetRedeemerId() string { + if x != nil && x.RedeemerId != nil { + return *x.RedeemerId + } + return "" +} + +func (x *Gift) GetSubscriptionId() string { + if x != nil && x.SubscriptionId != nil { + return *x.SubscriptionId + } + return "" +} + +func (x *Gift) GetExpiresAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiresAt + } + return nil +} + +func (x *Gift) GetIsOpenGift() bool { + if x != nil { + return x.IsOpenGift + } + return false +} + +func (x *Gift) GetPaymentMethod() string { + if x != nil { + return x.PaymentMethod + } + return "" +} + +func (x *Gift) GetPaymentDetails() *PaymentDetails { + if x != nil { + return x.PaymentDetails + } + return nil +} + +func (x *Gift) GetCouponId() string { + if x != nil && x.CouponId != nil { + return *x.CouponId + } + return "" +} + +func (x *Gift) GetCoupon() *Coupon { + if x != nil { + return x.Coupon + } + return nil +} + +func (x *Gift) GetIsRedeemable() bool { + if x != nil { + return x.IsRedeemable + } + return false +} + +func (x *Gift) GetIsExpired() bool { + if x != nil { + return x.IsExpired + } + return false +} + +func (x *Gift) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Gift) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type GetWalletRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetWalletRequest) Reset() { + *x = GetWalletRequest{} + mi := &file_wallet_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetWalletRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWalletRequest) ProtoMessage() {} + +func (x *GetWalletRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetWalletRequest.ProtoReflect.Descriptor instead. +func (*GetWalletRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{9} +} + +func (x *GetWalletRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +type CreateWalletRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateWalletRequest) Reset() { + *x = CreateWalletRequest{} + mi := &file_wallet_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateWalletRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateWalletRequest) ProtoMessage() {} + +func (x *CreateWalletRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateWalletRequest.ProtoReflect.Descriptor instead. +func (*CreateWalletRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{10} +} + +func (x *CreateWalletRequest) GetAccountId() string { + if x != nil { + return x.AccountId + } + return "" +} + +type GetOrCreateWalletPocketRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + WalletId string `protobuf:"bytes,1,opt,name=wallet_id,json=walletId,proto3" json:"wallet_id,omitempty"` + Currency string `protobuf:"bytes,2,opt,name=currency,proto3" json:"currency,omitempty"` + InitialAmount *string `protobuf:"bytes,3,opt,name=initial_amount,json=initialAmount,proto3,oneof" json:"initial_amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetOrCreateWalletPocketRequest) Reset() { + *x = GetOrCreateWalletPocketRequest{} + mi := &file_wallet_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetOrCreateWalletPocketRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetOrCreateWalletPocketRequest) ProtoMessage() {} + +func (x *GetOrCreateWalletPocketRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetOrCreateWalletPocketRequest.ProtoReflect.Descriptor instead. +func (*GetOrCreateWalletPocketRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{11} +} + +func (x *GetOrCreateWalletPocketRequest) GetWalletId() string { + if x != nil { + return x.WalletId + } + return "" +} + +func (x *GetOrCreateWalletPocketRequest) GetCurrency() string { + if x != nil { + return x.Currency + } + return "" +} + +func (x *GetOrCreateWalletPocketRequest) GetInitialAmount() string { + if x != nil && x.InitialAmount != nil { + return *x.InitialAmount + } + return "" +} + +type CreateOrderRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PayeeWalletId *string `protobuf:"bytes,1,opt,name=payee_wallet_id,json=payeeWalletId,proto3,oneof" json:"payee_wallet_id,omitempty"` + Currency string `protobuf:"bytes,2,opt,name=currency,proto3" json:"currency,omitempty"` + Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + Expiration *durationpb.Duration `protobuf:"bytes,4,opt,name=expiration,proto3,oneof" json:"expiration,omitempty"` + AppIdentifier *string `protobuf:"bytes,5,opt,name=app_identifier,json=appIdentifier,proto3,oneof" json:"app_identifier,omitempty"` + ProductIdentifier *string `protobuf:"bytes,8,opt,name=product_identifier,json=productIdentifier,proto3,oneof" json:"product_identifier,omitempty"` + // Using bytes for meta to represent JSON. + Meta []byte `protobuf:"bytes,6,opt,name=meta,proto3,oneof" json:"meta,omitempty"` + Remarks *string `protobuf:"bytes,9,opt,name=remarks,proto3,oneof" json:"remarks,omitempty"` + Reuseable bool `protobuf:"varint,7,opt,name=reuseable,proto3" json:"reuseable,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateOrderRequest) Reset() { + *x = CreateOrderRequest{} + mi := &file_wallet_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateOrderRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateOrderRequest) ProtoMessage() {} + +func (x *CreateOrderRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateOrderRequest.ProtoReflect.Descriptor instead. +func (*CreateOrderRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{12} +} + +func (x *CreateOrderRequest) GetPayeeWalletId() string { + if x != nil && x.PayeeWalletId != nil { + return *x.PayeeWalletId + } + return "" +} + +func (x *CreateOrderRequest) GetCurrency() string { + if x != nil { + return x.Currency + } + return "" +} + +func (x *CreateOrderRequest) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *CreateOrderRequest) GetExpiration() *durationpb.Duration { + if x != nil { + return x.Expiration + } + return nil +} + +func (x *CreateOrderRequest) GetAppIdentifier() string { + if x != nil && x.AppIdentifier != nil { + return *x.AppIdentifier + } + return "" +} + +func (x *CreateOrderRequest) GetProductIdentifier() string { + if x != nil && x.ProductIdentifier != nil { + return *x.ProductIdentifier + } + return "" +} + +func (x *CreateOrderRequest) GetMeta() []byte { + if x != nil { + return x.Meta + } + return nil +} + +func (x *CreateOrderRequest) GetRemarks() string { + if x != nil && x.Remarks != nil { + return *x.Remarks + } + return "" +} + +func (x *CreateOrderRequest) GetReuseable() bool { + if x != nil { + return x.Reuseable + } + return false +} + +type Order struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + PayeeWalletId *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=payee_wallet_id,json=payeeWalletId,proto3" json:"payee_wallet_id,omitempty"` + Currency *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=currency,proto3" json:"currency,omitempty"` + Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` + ExpiredAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"` + AppIdentifier *wrapperspb.StringValue `protobuf:"bytes,6,opt,name=app_identifier,json=appIdentifier,proto3" json:"app_identifier,omitempty"` + ProductIdentifier *wrapperspb.StringValue `protobuf:"bytes,12,opt,name=product_identifier,json=productIdentifier,proto3" json:"product_identifier,omitempty"` + // Using bytes for meta to represent JSON. + Meta []byte `protobuf:"bytes,7,opt,name=meta,proto3,oneof" json:"meta,omitempty"` + Status OrderStatus `protobuf:"varint,8,opt,name=status,proto3,enum=proto.OrderStatus" json:"status,omitempty"` + TransactionId *wrapperspb.StringValue `protobuf:"bytes,9,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` + Transaction *Transaction `protobuf:"bytes,10,opt,name=transaction,proto3,oneof" json:"transaction,omitempty"` + Remarks *wrapperspb.StringValue `protobuf:"bytes,11,opt,name=remarks,proto3" json:"remarks,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Order) Reset() { + *x = Order{} + mi := &file_wallet_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Order) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Order) ProtoMessage() {} + +func (x *Order) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Order.ProtoReflect.Descriptor instead. +func (*Order) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{13} +} + +func (x *Order) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Order) GetPayeeWalletId() *wrapperspb.StringValue { + if x != nil { + return x.PayeeWalletId + } + return nil +} + +func (x *Order) GetCurrency() *wrapperspb.StringValue { + if x != nil { + return x.Currency + } + return nil +} + +func (x *Order) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *Order) GetExpiredAt() *timestamppb.Timestamp { + if x != nil { + return x.ExpiredAt + } + return nil +} + +func (x *Order) GetAppIdentifier() *wrapperspb.StringValue { + if x != nil { + return x.AppIdentifier + } + return nil +} + +func (x *Order) GetProductIdentifier() *wrapperspb.StringValue { + if x != nil { + return x.ProductIdentifier + } + return nil +} + +func (x *Order) GetMeta() []byte { + if x != nil { + return x.Meta + } + return nil +} + +func (x *Order) GetStatus() OrderStatus { + if x != nil { + return x.Status + } + return OrderStatus_ORDER_STATUS_UNSPECIFIED +} + +func (x *Order) GetTransactionId() *wrapperspb.StringValue { + if x != nil { + return x.TransactionId + } + return nil +} + +func (x *Order) GetTransaction() *Transaction { + if x != nil { + return x.Transaction + } + return nil +} + +func (x *Order) GetRemarks() *wrapperspb.StringValue { + if x != nil { + return x.Remarks + } + return nil +} + +type Transaction struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + PayerWalletId *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=payer_wallet_id,json=payerWalletId,proto3" json:"payer_wallet_id,omitempty"` + PayeeWalletId *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=payee_wallet_id,json=payeeWalletId,proto3" json:"payee_wallet_id,omitempty"` + Currency string `protobuf:"bytes,4,opt,name=currency,proto3" json:"currency,omitempty"` + Amount string `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount,omitempty"` + Remarks *wrapperspb.StringValue `protobuf:"bytes,6,opt,name=remarks,proto3" json:"remarks,omitempty"` + Type TransactionType `protobuf:"varint,7,opt,name=type,proto3,enum=proto.TransactionType" json:"type,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction) Reset() { + *x = Transaction{} + mi := &file_wallet_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction) ProtoMessage() {} + +func (x *Transaction) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction.ProtoReflect.Descriptor instead. +func (*Transaction) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{14} +} + +func (x *Transaction) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Transaction) GetPayerWalletId() *wrapperspb.StringValue { + if x != nil { + return x.PayerWalletId + } + return nil +} + +func (x *Transaction) GetPayeeWalletId() *wrapperspb.StringValue { + if x != nil { + return x.PayeeWalletId + } + return nil +} + +func (x *Transaction) GetCurrency() string { + if x != nil { + return x.Currency + } + return "" +} + +func (x *Transaction) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *Transaction) GetRemarks() *wrapperspb.StringValue { + if x != nil { + return x.Remarks + } + return nil +} + +func (x *Transaction) GetType() TransactionType { + if x != nil { + return x.Type + } + return TransactionType_TRANSACTION_TYPE_UNSPECIFIED +} + +func (x *Transaction) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Transaction) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type CreateTransactionWithAccountRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PayerAccountId *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=payer_account_id,json=payerAccountId,proto3" json:"payer_account_id,omitempty"` + PayeeAccountId *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=payee_account_id,json=payeeAccountId,proto3" json:"payee_account_id,omitempty"` + Currency string `protobuf:"bytes,3,opt,name=currency,proto3" json:"currency,omitempty"` + Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` + Remarks *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=remarks,proto3" json:"remarks,omitempty"` + Type TransactionType `protobuf:"varint,6,opt,name=type,proto3,enum=proto.TransactionType" json:"type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateTransactionWithAccountRequest) Reset() { + *x = CreateTransactionWithAccountRequest{} + mi := &file_wallet_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateTransactionWithAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateTransactionWithAccountRequest) ProtoMessage() {} + +func (x *CreateTransactionWithAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateTransactionWithAccountRequest.ProtoReflect.Descriptor instead. +func (*CreateTransactionWithAccountRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{15} +} + +func (x *CreateTransactionWithAccountRequest) GetPayerAccountId() *wrapperspb.StringValue { + if x != nil { + return x.PayerAccountId + } + return nil +} + +func (x *CreateTransactionWithAccountRequest) GetPayeeAccountId() *wrapperspb.StringValue { + if x != nil { + return x.PayeeAccountId + } + return nil +} + +func (x *CreateTransactionWithAccountRequest) GetCurrency() string { + if x != nil { + return x.Currency + } + return "" +} + +func (x *CreateTransactionWithAccountRequest) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *CreateTransactionWithAccountRequest) GetRemarks() *wrapperspb.StringValue { + if x != nil { + return x.Remarks + } + return nil +} + +func (x *CreateTransactionWithAccountRequest) GetType() TransactionType { + if x != nil { + return x.Type + } + return TransactionType_TRANSACTION_TYPE_UNSPECIFIED +} + +type CreateTransactionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PayerWalletId *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=payer_wallet_id,json=payerWalletId,proto3" json:"payer_wallet_id,omitempty"` + PayeeWalletId *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=payee_wallet_id,json=payeeWalletId,proto3" json:"payee_wallet_id,omitempty"` + Currency string `protobuf:"bytes,3,opt,name=currency,proto3" json:"currency,omitempty"` + Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` + Remarks *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=remarks,proto3" json:"remarks,omitempty"` + Type TransactionType `protobuf:"varint,6,opt,name=type,proto3,enum=proto.TransactionType" json:"type,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateTransactionRequest) Reset() { + *x = CreateTransactionRequest{} + mi := &file_wallet_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateTransactionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateTransactionRequest) ProtoMessage() {} + +func (x *CreateTransactionRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateTransactionRequest.ProtoReflect.Descriptor instead. +func (*CreateTransactionRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{16} +} + +func (x *CreateTransactionRequest) GetPayerWalletId() *wrapperspb.StringValue { + if x != nil { + return x.PayerWalletId + } + return nil +} + +func (x *CreateTransactionRequest) GetPayeeWalletId() *wrapperspb.StringValue { + if x != nil { + return x.PayeeWalletId + } + return nil +} + +func (x *CreateTransactionRequest) GetCurrency() string { + if x != nil { + return x.Currency + } + return "" +} + +func (x *CreateTransactionRequest) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *CreateTransactionRequest) GetRemarks() *wrapperspb.StringValue { + if x != nil { + return x.Remarks + } + return nil +} + +func (x *CreateTransactionRequest) GetType() TransactionType { + if x != nil { + return x.Type + } + return TransactionType_TRANSACTION_TYPE_UNSPECIFIED +} + +type CancelOrderRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrderId string `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CancelOrderRequest) Reset() { + *x = CancelOrderRequest{} + mi := &file_wallet_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CancelOrderRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancelOrderRequest) ProtoMessage() {} + +func (x *CancelOrderRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancelOrderRequest.ProtoReflect.Descriptor instead. +func (*CancelOrderRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{17} +} + +func (x *CancelOrderRequest) GetOrderId() string { + if x != nil { + return x.OrderId + } + return "" +} + +type RefundOrderRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrderId string `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RefundOrderRequest) Reset() { + *x = RefundOrderRequest{} + mi := &file_wallet_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RefundOrderRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefundOrderRequest) ProtoMessage() {} + +func (x *RefundOrderRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefundOrderRequest.ProtoReflect.Descriptor instead. +func (*RefundOrderRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{18} +} + +func (x *RefundOrderRequest) GetOrderId() string { + if x != nil { + return x.OrderId + } + return "" +} + +type RefundOrderResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Order *Order `protobuf:"bytes,1,opt,name=order,proto3" json:"order,omitempty"` + RefundTransaction *Transaction `protobuf:"bytes,2,opt,name=refund_transaction,json=refundTransaction,proto3" json:"refund_transaction,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RefundOrderResponse) Reset() { + *x = RefundOrderResponse{} + mi := &file_wallet_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RefundOrderResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefundOrderResponse) ProtoMessage() {} + +func (x *RefundOrderResponse) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefundOrderResponse.ProtoReflect.Descriptor instead. +func (*RefundOrderResponse) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{19} +} + +func (x *RefundOrderResponse) GetOrder() *Order { + if x != nil { + return x.Order + } + return nil +} + +func (x *RefundOrderResponse) GetRefundTransaction() *Transaction { + if x != nil { + return x.RefundTransaction + } + return nil +} + +type TransferRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PayerAccountId string `protobuf:"bytes,1,opt,name=payer_account_id,json=payerAccountId,proto3" json:"payer_account_id,omitempty"` + PayeeAccountId string `protobuf:"bytes,2,opt,name=payee_account_id,json=payeeAccountId,proto3" json:"payee_account_id,omitempty"` + Currency string `protobuf:"bytes,3,opt,name=currency,proto3" json:"currency,omitempty"` + Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransferRequest) Reset() { + *x = TransferRequest{} + mi := &file_wallet_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransferRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransferRequest) ProtoMessage() {} + +func (x *TransferRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransferRequest.ProtoReflect.Descriptor instead. +func (*TransferRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{20} +} + +func (x *TransferRequest) GetPayerAccountId() string { + if x != nil { + return x.PayerAccountId + } + return "" +} + +func (x *TransferRequest) GetPayeeAccountId() string { + if x != nil { + return x.PayeeAccountId + } + return "" +} + +func (x *TransferRequest) GetCurrency() string { + if x != nil { + return x.Currency + } + return "" +} + +func (x *TransferRequest) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +type GetWalletFundRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + FundId string `protobuf:"bytes,1,opt,name=fund_id,json=fundId,proto3" json:"fund_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetWalletFundRequest) Reset() { + *x = GetWalletFundRequest{} + mi := &file_wallet_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetWalletFundRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWalletFundRequest) ProtoMessage() {} + +func (x *GetWalletFundRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetWalletFundRequest.ProtoReflect.Descriptor instead. +func (*GetWalletFundRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{21} +} + +func (x *GetWalletFundRequest) GetFundId() string { + if x != nil { + return x.FundId + } + return "" +} + +var File_wallet_proto protoreflect.FileDescriptor + +const file_wallet_proto_rawDesc = "" + + "\n" + + "\fwallet.proto\x12\x05proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1egoogle/protobuf/duration.proto\"f\n" + + "\x06Wallet\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12-\n" + + "\apockets\x18\x02 \x03(\v2\x13.proto.WalletPocketR\apockets\x12\x1d\n" + + "\n" + + "account_id\x18\x03 \x01(\tR\taccountId\"o\n" + + "\fWalletPocket\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1a\n" + + "\bcurrency\x18\x02 \x01(\tR\bcurrency\x12\x16\n" + + "\x06amount\x18\x03 \x01(\tR\x06amount\x12\x1b\n" + + "\twallet_id\x18\x04 \x01(\tR\bwalletId\"\xc3\x03\n" + + "\n" + + "WalletFund\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1a\n" + + "\bcurrency\x18\x02 \x01(\tR\bcurrency\x12!\n" + + "\ftotal_amount\x18\x03 \x01(\tR\vtotalAmount\x12)\n" + + "\x10remaining_amount\x18\n" + + " \x01(\tR\x0fremainingAmount\x123\n" + + "\n" + + "split_type\x18\x04 \x01(\x0e2\x14.proto.FundSplitTypeR\tsplitType\x12)\n" + + "\x06status\x18\x05 \x01(\x0e2\x11.proto.FundStatusR\x06status\x126\n" + + "\amessage\x18\x06 \x01(\v2\x1c.google.protobuf.StringValueR\amessage\x12,\n" + + "\x12creator_account_id\x18\a \x01(\tR\x10creatorAccountId\x129\n" + + "\n" + + "expired_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\texpiredAt\x12:\n" + + "\n" + + "recipients\x18\t \x03(\v2\x1a.proto.WalletFundRecipientR\n" + + "recipients\"\xfb\x01\n" + + "\x13WalletFundRecipient\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x17\n" + + "\afund_id\x18\x02 \x01(\tR\x06fundId\x120\n" + + "\x14recipient_account_id\x18\x03 \x01(\tR\x12recipientAccountId\x12\x16\n" + + "\x06amount\x18\x04 \x01(\tR\x06amount\x12\x1f\n" + + "\vis_received\x18\x05 \x01(\bR\n" + + "isReceived\x12@\n" + + "\vreceived_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampH\x00R\n" + + "receivedAt\x88\x01\x01B\x0e\n" + + "\f_received_at\"\xc7\x06\n" + + "\fSubscription\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x125\n" + + "\bbegun_at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\abegunAt\x12:\n" + + "\bended_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampH\x00R\aendedAt\x88\x01\x01\x12\x1e\n" + + "\n" + + "identifier\x18\x04 \x01(\tR\n" + + "identifier\x12\x1b\n" + + "\tis_active\x18\x05 \x01(\bR\bisActive\x12\"\n" + + "\ris_free_trial\x18\x06 \x01(\bR\visFreeTrial\x121\n" + + "\x06status\x18\a \x01(\x0e2\x19.proto.SubscriptionStatusR\x06status\x12%\n" + + "\x0epayment_method\x18\b \x01(\tR\rpaymentMethod\x12>\n" + + "\x0fpayment_details\x18\t \x01(\v2\x15.proto.PaymentDetailsR\x0epaymentDetails\x12\x1d\n" + + "\n" + + "base_price\x18\n" + + " \x01(\tR\tbasePrice\x12 \n" + + "\tcoupon_id\x18\v \x01(\tH\x01R\bcouponId\x88\x01\x01\x12*\n" + + "\x06coupon\x18\f \x01(\v2\r.proto.CouponH\x02R\x06coupon\x88\x01\x01\x12>\n" + + "\n" + + "renewal_at\x18\r \x01(\v2\x1a.google.protobuf.TimestampH\x03R\trenewalAt\x88\x01\x01\x12\x1d\n" + + "\n" + + "account_id\x18\x0e \x01(\tR\taccountId\x12!\n" + + "\fis_available\x18\x0f \x01(\bR\visAvailable\x12\x1f\n" + + "\vfinal_price\x18\x10 \x01(\tR\n" + + "finalPrice\x129\n" + + "\n" + + "created_at\x18\x11 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\x12 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAtB\v\n" + + "\t_ended_atB\f\n" + + "\n" + + "_coupon_idB\t\n" + + "\a_couponB\r\n" + + "\v_renewal_at\"\xc1\x05\n" + + "\x1bSubscriptionReferenceObject\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1e\n" + + "\n" + + "identifier\x18\x02 \x01(\tR\n" + + "identifier\x125\n" + + "\bbegun_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\abegunAt\x12:\n" + + "\bended_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampH\x00R\aendedAt\x88\x01\x01\x12\x1b\n" + + "\tis_active\x18\x05 \x01(\bR\bisActive\x12!\n" + + "\fis_available\x18\x06 \x01(\bR\visAvailable\x12\"\n" + + "\ris_free_trial\x18\a \x01(\bR\visFreeTrial\x121\n" + + "\x06status\x18\b \x01(\x0e2\x19.proto.SubscriptionStatusR\x06status\x12\x1d\n" + + "\n" + + "base_price\x18\t \x01(\tR\tbasePrice\x12\x1f\n" + + "\vfinal_price\x18\n" + + " \x01(\tR\n" + + "finalPrice\x12>\n" + + "\n" + + "renewal_at\x18\v \x01(\v2\x1a.google.protobuf.TimestampH\x01R\trenewalAt\x88\x01\x01\x12\x1d\n" + + "\n" + + "account_id\x18\f \x01(\tR\taccountId\x12&\n" + + "\fdisplay_name\x18\r \x01(\tH\x02R\vdisplayName\x88\x01\x01\x129\n" + + "\n" + + "created_at\x18\x0e \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\x0f \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAtB\v\n" + + "\t_ended_atB\r\n" + + "\v_renewal_atB\x0f\n" + + "\r_display_name\"Y\n" + + "\x0ePaymentDetails\x12\x1a\n" + + "\bcurrency\x18\x01 \x01(\tR\bcurrency\x12\x1e\n" + + "\border_id\x18\x02 \x01(\tH\x00R\aorderId\x88\x01\x01B\v\n" + + "\t_order_id\"\xee\x04\n" + + "\x06Coupon\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12#\n" + + "\n" + + "identifier\x18\x02 \x01(\tH\x00R\n" + + "identifier\x88\x01\x01\x12\x17\n" + + "\x04code\x18\x03 \x01(\tH\x01R\x04code\x88\x01\x01\x12@\n" + + "\vaffected_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampH\x02R\n" + + "affectedAt\x88\x01\x01\x12>\n" + + "\n" + + "expired_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampH\x03R\texpiredAt\x88\x01\x01\x12,\n" + + "\x0fdiscount_amount\x18\x06 \x01(\tH\x04R\x0ediscountAmount\x88\x01\x01\x12F\n" + + "\rdiscount_rate\x18\a \x01(\v2\x1c.google.protobuf.DoubleValueH\x05R\fdiscountRate\x88\x01\x01\x12=\n" + + "\tmax_usage\x18\b \x01(\v2\x1b.google.protobuf.Int32ValueH\x06R\bmaxUsage\x88\x01\x01\x129\n" + + "\n" + + "created_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\n" + + " \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAtB\r\n" + + "\v_identifierB\a\n" + + "\x05_codeB\x0e\n" + + "\f_affected_atB\r\n" + + "\v_expired_atB\x12\n" + + "\x10_discount_amountB\x10\n" + + "\x0e_discount_rateB\f\n" + + "\n" + + "_max_usage\"\x87\b\n" + + "\x04Gift\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1b\n" + + "\tgifter_id\x18\x02 \x01(\tR\bgifterId\x12&\n" + + "\frecipient_id\x18\x03 \x01(\tH\x00R\vrecipientId\x88\x01\x01\x12\x1b\n" + + "\tgift_code\x18\x04 \x01(\tR\bgiftCode\x12\x1d\n" + + "\amessage\x18\x05 \x01(\tH\x01R\amessage\x88\x01\x01\x127\n" + + "\x17subscription_identifier\x18\x06 \x01(\tR\x16subscriptionIdentifier\x12\x1d\n" + + "\n" + + "base_price\x18\a \x01(\tR\tbasePrice\x12\x1f\n" + + "\vfinal_price\x18\b \x01(\tR\n" + + "finalPrice\x12)\n" + + "\x06status\x18\t \x01(\x0e2\x11.proto.GiftStatusR\x06status\x12@\n" + + "\vredeemed_at\x18\n" + + " \x01(\v2\x1a.google.protobuf.TimestampH\x02R\n" + + "redeemedAt\x88\x01\x01\x12$\n" + + "\vredeemer_id\x18\v \x01(\tH\x03R\n" + + "redeemerId\x88\x01\x01\x12,\n" + + "\x0fsubscription_id\x18\f \x01(\tH\x04R\x0esubscriptionId\x88\x01\x01\x129\n" + + "\n" + + "expires_at\x18\r \x01(\v2\x1a.google.protobuf.TimestampR\texpiresAt\x12 \n" + + "\fis_open_gift\x18\x0e \x01(\bR\n" + + "isOpenGift\x12%\n" + + "\x0epayment_method\x18\x0f \x01(\tR\rpaymentMethod\x12>\n" + + "\x0fpayment_details\x18\x10 \x01(\v2\x15.proto.PaymentDetailsR\x0epaymentDetails\x12 \n" + + "\tcoupon_id\x18\x11 \x01(\tH\x05R\bcouponId\x88\x01\x01\x12*\n" + + "\x06coupon\x18\x12 \x01(\v2\r.proto.CouponH\x06R\x06coupon\x88\x01\x01\x12#\n" + + "\ris_redeemable\x18\x13 \x01(\bR\fisRedeemable\x12\x1d\n" + + "\n" + + "is_expired\x18\x14 \x01(\bR\tisExpired\x129\n" + + "\n" + + "created_at\x18\x15 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\x16 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAtB\x0f\n" + + "\r_recipient_idB\n" + + "\n" + + "\b_messageB\x0e\n" + + "\f_redeemed_atB\x0e\n" + + "\f_redeemer_idB\x12\n" + + "\x10_subscription_idB\f\n" + + "\n" + + "_coupon_idB\t\n" + + "\a_coupon\"1\n" + + "\x10GetWalletRequest\x12\x1d\n" + + "\n" + + "account_id\x18\x01 \x01(\tR\taccountId\"4\n" + + "\x13CreateWalletRequest\x12\x1d\n" + + "\n" + + "account_id\x18\x01 \x01(\tR\taccountId\"\x98\x01\n" + + "\x1eGetOrCreateWalletPocketRequest\x12\x1b\n" + + "\twallet_id\x18\x01 \x01(\tR\bwalletId\x12\x1a\n" + + "\bcurrency\x18\x02 \x01(\tR\bcurrency\x12*\n" + + "\x0einitial_amount\x18\x03 \x01(\tH\x00R\rinitialAmount\x88\x01\x01B\x11\n" + + "\x0f_initial_amount\"\xcd\x03\n" + + "\x12CreateOrderRequest\x12+\n" + + "\x0fpayee_wallet_id\x18\x01 \x01(\tH\x00R\rpayeeWalletId\x88\x01\x01\x12\x1a\n" + + "\bcurrency\x18\x02 \x01(\tR\bcurrency\x12\x16\n" + + "\x06amount\x18\x03 \x01(\tR\x06amount\x12>\n" + + "\n" + + "expiration\x18\x04 \x01(\v2\x19.google.protobuf.DurationH\x01R\n" + + "expiration\x88\x01\x01\x12*\n" + + "\x0eapp_identifier\x18\x05 \x01(\tH\x02R\rappIdentifier\x88\x01\x01\x122\n" + + "\x12product_identifier\x18\b \x01(\tH\x03R\x11productIdentifier\x88\x01\x01\x12\x17\n" + + "\x04meta\x18\x06 \x01(\fH\x04R\x04meta\x88\x01\x01\x12\x1d\n" + + "\aremarks\x18\t \x01(\tH\x05R\aremarks\x88\x01\x01\x12\x1c\n" + + "\treuseable\x18\a \x01(\bR\treuseableB\x12\n" + + "\x10_payee_wallet_idB\r\n" + + "\v_expirationB\x11\n" + + "\x0f_app_identifierB\x15\n" + + "\x13_product_identifierB\a\n" + + "\x05_metaB\n" + + "\n" + + "\b_remarks\"\x92\x05\n" + + "\x05Order\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12D\n" + + "\x0fpayee_wallet_id\x18\x02 \x01(\v2\x1c.google.protobuf.StringValueR\rpayeeWalletId\x128\n" + + "\bcurrency\x18\x03 \x01(\v2\x1c.google.protobuf.StringValueR\bcurrency\x12\x16\n" + + "\x06amount\x18\x04 \x01(\tR\x06amount\x129\n" + + "\n" + + "expired_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\texpiredAt\x12C\n" + + "\x0eapp_identifier\x18\x06 \x01(\v2\x1c.google.protobuf.StringValueR\rappIdentifier\x12K\n" + + "\x12product_identifier\x18\f \x01(\v2\x1c.google.protobuf.StringValueR\x11productIdentifier\x12\x17\n" + + "\x04meta\x18\a \x01(\fH\x00R\x04meta\x88\x01\x01\x12*\n" + + "\x06status\x18\b \x01(\x0e2\x12.proto.OrderStatusR\x06status\x12C\n" + + "\x0etransaction_id\x18\t \x01(\v2\x1c.google.protobuf.StringValueR\rtransactionId\x129\n" + + "\vtransaction\x18\n" + + " \x01(\v2\x12.proto.TransactionH\x01R\vtransaction\x88\x01\x01\x126\n" + + "\aremarks\x18\v \x01(\v2\x1c.google.protobuf.StringValueR\aremarksB\a\n" + + "\x05_metaB\x0e\n" + + "\f_transaction\"\xb7\x03\n" + + "\vTransaction\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12D\n" + + "\x0fpayer_wallet_id\x18\x02 \x01(\v2\x1c.google.protobuf.StringValueR\rpayerWalletId\x12D\n" + + "\x0fpayee_wallet_id\x18\x03 \x01(\v2\x1c.google.protobuf.StringValueR\rpayeeWalletId\x12\x1a\n" + + "\bcurrency\x18\x04 \x01(\tR\bcurrency\x12\x16\n" + + "\x06amount\x18\x05 \x01(\tR\x06amount\x126\n" + + "\aremarks\x18\x06 \x01(\v2\x1c.google.protobuf.StringValueR\aremarks\x12*\n" + + "\x04type\x18\a \x01(\x0e2\x16.proto.TransactionTypeR\x04type\x129\n" + + "\n" + + "created_at\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"\xcd\x02\n" + + "#CreateTransactionWithAccountRequest\x12F\n" + + "\x10payer_account_id\x18\x01 \x01(\v2\x1c.google.protobuf.StringValueR\x0epayerAccountId\x12F\n" + + "\x10payee_account_id\x18\x02 \x01(\v2\x1c.google.protobuf.StringValueR\x0epayeeAccountId\x12\x1a\n" + + "\bcurrency\x18\x03 \x01(\tR\bcurrency\x12\x16\n" + + "\x06amount\x18\x04 \x01(\tR\x06amount\x126\n" + + "\aremarks\x18\x05 \x01(\v2\x1c.google.protobuf.StringValueR\aremarks\x12*\n" + + "\x04type\x18\x06 \x01(\x0e2\x16.proto.TransactionTypeR\x04type\"\xbe\x02\n" + + "\x18CreateTransactionRequest\x12D\n" + + "\x0fpayer_wallet_id\x18\x01 \x01(\v2\x1c.google.protobuf.StringValueR\rpayerWalletId\x12D\n" + + "\x0fpayee_wallet_id\x18\x02 \x01(\v2\x1c.google.protobuf.StringValueR\rpayeeWalletId\x12\x1a\n" + + "\bcurrency\x18\x03 \x01(\tR\bcurrency\x12\x16\n" + + "\x06amount\x18\x04 \x01(\tR\x06amount\x126\n" + + "\aremarks\x18\x05 \x01(\v2\x1c.google.protobuf.StringValueR\aremarks\x12*\n" + + "\x04type\x18\x06 \x01(\x0e2\x16.proto.TransactionTypeR\x04type\"/\n" + + "\x12CancelOrderRequest\x12\x19\n" + + "\border_id\x18\x01 \x01(\tR\aorderId\"/\n" + + "\x12RefundOrderRequest\x12\x19\n" + + "\border_id\x18\x01 \x01(\tR\aorderId\"|\n" + + "\x13RefundOrderResponse\x12\"\n" + + "\x05order\x18\x01 \x01(\v2\f.proto.OrderR\x05order\x12A\n" + + "\x12refund_transaction\x18\x02 \x01(\v2\x12.proto.TransactionR\x11refundTransaction\"\x99\x01\n" + + "\x0fTransferRequest\x12(\n" + + "\x10payer_account_id\x18\x01 \x01(\tR\x0epayerAccountId\x12(\n" + + "\x10payee_account_id\x18\x02 \x01(\tR\x0epayeeAccountId\x12\x1a\n" + + "\bcurrency\x18\x03 \x01(\tR\bcurrency\x12\x16\n" + + "\x06amount\x18\x04 \x01(\tR\x06amount\"/\n" + + "\x14GetWalletFundRequest\x12\x17\n" + + "\afund_id\x18\x01 \x01(\tR\x06fundId*f\n" + + "\rFundSplitType\x12\x1f\n" + + "\x1bFUND_SPLIT_TYPE_UNSPECIFIED\x10\x00\x12\x18\n" + + "\x14FUND_SPLIT_TYPE_EVEN\x10\x01\x12\x1a\n" + + "\x16FUND_SPLIT_TYPE_RANDOM\x10\x02*\xb9\x01\n" + + "\n" + + "FundStatus\x12\x1b\n" + + "\x17FUND_STATUS_UNSPECIFIED\x10\x00\x12\x17\n" + + "\x13FUND_STATUS_CREATED\x10\x01\x12\"\n" + + "\x1eFUND_STATUS_PARTIALLY_RECEIVED\x10\x02\x12\x1e\n" + + "\x1aFUND_STATUS_FULLY_RECEIVED\x10\x03\x12\x17\n" + + "\x13FUND_STATUS_EXPIRED\x10\x04\x12\x18\n" + + "\x14FUND_STATUS_REFUNDED\x10\x05*\xbd\x01\n" + + "\x12SubscriptionStatus\x12#\n" + + "\x1fSUBSCRIPTION_STATUS_UNSPECIFIED\x10\x00\x12\x1e\n" + + "\x1aSUBSCRIPTION_STATUS_UNPAID\x10\x01\x12\x1e\n" + + "\x1aSUBSCRIPTION_STATUS_ACTIVE\x10\x02\x12\x1f\n" + + "\x1bSUBSCRIPTION_STATUS_EXPIRED\x10\x03\x12!\n" + + "\x1dSUBSCRIPTION_STATUS_CANCELLED\x10\x04*\xa6\x01\n" + + "\n" + + "GiftStatus\x12\x1b\n" + + "\x17GIFT_STATUS_UNSPECIFIED\x10\x00\x12\x17\n" + + "\x13GIFT_STATUS_CREATED\x10\x01\x12\x14\n" + + "\x10GIFT_STATUS_SENT\x10\x02\x12\x18\n" + + "\x14GIFT_STATUS_REDEEMED\x10\x03\x12\x17\n" + + "\x13GIFT_STATUS_EXPIRED\x10\x04\x12\x19\n" + + "\x15GIFT_STATUS_CANCELLED\x10\x05*\xac\x01\n" + + "\vOrderStatus\x12\x1c\n" + + "\x18ORDER_STATUS_UNSPECIFIED\x10\x00\x12\x17\n" + + "\x13ORDER_STATUS_UNPAID\x10\x01\x12\x15\n" + + "\x11ORDER_STATUS_PAID\x10\x02\x12\x18\n" + + "\x14ORDER_STATUS_EXPIRED\x10\x03\x12\x1a\n" + + "\x16ORDER_STATUS_CANCELLED\x10\x04\x12\x19\n" + + "\x15ORDER_STATUS_FINISHED\x10\x05*\x8b\x01\n" + + "\x0fTransactionType\x12 \n" + + "\x1cTRANSACTION_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n" + + "\x17TRANSACTION_TYPE_SYSTEM\x10\x01\x12\x1a\n" + + "\x16TRANSACTION_TYPE_ORDER\x10\x02\x12\x1d\n" + + "\x19TRANSACTION_TYPE_TRANSFER\x10\x032\xd6\x01\n" + + "\rWalletService\x123\n" + + "\tGetWallet\x12\x17.proto.GetWalletRequest\x1a\r.proto.Wallet\x129\n" + + "\fCreateWallet\x12\x1a.proto.CreateWalletRequest\x1a\r.proto.Wallet\x12U\n" + + "\x17GetOrCreateWalletPocket\x12%.proto.GetOrCreateWalletPocketRequest\x1a\x13.proto.WalletPocket2\xe9\x03\n" + + "\x0ePaymentService\x126\n" + + "\vCreateOrder\x12\x19.proto.CreateOrderRequest\x1a\f.proto.Order\x12^\n" + + "\x1cCreateTransactionWithAccount\x12*.proto.CreateTransactionWithAccountRequest\x1a\x12.proto.Transaction\x12H\n" + + "\x11CreateTransaction\x12\x1f.proto.CreateTransactionRequest\x1a\x12.proto.Transaction\x126\n" + + "\vCancelOrder\x12\x19.proto.CancelOrderRequest\x1a\f.proto.Order\x12D\n" + + "\vRefundOrder\x12\x19.proto.RefundOrderRequest\x1a\x1a.proto.RefundOrderResponse\x126\n" + + "\bTransfer\x12\x16.proto.TransferRequest\x1a\x12.proto.Transaction\x12?\n" + + "\rGetWalletFund\x12\x1b.proto.GetWalletFundRequest\x1a\x11.proto.WalletFundBUZ7git.solsynth.dev/goatworks/turbine/pkg/shared/proto/gen\xaa\x02\x19DysonNetwork.Shared.Protob\x06proto3" + +var ( + file_wallet_proto_rawDescOnce sync.Once + file_wallet_proto_rawDescData []byte +) + +func file_wallet_proto_rawDescGZIP() []byte { + file_wallet_proto_rawDescOnce.Do(func() { + file_wallet_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_wallet_proto_rawDesc), len(file_wallet_proto_rawDesc))) + }) + return file_wallet_proto_rawDescData +} + +var file_wallet_proto_enumTypes = make([]protoimpl.EnumInfo, 6) +var file_wallet_proto_msgTypes = make([]protoimpl.MessageInfo, 22) +var file_wallet_proto_goTypes = []any{ + (FundSplitType)(0), // 0: proto.FundSplitType + (FundStatus)(0), // 1: proto.FundStatus + (SubscriptionStatus)(0), // 2: proto.SubscriptionStatus + (GiftStatus)(0), // 3: proto.GiftStatus + (OrderStatus)(0), // 4: proto.OrderStatus + (TransactionType)(0), // 5: proto.TransactionType + (*Wallet)(nil), // 6: proto.Wallet + (*WalletPocket)(nil), // 7: proto.WalletPocket + (*WalletFund)(nil), // 8: proto.WalletFund + (*WalletFundRecipient)(nil), // 9: proto.WalletFundRecipient + (*Subscription)(nil), // 10: proto.Subscription + (*SubscriptionReferenceObject)(nil), // 11: proto.SubscriptionReferenceObject + (*PaymentDetails)(nil), // 12: proto.PaymentDetails + (*Coupon)(nil), // 13: proto.Coupon + (*Gift)(nil), // 14: proto.Gift + (*GetWalletRequest)(nil), // 15: proto.GetWalletRequest + (*CreateWalletRequest)(nil), // 16: proto.CreateWalletRequest + (*GetOrCreateWalletPocketRequest)(nil), // 17: proto.GetOrCreateWalletPocketRequest + (*CreateOrderRequest)(nil), // 18: proto.CreateOrderRequest + (*Order)(nil), // 19: proto.Order + (*Transaction)(nil), // 20: proto.Transaction + (*CreateTransactionWithAccountRequest)(nil), // 21: proto.CreateTransactionWithAccountRequest + (*CreateTransactionRequest)(nil), // 22: proto.CreateTransactionRequest + (*CancelOrderRequest)(nil), // 23: proto.CancelOrderRequest + (*RefundOrderRequest)(nil), // 24: proto.RefundOrderRequest + (*RefundOrderResponse)(nil), // 25: proto.RefundOrderResponse + (*TransferRequest)(nil), // 26: proto.TransferRequest + (*GetWalletFundRequest)(nil), // 27: proto.GetWalletFundRequest + (*wrapperspb.StringValue)(nil), // 28: google.protobuf.StringValue + (*timestamppb.Timestamp)(nil), // 29: google.protobuf.Timestamp + (*wrapperspb.DoubleValue)(nil), // 30: google.protobuf.DoubleValue + (*wrapperspb.Int32Value)(nil), // 31: google.protobuf.Int32Value + (*durationpb.Duration)(nil), // 32: google.protobuf.Duration +} +var file_wallet_proto_depIdxs = []int32{ + 7, // 0: proto.Wallet.pockets:type_name -> proto.WalletPocket + 0, // 1: proto.WalletFund.split_type:type_name -> proto.FundSplitType + 1, // 2: proto.WalletFund.status:type_name -> proto.FundStatus + 28, // 3: proto.WalletFund.message:type_name -> google.protobuf.StringValue + 29, // 4: proto.WalletFund.expired_at:type_name -> google.protobuf.Timestamp + 9, // 5: proto.WalletFund.recipients:type_name -> proto.WalletFundRecipient + 29, // 6: proto.WalletFundRecipient.received_at:type_name -> google.protobuf.Timestamp + 29, // 7: proto.Subscription.begun_at:type_name -> google.protobuf.Timestamp + 29, // 8: proto.Subscription.ended_at:type_name -> google.protobuf.Timestamp + 2, // 9: proto.Subscription.status:type_name -> proto.SubscriptionStatus + 12, // 10: proto.Subscription.payment_details:type_name -> proto.PaymentDetails + 13, // 11: proto.Subscription.coupon:type_name -> proto.Coupon + 29, // 12: proto.Subscription.renewal_at:type_name -> google.protobuf.Timestamp + 29, // 13: proto.Subscription.created_at:type_name -> google.protobuf.Timestamp + 29, // 14: proto.Subscription.updated_at:type_name -> google.protobuf.Timestamp + 29, // 15: proto.SubscriptionReferenceObject.begun_at:type_name -> google.protobuf.Timestamp + 29, // 16: proto.SubscriptionReferenceObject.ended_at:type_name -> google.protobuf.Timestamp + 2, // 17: proto.SubscriptionReferenceObject.status:type_name -> proto.SubscriptionStatus + 29, // 18: proto.SubscriptionReferenceObject.renewal_at:type_name -> google.protobuf.Timestamp + 29, // 19: proto.SubscriptionReferenceObject.created_at:type_name -> google.protobuf.Timestamp + 29, // 20: proto.SubscriptionReferenceObject.updated_at:type_name -> google.protobuf.Timestamp + 29, // 21: proto.Coupon.affected_at:type_name -> google.protobuf.Timestamp + 29, // 22: proto.Coupon.expired_at:type_name -> google.protobuf.Timestamp + 30, // 23: proto.Coupon.discount_rate:type_name -> google.protobuf.DoubleValue + 31, // 24: proto.Coupon.max_usage:type_name -> google.protobuf.Int32Value + 29, // 25: proto.Coupon.created_at:type_name -> google.protobuf.Timestamp + 29, // 26: proto.Coupon.updated_at:type_name -> google.protobuf.Timestamp + 3, // 27: proto.Gift.status:type_name -> proto.GiftStatus + 29, // 28: proto.Gift.redeemed_at:type_name -> google.protobuf.Timestamp + 29, // 29: proto.Gift.expires_at:type_name -> google.protobuf.Timestamp + 12, // 30: proto.Gift.payment_details:type_name -> proto.PaymentDetails + 13, // 31: proto.Gift.coupon:type_name -> proto.Coupon + 29, // 32: proto.Gift.created_at:type_name -> google.protobuf.Timestamp + 29, // 33: proto.Gift.updated_at:type_name -> google.protobuf.Timestamp + 32, // 34: proto.CreateOrderRequest.expiration:type_name -> google.protobuf.Duration + 28, // 35: proto.Order.payee_wallet_id:type_name -> google.protobuf.StringValue + 28, // 36: proto.Order.currency:type_name -> google.protobuf.StringValue + 29, // 37: proto.Order.expired_at:type_name -> google.protobuf.Timestamp + 28, // 38: proto.Order.app_identifier:type_name -> google.protobuf.StringValue + 28, // 39: proto.Order.product_identifier:type_name -> google.protobuf.StringValue + 4, // 40: proto.Order.status:type_name -> proto.OrderStatus + 28, // 41: proto.Order.transaction_id:type_name -> google.protobuf.StringValue + 20, // 42: proto.Order.transaction:type_name -> proto.Transaction + 28, // 43: proto.Order.remarks:type_name -> google.protobuf.StringValue + 28, // 44: proto.Transaction.payer_wallet_id:type_name -> google.protobuf.StringValue + 28, // 45: proto.Transaction.payee_wallet_id:type_name -> google.protobuf.StringValue + 28, // 46: proto.Transaction.remarks:type_name -> google.protobuf.StringValue + 5, // 47: proto.Transaction.type:type_name -> proto.TransactionType + 29, // 48: proto.Transaction.created_at:type_name -> google.protobuf.Timestamp + 29, // 49: proto.Transaction.updated_at:type_name -> google.protobuf.Timestamp + 28, // 50: proto.CreateTransactionWithAccountRequest.payer_account_id:type_name -> google.protobuf.StringValue + 28, // 51: proto.CreateTransactionWithAccountRequest.payee_account_id:type_name -> google.protobuf.StringValue + 28, // 52: proto.CreateTransactionWithAccountRequest.remarks:type_name -> google.protobuf.StringValue + 5, // 53: proto.CreateTransactionWithAccountRequest.type:type_name -> proto.TransactionType + 28, // 54: proto.CreateTransactionRequest.payer_wallet_id:type_name -> google.protobuf.StringValue + 28, // 55: proto.CreateTransactionRequest.payee_wallet_id:type_name -> google.protobuf.StringValue + 28, // 56: proto.CreateTransactionRequest.remarks:type_name -> google.protobuf.StringValue + 5, // 57: proto.CreateTransactionRequest.type:type_name -> proto.TransactionType + 19, // 58: proto.RefundOrderResponse.order:type_name -> proto.Order + 20, // 59: proto.RefundOrderResponse.refund_transaction:type_name -> proto.Transaction + 15, // 60: proto.WalletService.GetWallet:input_type -> proto.GetWalletRequest + 16, // 61: proto.WalletService.CreateWallet:input_type -> proto.CreateWalletRequest + 17, // 62: proto.WalletService.GetOrCreateWalletPocket:input_type -> proto.GetOrCreateWalletPocketRequest + 18, // 63: proto.PaymentService.CreateOrder:input_type -> proto.CreateOrderRequest + 21, // 64: proto.PaymentService.CreateTransactionWithAccount:input_type -> proto.CreateTransactionWithAccountRequest + 22, // 65: proto.PaymentService.CreateTransaction:input_type -> proto.CreateTransactionRequest + 23, // 66: proto.PaymentService.CancelOrder:input_type -> proto.CancelOrderRequest + 24, // 67: proto.PaymentService.RefundOrder:input_type -> proto.RefundOrderRequest + 26, // 68: proto.PaymentService.Transfer:input_type -> proto.TransferRequest + 27, // 69: proto.PaymentService.GetWalletFund:input_type -> proto.GetWalletFundRequest + 6, // 70: proto.WalletService.GetWallet:output_type -> proto.Wallet + 6, // 71: proto.WalletService.CreateWallet:output_type -> proto.Wallet + 7, // 72: proto.WalletService.GetOrCreateWalletPocket:output_type -> proto.WalletPocket + 19, // 73: proto.PaymentService.CreateOrder:output_type -> proto.Order + 20, // 74: proto.PaymentService.CreateTransactionWithAccount:output_type -> proto.Transaction + 20, // 75: proto.PaymentService.CreateTransaction:output_type -> proto.Transaction + 19, // 76: proto.PaymentService.CancelOrder:output_type -> proto.Order + 25, // 77: proto.PaymentService.RefundOrder:output_type -> proto.RefundOrderResponse + 20, // 78: proto.PaymentService.Transfer:output_type -> proto.Transaction + 8, // 79: proto.PaymentService.GetWalletFund:output_type -> proto.WalletFund + 70, // [70:80] is the sub-list for method output_type + 60, // [60:70] is the sub-list for method input_type + 60, // [60:60] is the sub-list for extension type_name + 60, // [60:60] is the sub-list for extension extendee + 0, // [0:60] is the sub-list for field type_name +} + +func init() { file_wallet_proto_init() } +func file_wallet_proto_init() { + if File_wallet_proto != nil { + return + } + file_wallet_proto_msgTypes[3].OneofWrappers = []any{} + file_wallet_proto_msgTypes[4].OneofWrappers = []any{} + file_wallet_proto_msgTypes[5].OneofWrappers = []any{} + file_wallet_proto_msgTypes[6].OneofWrappers = []any{} + file_wallet_proto_msgTypes[7].OneofWrappers = []any{} + file_wallet_proto_msgTypes[8].OneofWrappers = []any{} + file_wallet_proto_msgTypes[11].OneofWrappers = []any{} + file_wallet_proto_msgTypes[12].OneofWrappers = []any{} + file_wallet_proto_msgTypes[13].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_wallet_proto_rawDesc), len(file_wallet_proto_rawDesc)), + NumEnums: 6, + NumMessages: 22, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_wallet_proto_goTypes, + DependencyIndexes: file_wallet_proto_depIdxs, + EnumInfos: file_wallet_proto_enumTypes, + MessageInfos: file_wallet_proto_msgTypes, + }.Build() + File_wallet_proto = out.File + file_wallet_proto_goTypes = nil + file_wallet_proto_depIdxs = nil +} diff --git a/pkg/shared/proto/gen/wallet_grpc.pb.go b/pkg/shared/proto/gen/wallet_grpc.pb.go new file mode 100644 index 0000000..8f1cbb6 --- /dev/null +++ b/pkg/shared/proto/gen/wallet_grpc.pb.go @@ -0,0 +1,527 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.0 +// - protoc v6.33.1 +// source: wallet.proto + +package gen + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + WalletService_GetWallet_FullMethodName = "/proto.WalletService/GetWallet" + WalletService_CreateWallet_FullMethodName = "/proto.WalletService/CreateWallet" + WalletService_GetOrCreateWalletPocket_FullMethodName = "/proto.WalletService/GetOrCreateWalletPocket" +) + +// WalletServiceClient is the client API for WalletService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type WalletServiceClient interface { + GetWallet(ctx context.Context, in *GetWalletRequest, opts ...grpc.CallOption) (*Wallet, error) + CreateWallet(ctx context.Context, in *CreateWalletRequest, opts ...grpc.CallOption) (*Wallet, error) + GetOrCreateWalletPocket(ctx context.Context, in *GetOrCreateWalletPocketRequest, opts ...grpc.CallOption) (*WalletPocket, error) +} + +type walletServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewWalletServiceClient(cc grpc.ClientConnInterface) WalletServiceClient { + return &walletServiceClient{cc} +} + +func (c *walletServiceClient) GetWallet(ctx context.Context, in *GetWalletRequest, opts ...grpc.CallOption) (*Wallet, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Wallet) + err := c.cc.Invoke(ctx, WalletService_GetWallet_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *walletServiceClient) CreateWallet(ctx context.Context, in *CreateWalletRequest, opts ...grpc.CallOption) (*Wallet, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Wallet) + err := c.cc.Invoke(ctx, WalletService_CreateWallet_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *walletServiceClient) GetOrCreateWalletPocket(ctx context.Context, in *GetOrCreateWalletPocketRequest, opts ...grpc.CallOption) (*WalletPocket, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(WalletPocket) + err := c.cc.Invoke(ctx, WalletService_GetOrCreateWalletPocket_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// WalletServiceServer is the server API for WalletService service. +// All implementations must embed UnimplementedWalletServiceServer +// for forward compatibility. +type WalletServiceServer interface { + GetWallet(context.Context, *GetWalletRequest) (*Wallet, error) + CreateWallet(context.Context, *CreateWalletRequest) (*Wallet, error) + GetOrCreateWalletPocket(context.Context, *GetOrCreateWalletPocketRequest) (*WalletPocket, error) + mustEmbedUnimplementedWalletServiceServer() +} + +// UnimplementedWalletServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedWalletServiceServer struct{} + +func (UnimplementedWalletServiceServer) GetWallet(context.Context, *GetWalletRequest) (*Wallet, error) { + return nil, status.Error(codes.Unimplemented, "method GetWallet not implemented") +} +func (UnimplementedWalletServiceServer) CreateWallet(context.Context, *CreateWalletRequest) (*Wallet, error) { + return nil, status.Error(codes.Unimplemented, "method CreateWallet not implemented") +} +func (UnimplementedWalletServiceServer) GetOrCreateWalletPocket(context.Context, *GetOrCreateWalletPocketRequest) (*WalletPocket, error) { + return nil, status.Error(codes.Unimplemented, "method GetOrCreateWalletPocket not implemented") +} +func (UnimplementedWalletServiceServer) mustEmbedUnimplementedWalletServiceServer() {} +func (UnimplementedWalletServiceServer) testEmbeddedByValue() {} + +// UnsafeWalletServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to WalletServiceServer will +// result in compilation errors. +type UnsafeWalletServiceServer interface { + mustEmbedUnimplementedWalletServiceServer() +} + +func RegisterWalletServiceServer(s grpc.ServiceRegistrar, srv WalletServiceServer) { + // If the following call panics, it indicates UnimplementedWalletServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&WalletService_ServiceDesc, srv) +} + +func _WalletService_GetWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetWalletRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WalletServiceServer).GetWallet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WalletService_GetWallet_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WalletServiceServer).GetWallet(ctx, req.(*GetWalletRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WalletService_CreateWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateWalletRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WalletServiceServer).CreateWallet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WalletService_CreateWallet_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WalletServiceServer).CreateWallet(ctx, req.(*CreateWalletRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _WalletService_GetOrCreateWalletPocket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetOrCreateWalletPocketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WalletServiceServer).GetOrCreateWalletPocket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: WalletService_GetOrCreateWalletPocket_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WalletServiceServer).GetOrCreateWalletPocket(ctx, req.(*GetOrCreateWalletPocketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// WalletService_ServiceDesc is the grpc.ServiceDesc for WalletService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var WalletService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "proto.WalletService", + HandlerType: (*WalletServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetWallet", + Handler: _WalletService_GetWallet_Handler, + }, + { + MethodName: "CreateWallet", + Handler: _WalletService_CreateWallet_Handler, + }, + { + MethodName: "GetOrCreateWalletPocket", + Handler: _WalletService_GetOrCreateWalletPocket_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "wallet.proto", +} + +const ( + PaymentService_CreateOrder_FullMethodName = "/proto.PaymentService/CreateOrder" + PaymentService_CreateTransactionWithAccount_FullMethodName = "/proto.PaymentService/CreateTransactionWithAccount" + PaymentService_CreateTransaction_FullMethodName = "/proto.PaymentService/CreateTransaction" + PaymentService_CancelOrder_FullMethodName = "/proto.PaymentService/CancelOrder" + PaymentService_RefundOrder_FullMethodName = "/proto.PaymentService/RefundOrder" + PaymentService_Transfer_FullMethodName = "/proto.PaymentService/Transfer" + PaymentService_GetWalletFund_FullMethodName = "/proto.PaymentService/GetWalletFund" +) + +// PaymentServiceClient is the client API for PaymentService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type PaymentServiceClient interface { + CreateOrder(ctx context.Context, in *CreateOrderRequest, opts ...grpc.CallOption) (*Order, error) + CreateTransactionWithAccount(ctx context.Context, in *CreateTransactionWithAccountRequest, opts ...grpc.CallOption) (*Transaction, error) + CreateTransaction(ctx context.Context, in *CreateTransactionRequest, opts ...grpc.CallOption) (*Transaction, error) + CancelOrder(ctx context.Context, in *CancelOrderRequest, opts ...grpc.CallOption) (*Order, error) + RefundOrder(ctx context.Context, in *RefundOrderRequest, opts ...grpc.CallOption) (*RefundOrderResponse, error) + Transfer(ctx context.Context, in *TransferRequest, opts ...grpc.CallOption) (*Transaction, error) + GetWalletFund(ctx context.Context, in *GetWalletFundRequest, opts ...grpc.CallOption) (*WalletFund, error) +} + +type paymentServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewPaymentServiceClient(cc grpc.ClientConnInterface) PaymentServiceClient { + return &paymentServiceClient{cc} +} + +func (c *paymentServiceClient) CreateOrder(ctx context.Context, in *CreateOrderRequest, opts ...grpc.CallOption) (*Order, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Order) + err := c.cc.Invoke(ctx, PaymentService_CreateOrder_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *paymentServiceClient) CreateTransactionWithAccount(ctx context.Context, in *CreateTransactionWithAccountRequest, opts ...grpc.CallOption) (*Transaction, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Transaction) + err := c.cc.Invoke(ctx, PaymentService_CreateTransactionWithAccount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *paymentServiceClient) CreateTransaction(ctx context.Context, in *CreateTransactionRequest, opts ...grpc.CallOption) (*Transaction, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Transaction) + err := c.cc.Invoke(ctx, PaymentService_CreateTransaction_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *paymentServiceClient) CancelOrder(ctx context.Context, in *CancelOrderRequest, opts ...grpc.CallOption) (*Order, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Order) + err := c.cc.Invoke(ctx, PaymentService_CancelOrder_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *paymentServiceClient) RefundOrder(ctx context.Context, in *RefundOrderRequest, opts ...grpc.CallOption) (*RefundOrderResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RefundOrderResponse) + err := c.cc.Invoke(ctx, PaymentService_RefundOrder_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *paymentServiceClient) Transfer(ctx context.Context, in *TransferRequest, opts ...grpc.CallOption) (*Transaction, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Transaction) + err := c.cc.Invoke(ctx, PaymentService_Transfer_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *paymentServiceClient) GetWalletFund(ctx context.Context, in *GetWalletFundRequest, opts ...grpc.CallOption) (*WalletFund, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(WalletFund) + err := c.cc.Invoke(ctx, PaymentService_GetWalletFund_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PaymentServiceServer is the server API for PaymentService service. +// All implementations must embed UnimplementedPaymentServiceServer +// for forward compatibility. +type PaymentServiceServer interface { + CreateOrder(context.Context, *CreateOrderRequest) (*Order, error) + CreateTransactionWithAccount(context.Context, *CreateTransactionWithAccountRequest) (*Transaction, error) + CreateTransaction(context.Context, *CreateTransactionRequest) (*Transaction, error) + CancelOrder(context.Context, *CancelOrderRequest) (*Order, error) + RefundOrder(context.Context, *RefundOrderRequest) (*RefundOrderResponse, error) + Transfer(context.Context, *TransferRequest) (*Transaction, error) + GetWalletFund(context.Context, *GetWalletFundRequest) (*WalletFund, error) + mustEmbedUnimplementedPaymentServiceServer() +} + +// UnimplementedPaymentServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedPaymentServiceServer struct{} + +func (UnimplementedPaymentServiceServer) CreateOrder(context.Context, *CreateOrderRequest) (*Order, error) { + return nil, status.Error(codes.Unimplemented, "method CreateOrder not implemented") +} +func (UnimplementedPaymentServiceServer) CreateTransactionWithAccount(context.Context, *CreateTransactionWithAccountRequest) (*Transaction, error) { + return nil, status.Error(codes.Unimplemented, "method CreateTransactionWithAccount not implemented") +} +func (UnimplementedPaymentServiceServer) CreateTransaction(context.Context, *CreateTransactionRequest) (*Transaction, error) { + return nil, status.Error(codes.Unimplemented, "method CreateTransaction not implemented") +} +func (UnimplementedPaymentServiceServer) CancelOrder(context.Context, *CancelOrderRequest) (*Order, error) { + return nil, status.Error(codes.Unimplemented, "method CancelOrder not implemented") +} +func (UnimplementedPaymentServiceServer) RefundOrder(context.Context, *RefundOrderRequest) (*RefundOrderResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RefundOrder not implemented") +} +func (UnimplementedPaymentServiceServer) Transfer(context.Context, *TransferRequest) (*Transaction, error) { + return nil, status.Error(codes.Unimplemented, "method Transfer not implemented") +} +func (UnimplementedPaymentServiceServer) GetWalletFund(context.Context, *GetWalletFundRequest) (*WalletFund, error) { + return nil, status.Error(codes.Unimplemented, "method GetWalletFund not implemented") +} +func (UnimplementedPaymentServiceServer) mustEmbedUnimplementedPaymentServiceServer() {} +func (UnimplementedPaymentServiceServer) testEmbeddedByValue() {} + +// UnsafePaymentServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PaymentServiceServer will +// result in compilation errors. +type UnsafePaymentServiceServer interface { + mustEmbedUnimplementedPaymentServiceServer() +} + +func RegisterPaymentServiceServer(s grpc.ServiceRegistrar, srv PaymentServiceServer) { + // If the following call panics, it indicates UnimplementedPaymentServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&PaymentService_ServiceDesc, srv) +} + +func _PaymentService_CreateOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateOrderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PaymentServiceServer).CreateOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PaymentService_CreateOrder_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PaymentServiceServer).CreateOrder(ctx, req.(*CreateOrderRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PaymentService_CreateTransactionWithAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateTransactionWithAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PaymentServiceServer).CreateTransactionWithAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PaymentService_CreateTransactionWithAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PaymentServiceServer).CreateTransactionWithAccount(ctx, req.(*CreateTransactionWithAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PaymentService_CreateTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateTransactionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PaymentServiceServer).CreateTransaction(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PaymentService_CreateTransaction_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PaymentServiceServer).CreateTransaction(ctx, req.(*CreateTransactionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PaymentService_CancelOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CancelOrderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PaymentServiceServer).CancelOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PaymentService_CancelOrder_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PaymentServiceServer).CancelOrder(ctx, req.(*CancelOrderRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PaymentService_RefundOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RefundOrderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PaymentServiceServer).RefundOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PaymentService_RefundOrder_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PaymentServiceServer).RefundOrder(ctx, req.(*RefundOrderRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PaymentService_Transfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TransferRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PaymentServiceServer).Transfer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PaymentService_Transfer_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PaymentServiceServer).Transfer(ctx, req.(*TransferRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PaymentService_GetWalletFund_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetWalletFundRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PaymentServiceServer).GetWalletFund(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PaymentService_GetWalletFund_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PaymentServiceServer).GetWalletFund(ctx, req.(*GetWalletFundRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// PaymentService_ServiceDesc is the grpc.ServiceDesc for PaymentService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var PaymentService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "proto.PaymentService", + HandlerType: (*PaymentServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateOrder", + Handler: _PaymentService_CreateOrder_Handler, + }, + { + MethodName: "CreateTransactionWithAccount", + Handler: _PaymentService_CreateTransactionWithAccount_Handler, + }, + { + MethodName: "CreateTransaction", + Handler: _PaymentService_CreateTransaction_Handler, + }, + { + MethodName: "CancelOrder", + Handler: _PaymentService_CancelOrder_Handler, + }, + { + MethodName: "RefundOrder", + Handler: _PaymentService_RefundOrder_Handler, + }, + { + MethodName: "Transfer", + Handler: _PaymentService_Transfer_Handler, + }, + { + MethodName: "GetWalletFund", + Handler: _PaymentService_GetWalletFund_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "wallet.proto", +} diff --git a/pkg/shared/proto/leveling.proto b/pkg/shared/proto/leveling.proto new file mode 100644 index 0000000..78bfbad --- /dev/null +++ b/pkg/shared/proto/leveling.proto @@ -0,0 +1,84 @@ +syntax = "proto3"; + +package proto; + +option csharp_namespace = "DysonNetwork.Shared.Proto"; + +option go_package = "git.solsynth.dev/goatworks/turbine/pkg/shared/proto/gen"; + +import "google/protobuf/timestamp.proto"; + +// ==================================== +// Message Definitions +// ==================================== + +// SocialCreditRecord represents a record of social credit changes for an account +message SocialCreditRecord { + string id = 1; // UUID string + string reason_type = 2; + string reason = 3; + double delta = 4; + string account_id = 5; // UUID string + google.protobuf.Timestamp created_at = 6; + google.protobuf.Timestamp updated_at = 7; +} + +// ExperienceRecord represents a record of experience points gained by an account +message ExperienceRecord { + string id = 1; // UUID string + string reason_type = 2; + string reason = 3; + int64 delta = 4; + double bonus_multiplier = 5; + string account_id = 6; // UUID string + google.protobuf.Timestamp created_at = 7; + google.protobuf.Timestamp updated_at = 8; +} + +// ==================================== +// Request/Response Messages +// ==================================== + +// Social Credit Requests/Responses +message AddSocialCreditRecordRequest { + string reason_type = 1; + string reason = 2; + double delta = 3; + string account_id = 4; // UUID string + google.protobuf.Timestamp expired_at = 5; +} + +message GetSocialCreditRequest { + string account_id = 1; // UUID string +} + +message SocialCreditResponse { + double amount = 1; +} + +// Experience Requests/Responses +message AddExperienceRecordRequest { + string reason_type = 1; + string reason = 2; + int64 delta = 3; + string account_id = 4; // UUID string +} + +// ==================================== +// Service Definitions +// ==================================== + +// SocialCreditService provides operations for managing social credit scores +service SocialCreditService { + // Adds a new social credit record for an account + rpc AddRecord(AddSocialCreditRecordRequest) returns (SocialCreditRecord); + + // Gets the current social credit score for an account + rpc GetSocialCredit(GetSocialCreditRequest) returns (SocialCreditResponse); +} + +// ExperienceService provides operations for managing experience points +service ExperienceService { + // Adds a new experience record for an account + rpc AddRecord(AddExperienceRecordRequest) returns (ExperienceRecord); +} diff --git a/pkg/shared/proto/post.proto b/pkg/shared/proto/post.proto new file mode 100644 index 0000000..3ee26dc --- /dev/null +++ b/pkg/shared/proto/post.proto @@ -0,0 +1,289 @@ +syntax = "proto3"; + +package proto; + +option csharp_namespace = "DysonNetwork.Shared.Proto"; + +option go_package = "git.solsynth.dev/goatworks/turbine/pkg/shared/proto/gen"; + +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "file.proto"; +import "realm.proto"; +import "publisher.proto"; + +// Enums +enum PostType { + POST_TYPE_UNSPECIFIED = 0; + MOMENT = 1; + ARTICLE = 2; +} + +enum PostVisibility { + VISIBILITY_UNSPECIFIED = 0; + PUBLIC = 1; + FRIENDS = 2; + UNLISTED = 3; + PRIVATE = 4; +} + +enum PostPinMode { + PIN_MODE_UNSPECIFIED = 0; + PUBLISHER_PAGE = 1; + REALM_PAGE = 2; + REPLY_PAGE = 3; +} + +enum ContentSensitiveMark { + SENSITIVE_MARK_UNSPECIFIED = 0; + LANGUAGE = 1; + SEXUAL_CONTENT = 2; + VIOLENCE = 3; + PROFANITY = 4; + HATE_SPEECH = 5; + RACISM = 6; + ADULT_CONTENT = 7; + DRUG_ABUSE = 8; + ALCOHOL_ABUSE = 9; + GAMBLING = 10; + SELF_HARM = 11; + CHILD_ABUSE = 12; + OTHER = 13; +} + +enum PostReactionAttitude { + ATTITUDE_UNSPECIFIED = 0; + POST_ATTITUDE_POSITIVE = 1; + POST_ATTITUDE_NEUTRAL = 2; + POST_ATTITUDE_NEGATIVE = 3; +} + +enum PostEmbedViewRenderer { + RENDERER_UNSPECIFIED = 0; + WEBVIEW = 1; +} + +// Messages + +message PostEmbedView { + string uri = 1; + optional double aspect_ratio = 2; + PostEmbedViewRenderer renderer = 3; +} + +message Post { + string id = 1; + string title = 2; + string description = 3; + string slug = 4; + optional google.protobuf.Timestamp edited_at = 5; + optional google.protobuf.Timestamp published_at = 6; + PostVisibility visibility = 7; + optional string content = 8; + + PostType type = 9; + optional PostPinMode pin_mode = 10; + optional bytes meta = 11; // Dictionary + optional bytes sensitive_marks = 12; // List + optional PostEmbedView embed_view = 13; + + int32 views_unique = 14; + int32 views_total = 15; + int32 upvotes = 16; + int32 downvotes = 17; + double awarded_score = 18; + + // Not mapped fields: handled client-side + map reactions_count = 19; // Dictionary + int32 replies_count = 20; + map reactions_made = 21; // Dictionary + + bool replied_gone = 22; + bool forwarded_gone = 23; + + optional string replied_post_id = 24; + optional Post replied_post = 25; // full if populated + optional string forwarded_post_id = 26; + optional Post forwarded_post = 27; // full if populated + + optional string realm_id = 28; + optional Realm realm = 29; // full if populated + + repeated CloudFile attachments = 30; // List + + string publisher_id = 31; + Publisher publisher = 32; + + repeated PostAward awards = 33; + repeated PostReaction reactions = 34; + repeated PostTag tags = 35; + repeated PostCategory categories = 36; + repeated PostFeaturedRecord featured_records = 37; + + // Added for ToActivity + google.protobuf.Timestamp created_at = 38; + google.protobuf.Timestamp updated_at = 39; + optional google.protobuf.Timestamp deleted_at = 40; +} + +message PostTag { + string id = 1; + string slug = 2; + string name = 3; + + google.protobuf.Timestamp created_at = 4; + google.protobuf.Timestamp updated_at = 5; +} + +message PostCategory { + string id = 1; + string slug = 2; + string name = 3; + + google.protobuf.Timestamp created_at = 4; + google.protobuf.Timestamp updated_at = 5; +} + +message PostCategorySubscription { + string id = 1; + string account_id = 2; + + optional string category_id = 3; + optional PostCategory category = 4; + optional string tag_id = 5; + optional PostTag tag = 6; + + google.protobuf.Timestamp created_at = 7; + google.protobuf.Timestamp updated_at = 8; +} + +message PostCollection { + string id = 1; + string slug = 2; + optional google.protobuf.StringValue name = 3; + optional google.protobuf.StringValue description = 4; + + Publisher publisher = 5; + optional string publisher_id = 6; // for cases where full publisher not needed + + repeated Post posts = 7; + + google.protobuf.Timestamp created_at = 8; + google.protobuf.Timestamp updated_at = 9; +} + +message PostFeaturedRecord { + string id = 1; + string post_id = 2; + optional google.protobuf.Timestamp featured_at = 3; + int32 social_credits = 4; + + google.protobuf.Timestamp created_at = 5; + google.protobuf.Timestamp updated_at = 6; +} + +message PostReaction { + string id = 1; + string symbol = 2; + PostReactionAttitude attitude = 3; + + string post_id = 4; + string account_id = 5; + optional Account account = 6; // optional full account + + google.protobuf.Timestamp created_at = 7; + google.protobuf.Timestamp updated_at = 8; +} + +message PostAward { + string id = 1; + double amount = 2; + PostReactionAttitude attitude = 3; + optional google.protobuf.StringValue message = 4; + + string post_id = 5; + string account_id = 6; + + google.protobuf.Timestamp created_at = 7; + google.protobuf.Timestamp updated_at = 8; +} + +// ==================================== +// Request/Response Messages +// ==================================== + +message GetPostRequest { + oneof identifier { + string id = 1; + string slug = 2; + } + google.protobuf.StringValue publisher_id = 3; +} + +message GetPostBatchRequest { + repeated string ids = 1; +} + +message GetPostBatchResponse { + repeated Post posts = 1; +} + +message SearchPostsRequest { + string query = 1; + string publisher_id = 2; + string realm_id = 3; + int32 page_size = 4; + string page_token = 5; + string order_by = 6; +} + +message SearchPostsResponse { + repeated Post posts = 1; + string next_page_token = 2; + int32 total_size = 3; +} + +message ListPostsRequest { + google.protobuf.StringValue publisher_id = 1; + google.protobuf.StringValue realm_id = 2; + int32 page_size = 3; + string page_token = 4; + google.protobuf.StringValue order_by = 5; + bool order_desc = 16; + repeated string categories = 6; + repeated string tags = 7; + google.protobuf.StringValue query = 8; + repeated PostType types = 9; + optional google.protobuf.Timestamp after = 10; // Filter posts created after this timestamp + optional google.protobuf.Timestamp before = 11; // Filter posts created before this timestamp + bool include_replies = 12; // Include reply posts + optional PostPinMode pinned = 13; // Filter by pinned mode (if present, null means not pinned) + bool only_media = 14; // Only return posts with attachments + bool shuffle = 15; // Random order +} + +message ListPostsResponse { + repeated Post posts = 1; + string next_page_token = 2; + int32 total_size = 3; +} + +// ==================================== +// Service Definitions +// ==================================== + +service PostService { + // Get a single post by id + rpc GetPost(GetPostRequest) returns (Post); + + // Get multiple posts by ids + rpc GetPostBatch(GetPostBatchRequest) returns (GetPostBatchResponse); + + // Search posts + rpc SearchPosts(SearchPostsRequest) returns (SearchPostsResponse); + + // List posts with filters + rpc ListPosts(ListPostsRequest) returns (ListPostsResponse); +} + +import 'account.proto'; diff --git a/pkg/shared/proto/publisher.proto b/pkg/shared/proto/publisher.proto new file mode 100644 index 0000000..41deafb --- /dev/null +++ b/pkg/shared/proto/publisher.proto @@ -0,0 +1,125 @@ +syntax = "proto3"; + +package proto; + +option csharp_namespace = "DysonNetwork.Shared.Proto"; + +option go_package = "git.solsynth.dev/goatworks/turbine/pkg/shared/proto/gen"; + +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "file.proto"; +import "account.proto"; + +enum PublisherType { + PUBLISHER_TYPE_UNSPECIFIED = 0; + PUB_INDIVIDUAL = 1; + PUB_ORGANIZATIONAL = 2; +} + +enum PublisherMemberRole { + PUBLISHER_MEMBER_ROLE_UNSPECIFIED = 0; + OWNER = 100; + MANAGER = 75; + EDITOR = 50; + VIEWER = 25; +} + +message PublisherFeature { + string id = 1; + string flag = 2; + google.protobuf.Timestamp expired_at = 3; + string publisher_id = 4; + google.protobuf.Timestamp created_at = 5; + google.protobuf.Timestamp updated_at = 6; +} + +message PublisherMember { + string publisher_id = 1; + string account_id = 2; + PublisherMemberRole role = 3; + google.protobuf.Timestamp joined_at = 4; + google.protobuf.Timestamp created_at = 5; + google.protobuf.Timestamp updated_at = 6; +} + +message Publisher { + string id = 1; + PublisherType type = 2; + string name = 3; + string nick = 4; + google.protobuf.StringValue bio = 5; + CloudFile picture = 8; + CloudFile background = 9; + optional VerificationMark verification_mark = 10; + string account_id = 11; + optional string realm_id = 12; + google.protobuf.Timestamp created_at = 13; + google.protobuf.Timestamp updated_at = 14; +} + +message GetPublisherRequest { + oneof query { + string name = 1; + string id = 2; + } +} + +message GetPublisherResponse { + Publisher publisher = 1; +} + +message GetPublisherBatchRequest { + repeated string ids = 1; +} + +message ListPublishersRequest { + string account_id = 1; // filter by owner/member account + string realm_id = 2; // filter by realm +} + +message ListPublishersResponse { + repeated Publisher publishers = 1; +} + +message ListPublisherMembersRequest { + string publisher_id = 1; +} + +message ListPublisherMembersResponse { + repeated PublisherMember members = 1; +} + +message SetPublisherFeatureFlagRequest { + string publisher_id = 1; + string flag = 2; +} + +message HasPublisherFeatureRequest { + string publisher_id = 1; + string flag = 2; +} + +message HasPublisherFeatureResponse { + bool enabled = 1; +} + +message IsPublisherMemberRequest { + string publisher_id = 1; + string account_id = 2; + PublisherMemberRole role = 3; +} + +message IsPublisherMemberResponse { + bool valid = 1; +} + +service PublisherService { + rpc GetPublisher(GetPublisherRequest) returns (GetPublisherResponse); + rpc GetPublisherBatch(GetPublisherBatchRequest) returns (ListPublishersResponse); + rpc ListPublishers(ListPublishersRequest) returns (ListPublishersResponse); + rpc ListPublisherMembers(ListPublisherMembersRequest) returns (ListPublisherMembersResponse); + rpc SetPublisherFeatureFlag(SetPublisherFeatureFlagRequest) returns (google.protobuf.StringValue); // returns optional message + rpc HasPublisherFeature(HasPublisherFeatureRequest) returns (HasPublisherFeatureResponse); + rpc IsPublisherMember(IsPublisherMemberRequest) returns (IsPublisherMemberResponse); +} diff --git a/pkg/shared/proto/realm.proto b/pkg/shared/proto/realm.proto new file mode 100644 index 0000000..4c68fc8 --- /dev/null +++ b/pkg/shared/proto/realm.proto @@ -0,0 +1,122 @@ +syntax = "proto3"; + +package proto; + +option csharp_namespace = "DysonNetwork.Shared.Proto"; + +option go_package = "git.solsynth.dev/goatworks/turbine/pkg/shared/proto/gen"; + +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "google/protobuf/empty.proto"; + +import 'account.proto'; +import "file.proto"; + +// Message Definitions + +message Realm { + string id = 1; + string name = 2; + string slug = 3; + bool is_community = 4; + bool is_public = 5; + string description = 6; + optional CloudFile picture = 7; + optional CloudFile background = 8; + optional VerificationMark verification = 9; + string account_id = 10; +} + +message RealmMember { + string account_id = 1; + string realm_id = 2; + int32 role = 3; + optional google.protobuf.Timestamp joined_at = 4; + optional google.protobuf.Timestamp leave_at = 5; + optional Account account = 6; + optional Realm realm = 7; +} + +// Service Definitions + +service RealmService { + // Get realm by id or slug + rpc GetRealm(GetRealmRequest) returns (Realm) {} + // Get realm batch by ids + rpc GetRealmBatch(GetRealmBatchRequest) returns (GetRealmBatchResponse) {} + // Get realms for a user + rpc GetUserRealms(GetUserRealmsRequest) returns (GetUserRealmsResponse) {} + // Get public realms + rpc GetPublicRealms(GetPublicRealmsRequest) returns (GetPublicRealmsResponse) {} + // Search public realms + rpc SearchRealms(SearchRealmsRequest) returns (GetPublicRealmsResponse) {} + // Send invitation notification + rpc SendInviteNotify(SendInviteNotifyRequest) returns (google.protobuf.Empty) {} + // Check if member has required role + rpc IsMemberWithRole(IsMemberWithRoleRequest) returns (google.protobuf.BoolValue) {} + // Load account for a member + rpc LoadMemberAccount(LoadMemberAccountRequest) returns (RealmMember) {} + // Load accounts for members + rpc LoadMemberAccounts(LoadMemberAccountsRequest) returns (LoadMemberAccountsResponse) {} +} + +// Request/Response Messages + +message GetRealmRequest { + oneof query { + string id = 1; + string slug = 2; + } +} + +message GetUserRealmsRequest { + string account_id = 1; +} + +message GetRealmBatchRequest { + repeated string ids = 1; +} + +message GetRealmBatchResponse { + repeated Realm realms = 1; +} + +message GetUserRealmsResponse { + repeated string realm_ids = 1; +} + +message GetPublicRealmsRequest { + optional string order_by = 1; +} + +message GetPublicRealmsResponse { + repeated Realm realms = 1; +} + +message SearchRealmsRequest { + string query = 1; + int32 limit = 2; +} + +message SendInviteNotifyRequest { + RealmMember member = 1; +} + +message IsMemberWithRoleRequest { + string realm_id = 1; + string account_id = 2; + repeated int32 required_roles = 3; +} + +message LoadMemberAccountRequest { + RealmMember member = 1; +} + +message LoadMemberAccountsRequest { + repeated RealmMember members = 1; +} + +message LoadMemberAccountsResponse { + repeated RealmMember members = 1; +} diff --git a/pkg/shared/proto/ring.pb.go b/pkg/shared/proto/ring.pb.go new file mode 100644 index 0000000..936337c --- /dev/null +++ b/pkg/shared/proto/ring.pb.go @@ -0,0 +1,1322 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.10 +// protoc v6.33.1 +// source: ring.proto + +package gen + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Represents an email message. +type EmailMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + ToName string `protobuf:"bytes,1,opt,name=to_name,json=toName,proto3" json:"to_name,omitempty"` + ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` + Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` + Body string `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EmailMessage) Reset() { + *x = EmailMessage{} + mi := &file_ring_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EmailMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmailMessage) ProtoMessage() {} + +func (x *EmailMessage) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EmailMessage.ProtoReflect.Descriptor instead. +func (*EmailMessage) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{0} +} + +func (x *EmailMessage) GetToName() string { + if x != nil { + return x.ToName + } + return "" +} + +func (x *EmailMessage) GetToAddress() string { + if x != nil { + return x.ToAddress + } + return "" +} + +func (x *EmailMessage) GetSubject() string { + if x != nil { + return x.Subject + } + return "" +} + +func (x *EmailMessage) GetBody() string { + if x != nil { + return x.Body + } + return "" +} + +type SendEmailRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Email *EmailMessage `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SendEmailRequest) Reset() { + *x = SendEmailRequest{} + mi := &file_ring_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SendEmailRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendEmailRequest) ProtoMessage() {} + +func (x *SendEmailRequest) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendEmailRequest.ProtoReflect.Descriptor instead. +func (*SendEmailRequest) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{1} +} + +func (x *SendEmailRequest) GetEmail() *EmailMessage { + if x != nil { + return x.Email + } + return nil +} + +// Represents a WebSocket packet. +type WebSocketPacket struct { + state protoimpl.MessageState `protogen:"open.v1"` + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + ErrorMessage *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WebSocketPacket) Reset() { + *x = WebSocketPacket{} + mi := &file_ring_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WebSocketPacket) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WebSocketPacket) ProtoMessage() {} + +func (x *WebSocketPacket) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WebSocketPacket.ProtoReflect.Descriptor instead. +func (*WebSocketPacket) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{2} +} + +func (x *WebSocketPacket) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *WebSocketPacket) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *WebSocketPacket) GetErrorMessage() *wrapperspb.StringValue { + if x != nil { + return x.ErrorMessage + } + return nil +} + +type PushWebSocketPacketRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Packet *WebSocketPacket `protobuf:"bytes,2,opt,name=packet,proto3" json:"packet,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PushWebSocketPacketRequest) Reset() { + *x = PushWebSocketPacketRequest{} + mi := &file_ring_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PushWebSocketPacketRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PushWebSocketPacketRequest) ProtoMessage() {} + +func (x *PushWebSocketPacketRequest) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PushWebSocketPacketRequest.ProtoReflect.Descriptor instead. +func (*PushWebSocketPacketRequest) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{3} +} + +func (x *PushWebSocketPacketRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *PushWebSocketPacketRequest) GetPacket() *WebSocketPacket { + if x != nil { + return x.Packet + } + return nil +} + +type PushWebSocketPacketToUsersRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserIds []string `protobuf:"bytes,1,rep,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty"` + Packet *WebSocketPacket `protobuf:"bytes,2,opt,name=packet,proto3" json:"packet,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PushWebSocketPacketToUsersRequest) Reset() { + *x = PushWebSocketPacketToUsersRequest{} + mi := &file_ring_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PushWebSocketPacketToUsersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PushWebSocketPacketToUsersRequest) ProtoMessage() {} + +func (x *PushWebSocketPacketToUsersRequest) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PushWebSocketPacketToUsersRequest.ProtoReflect.Descriptor instead. +func (*PushWebSocketPacketToUsersRequest) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{4} +} + +func (x *PushWebSocketPacketToUsersRequest) GetUserIds() []string { + if x != nil { + return x.UserIds + } + return nil +} + +func (x *PushWebSocketPacketToUsersRequest) GetPacket() *WebSocketPacket { + if x != nil { + return x.Packet + } + return nil +} + +type PushWebSocketPacketToDeviceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + DeviceId string `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"` + Packet *WebSocketPacket `protobuf:"bytes,2,opt,name=packet,proto3" json:"packet,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PushWebSocketPacketToDeviceRequest) Reset() { + *x = PushWebSocketPacketToDeviceRequest{} + mi := &file_ring_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PushWebSocketPacketToDeviceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PushWebSocketPacketToDeviceRequest) ProtoMessage() {} + +func (x *PushWebSocketPacketToDeviceRequest) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PushWebSocketPacketToDeviceRequest.ProtoReflect.Descriptor instead. +func (*PushWebSocketPacketToDeviceRequest) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{5} +} + +func (x *PushWebSocketPacketToDeviceRequest) GetDeviceId() string { + if x != nil { + return x.DeviceId + } + return "" +} + +func (x *PushWebSocketPacketToDeviceRequest) GetPacket() *WebSocketPacket { + if x != nil { + return x.Packet + } + return nil +} + +type PushWebSocketPacketToDevicesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + DeviceIds []string `protobuf:"bytes,1,rep,name=device_ids,json=deviceIds,proto3" json:"device_ids,omitempty"` + Packet *WebSocketPacket `protobuf:"bytes,2,opt,name=packet,proto3" json:"packet,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PushWebSocketPacketToDevicesRequest) Reset() { + *x = PushWebSocketPacketToDevicesRequest{} + mi := &file_ring_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PushWebSocketPacketToDevicesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PushWebSocketPacketToDevicesRequest) ProtoMessage() {} + +func (x *PushWebSocketPacketToDevicesRequest) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PushWebSocketPacketToDevicesRequest.ProtoReflect.Descriptor instead. +func (*PushWebSocketPacketToDevicesRequest) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{6} +} + +func (x *PushWebSocketPacketToDevicesRequest) GetDeviceIds() []string { + if x != nil { + return x.DeviceIds + } + return nil +} + +func (x *PushWebSocketPacketToDevicesRequest) GetPacket() *WebSocketPacket { + if x != nil { + return x.Packet + } + return nil +} + +// Represents a push notification. +type PushNotification struct { + state protoimpl.MessageState `protogen:"open.v1"` + Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + Subtitle string `protobuf:"bytes,3,opt,name=subtitle,proto3" json:"subtitle,omitempty"` + Body string `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` + Meta []byte `protobuf:"bytes,5,opt,name=meta,proto3,oneof" json:"meta,omitempty"` + ActionUri *string `protobuf:"bytes,6,opt,name=action_uri,json=actionUri,proto3,oneof" json:"action_uri,omitempty"` + IsSilent bool `protobuf:"varint,7,opt,name=is_silent,json=isSilent,proto3" json:"is_silent,omitempty"` + IsSavable bool `protobuf:"varint,8,opt,name=is_savable,json=isSavable,proto3" json:"is_savable,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PushNotification) Reset() { + *x = PushNotification{} + mi := &file_ring_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PushNotification) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PushNotification) ProtoMessage() {} + +func (x *PushNotification) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PushNotification.ProtoReflect.Descriptor instead. +func (*PushNotification) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{7} +} + +func (x *PushNotification) GetTopic() string { + if x != nil { + return x.Topic + } + return "" +} + +func (x *PushNotification) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *PushNotification) GetSubtitle() string { + if x != nil { + return x.Subtitle + } + return "" +} + +func (x *PushNotification) GetBody() string { + if x != nil { + return x.Body + } + return "" +} + +func (x *PushNotification) GetMeta() []byte { + if x != nil { + return x.Meta + } + return nil +} + +func (x *PushNotification) GetActionUri() string { + if x != nil && x.ActionUri != nil { + return *x.ActionUri + } + return "" +} + +func (x *PushNotification) GetIsSilent() bool { + if x != nil { + return x.IsSilent + } + return false +} + +func (x *PushNotification) GetIsSavable() bool { + if x != nil { + return x.IsSavable + } + return false +} + +type SendPushNotificationToUserRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Notification *PushNotification `protobuf:"bytes,2,opt,name=notification,proto3" json:"notification,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SendPushNotificationToUserRequest) Reset() { + *x = SendPushNotificationToUserRequest{} + mi := &file_ring_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SendPushNotificationToUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendPushNotificationToUserRequest) ProtoMessage() {} + +func (x *SendPushNotificationToUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendPushNotificationToUserRequest.ProtoReflect.Descriptor instead. +func (*SendPushNotificationToUserRequest) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{8} +} + +func (x *SendPushNotificationToUserRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *SendPushNotificationToUserRequest) GetNotification() *PushNotification { + if x != nil { + return x.Notification + } + return nil +} + +type SendPushNotificationToUsersRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserIds []string `protobuf:"bytes,1,rep,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty"` + Notification *PushNotification `protobuf:"bytes,2,opt,name=notification,proto3" json:"notification,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SendPushNotificationToUsersRequest) Reset() { + *x = SendPushNotificationToUsersRequest{} + mi := &file_ring_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SendPushNotificationToUsersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendPushNotificationToUsersRequest) ProtoMessage() {} + +func (x *SendPushNotificationToUsersRequest) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendPushNotificationToUsersRequest.ProtoReflect.Descriptor instead. +func (*SendPushNotificationToUsersRequest) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{9} +} + +func (x *SendPushNotificationToUsersRequest) GetUserIds() []string { + if x != nil { + return x.UserIds + } + return nil +} + +func (x *SendPushNotificationToUsersRequest) GetNotification() *PushNotification { + if x != nil { + return x.Notification + } + return nil +} + +type UnsubscribePushNotificationsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + DeviceId string `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UnsubscribePushNotificationsRequest) Reset() { + *x = UnsubscribePushNotificationsRequest{} + mi := &file_ring_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UnsubscribePushNotificationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnsubscribePushNotificationsRequest) ProtoMessage() {} + +func (x *UnsubscribePushNotificationsRequest) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnsubscribePushNotificationsRequest.ProtoReflect.Descriptor instead. +func (*UnsubscribePushNotificationsRequest) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{10} +} + +func (x *UnsubscribePushNotificationsRequest) GetDeviceId() string { + if x != nil { + return x.DeviceId + } + return "" +} + +type GetWebsocketConnectionStatusRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Id: + // + // *GetWebsocketConnectionStatusRequest_DeviceId + // *GetWebsocketConnectionStatusRequest_UserId + Id isGetWebsocketConnectionStatusRequest_Id `protobuf_oneof:"id"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetWebsocketConnectionStatusRequest) Reset() { + *x = GetWebsocketConnectionStatusRequest{} + mi := &file_ring_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetWebsocketConnectionStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWebsocketConnectionStatusRequest) ProtoMessage() {} + +func (x *GetWebsocketConnectionStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetWebsocketConnectionStatusRequest.ProtoReflect.Descriptor instead. +func (*GetWebsocketConnectionStatusRequest) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{11} +} + +func (x *GetWebsocketConnectionStatusRequest) GetId() isGetWebsocketConnectionStatusRequest_Id { + if x != nil { + return x.Id + } + return nil +} + +func (x *GetWebsocketConnectionStatusRequest) GetDeviceId() string { + if x != nil { + if x, ok := x.Id.(*GetWebsocketConnectionStatusRequest_DeviceId); ok { + return x.DeviceId + } + } + return "" +} + +func (x *GetWebsocketConnectionStatusRequest) GetUserId() string { + if x != nil { + if x, ok := x.Id.(*GetWebsocketConnectionStatusRequest_UserId); ok { + return x.UserId + } + } + return "" +} + +type isGetWebsocketConnectionStatusRequest_Id interface { + isGetWebsocketConnectionStatusRequest_Id() +} + +type GetWebsocketConnectionStatusRequest_DeviceId struct { + DeviceId string `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3,oneof"` +} + +type GetWebsocketConnectionStatusRequest_UserId struct { + UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3,oneof"` +} + +func (*GetWebsocketConnectionStatusRequest_DeviceId) isGetWebsocketConnectionStatusRequest_Id() {} + +func (*GetWebsocketConnectionStatusRequest_UserId) isGetWebsocketConnectionStatusRequest_Id() {} + +type GetWebsocketConnectionStatusResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + IsConnected bool `protobuf:"varint,1,opt,name=is_connected,json=isConnected,proto3" json:"is_connected,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetWebsocketConnectionStatusResponse) Reset() { + *x = GetWebsocketConnectionStatusResponse{} + mi := &file_ring_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetWebsocketConnectionStatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWebsocketConnectionStatusResponse) ProtoMessage() {} + +func (x *GetWebsocketConnectionStatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetWebsocketConnectionStatusResponse.ProtoReflect.Descriptor instead. +func (*GetWebsocketConnectionStatusResponse) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{12} +} + +func (x *GetWebsocketConnectionStatusResponse) GetIsConnected() bool { + if x != nil { + return x.IsConnected + } + return false +} + +type GetWebsocketConnectionStatusBatchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UsersId []string `protobuf:"bytes,1,rep,name=users_id,json=usersId,proto3" json:"users_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetWebsocketConnectionStatusBatchRequest) Reset() { + *x = GetWebsocketConnectionStatusBatchRequest{} + mi := &file_ring_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetWebsocketConnectionStatusBatchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWebsocketConnectionStatusBatchRequest) ProtoMessage() {} + +func (x *GetWebsocketConnectionStatusBatchRequest) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetWebsocketConnectionStatusBatchRequest.ProtoReflect.Descriptor instead. +func (*GetWebsocketConnectionStatusBatchRequest) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{13} +} + +func (x *GetWebsocketConnectionStatusBatchRequest) GetUsersId() []string { + if x != nil { + return x.UsersId + } + return nil +} + +type GetWebsocketConnectionStatusBatchResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + IsConnected map[string]bool `protobuf:"bytes,1,rep,name=is_connected,json=isConnected,proto3" json:"is_connected,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetWebsocketConnectionStatusBatchResponse) Reset() { + *x = GetWebsocketConnectionStatusBatchResponse{} + mi := &file_ring_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetWebsocketConnectionStatusBatchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWebsocketConnectionStatusBatchResponse) ProtoMessage() {} + +func (x *GetWebsocketConnectionStatusBatchResponse) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetWebsocketConnectionStatusBatchResponse.ProtoReflect.Descriptor instead. +func (*GetWebsocketConnectionStatusBatchResponse) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{14} +} + +func (x *GetWebsocketConnectionStatusBatchResponse) GetIsConnected() map[string]bool { + if x != nil { + return x.IsConnected + } + return nil +} + +type ReceiveWebSocketPacketRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Packet *WebSocketPacket `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet,omitempty"` + Account *Account `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` + DeviceId string `protobuf:"bytes,3,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ReceiveWebSocketPacketRequest) Reset() { + *x = ReceiveWebSocketPacketRequest{} + mi := &file_ring_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ReceiveWebSocketPacketRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReceiveWebSocketPacketRequest) ProtoMessage() {} + +func (x *ReceiveWebSocketPacketRequest) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReceiveWebSocketPacketRequest.ProtoReflect.Descriptor instead. +func (*ReceiveWebSocketPacketRequest) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{15} +} + +func (x *ReceiveWebSocketPacketRequest) GetPacket() *WebSocketPacket { + if x != nil { + return x.Packet + } + return nil +} + +func (x *ReceiveWebSocketPacketRequest) GetAccount() *Account { + if x != nil { + return x.Account + } + return nil +} + +func (x *ReceiveWebSocketPacketRequest) GetDeviceId() string { + if x != nil { + return x.DeviceId + } + return "" +} + +// WebSocket event messages for NATS publishing +type WebSocketConnectedEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountId *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + DeviceId string `protobuf:"bytes,2,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"` + IsOffline bool `protobuf:"varint,3,opt,name=is_offline,json=isOffline,proto3" json:"is_offline,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WebSocketConnectedEvent) Reset() { + *x = WebSocketConnectedEvent{} + mi := &file_ring_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WebSocketConnectedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WebSocketConnectedEvent) ProtoMessage() {} + +func (x *WebSocketConnectedEvent) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WebSocketConnectedEvent.ProtoReflect.Descriptor instead. +func (*WebSocketConnectedEvent) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{16} +} + +func (x *WebSocketConnectedEvent) GetAccountId() *wrapperspb.StringValue { + if x != nil { + return x.AccountId + } + return nil +} + +func (x *WebSocketConnectedEvent) GetDeviceId() string { + if x != nil { + return x.DeviceId + } + return "" +} + +func (x *WebSocketConnectedEvent) GetIsOffline() bool { + if x != nil { + return x.IsOffline + } + return false +} + +type WebSocketDisconnectedEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountId *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + DeviceId string `protobuf:"bytes,2,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"` + IsOffline bool `protobuf:"varint,3,opt,name=is_offline,json=isOffline,proto3" json:"is_offline,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WebSocketDisconnectedEvent) Reset() { + *x = WebSocketDisconnectedEvent{} + mi := &file_ring_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WebSocketDisconnectedEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WebSocketDisconnectedEvent) ProtoMessage() {} + +func (x *WebSocketDisconnectedEvent) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WebSocketDisconnectedEvent.ProtoReflect.Descriptor instead. +func (*WebSocketDisconnectedEvent) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{17} +} + +func (x *WebSocketDisconnectedEvent) GetAccountId() *wrapperspb.StringValue { + if x != nil { + return x.AccountId + } + return nil +} + +func (x *WebSocketDisconnectedEvent) GetDeviceId() string { + if x != nil { + return x.DeviceId + } + return "" +} + +func (x *WebSocketDisconnectedEvent) GetIsOffline() bool { + if x != nil { + return x.IsOffline + } + return false +} + +type WebSocketPacketEvent struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccountId *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` + DeviceId string `protobuf:"bytes,2,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"` + PacketBytes []byte `protobuf:"bytes,3,opt,name=packet_bytes,json=packetBytes,proto3" json:"packet_bytes,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WebSocketPacketEvent) Reset() { + *x = WebSocketPacketEvent{} + mi := &file_ring_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WebSocketPacketEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WebSocketPacketEvent) ProtoMessage() {} + +func (x *WebSocketPacketEvent) ProtoReflect() protoreflect.Message { + mi := &file_ring_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WebSocketPacketEvent.ProtoReflect.Descriptor instead. +func (*WebSocketPacketEvent) Descriptor() ([]byte, []int) { + return file_ring_proto_rawDescGZIP(), []int{18} +} + +func (x *WebSocketPacketEvent) GetAccountId() *wrapperspb.StringValue { + if x != nil { + return x.AccountId + } + return nil +} + +func (x *WebSocketPacketEvent) GetDeviceId() string { + if x != nil { + return x.DeviceId + } + return "" +} + +func (x *WebSocketPacketEvent) GetPacketBytes() []byte { + if x != nil { + return x.PacketBytes + } + return nil +} + +var File_ring_proto protoreflect.FileDescriptor + +const file_ring_proto_rawDesc = "" + + "\n" + + "\n" + + "ring.proto\x12\x05proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\raccount.proto\"t\n" + + "\fEmailMessage\x12\x17\n" + + "\ato_name\x18\x01 \x01(\tR\x06toName\x12\x1d\n" + + "\n" + + "to_address\x18\x02 \x01(\tR\ttoAddress\x12\x18\n" + + "\asubject\x18\x03 \x01(\tR\asubject\x12\x12\n" + + "\x04body\x18\x04 \x01(\tR\x04body\"=\n" + + "\x10SendEmailRequest\x12)\n" + + "\x05email\x18\x01 \x01(\v2\x13.proto.EmailMessageR\x05email\"|\n" + + "\x0fWebSocketPacket\x12\x12\n" + + "\x04type\x18\x01 \x01(\tR\x04type\x12\x12\n" + + "\x04data\x18\x02 \x01(\fR\x04data\x12A\n" + + "\rerror_message\x18\x03 \x01(\v2\x1c.google.protobuf.StringValueR\ferrorMessage\"e\n" + + "\x1aPushWebSocketPacketRequest\x12\x17\n" + + "\auser_id\x18\x01 \x01(\tR\x06userId\x12.\n" + + "\x06packet\x18\x02 \x01(\v2\x16.proto.WebSocketPacketR\x06packet\"n\n" + + "!PushWebSocketPacketToUsersRequest\x12\x19\n" + + "\buser_ids\x18\x01 \x03(\tR\auserIds\x12.\n" + + "\x06packet\x18\x02 \x01(\v2\x16.proto.WebSocketPacketR\x06packet\"q\n" + + "\"PushWebSocketPacketToDeviceRequest\x12\x1b\n" + + "\tdevice_id\x18\x01 \x01(\tR\bdeviceId\x12.\n" + + "\x06packet\x18\x02 \x01(\v2\x16.proto.WebSocketPacketR\x06packet\"t\n" + + "#PushWebSocketPacketToDevicesRequest\x12\x1d\n" + + "\n" + + "device_ids\x18\x01 \x03(\tR\tdeviceIds\x12.\n" + + "\x06packet\x18\x02 \x01(\v2\x16.proto.WebSocketPacketR\x06packet\"\xff\x01\n" + + "\x10PushNotification\x12\x14\n" + + "\x05topic\x18\x01 \x01(\tR\x05topic\x12\x14\n" + + "\x05title\x18\x02 \x01(\tR\x05title\x12\x1a\n" + + "\bsubtitle\x18\x03 \x01(\tR\bsubtitle\x12\x12\n" + + "\x04body\x18\x04 \x01(\tR\x04body\x12\x17\n" + + "\x04meta\x18\x05 \x01(\fH\x00R\x04meta\x88\x01\x01\x12\"\n" + + "\n" + + "action_uri\x18\x06 \x01(\tH\x01R\tactionUri\x88\x01\x01\x12\x1b\n" + + "\tis_silent\x18\a \x01(\bR\bisSilent\x12\x1d\n" + + "\n" + + "is_savable\x18\b \x01(\bR\tisSavableB\a\n" + + "\x05_metaB\r\n" + + "\v_action_uri\"y\n" + + "!SendPushNotificationToUserRequest\x12\x17\n" + + "\auser_id\x18\x01 \x01(\tR\x06userId\x12;\n" + + "\fnotification\x18\x02 \x01(\v2\x17.proto.PushNotificationR\fnotification\"|\n" + + "\"SendPushNotificationToUsersRequest\x12\x19\n" + + "\buser_ids\x18\x01 \x03(\tR\auserIds\x12;\n" + + "\fnotification\x18\x02 \x01(\v2\x17.proto.PushNotificationR\fnotification\"B\n" + + "#UnsubscribePushNotificationsRequest\x12\x1b\n" + + "\tdevice_id\x18\x01 \x01(\tR\bdeviceId\"e\n" + + "#GetWebsocketConnectionStatusRequest\x12\x1d\n" + + "\tdevice_id\x18\x01 \x01(\tH\x00R\bdeviceId\x12\x19\n" + + "\auser_id\x18\x02 \x01(\tH\x00R\x06userIdB\x04\n" + + "\x02id\"I\n" + + "$GetWebsocketConnectionStatusResponse\x12!\n" + + "\fis_connected\x18\x01 \x01(\bR\visConnected\"E\n" + + "(GetWebsocketConnectionStatusBatchRequest\x12\x19\n" + + "\busers_id\x18\x01 \x03(\tR\ausersId\"\xd1\x01\n" + + ")GetWebsocketConnectionStatusBatchResponse\x12d\n" + + "\fis_connected\x18\x01 \x03(\v2A.proto.GetWebsocketConnectionStatusBatchResponse.IsConnectedEntryR\visConnected\x1a>\n" + + "\x10IsConnectedEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\bR\x05value:\x028\x01\"\x96\x01\n" + + "\x1dReceiveWebSocketPacketRequest\x12.\n" + + "\x06packet\x18\x01 \x01(\v2\x16.proto.WebSocketPacketR\x06packet\x12(\n" + + "\aaccount\x18\x02 \x01(\v2\x0e.proto.AccountR\aaccount\x12\x1b\n" + + "\tdevice_id\x18\x03 \x01(\tR\bdeviceId\"\x92\x01\n" + + "\x17WebSocketConnectedEvent\x12;\n" + + "\n" + + "account_id\x18\x01 \x01(\v2\x1c.google.protobuf.StringValueR\taccountId\x12\x1b\n" + + "\tdevice_id\x18\x02 \x01(\tR\bdeviceId\x12\x1d\n" + + "\n" + + "is_offline\x18\x03 \x01(\bR\tisOffline\"\x95\x01\n" + + "\x1aWebSocketDisconnectedEvent\x12;\n" + + "\n" + + "account_id\x18\x01 \x01(\v2\x1c.google.protobuf.StringValueR\taccountId\x12\x1b\n" + + "\tdevice_id\x18\x02 \x01(\tR\bdeviceId\x12\x1d\n" + + "\n" + + "is_offline\x18\x03 \x01(\bR\tisOffline\"\x93\x01\n" + + "\x14WebSocketPacketEvent\x12;\n" + + "\n" + + "account_id\x18\x01 \x01(\v2\x1c.google.protobuf.StringValueR\taccountId\x12\x1b\n" + + "\tdevice_id\x18\x02 \x01(\tR\bdeviceId\x12!\n" + + "\fpacket_bytes\x18\x03 \x01(\fR\vpacketBytes2\xff\a\n" + + "\vRingService\x12>\n" + + "\tSendEmail\x12\x17.proto.SendEmailRequest\x1a\x16.google.protobuf.Empty\"\x00\x12R\n" + + "\x13PushWebSocketPacket\x12!.proto.PushWebSocketPacketRequest\x1a\x16.google.protobuf.Empty\"\x00\x12`\n" + + "\x1aPushWebSocketPacketToUsers\x12(.proto.PushWebSocketPacketToUsersRequest\x1a\x16.google.protobuf.Empty\"\x00\x12b\n" + + "\x1bPushWebSocketPacketToDevice\x12).proto.PushWebSocketPacketToDeviceRequest\x1a\x16.google.protobuf.Empty\"\x00\x12d\n" + + "\x1cPushWebSocketPacketToDevices\x12*.proto.PushWebSocketPacketToDevicesRequest\x1a\x16.google.protobuf.Empty\"\x00\x12`\n" + + "\x1aSendPushNotificationToUser\x12(.proto.SendPushNotificationToUserRequest\x1a\x16.google.protobuf.Empty\"\x00\x12b\n" + + "\x1bSendPushNotificationToUsers\x12).proto.SendPushNotificationToUsersRequest\x1a\x16.google.protobuf.Empty\"\x00\x12d\n" + + "\x1cUnsubscribePushNotifications\x12*.proto.UnsubscribePushNotificationsRequest\x1a\x16.google.protobuf.Empty\"\x00\x12y\n" + + "\x1cGetWebsocketConnectionStatus\x12*.proto.GetWebsocketConnectionStatusRequest\x1a+.proto.GetWebsocketConnectionStatusResponse\"\x00\x12\x88\x01\n" + + "!GetWebsocketConnectionStatusBatch\x12/.proto.GetWebsocketConnectionStatusBatchRequest\x1a0.proto.GetWebsocketConnectionStatusBatchResponse\"\x002n\n" + + "\x12RingHandlerService\x12X\n" + + "\x16ReceiveWebSocketPacket\x12$.proto.ReceiveWebSocketPacketRequest\x1a\x16.google.protobuf.Empty\"\x00BUZ7git.solsynth.dev/goatworks/turbine/pkg/shared/proto/gen\xaa\x02\x19DysonNetwork.Shared.Protob\x06proto3" + +var ( + file_ring_proto_rawDescOnce sync.Once + file_ring_proto_rawDescData []byte +) + +func file_ring_proto_rawDescGZIP() []byte { + file_ring_proto_rawDescOnce.Do(func() { + file_ring_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ring_proto_rawDesc), len(file_ring_proto_rawDesc))) + }) + return file_ring_proto_rawDescData +} + +var file_ring_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_ring_proto_goTypes = []any{ + (*EmailMessage)(nil), // 0: proto.EmailMessage + (*SendEmailRequest)(nil), // 1: proto.SendEmailRequest + (*WebSocketPacket)(nil), // 2: proto.WebSocketPacket + (*PushWebSocketPacketRequest)(nil), // 3: proto.PushWebSocketPacketRequest + (*PushWebSocketPacketToUsersRequest)(nil), // 4: proto.PushWebSocketPacketToUsersRequest + (*PushWebSocketPacketToDeviceRequest)(nil), // 5: proto.PushWebSocketPacketToDeviceRequest + (*PushWebSocketPacketToDevicesRequest)(nil), // 6: proto.PushWebSocketPacketToDevicesRequest + (*PushNotification)(nil), // 7: proto.PushNotification + (*SendPushNotificationToUserRequest)(nil), // 8: proto.SendPushNotificationToUserRequest + (*SendPushNotificationToUsersRequest)(nil), // 9: proto.SendPushNotificationToUsersRequest + (*UnsubscribePushNotificationsRequest)(nil), // 10: proto.UnsubscribePushNotificationsRequest + (*GetWebsocketConnectionStatusRequest)(nil), // 11: proto.GetWebsocketConnectionStatusRequest + (*GetWebsocketConnectionStatusResponse)(nil), // 12: proto.GetWebsocketConnectionStatusResponse + (*GetWebsocketConnectionStatusBatchRequest)(nil), // 13: proto.GetWebsocketConnectionStatusBatchRequest + (*GetWebsocketConnectionStatusBatchResponse)(nil), // 14: proto.GetWebsocketConnectionStatusBatchResponse + (*ReceiveWebSocketPacketRequest)(nil), // 15: proto.ReceiveWebSocketPacketRequest + (*WebSocketConnectedEvent)(nil), // 16: proto.WebSocketConnectedEvent + (*WebSocketDisconnectedEvent)(nil), // 17: proto.WebSocketDisconnectedEvent + (*WebSocketPacketEvent)(nil), // 18: proto.WebSocketPacketEvent + nil, // 19: proto.GetWebsocketConnectionStatusBatchResponse.IsConnectedEntry + (*wrapperspb.StringValue)(nil), // 20: google.protobuf.StringValue + (*Account)(nil), // 21: proto.Account + (*emptypb.Empty)(nil), // 22: google.protobuf.Empty +} +var file_ring_proto_depIdxs = []int32{ + 0, // 0: proto.SendEmailRequest.email:type_name -> proto.EmailMessage + 20, // 1: proto.WebSocketPacket.error_message:type_name -> google.protobuf.StringValue + 2, // 2: proto.PushWebSocketPacketRequest.packet:type_name -> proto.WebSocketPacket + 2, // 3: proto.PushWebSocketPacketToUsersRequest.packet:type_name -> proto.WebSocketPacket + 2, // 4: proto.PushWebSocketPacketToDeviceRequest.packet:type_name -> proto.WebSocketPacket + 2, // 5: proto.PushWebSocketPacketToDevicesRequest.packet:type_name -> proto.WebSocketPacket + 7, // 6: proto.SendPushNotificationToUserRequest.notification:type_name -> proto.PushNotification + 7, // 7: proto.SendPushNotificationToUsersRequest.notification:type_name -> proto.PushNotification + 19, // 8: proto.GetWebsocketConnectionStatusBatchResponse.is_connected:type_name -> proto.GetWebsocketConnectionStatusBatchResponse.IsConnectedEntry + 2, // 9: proto.ReceiveWebSocketPacketRequest.packet:type_name -> proto.WebSocketPacket + 21, // 10: proto.ReceiveWebSocketPacketRequest.account:type_name -> proto.Account + 20, // 11: proto.WebSocketConnectedEvent.account_id:type_name -> google.protobuf.StringValue + 20, // 12: proto.WebSocketDisconnectedEvent.account_id:type_name -> google.protobuf.StringValue + 20, // 13: proto.WebSocketPacketEvent.account_id:type_name -> google.protobuf.StringValue + 1, // 14: proto.RingService.SendEmail:input_type -> proto.SendEmailRequest + 3, // 15: proto.RingService.PushWebSocketPacket:input_type -> proto.PushWebSocketPacketRequest + 4, // 16: proto.RingService.PushWebSocketPacketToUsers:input_type -> proto.PushWebSocketPacketToUsersRequest + 5, // 17: proto.RingService.PushWebSocketPacketToDevice:input_type -> proto.PushWebSocketPacketToDeviceRequest + 6, // 18: proto.RingService.PushWebSocketPacketToDevices:input_type -> proto.PushWebSocketPacketToDevicesRequest + 8, // 19: proto.RingService.SendPushNotificationToUser:input_type -> proto.SendPushNotificationToUserRequest + 9, // 20: proto.RingService.SendPushNotificationToUsers:input_type -> proto.SendPushNotificationToUsersRequest + 10, // 21: proto.RingService.UnsubscribePushNotifications:input_type -> proto.UnsubscribePushNotificationsRequest + 11, // 22: proto.RingService.GetWebsocketConnectionStatus:input_type -> proto.GetWebsocketConnectionStatusRequest + 13, // 23: proto.RingService.GetWebsocketConnectionStatusBatch:input_type -> proto.GetWebsocketConnectionStatusBatchRequest + 15, // 24: proto.RingHandlerService.ReceiveWebSocketPacket:input_type -> proto.ReceiveWebSocketPacketRequest + 22, // 25: proto.RingService.SendEmail:output_type -> google.protobuf.Empty + 22, // 26: proto.RingService.PushWebSocketPacket:output_type -> google.protobuf.Empty + 22, // 27: proto.RingService.PushWebSocketPacketToUsers:output_type -> google.protobuf.Empty + 22, // 28: proto.RingService.PushWebSocketPacketToDevice:output_type -> google.protobuf.Empty + 22, // 29: proto.RingService.PushWebSocketPacketToDevices:output_type -> google.protobuf.Empty + 22, // 30: proto.RingService.SendPushNotificationToUser:output_type -> google.protobuf.Empty + 22, // 31: proto.RingService.SendPushNotificationToUsers:output_type -> google.protobuf.Empty + 22, // 32: proto.RingService.UnsubscribePushNotifications:output_type -> google.protobuf.Empty + 12, // 33: proto.RingService.GetWebsocketConnectionStatus:output_type -> proto.GetWebsocketConnectionStatusResponse + 14, // 34: proto.RingService.GetWebsocketConnectionStatusBatch:output_type -> proto.GetWebsocketConnectionStatusBatchResponse + 22, // 35: proto.RingHandlerService.ReceiveWebSocketPacket:output_type -> google.protobuf.Empty + 25, // [25:36] is the sub-list for method output_type + 14, // [14:25] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name +} + +func init() { file_ring_proto_init() } +func file_ring_proto_init() { + if File_ring_proto != nil { + return + } + file_account_proto_init() + file_ring_proto_msgTypes[7].OneofWrappers = []any{} + file_ring_proto_msgTypes[11].OneofWrappers = []any{ + (*GetWebsocketConnectionStatusRequest_DeviceId)(nil), + (*GetWebsocketConnectionStatusRequest_UserId)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_ring_proto_rawDesc), len(file_ring_proto_rawDesc)), + NumEnums: 0, + NumMessages: 20, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_ring_proto_goTypes, + DependencyIndexes: file_ring_proto_depIdxs, + MessageInfos: file_ring_proto_msgTypes, + }.Build() + File_ring_proto = out.File + file_ring_proto_goTypes = nil + file_ring_proto_depIdxs = nil +} diff --git a/pkg/shared/proto/ring.proto b/pkg/shared/proto/ring.proto new file mode 100644 index 0000000..5fcccfa --- /dev/null +++ b/pkg/shared/proto/ring.proto @@ -0,0 +1,157 @@ +syntax = "proto3"; + +package proto; + +option csharp_namespace = "DysonNetwork.Shared.Proto"; + +option go_package = "git.solsynth.dev/goatworks/turbine/pkg/shared/proto/gen"; + +import "google/protobuf/empty.proto"; +import "google/protobuf/wrappers.proto"; + +import "account.proto"; + +// RingService provides methods to send various types of notifications. +service RingService { + // Sends an email. + rpc SendEmail(SendEmailRequest) returns (google.protobuf.Empty) {} + + // Pushes a packet to a user via WebSocket. + rpc PushWebSocketPacket(PushWebSocketPacketRequest) returns (google.protobuf.Empty) {} + + // Pushes a packet to a list of users via WebSocket. + rpc PushWebSocketPacketToUsers(PushWebSocketPacketToUsersRequest) returns (google.protobuf.Empty) {} + + // Pushes a packet to a device via WebSocket. + rpc PushWebSocketPacketToDevice(PushWebSocketPacketToDeviceRequest) returns (google.protobuf.Empty) {} + + // Pushes a packet to a list of devices via WebSocket. + rpc PushWebSocketPacketToDevices(PushWebSocketPacketToDevicesRequest) returns (google.protobuf.Empty) {} + + // Sends a push notification to a user. + rpc SendPushNotificationToUser(SendPushNotificationToUserRequest) returns (google.protobuf.Empty) {} + + // Sends a push notification to a list of users. + rpc SendPushNotificationToUsers(SendPushNotificationToUsersRequest) returns (google.protobuf.Empty) {} + + // Unsubscribes a device from push notifications. + rpc UnsubscribePushNotifications(UnsubscribePushNotificationsRequest) returns (google.protobuf.Empty) {} + + // Gets the WebSocket connection status for a device or user. + rpc GetWebsocketConnectionStatus(GetWebsocketConnectionStatusRequest) returns (GetWebsocketConnectionStatusResponse) {} + + rpc GetWebsocketConnectionStatusBatch(GetWebsocketConnectionStatusBatchRequest) returns (GetWebsocketConnectionStatusBatchResponse) {} +} + +// Represents an email message. +message EmailMessage { + string to_name = 1; + string to_address = 2; + string subject = 3; + string body = 4; +} + +message SendEmailRequest { + EmailMessage email = 1; +} + +// Represents a WebSocket packet. +message WebSocketPacket { + string type = 1; + bytes data = 2; + google.protobuf.StringValue error_message = 3; +} + +message PushWebSocketPacketRequest { + string user_id = 1; + WebSocketPacket packet = 2; +} + +message PushWebSocketPacketToUsersRequest { + repeated string user_ids = 1; + WebSocketPacket packet = 2; +} + +message PushWebSocketPacketToDeviceRequest { + string device_id = 1; + WebSocketPacket packet = 2; +} + +message PushWebSocketPacketToDevicesRequest { + repeated string device_ids = 1; + WebSocketPacket packet = 2; +} + +// Represents a push notification. +message PushNotification { + string topic = 1; + string title = 2; + string subtitle = 3; + string body = 4; + optional bytes meta = 5; + optional string action_uri = 6; + bool is_silent = 7; + bool is_savable = 8; +} + +message SendPushNotificationToUserRequest { + string user_id = 1; + PushNotification notification = 2; +} + +message SendPushNotificationToUsersRequest { + repeated string user_ids = 1; + PushNotification notification = 2; +} + +message UnsubscribePushNotificationsRequest { + string device_id = 1; +} + +message GetWebsocketConnectionStatusRequest { + oneof id { + string device_id = 1; + string user_id = 2; + } +} + +message GetWebsocketConnectionStatusResponse { + bool is_connected = 1; +} + +message GetWebsocketConnectionStatusBatchRequest { + repeated string users_id = 1; +} + +message GetWebsocketConnectionStatusBatchResponse { + map is_connected = 1; +} + +service RingHandlerService { + rpc ReceiveWebSocketPacket(ReceiveWebSocketPacketRequest) returns (google.protobuf.Empty) {} +} + +message ReceiveWebSocketPacketRequest { + WebSocketPacket packet = 1; + Account account = 2; + string device_id = 3; +} + +// WebSocket event messages for NATS publishing +message WebSocketConnectedEvent { + google.protobuf.StringValue account_id = 1; + string device_id = 2; + bool is_offline = 3; +} + +message WebSocketDisconnectedEvent { + google.protobuf.StringValue account_id = 1; + string device_id = 2; + bool is_offline = 3; +} + +message WebSocketPacketEvent { + google.protobuf.StringValue account_id = 1; + string device_id = 2; + bytes packet_bytes = 3; +} diff --git a/pkg/shared/proto/ring_grpc.pb.go b/pkg/shared/proto/ring_grpc.pb.go new file mode 100644 index 0000000..579ffa3 --- /dev/null +++ b/pkg/shared/proto/ring_grpc.pb.go @@ -0,0 +1,588 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.0 +// - protoc v6.33.1 +// source: ring.proto + +package gen + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + emptypb "google.golang.org/protobuf/types/known/emptypb" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + RingService_SendEmail_FullMethodName = "/proto.RingService/SendEmail" + RingService_PushWebSocketPacket_FullMethodName = "/proto.RingService/PushWebSocketPacket" + RingService_PushWebSocketPacketToUsers_FullMethodName = "/proto.RingService/PushWebSocketPacketToUsers" + RingService_PushWebSocketPacketToDevice_FullMethodName = "/proto.RingService/PushWebSocketPacketToDevice" + RingService_PushWebSocketPacketToDevices_FullMethodName = "/proto.RingService/PushWebSocketPacketToDevices" + RingService_SendPushNotificationToUser_FullMethodName = "/proto.RingService/SendPushNotificationToUser" + RingService_SendPushNotificationToUsers_FullMethodName = "/proto.RingService/SendPushNotificationToUsers" + RingService_UnsubscribePushNotifications_FullMethodName = "/proto.RingService/UnsubscribePushNotifications" + RingService_GetWebsocketConnectionStatus_FullMethodName = "/proto.RingService/GetWebsocketConnectionStatus" + RingService_GetWebsocketConnectionStatusBatch_FullMethodName = "/proto.RingService/GetWebsocketConnectionStatusBatch" +) + +// RingServiceClient is the client API for RingService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// RingService provides methods to send various types of notifications. +type RingServiceClient interface { + // Sends an email. + SendEmail(ctx context.Context, in *SendEmailRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Pushes a packet to a user via WebSocket. + PushWebSocketPacket(ctx context.Context, in *PushWebSocketPacketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Pushes a packet to a list of users via WebSocket. + PushWebSocketPacketToUsers(ctx context.Context, in *PushWebSocketPacketToUsersRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Pushes a packet to a device via WebSocket. + PushWebSocketPacketToDevice(ctx context.Context, in *PushWebSocketPacketToDeviceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Pushes a packet to a list of devices via WebSocket. + PushWebSocketPacketToDevices(ctx context.Context, in *PushWebSocketPacketToDevicesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Sends a push notification to a user. + SendPushNotificationToUser(ctx context.Context, in *SendPushNotificationToUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Sends a push notification to a list of users. + SendPushNotificationToUsers(ctx context.Context, in *SendPushNotificationToUsersRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Unsubscribes a device from push notifications. + UnsubscribePushNotifications(ctx context.Context, in *UnsubscribePushNotificationsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // Gets the WebSocket connection status for a device or user. + GetWebsocketConnectionStatus(ctx context.Context, in *GetWebsocketConnectionStatusRequest, opts ...grpc.CallOption) (*GetWebsocketConnectionStatusResponse, error) + GetWebsocketConnectionStatusBatch(ctx context.Context, in *GetWebsocketConnectionStatusBatchRequest, opts ...grpc.CallOption) (*GetWebsocketConnectionStatusBatchResponse, error) +} + +type ringServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewRingServiceClient(cc grpc.ClientConnInterface) RingServiceClient { + return &ringServiceClient{cc} +} + +func (c *ringServiceClient) SendEmail(ctx context.Context, in *SendEmailRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RingService_SendEmail_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *ringServiceClient) PushWebSocketPacket(ctx context.Context, in *PushWebSocketPacketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RingService_PushWebSocketPacket_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *ringServiceClient) PushWebSocketPacketToUsers(ctx context.Context, in *PushWebSocketPacketToUsersRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RingService_PushWebSocketPacketToUsers_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *ringServiceClient) PushWebSocketPacketToDevice(ctx context.Context, in *PushWebSocketPacketToDeviceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RingService_PushWebSocketPacketToDevice_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *ringServiceClient) PushWebSocketPacketToDevices(ctx context.Context, in *PushWebSocketPacketToDevicesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RingService_PushWebSocketPacketToDevices_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *ringServiceClient) SendPushNotificationToUser(ctx context.Context, in *SendPushNotificationToUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RingService_SendPushNotificationToUser_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *ringServiceClient) SendPushNotificationToUsers(ctx context.Context, in *SendPushNotificationToUsersRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RingService_SendPushNotificationToUsers_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *ringServiceClient) UnsubscribePushNotifications(ctx context.Context, in *UnsubscribePushNotificationsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RingService_UnsubscribePushNotifications_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *ringServiceClient) GetWebsocketConnectionStatus(ctx context.Context, in *GetWebsocketConnectionStatusRequest, opts ...grpc.CallOption) (*GetWebsocketConnectionStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetWebsocketConnectionStatusResponse) + err := c.cc.Invoke(ctx, RingService_GetWebsocketConnectionStatus_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *ringServiceClient) GetWebsocketConnectionStatusBatch(ctx context.Context, in *GetWebsocketConnectionStatusBatchRequest, opts ...grpc.CallOption) (*GetWebsocketConnectionStatusBatchResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetWebsocketConnectionStatusBatchResponse) + err := c.cc.Invoke(ctx, RingService_GetWebsocketConnectionStatusBatch_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RingServiceServer is the server API for RingService service. +// All implementations must embed UnimplementedRingServiceServer +// for forward compatibility. +// +// RingService provides methods to send various types of notifications. +type RingServiceServer interface { + // Sends an email. + SendEmail(context.Context, *SendEmailRequest) (*emptypb.Empty, error) + // Pushes a packet to a user via WebSocket. + PushWebSocketPacket(context.Context, *PushWebSocketPacketRequest) (*emptypb.Empty, error) + // Pushes a packet to a list of users via WebSocket. + PushWebSocketPacketToUsers(context.Context, *PushWebSocketPacketToUsersRequest) (*emptypb.Empty, error) + // Pushes a packet to a device via WebSocket. + PushWebSocketPacketToDevice(context.Context, *PushWebSocketPacketToDeviceRequest) (*emptypb.Empty, error) + // Pushes a packet to a list of devices via WebSocket. + PushWebSocketPacketToDevices(context.Context, *PushWebSocketPacketToDevicesRequest) (*emptypb.Empty, error) + // Sends a push notification to a user. + SendPushNotificationToUser(context.Context, *SendPushNotificationToUserRequest) (*emptypb.Empty, error) + // Sends a push notification to a list of users. + SendPushNotificationToUsers(context.Context, *SendPushNotificationToUsersRequest) (*emptypb.Empty, error) + // Unsubscribes a device from push notifications. + UnsubscribePushNotifications(context.Context, *UnsubscribePushNotificationsRequest) (*emptypb.Empty, error) + // Gets the WebSocket connection status for a device or user. + GetWebsocketConnectionStatus(context.Context, *GetWebsocketConnectionStatusRequest) (*GetWebsocketConnectionStatusResponse, error) + GetWebsocketConnectionStatusBatch(context.Context, *GetWebsocketConnectionStatusBatchRequest) (*GetWebsocketConnectionStatusBatchResponse, error) + mustEmbedUnimplementedRingServiceServer() +} + +// UnimplementedRingServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedRingServiceServer struct{} + +func (UnimplementedRingServiceServer) SendEmail(context.Context, *SendEmailRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method SendEmail not implemented") +} +func (UnimplementedRingServiceServer) PushWebSocketPacket(context.Context, *PushWebSocketPacketRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method PushWebSocketPacket not implemented") +} +func (UnimplementedRingServiceServer) PushWebSocketPacketToUsers(context.Context, *PushWebSocketPacketToUsersRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method PushWebSocketPacketToUsers not implemented") +} +func (UnimplementedRingServiceServer) PushWebSocketPacketToDevice(context.Context, *PushWebSocketPacketToDeviceRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method PushWebSocketPacketToDevice not implemented") +} +func (UnimplementedRingServiceServer) PushWebSocketPacketToDevices(context.Context, *PushWebSocketPacketToDevicesRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method PushWebSocketPacketToDevices not implemented") +} +func (UnimplementedRingServiceServer) SendPushNotificationToUser(context.Context, *SendPushNotificationToUserRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method SendPushNotificationToUser not implemented") +} +func (UnimplementedRingServiceServer) SendPushNotificationToUsers(context.Context, *SendPushNotificationToUsersRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method SendPushNotificationToUsers not implemented") +} +func (UnimplementedRingServiceServer) UnsubscribePushNotifications(context.Context, *UnsubscribePushNotificationsRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method UnsubscribePushNotifications not implemented") +} +func (UnimplementedRingServiceServer) GetWebsocketConnectionStatus(context.Context, *GetWebsocketConnectionStatusRequest) (*GetWebsocketConnectionStatusResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetWebsocketConnectionStatus not implemented") +} +func (UnimplementedRingServiceServer) GetWebsocketConnectionStatusBatch(context.Context, *GetWebsocketConnectionStatusBatchRequest) (*GetWebsocketConnectionStatusBatchResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetWebsocketConnectionStatusBatch not implemented") +} +func (UnimplementedRingServiceServer) mustEmbedUnimplementedRingServiceServer() {} +func (UnimplementedRingServiceServer) testEmbeddedByValue() {} + +// UnsafeRingServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RingServiceServer will +// result in compilation errors. +type UnsafeRingServiceServer interface { + mustEmbedUnimplementedRingServiceServer() +} + +func RegisterRingServiceServer(s grpc.ServiceRegistrar, srv RingServiceServer) { + // If the following call panics, it indicates UnimplementedRingServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&RingService_ServiceDesc, srv) +} + +func _RingService_SendEmail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SendEmailRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RingServiceServer).SendEmail(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RingService_SendEmail_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RingServiceServer).SendEmail(ctx, req.(*SendEmailRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RingService_PushWebSocketPacket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PushWebSocketPacketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RingServiceServer).PushWebSocketPacket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RingService_PushWebSocketPacket_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RingServiceServer).PushWebSocketPacket(ctx, req.(*PushWebSocketPacketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RingService_PushWebSocketPacketToUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PushWebSocketPacketToUsersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RingServiceServer).PushWebSocketPacketToUsers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RingService_PushWebSocketPacketToUsers_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RingServiceServer).PushWebSocketPacketToUsers(ctx, req.(*PushWebSocketPacketToUsersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RingService_PushWebSocketPacketToDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PushWebSocketPacketToDeviceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RingServiceServer).PushWebSocketPacketToDevice(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RingService_PushWebSocketPacketToDevice_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RingServiceServer).PushWebSocketPacketToDevice(ctx, req.(*PushWebSocketPacketToDeviceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RingService_PushWebSocketPacketToDevices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PushWebSocketPacketToDevicesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RingServiceServer).PushWebSocketPacketToDevices(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RingService_PushWebSocketPacketToDevices_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RingServiceServer).PushWebSocketPacketToDevices(ctx, req.(*PushWebSocketPacketToDevicesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RingService_SendPushNotificationToUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SendPushNotificationToUserRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RingServiceServer).SendPushNotificationToUser(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RingService_SendPushNotificationToUser_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RingServiceServer).SendPushNotificationToUser(ctx, req.(*SendPushNotificationToUserRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RingService_SendPushNotificationToUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SendPushNotificationToUsersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RingServiceServer).SendPushNotificationToUsers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RingService_SendPushNotificationToUsers_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RingServiceServer).SendPushNotificationToUsers(ctx, req.(*SendPushNotificationToUsersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RingService_UnsubscribePushNotifications_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnsubscribePushNotificationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RingServiceServer).UnsubscribePushNotifications(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RingService_UnsubscribePushNotifications_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RingServiceServer).UnsubscribePushNotifications(ctx, req.(*UnsubscribePushNotificationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RingService_GetWebsocketConnectionStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetWebsocketConnectionStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RingServiceServer).GetWebsocketConnectionStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RingService_GetWebsocketConnectionStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RingServiceServer).GetWebsocketConnectionStatus(ctx, req.(*GetWebsocketConnectionStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RingService_GetWebsocketConnectionStatusBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetWebsocketConnectionStatusBatchRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RingServiceServer).GetWebsocketConnectionStatusBatch(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RingService_GetWebsocketConnectionStatusBatch_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RingServiceServer).GetWebsocketConnectionStatusBatch(ctx, req.(*GetWebsocketConnectionStatusBatchRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// RingService_ServiceDesc is the grpc.ServiceDesc for RingService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var RingService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "proto.RingService", + HandlerType: (*RingServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SendEmail", + Handler: _RingService_SendEmail_Handler, + }, + { + MethodName: "PushWebSocketPacket", + Handler: _RingService_PushWebSocketPacket_Handler, + }, + { + MethodName: "PushWebSocketPacketToUsers", + Handler: _RingService_PushWebSocketPacketToUsers_Handler, + }, + { + MethodName: "PushWebSocketPacketToDevice", + Handler: _RingService_PushWebSocketPacketToDevice_Handler, + }, + { + MethodName: "PushWebSocketPacketToDevices", + Handler: _RingService_PushWebSocketPacketToDevices_Handler, + }, + { + MethodName: "SendPushNotificationToUser", + Handler: _RingService_SendPushNotificationToUser_Handler, + }, + { + MethodName: "SendPushNotificationToUsers", + Handler: _RingService_SendPushNotificationToUsers_Handler, + }, + { + MethodName: "UnsubscribePushNotifications", + Handler: _RingService_UnsubscribePushNotifications_Handler, + }, + { + MethodName: "GetWebsocketConnectionStatus", + Handler: _RingService_GetWebsocketConnectionStatus_Handler, + }, + { + MethodName: "GetWebsocketConnectionStatusBatch", + Handler: _RingService_GetWebsocketConnectionStatusBatch_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "ring.proto", +} + +const ( + RingHandlerService_ReceiveWebSocketPacket_FullMethodName = "/proto.RingHandlerService/ReceiveWebSocketPacket" +) + +// RingHandlerServiceClient is the client API for RingHandlerService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type RingHandlerServiceClient interface { + ReceiveWebSocketPacket(ctx context.Context, in *ReceiveWebSocketPacketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type ringHandlerServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewRingHandlerServiceClient(cc grpc.ClientConnInterface) RingHandlerServiceClient { + return &ringHandlerServiceClient{cc} +} + +func (c *ringHandlerServiceClient) ReceiveWebSocketPacket(ctx context.Context, in *ReceiveWebSocketPacketRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, RingHandlerService_ReceiveWebSocketPacket_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RingHandlerServiceServer is the server API for RingHandlerService service. +// All implementations must embed UnimplementedRingHandlerServiceServer +// for forward compatibility. +type RingHandlerServiceServer interface { + ReceiveWebSocketPacket(context.Context, *ReceiveWebSocketPacketRequest) (*emptypb.Empty, error) + mustEmbedUnimplementedRingHandlerServiceServer() +} + +// UnimplementedRingHandlerServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedRingHandlerServiceServer struct{} + +func (UnimplementedRingHandlerServiceServer) ReceiveWebSocketPacket(context.Context, *ReceiveWebSocketPacketRequest) (*emptypb.Empty, error) { + return nil, status.Error(codes.Unimplemented, "method ReceiveWebSocketPacket not implemented") +} +func (UnimplementedRingHandlerServiceServer) mustEmbedUnimplementedRingHandlerServiceServer() {} +func (UnimplementedRingHandlerServiceServer) testEmbeddedByValue() {} + +// UnsafeRingHandlerServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RingHandlerServiceServer will +// result in compilation errors. +type UnsafeRingHandlerServiceServer interface { + mustEmbedUnimplementedRingHandlerServiceServer() +} + +func RegisterRingHandlerServiceServer(s grpc.ServiceRegistrar, srv RingHandlerServiceServer) { + // If the following call panics, it indicates UnimplementedRingHandlerServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&RingHandlerService_ServiceDesc, srv) +} + +func _RingHandlerService_ReceiveWebSocketPacket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReceiveWebSocketPacketRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RingHandlerServiceServer).ReceiveWebSocketPacket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RingHandlerService_ReceiveWebSocketPacket_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RingHandlerServiceServer).ReceiveWebSocketPacket(ctx, req.(*ReceiveWebSocketPacketRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// RingHandlerService_ServiceDesc is the grpc.ServiceDesc for RingHandlerService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var RingHandlerService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "proto.RingHandlerService", + HandlerType: (*RingHandlerServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ReceiveWebSocketPacket", + Handler: _RingHandlerService_ReceiveWebSocketPacket_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "ring.proto", +} diff --git a/pkg/shared/proto/wallet.proto b/pkg/shared/proto/wallet.proto new file mode 100644 index 0000000..83cf0e4 --- /dev/null +++ b/pkg/shared/proto/wallet.proto @@ -0,0 +1,297 @@ +syntax = "proto3"; + +package proto; + +option csharp_namespace = "DysonNetwork.Shared.Proto"; + +option go_package = "git.solsynth.dev/goatworks/turbine/pkg/shared/proto/gen"; + +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "google/protobuf/duration.proto"; + +message Wallet { + string id = 1; + repeated WalletPocket pockets = 2; + string account_id = 3; +} + +message WalletPocket { + string id = 1; + string currency = 2; + // Using string for decimal to avoid precision loss. + string amount = 3; + string wallet_id = 4; +} + +enum FundSplitType { + FUND_SPLIT_TYPE_UNSPECIFIED = 0; + FUND_SPLIT_TYPE_EVEN = 1; + FUND_SPLIT_TYPE_RANDOM = 2; +} + +enum FundStatus { + FUND_STATUS_UNSPECIFIED = 0; + FUND_STATUS_CREATED = 1; + FUND_STATUS_PARTIALLY_RECEIVED = 2; + FUND_STATUS_FULLY_RECEIVED = 3; + FUND_STATUS_EXPIRED = 4; + FUND_STATUS_REFUNDED = 5; +} + +message WalletFund { + string id = 1; + string currency = 2; + string total_amount = 3; + string remaining_amount = 10; + FundSplitType split_type = 4; + FundStatus status = 5; + google.protobuf.StringValue message = 6; + string creator_account_id = 7; + google.protobuf.Timestamp expired_at = 8; + repeated WalletFundRecipient recipients = 9; +} + +message WalletFundRecipient { + string id = 1; + string fund_id = 2; + string recipient_account_id = 3; + string amount = 4; + bool is_received = 5; + optional google.protobuf.Timestamp received_at = 6; +} + +enum SubscriptionStatus { + // Using proto3 enum naming convention + SUBSCRIPTION_STATUS_UNSPECIFIED = 0; + SUBSCRIPTION_STATUS_UNPAID = 1; + SUBSCRIPTION_STATUS_ACTIVE = 2; + SUBSCRIPTION_STATUS_EXPIRED = 3; + SUBSCRIPTION_STATUS_CANCELLED = 4; +} + +enum GiftStatus { + // Using proto3 enum naming convention + GIFT_STATUS_UNSPECIFIED = 0; + GIFT_STATUS_CREATED = 1; + GIFT_STATUS_SENT = 2; + GIFT_STATUS_REDEEMED = 3; + GIFT_STATUS_EXPIRED = 4; + GIFT_STATUS_CANCELLED = 5; +} + +message Subscription { + string id = 1; + google.protobuf.Timestamp begun_at = 2; + optional google.protobuf.Timestamp ended_at = 3; + string identifier = 4; + bool is_active = 5; + bool is_free_trial = 6; + SubscriptionStatus status = 7; + string payment_method = 8; + PaymentDetails payment_details = 9; + // Using string for decimal to avoid precision loss. + string base_price = 10; + optional string coupon_id = 11; + optional Coupon coupon = 12; + optional google.protobuf.Timestamp renewal_at = 13; + string account_id = 14; + bool is_available = 15; + // Using string for decimal to avoid precision loss. + string final_price = 16; + google.protobuf.Timestamp created_at = 17; + google.protobuf.Timestamp updated_at = 18; +} + +message SubscriptionReferenceObject { + string id = 1; + string identifier = 2; + google.protobuf.Timestamp begun_at = 3; + optional google.protobuf.Timestamp ended_at = 4; + bool is_active = 5; + bool is_available = 6; + bool is_free_trial = 7; + SubscriptionStatus status = 8; + // Using string for decimal to avoid precision loss. + string base_price = 9; + // Using string for decimal to avoid precision loss. + string final_price = 10; + optional google.protobuf.Timestamp renewal_at = 11; + string account_id = 12; + optional string display_name = 13; + google.protobuf.Timestamp created_at = 14; + google.protobuf.Timestamp updated_at = 15; +} + +message PaymentDetails { + string currency = 1; + optional string order_id = 2; +} + +message Coupon { + string id = 1; + optional string identifier = 2; + optional string code = 3; + optional google.protobuf.Timestamp affected_at = 4; + optional google.protobuf.Timestamp expired_at = 5; + // Using string for decimal to avoid precision loss. + optional string discount_amount = 6; + optional google.protobuf.DoubleValue discount_rate = 7; + optional google.protobuf.Int32Value max_usage = 8; + google.protobuf.Timestamp created_at = 9; + google.protobuf.Timestamp updated_at = 10; +} + +message Gift { + string id = 1; + string gifter_id = 2; + optional string recipient_id = 3; + string gift_code = 4; + optional string message = 5; + string subscription_identifier = 6; + string base_price = 7; + string final_price = 8; + GiftStatus status = 9; + optional google.protobuf.Timestamp redeemed_at = 10; + optional string redeemer_id = 11; + optional string subscription_id = 12; + google.protobuf.Timestamp expires_at = 13; + bool is_open_gift = 14; + string payment_method = 15; + PaymentDetails payment_details = 16; + optional string coupon_id = 17; + optional Coupon coupon = 18; + bool is_redeemable = 19; + bool is_expired = 20; + google.protobuf.Timestamp created_at = 21; + google.protobuf.Timestamp updated_at = 22; +} + +service WalletService { + rpc GetWallet(GetWalletRequest) returns (Wallet); + rpc CreateWallet(CreateWalletRequest) returns (Wallet); + rpc GetOrCreateWalletPocket(GetOrCreateWalletPocketRequest) returns (WalletPocket); +} + +message GetWalletRequest { + string account_id = 1; +} + +message CreateWalletRequest { + string account_id = 1; +} + +message GetOrCreateWalletPocketRequest { + string wallet_id = 1; + string currency = 2; + optional string initial_amount = 3; +} + +service PaymentService { + rpc CreateOrder(CreateOrderRequest) returns (Order); + rpc CreateTransactionWithAccount(CreateTransactionWithAccountRequest) returns (Transaction); + rpc CreateTransaction(CreateTransactionRequest) returns (Transaction); + rpc CancelOrder(CancelOrderRequest) returns (Order); + rpc RefundOrder(RefundOrderRequest) returns (RefundOrderResponse); + rpc Transfer(TransferRequest) returns (Transaction); + rpc GetWalletFund(GetWalletFundRequest) returns (WalletFund); +} + +message CreateOrderRequest { + optional string payee_wallet_id = 1; + string currency = 2; + string amount = 3; + optional google.protobuf.Duration expiration = 4; + optional string app_identifier = 5; + optional string product_identifier = 8; + // Using bytes for meta to represent JSON. + optional bytes meta = 6; + optional string remarks = 9; + bool reuseable = 7; +} + +message Order { + string id = 1; + google.protobuf.StringValue payee_wallet_id = 2; + google.protobuf.StringValue currency = 3; + string amount = 4; + google.protobuf.Timestamp expired_at = 5; + google.protobuf.StringValue app_identifier = 6; + google.protobuf.StringValue product_identifier = 12; + // Using bytes for meta to represent JSON. + optional bytes meta = 7; + OrderStatus status = 8; + google.protobuf.StringValue transaction_id = 9; + optional Transaction transaction = 10; + google.protobuf.StringValue remarks = 11; +} + +enum OrderStatus { + ORDER_STATUS_UNSPECIFIED = 0; + ORDER_STATUS_UNPAID = 1; + ORDER_STATUS_PAID = 2; + ORDER_STATUS_EXPIRED = 3; + ORDER_STATUS_CANCELLED = 4; + ORDER_STATUS_FINISHED = 5; +} + +message Transaction { + string id = 1; + google.protobuf.StringValue payer_wallet_id = 2; + google.protobuf.StringValue payee_wallet_id = 3; + string currency = 4; + string amount = 5; + google.protobuf.StringValue remarks = 6; + TransactionType type = 7; + google.protobuf.Timestamp created_at = 8; + google.protobuf.Timestamp updated_at = 9; +} + +enum TransactionType { + TRANSACTION_TYPE_UNSPECIFIED = 0; + TRANSACTION_TYPE_SYSTEM = 1; + TRANSACTION_TYPE_ORDER = 2; + TRANSACTION_TYPE_TRANSFER = 3; +} + +message CreateTransactionWithAccountRequest { + google.protobuf.StringValue payer_account_id = 1; + google.protobuf.StringValue payee_account_id = 2; + string currency = 3; + string amount = 4; + google.protobuf.StringValue remarks = 5; + TransactionType type = 6; +} + +message CreateTransactionRequest { + google.protobuf.StringValue payer_wallet_id = 1; + google.protobuf.StringValue payee_wallet_id = 2; + string currency = 3; + string amount = 4; + google.protobuf.StringValue remarks = 5; + TransactionType type = 6; +} + +message CancelOrderRequest { + string order_id = 1; +} + +message RefundOrderRequest { + string order_id = 1; +} + +message RefundOrderResponse { + Order order = 1; + Transaction refund_transaction = 2; +} + +message TransferRequest { + string payer_account_id = 1; + string payee_account_id = 2; + string currency = 3; + string amount = 4; +} + +message GetWalletFundRequest { + string fund_id = 1; +}