diff --git a/go.mod b/go.mod index d61cf34..6774f17 100644 --- a/go.mod +++ b/go.mod @@ -5,12 +5,12 @@ go 1.23.0 toolchain go1.23.1 require ( - github.com/envoyproxy/go-control-plane/envoy v1.32.2 + github.com/envoyproxy/go-control-plane/envoy v1.32.3 github.com/envoyproxy/protoc-gen-validate v1.1.0 - github.com/pomerium/pomerium v0.28.0 + github.com/pomerium/pomerium v0.28.1-0.20250122205906-0bd6d8cc8315 github.com/stretchr/testify v1.10.0 google.golang.org/grpc v1.69.2 - google.golang.org/protobuf v1.36.1 + google.golang.org/protobuf v1.36.2 ) require ( @@ -18,7 +18,7 @@ require ( github.com/caddyserver/certmagic v0.21.4 // indirect github.com/caddyserver/zerossl v0.1.3 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78 // indirect + github.com/cncf/xds/go v0.0.0-20241223141626-cff3c89139a3 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/go-jose/go-jose/v3 v3.0.3 // indirect github.com/google/uuid v1.6.0 // indirect @@ -27,7 +27,7 @@ require ( github.com/hashicorp/go-set/v3 v3.0.0 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/jxskiss/base62 v1.1.0 // indirect - github.com/klauspost/cpuid/v2 v2.2.8 // indirect + github.com/klauspost/cpuid/v2 v2.2.9 // indirect github.com/libdns/libdns v0.2.2 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect @@ -41,14 +41,14 @@ require ( github.com/zeebo/blake3 v0.2.4 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/crypto v0.28.0 // indirect + golang.org/x/crypto v0.31.0 // indirect golang.org/x/mod v0.20.0 // indirect - golang.org/x/net v0.30.0 // indirect - golang.org/x/sync v0.8.0 // indirect - golang.org/x/sys v0.26.0 // indirect - golang.org/x/text v0.19.0 // indirect + golang.org/x/net v0.33.0 // indirect + golang.org/x/sync v0.10.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect golang.org/x/tools v0.24.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 9611ba0..6554538 100644 --- a/go.sum +++ b/go.sum @@ -1,19 +1,11 @@ cel.dev/expr v0.16.2 h1:RwRhoH17VhAu9U5CMvMhH1PDVgf0tuz9FT+24AfMLfU= cel.dev/expr v0.16.2/go.mod h1:gXngZQMkWJoSbE8mOzehJlXQyubn/Vg0vR9/F3W7iw8= -contrib.go.opencensus.io/exporter/jaeger v0.2.1 h1:yGBYzYMewVL0yO9qqJv3Z5+IRhPdU7e9o/2oKpX4YvI= -contrib.go.opencensus.io/exporter/jaeger v0.2.1/go.mod h1:Y8IsLgdxqh1QxYxPC5IgXVmBaeLUeQFfBeBi9PbeZd0= contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ= -contrib.go.opencensus.io/exporter/zipkin v0.1.2 h1:YqE293IZrKtqPnpwDPH/lOqTWD/s3Iwabycam74JV3g= -contrib.go.opencensus.io/exporter/zipkin v0.1.2/go.mod h1:mP5xM3rrgOjpn79MM8fZbj3gsxcuytSqtH0dxSWW1RE= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/DataDog/datadog-go v3.5.0+incompatible h1:AShr9cqkF+taHjyQgcBcQUt/ZNK+iPq4ROaZwSX5c/U= -github.com/DataDog/datadog-go v3.5.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/opencensus-go-exporter-datadog v0.0.0-20200406135749-5c268882acf0 h1:Y6HFfo8UuntPOpfmUmLb0o3MNYKfUuH2aNmvypsDbY4= -github.com/DataDog/opencensus-go-exporter-datadog v0.0.0-20200406135749-5c268882acf0/go.mod h1:/VV3EFO/hTNQZHAqaj+CPGy2+ioFrP4EX3iRwozubhQ= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8= @@ -32,8 +24,8 @@ github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UF github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cloudflare/circl v1.5.0 h1:hxIWksrX6XN5a1L2TI/h53AGPhNHoUBo+TD1ms9+pys= github.com/cloudflare/circl v1.5.0/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs= -github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78 h1:QVw89YDxXxEe+l8gU8ETbOasdwEV+avkR75ZzsVV9WI= -github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= +github.com/cncf/xds/go v0.0.0-20241223141626-cff3c89139a3 h1:boJj011Hh+874zpIySeApCX4GeOjPl9qhRF3QuIZq+Q= +github.com/cncf/xds/go v0.0.0-20241223141626-cff3c89139a3/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= @@ -48,22 +40,22 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/docker v27.3.1+incompatible h1:KttF0XoteNTicmUtBO0L2tP+J7FGRFTjaEF4k6WdhfI= -github.com/docker/docker v27.3.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v27.4.1+incompatible h1:ZJvcY7gfwHn1JF48PfbyXg7Jyt9ZCWDW+GGXOIxEwp4= +github.com/docker/docker v27.4.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/envoyproxy/go-control-plane/envoy v1.32.2 h1:zidqwmijfcbyKqVxjQDFx042PgX+p9U+/fu/f9VtSk8= -github.com/envoyproxy/go-control-plane/envoy v1.32.2/go.mod h1:eR2SOX2IedqlPvmiKjUH7Wu//S602JKI7HPC/L3SRq8= +github.com/envoyproxy/go-control-plane/envoy v1.32.3 h1:hVEaommgvzTjTd4xCaFd+kEQ2iYBtGxP6luyLrx6uOk= +github.com/envoyproxy/go-control-plane/envoy v1.32.3/go.mod h1:F6hWupPfh75TBXGKA++MCT/CZHFq5r9/uwt/kQYkZfE= github.com/envoyproxy/protoc-gen-validate v1.1.0 h1:tntQDh69XqOCOZsDz0lVJQez/2L6Uu2PdjCQwWCJ3bM= github.com/envoyproxy/protoc-gen-validate v1.1.0/go.mod h1:sXRDRVmzEbkM7CVcM06s9shE/m23dg3wzjl0UWqJ2q4= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= -github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= +github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A= github.com/go-ini/ini v1.67.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-jose/go-jose/v3 v3.0.3 h1:fFKWeig/irsp7XD2zBxvnmA/XaRWp5V3CBsZXJF7G7k= @@ -85,8 +77,8 @@ github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PU github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ= +github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -104,6 +96,8 @@ github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyC github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 h1:TmHmbvxPmaegwhDubVz0lICL0J5Ka2vwTzhoePEXsGE= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0/go.mod h1:qztMSjm835F2bXf+5HKAPIS5qsmQDqZna/PgVt4rWtI= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -119,16 +113,16 @@ github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsI 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.1 h1:x7SYsPBYDkHDksogeSmZZ5xzThcTgRz++I5E+ePFUcs= -github.com/jackc/pgx/v5 v5.7.1/go.mod h1:e7O26IywZZ+naJtWWos6i6fvWK+29etgITqrqHLfoZA= +github.com/jackc/pgx/v5 v5.7.2 h1:mLoDLV6sonKlvjIEsV56SkWNCnuNv531l94GaIzO+XI= +github.com/jackc/pgx/v5 v5.7.2/go.mod h1:ncY89UGWxg82EykZUwSpUKEfccBGGYq1xjrOpsbsfGQ= 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/jxskiss/base62 v1.1.0 h1:A5zbF8v8WXx2xixnAKD2w+abC+sIzYJX+nxmhA6HWFw= github.com/jxskiss/base62 v1.1.0/go.mod h1:HhWAlUXvxKThfOlZbcuFzsqwtF5TcqS9ru3y5GfjWAc= github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= -github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM= -github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/klauspost/cpuid/v2 v2.2.9 h1:66ze0taIn2H33fBvCkXuv9BmCwDfafmiIVpKV9kKGuY= +github.com/klauspost/cpuid/v2 v2.2.9/go.mod h1:rqkxqrZ1EhYM9G+hXH7YdowN5R5RGN6NK4QwQ3WMXF8= 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= @@ -151,8 +145,8 @@ github.com/miekg/dns v1.1.62 h1:cN8OuEF1/x5Rq6Np+h1epln8OiyPWV+lROx9LxcGgIQ= github.com/miekg/dns v1.1.62/go.mod h1:mvDlcItzm+br7MToIKqkglaGhlFMHJ9DTNNWONWXbNQ= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= -github.com/minio/minio-go/v7 v7.0.80 h1:2mdUHXEykRdY/BigLt3Iuu1otL0JTogT0Nmltg0wujk= -github.com/minio/minio-go/v7 v7.0.80/go.mod h1:84gmIilaX4zcvAWWzJ5Z1WI5axN+hAbM5w25xf8xvC0= +github.com/minio/minio-go/v7 v7.0.82 h1:tWfICLhmp2aFPXL8Tli0XDTHj2VB/fNf0PC1f/i1gRo= +github.com/minio/minio-go/v7 v7.0.82/go.mod h1:84gmIilaX4zcvAWWzJ5Z1WI5axN+hAbM5w25xf8xvC0= github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4= github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE= github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c h1:cqn374mizHuIWj+OSJCajGr/phAmuMug9qIX3l9CflE= @@ -173,18 +167,14 @@ github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/open-policy-agent/opa v0.70.0 h1:B3cqCN2iQAyKxK6+GI+N40uqkin+wzIrM7YA60t9x1U= -github.com/open-policy-agent/opa v0.70.0/go.mod h1:Y/nm5NY0BX0BqjBriKUiV81sCl8XOjjvqQG7dXrggtI= +github.com/open-policy-agent/opa v1.0.0 h1:fZsEwxg1knpPvUn0YDJuJZBcbVg4G3zKpWa3+CnYK+I= +github.com/open-policy-agent/opa v1.0.0/go.mod h1:+JyoH12I0+zqyC1iX7a2tmoQlipwAEGvOhVJMhmy+rM= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= -github.com/openzipkin/zipkin-go v0.4.3 h1:9EGwpqkgnwdEIJ+Od7QVSEIH+ocmm5nPat0G7sjsSdg= -github.com/openzipkin/zipkin-go v0.4.3/go.mod h1:M9wCJZFWCo2RiY+o1eBCEMe0Dp2S5LDHcMZmk3RmK7c= github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= -github.com/philhofer/fwd v1.1.2 h1:bnDivRJ1EWPjUIRXV5KfORO897HTbpFAQddBdE8t7Gw= -github.com/philhofer/fwd v1.1.2/go.mod h1:qkPdfjR2SIEbspLqpe1tO4n5yICnr2DY7mqEx2tUTP0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= 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= @@ -194,8 +184,8 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pomerium/csrf v1.7.0 h1:Qp4t6oyEod3svQtKfJZs589mdUTWKVf7q0PgCKYCshY= github.com/pomerium/csrf v1.7.0/go.mod h1:hAPZV47mEj2T9xFs+ysbum4l7SF1IdrryYaY6PdoIqw= -github.com/pomerium/pomerium v0.28.0 h1:oNUw623093ybLB+a/W7fZgJXRlZiLlbwXMWXpdMTs3E= -github.com/pomerium/pomerium v0.28.0/go.mod h1:5kyioARKhZjQhXO9yK7ooVfa97ctk/0XJ2AOhVxdRpM= +github.com/pomerium/pomerium v0.28.1-0.20250122205906-0bd6d8cc8315 h1:pdCpEr39m9UomjVkTp17Q4qeTbDZj7yxEffdBXZADe4= +github.com/pomerium/pomerium v0.28.1-0.20250122205906-0bd6d8cc8315/go.mod h1:ujclJDq2BGZuSe2/9Lz2w4MpTVIR8DrR05qyjk1OcsU= github.com/pomerium/protoutil v0.0.0-20240813175624-47b7ac43ff46 h1:NRTg8JOXCxcIA1lAgD74iYud0rbshbWOB3Ou4+Huil8= github.com/pomerium/protoutil v0.0.0-20240813175624-47b7ac43ff46/go.mod h1:QqZmx6ZgPxz18va7kqoT4t/0yJtP7YFIDiT/W2n2fZ4= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= @@ -204,8 +194,8 @@ github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+ github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.60.1 h1:FUas6GcOw66yB/73KC+BOZoFJmbo/1pojoILArPAaSc= -github.com/prometheus/common v0.60.1/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= +github.com/prometheus/common v0.61.0 h1:3gv/GThfX0cV2lpO7gkTUwZru38mxevy90Bj8YFSRQQ= +github.com/prometheus/common v0.61.0/go.mod h1:zr29OCN/2BsJRaFwG8QOBr41D6kkchKbpeNH7pAjb/s= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= @@ -249,14 +239,10 @@ github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8 github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= -github.com/tinylib/msgp v1.1.8 h1:FCXC1xanKO4I8plpHGH2P7koL/RzZs12l/+r7vakfm0= -github.com/tinylib/msgp v1.1.8/go.mod h1:qkpG+2ldGg4xRFmx+jfTvZPxfGFhi64BcnL9vkCm/Tw= github.com/tklauser/go-sysconf v0.3.14 h1:g5vzr9iPFFz24v2KZXs/pvpvh8/V9Fw6vQK5ZZb78yU= github.com/tklauser/go-sysconf v0.3.14/go.mod h1:1ym4lWMLUOhuBOPGtRcJm7tEGX4SCYNEEEtghGG/8uY= github.com/tklauser/numcpus v0.8.0 h1:Mx4Wwe/FjZLeQsK/6kt2EOepwwSl7SmJrK5bV/dXYgY= github.com/tklauser/numcpus v0.8.0/go.mod h1:ZJZlAY+dmR4eut8epnzf0u/VwodKmryxR8txiloSqBE= -github.com/uber/jaeger-client-go v2.25.0+incompatible h1:IxcNZ7WRY1Y3G4poYlx24szfsn/3LvK9QHCq9oQw8+U= -github.com/uber/jaeger-client-go v2.25.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/volatiletech/null/v9 v9.0.0 h1:JCdlHEiSRVxOi7/MABiEfdsqmuj9oTV20Ao7VvZ0JkE= github.com/volatiletech/null/v9 v9.0.0/go.mod h1:zRFghPVahaiIMRXiUJrc6gsoG83Cm3ZoAfSTw7VHGQc= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= @@ -274,18 +260,40 @@ github.com/zeebo/pcg v1.0.1 h1:lyqfGeWiv4ahac6ttHs+I5hwtH/+1mrhlCtVNQM2kHo= github.com/zeebo/pcg v1.0.1/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l4= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 h1:TT4fX+nBOA/+LUkobKGW1ydGcn+G3vRw9+g5HwCphpk= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0/go.mod h1:L7UH0GbB0p47T4Rri3uHjbpCFYrVrwc1I25QhNPiGK8= -go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= -go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= -go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= -go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= -go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= -go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= -go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= -go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= -go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= -go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= +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/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.57.0 h1:qtFISDHKolvIxzSs0gIaiPUPR0Cucb0F2coHC7ZLdps= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.57.0/go.mod h1:Y+Pop1Q6hCOnETWTW4NROK/q1hv50hM7yDaUTjG8lp8= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 h1:yd02MEjBdJkG3uabWP9apV+OuWRIXGDuJEUJbOHmCFU= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0/go.mod h1:umTcuxiv1n/s/S6/c2AT/g2CQ7u5C59sHDNmfSwgz7Q= +go.opentelemetry.io/contrib/propagators/autoprop v0.57.0 h1:bNPJOdT5154XxzeFmrh8R+PXnV4t3TZEczy8gHEpcpg= +go.opentelemetry.io/contrib/propagators/autoprop v0.57.0/go.mod h1:Tb0j0mK+QatKdCxCKPN7CSzc7kx/q34/KaohJx/N96s= +go.opentelemetry.io/contrib/propagators/aws v1.32.0 h1:NELzr8bW7a7aHVZj5gaep1PfkvoSCGx+1qNGZx/uhhU= +go.opentelemetry.io/contrib/propagators/aws v1.32.0/go.mod h1:XKMrzHNka3eOA+nGEcNKYVL9s77TAhkwQEynYuaRFnQ= +go.opentelemetry.io/contrib/propagators/b3 v1.32.0 h1:MazJBz2Zf6HTN/nK/s3Ru1qme+VhWU5hm83QxEP+dvw= +go.opentelemetry.io/contrib/propagators/b3 v1.32.0/go.mod h1:B0s70QHYPrJwPOwD1o3V/R8vETNOG9N3qZf4LDYvA30= +go.opentelemetry.io/contrib/propagators/jaeger v1.32.0 h1:K/fOyTMD6GELKTIJBaJ9k3ppF2Njt8MeUGBOwfaWXXA= +go.opentelemetry.io/contrib/propagators/jaeger v1.32.0/go.mod h1:ISE6hda//MTWvtngG7p4et3OCngsrTVfl7c6DjN17f8= +go.opentelemetry.io/contrib/propagators/ot v1.32.0 h1:Poy02A4wOZubHyd2hpHPDgZW+rn6EIq0vCwTZJ6Lmu8= +go.opentelemetry.io/contrib/propagators/ot v1.32.0/go.mod h1:cbhaURV+VR3NIMarzDYZU1RDEkXG1fNd1WMP1XCcGkY= +go.opentelemetry.io/otel v1.33.0 h1:/FerN9bax5LoK51X/sI0SVYrjSE0/yUL7DpxW4K3FWw= +go.opentelemetry.io/otel v1.33.0/go.mod h1:SUUkR6csvUQl+yjReHu5uM3EtVV7MBm5FHKRlNx4I8I= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 h1:Vh5HayB/0HHfOQA7Ctx69E/Y/DcQSMPpKANYVMQ7fBA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0/go.mod h1:cpgtDBaqD/6ok/UG0jT15/uKjAY8mRA53diogHBg3UI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 h1:5pojmb1U1AogINhN3SurB+zm/nIcusopeBNp42f45QM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0/go.mod h1:57gTHJSE5S1tqg+EKsLPlTWhpHMsWlVmer+LA926XiA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.32.0 h1:cMyu9O88joYEaI47CnQkxO1XZdpoTF9fEnW2duIddhw= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.32.0/go.mod h1:6Am3rn7P9TVVeXYG+wtcGE7IE1tsQ+bP3AuWcKt/gOI= +go.opentelemetry.io/otel/metric v1.33.0 h1:r+JOocAyeRVXD8lZpjdQjzMadVZp2M4WmQ+5WtEnklQ= +go.opentelemetry.io/otel/metric v1.33.0/go.mod h1:L9+Fyctbp6HFTddIxClbQkjtubW6O9QS3Ann/M82u6M= +go.opentelemetry.io/otel/sdk v1.33.0 h1:iax7M131HuAm9QkZotNHEfstof92xM+N8sr3uHXc2IM= +go.opentelemetry.io/otel/sdk v1.33.0/go.mod h1:A1Q5oi7/9XaMlIWzPSxLRWOI8nG3FnzHJNbiENQuihM= +go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiyYCU9snn1CU= +go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ= +go.opentelemetry.io/otel/trace v1.33.0 h1:cCJuF7LRjUFso9LPnEAHJDB2pqzp+hbO8eu1qqW2d/s= +go.opentelemetry.io/otel/trace v1.33.0/go.mod h1:uIcdVUZMpTAmz0tI1z04GoVSezK37CbGV4fr1f2nBck= +go.opentelemetry.io/proto/otlp v1.4.0 h1:TA9WRvW6zMwP+Ssb6fLoUIuirti1gGbP28GcKG1jgeg= +go.opentelemetry.io/proto/otlp v1.4.0/go.mod h1:PPBWZIP98o2ElSqI35IHfu7hIhSwvc5N38Jw8pXuGFY= 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/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= @@ -297,8 +305,8 @@ go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= -golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= -golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= +golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= +golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa h1:ELnwvuAXPNtPk1TJRuGkI9fDTwym6AYBu0qzT8AcHdI= golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -310,15 +318,15 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= -golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= -golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= -golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= +golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= +golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= +golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20190423024810-112230192c58/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.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 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= @@ -330,8 +338,8 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= -golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 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/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= @@ -343,8 +351,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= -golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= 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.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= @@ -352,18 +360,14 @@ golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.203.0 h1:SrEeuwU3S11Wlscsn+LA1kb/Y5xT8uggJSkIhD08NAU= -google.golang.org/api v0.203.0/go.mod h1:BuOVyCSYEPwJb3npWvDnNmFI92f3GeRnHNkETneT3SI= -google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 h1:fVoAXEKA4+yufmbdVYv+SE73+cPZbbbe8paLsHfkK+U= -google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53/go.mod h1:riSXTwQ4+nqmPGtobMFyW5FqVAmIs0St6VPp4Ug7CE4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 h1:X58yt85/IXCx0Y3ZwN6sEIKZzQtDEYaBWrDvErdXrRE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= +google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 h1:CkkIfIt50+lT6NHAVoRYEyAvQGFM7xEwXUUywFvEb3Q= +google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576/go.mod h1:1R3kvZ1dtP3+4p4d3G8uJ8rFk/fWlScl38vanWACI08= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 h1:8ZmaLZE4XWrtU3MyClkYqqtl6Oegr3235h7jxsDyqCY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= -google.golang.org/protobuf v1.36.1 h1:yBPeRvTftaleIgM3PZ/WBIZ7XM/eEYAaEyCwvyjq/gk= -google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= -gopkg.in/DataDog/dd-trace-go.v1 v1.22.0 h1:gpWsqqkwUldNZXGJqT69NU9MdEDhLboK1C4nMgR0MWw= -gopkg.in/DataDog/dd-trace-go.v1 v1.22.0/go.mod h1:DVp8HmDh8PuTu2Z0fVVlBsyWaC++fzwVCaGWylTe3tg= +google.golang.org/protobuf v1.36.2 h1:R8FeyR1/eLmkutZOM5CWghmo5itiG9z0ktFlTVLuTmU= +google.golang.org/protobuf v1.36.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= 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= diff --git a/pb/activity_log.pb.go b/pb/activity_log.pb.go index 2303167..5147669 100644 --- a/pb/activity_log.pb.go +++ b/pb/activity_log.pb.go @@ -1,16 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 -// protoc v4.24.4 +// protoc-gen-go v1.34.2 +// protoc v3.20.3 // source: activity_log.proto package pb import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" @@ -59,9 +55,11 @@ type ActivityLogEntry struct { func (x *ActivityLogEntry) Reset() { *x = ActivityLogEntry{} - mi := &file_activity_log_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_activity_log_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ActivityLogEntry) String() string { @@ -72,7 +70,7 @@ func (*ActivityLogEntry) ProtoMessage() {} func (x *ActivityLogEntry) ProtoReflect() protoreflect.Message { mi := &file_activity_log_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -237,9 +235,11 @@ type GetActivityLogEntryRequest struct { func (x *GetActivityLogEntryRequest) Reset() { *x = GetActivityLogEntryRequest{} - mi := &file_activity_log_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_activity_log_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetActivityLogEntryRequest) String() string { @@ -250,7 +250,7 @@ func (*GetActivityLogEntryRequest) ProtoMessage() {} func (x *GetActivityLogEntryRequest) ProtoReflect() protoreflect.Message { mi := &file_activity_log_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -284,9 +284,11 @@ type GetActivityLogEntryResponse struct { func (x *GetActivityLogEntryResponse) Reset() { *x = GetActivityLogEntryResponse{} - mi := &file_activity_log_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_activity_log_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetActivityLogEntryResponse) String() string { @@ -297,7 +299,7 @@ func (*GetActivityLogEntryResponse) ProtoMessage() {} func (x *GetActivityLogEntryResponse) ProtoReflect() protoreflect.Message { mi := &file_activity_log_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -366,9 +368,11 @@ type ListActivityLogEntriesRequest struct { func (x *ListActivityLogEntriesRequest) Reset() { *x = ListActivityLogEntriesRequest{} - mi := &file_activity_log_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_activity_log_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListActivityLogEntriesRequest) String() string { @@ -379,7 +383,7 @@ func (*ListActivityLogEntriesRequest) ProtoMessage() {} func (x *ListActivityLogEntriesRequest) ProtoReflect() protoreflect.Message { mi := &file_activity_log_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -506,9 +510,11 @@ type ListActivityLogEntriesResponse struct { func (x *ListActivityLogEntriesResponse) Reset() { *x = ListActivityLogEntriesResponse{} - mi := &file_activity_log_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_activity_log_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListActivityLogEntriesResponse) String() string { @@ -519,7 +525,7 @@ func (*ListActivityLogEntriesResponse) ProtoMessage() {} func (x *ListActivityLogEntriesResponse) ProtoReflect() protoreflect.Message { mi := &file_activity_log_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -561,9 +567,11 @@ type ActivityLogEntry_DiffSummary struct { func (x *ActivityLogEntry_DiffSummary) Reset() { *x = ActivityLogEntry_DiffSummary{} - mi := &file_activity_log_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_activity_log_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ActivityLogEntry_DiffSummary) String() string { @@ -574,7 +582,7 @@ func (*ActivityLogEntry_DiffSummary) ProtoMessage() {} func (x *ActivityLogEntry_DiffSummary) ProtoReflect() protoreflect.Message { mi := &file_activity_log_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -615,9 +623,11 @@ type ListActivityLogEntriesRequest_Entity struct { func (x *ListActivityLogEntriesRequest_Entity) Reset() { *x = ListActivityLogEntriesRequest_Entity{} - mi := &file_activity_log_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_activity_log_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListActivityLogEntriesRequest_Entity) String() string { @@ -628,7 +638,7 @@ func (*ListActivityLogEntriesRequest_Entity) ProtoMessage() {} func (x *ListActivityLogEntriesRequest_Entity) ProtoReflect() protoreflect.Message { mi := &file_activity_log_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -672,9 +682,11 @@ type ListActivityLogEntriesRequest_Sort struct { func (x *ListActivityLogEntriesRequest_Sort) Reset() { *x = ListActivityLogEntriesRequest_Sort{} - mi := &file_activity_log_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_activity_log_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListActivityLogEntriesRequest_Sort) String() string { @@ -685,7 +697,7 @@ func (*ListActivityLogEntriesRequest_Sort) ProtoMessage() {} func (x *ListActivityLogEntriesRequest_Sort) ProtoReflect() protoreflect.Message { mi := &file_activity_log_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -727,9 +739,11 @@ type ListActivityLogEntriesRequest_DateFilter struct { func (x *ListActivityLogEntriesRequest_DateFilter) Reset() { *x = ListActivityLogEntriesRequest_DateFilter{} - mi := &file_activity_log_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_activity_log_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListActivityLogEntriesRequest_DateFilter) String() string { @@ -740,7 +754,7 @@ func (*ListActivityLogEntriesRequest_DateFilter) ProtoMessage() {} func (x *ListActivityLogEntriesRequest_DateFilter) ProtoReflect() protoreflect.Message { mi := &file_activity_log_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -783,9 +797,11 @@ type ListActivityLogEntriesRequest_StringFilter struct { func (x *ListActivityLogEntriesRequest_StringFilter) Reset() { *x = ListActivityLogEntriesRequest_StringFilter{} - mi := &file_activity_log_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_activity_log_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListActivityLogEntriesRequest_StringFilter) String() string { @@ -796,7 +812,7 @@ func (*ListActivityLogEntriesRequest_StringFilter) ProtoMessage() {} func (x *ListActivityLogEntriesRequest_StringFilter) ProtoReflect() protoreflect.Message { mi := &file_activity_log_proto_msgTypes[9] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1068,6 +1084,128 @@ func file_activity_log_proto_init() { if File_activity_log_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_activity_log_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*ActivityLogEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_activity_log_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetActivityLogEntryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_activity_log_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*GetActivityLogEntryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_activity_log_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ListActivityLogEntriesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_activity_log_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*ListActivityLogEntriesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_activity_log_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*ActivityLogEntry_DiffSummary); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_activity_log_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*ListActivityLogEntriesRequest_Entity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_activity_log_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*ListActivityLogEntriesRequest_Sort); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_activity_log_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*ListActivityLogEntriesRequest_DateFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_activity_log_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*ListActivityLogEntriesRequest_StringFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } file_activity_log_proto_msgTypes[2].OneofWrappers = []any{} file_activity_log_proto_msgTypes[3].OneofWrappers = []any{} type x struct{} @@ -1089,125 +1227,3 @@ func file_activity_log_proto_init() { file_activity_log_proto_goTypes = nil file_activity_log_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// ActivityLogServiceClient is the client API for ActivityLogService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ActivityLogServiceClient interface { - // GetActivityLogEntry retrieves a specific activity log entry - GetActivityLogEntry(ctx context.Context, in *GetActivityLogEntryRequest, opts ...grpc.CallOption) (*GetActivityLogEntryResponse, error) - // ListActivityLogEntries lists activity log entries based on paramters in the - // ListActivityLogEntriesRequest - ListActivityLogEntries(ctx context.Context, in *ListActivityLogEntriesRequest, opts ...grpc.CallOption) (*ListActivityLogEntriesResponse, error) -} - -type activityLogServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewActivityLogServiceClient(cc grpc.ClientConnInterface) ActivityLogServiceClient { - return &activityLogServiceClient{cc} -} - -func (c *activityLogServiceClient) GetActivityLogEntry(ctx context.Context, in *GetActivityLogEntryRequest, opts ...grpc.CallOption) (*GetActivityLogEntryResponse, error) { - out := new(GetActivityLogEntryResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.ActivityLogService/GetActivityLogEntry", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *activityLogServiceClient) ListActivityLogEntries(ctx context.Context, in *ListActivityLogEntriesRequest, opts ...grpc.CallOption) (*ListActivityLogEntriesResponse, error) { - out := new(ListActivityLogEntriesResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.ActivityLogService/ListActivityLogEntries", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ActivityLogServiceServer is the server API for ActivityLogService service. -type ActivityLogServiceServer interface { - // GetActivityLogEntry retrieves a specific activity log entry - GetActivityLogEntry(context.Context, *GetActivityLogEntryRequest) (*GetActivityLogEntryResponse, error) - // ListActivityLogEntries lists activity log entries based on paramters in the - // ListActivityLogEntriesRequest - ListActivityLogEntries(context.Context, *ListActivityLogEntriesRequest) (*ListActivityLogEntriesResponse, error) -} - -// UnimplementedActivityLogServiceServer can be embedded to have forward compatible implementations. -type UnimplementedActivityLogServiceServer struct { -} - -func (*UnimplementedActivityLogServiceServer) GetActivityLogEntry(context.Context, *GetActivityLogEntryRequest) (*GetActivityLogEntryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetActivityLogEntry not implemented") -} -func (*UnimplementedActivityLogServiceServer) ListActivityLogEntries(context.Context, *ListActivityLogEntriesRequest) (*ListActivityLogEntriesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListActivityLogEntries not implemented") -} - -func RegisterActivityLogServiceServer(s *grpc.Server, srv ActivityLogServiceServer) { - s.RegisterService(&_ActivityLogService_serviceDesc, srv) -} - -func _ActivityLogService_GetActivityLogEntry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetActivityLogEntryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ActivityLogServiceServer).GetActivityLogEntry(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.ActivityLogService/GetActivityLogEntry", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ActivityLogServiceServer).GetActivityLogEntry(ctx, req.(*GetActivityLogEntryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ActivityLogService_ListActivityLogEntries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListActivityLogEntriesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ActivityLogServiceServer).ListActivityLogEntries(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.ActivityLogService/ListActivityLogEntries", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ActivityLogServiceServer).ListActivityLogEntries(ctx, req.(*ListActivityLogEntriesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ActivityLogService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "pomerium.dashboard.ActivityLogService", - HandlerType: (*ActivityLogServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetActivityLogEntry", - Handler: _ActivityLogService_GetActivityLogEntry_Handler, - }, - { - MethodName: "ListActivityLogEntries", - Handler: _ActivityLogService_ListActivityLogEntries_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "activity_log.proto", -} diff --git a/pb/activity_log_grpc.pb.go b/pb/activity_log_grpc.pb.go new file mode 100644 index 0000000..6b00cd0 --- /dev/null +++ b/pb/activity_log_grpc.pb.go @@ -0,0 +1,169 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v3.20.3 +// source: activity_log.proto + +package pb + +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 ( + ActivityLogService_GetActivityLogEntry_FullMethodName = "/pomerium.dashboard.ActivityLogService/GetActivityLogEntry" + ActivityLogService_ListActivityLogEntries_FullMethodName = "/pomerium.dashboard.ActivityLogService/ListActivityLogEntries" +) + +// ActivityLogServiceClient is the client API for ActivityLogService 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. +// +// ActivityLogService tracks historical changes to configuration made through +// Pomerium Enterprise +type ActivityLogServiceClient interface { + // GetActivityLogEntry retrieves a specific activity log entry + GetActivityLogEntry(ctx context.Context, in *GetActivityLogEntryRequest, opts ...grpc.CallOption) (*GetActivityLogEntryResponse, error) + // ListActivityLogEntries lists activity log entries based on paramters in the + // ListActivityLogEntriesRequest + ListActivityLogEntries(ctx context.Context, in *ListActivityLogEntriesRequest, opts ...grpc.CallOption) (*ListActivityLogEntriesResponse, error) +} + +type activityLogServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewActivityLogServiceClient(cc grpc.ClientConnInterface) ActivityLogServiceClient { + return &activityLogServiceClient{cc} +} + +func (c *activityLogServiceClient) GetActivityLogEntry(ctx context.Context, in *GetActivityLogEntryRequest, opts ...grpc.CallOption) (*GetActivityLogEntryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetActivityLogEntryResponse) + err := c.cc.Invoke(ctx, ActivityLogService_GetActivityLogEntry_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *activityLogServiceClient) ListActivityLogEntries(ctx context.Context, in *ListActivityLogEntriesRequest, opts ...grpc.CallOption) (*ListActivityLogEntriesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListActivityLogEntriesResponse) + err := c.cc.Invoke(ctx, ActivityLogService_ListActivityLogEntries_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ActivityLogServiceServer is the server API for ActivityLogService service. +// All implementations should embed UnimplementedActivityLogServiceServer +// for forward compatibility. +// +// ActivityLogService tracks historical changes to configuration made through +// Pomerium Enterprise +type ActivityLogServiceServer interface { + // GetActivityLogEntry retrieves a specific activity log entry + GetActivityLogEntry(context.Context, *GetActivityLogEntryRequest) (*GetActivityLogEntryResponse, error) + // ListActivityLogEntries lists activity log entries based on paramters in the + // ListActivityLogEntriesRequest + ListActivityLogEntries(context.Context, *ListActivityLogEntriesRequest) (*ListActivityLogEntriesResponse, error) +} + +// UnimplementedActivityLogServiceServer should 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 UnimplementedActivityLogServiceServer struct{} + +func (UnimplementedActivityLogServiceServer) GetActivityLogEntry(context.Context, *GetActivityLogEntryRequest) (*GetActivityLogEntryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetActivityLogEntry not implemented") +} +func (UnimplementedActivityLogServiceServer) ListActivityLogEntries(context.Context, *ListActivityLogEntriesRequest) (*ListActivityLogEntriesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListActivityLogEntries not implemented") +} +func (UnimplementedActivityLogServiceServer) testEmbeddedByValue() {} + +// UnsafeActivityLogServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ActivityLogServiceServer will +// result in compilation errors. +type UnsafeActivityLogServiceServer interface { + mustEmbedUnimplementedActivityLogServiceServer() +} + +func RegisterActivityLogServiceServer(s grpc.ServiceRegistrar, srv ActivityLogServiceServer) { + // If the following call pancis, it indicates UnimplementedActivityLogServiceServer 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(&ActivityLogService_ServiceDesc, srv) +} + +func _ActivityLogService_GetActivityLogEntry_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetActivityLogEntryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ActivityLogServiceServer).GetActivityLogEntry(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ActivityLogService_GetActivityLogEntry_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ActivityLogServiceServer).GetActivityLogEntry(ctx, req.(*GetActivityLogEntryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ActivityLogService_ListActivityLogEntries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListActivityLogEntriesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ActivityLogServiceServer).ListActivityLogEntries(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ActivityLogService_ListActivityLogEntries_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ActivityLogServiceServer).ListActivityLogEntries(ctx, req.(*ListActivityLogEntriesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ActivityLogService_ServiceDesc is the grpc.ServiceDesc for ActivityLogService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ActivityLogService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pomerium.dashboard.ActivityLogService", + HandlerType: (*ActivityLogServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetActivityLogEntry", + Handler: _ActivityLogService_GetActivityLogEntry_Handler, + }, + { + MethodName: "ListActivityLogEntries", + Handler: _ActivityLogService_ListActivityLogEntries_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "activity_log.proto", +} diff --git a/pb/audit_svc.pb.go b/pb/audit_svc.pb.go deleted file mode 100644 index f6657aa..0000000 --- a/pb/audit_svc.pb.go +++ /dev/null @@ -1,288 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.35.2 -// protoc v4.24.4 -// source: audit_svc.proto - -package pb - -import ( - context "context" - audit "github.com/pomerium/pomerium/pkg/grpc/audit" - crypt "github.com/pomerium/pomerium/pkg/grpc/crypt" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -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 DecryptAuditRecordsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SealedAuditRecords []*crypt.SealedMessage `protobuf:"bytes,1,rep,name=sealed_audit_records,json=sealedAuditRecords,proto3" json:"sealed_audit_records,omitempty"` -} - -func (x *DecryptAuditRecordsRequest) Reset() { - *x = DecryptAuditRecordsRequest{} - mi := &file_audit_svc_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DecryptAuditRecordsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DecryptAuditRecordsRequest) ProtoMessage() {} - -func (x *DecryptAuditRecordsRequest) ProtoReflect() protoreflect.Message { - mi := &file_audit_svc_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 DecryptAuditRecordsRequest.ProtoReflect.Descriptor instead. -func (*DecryptAuditRecordsRequest) Descriptor() ([]byte, []int) { - return file_audit_svc_proto_rawDescGZIP(), []int{0} -} - -func (x *DecryptAuditRecordsRequest) GetSealedAuditRecords() []*crypt.SealedMessage { - if x != nil { - return x.SealedAuditRecords - } - return nil -} - -type DecryptAuditRecordsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AuditRecords []*audit.Record `protobuf:"bytes,1,rep,name=audit_records,json=auditRecords,proto3" json:"audit_records,omitempty"` -} - -func (x *DecryptAuditRecordsResponse) Reset() { - *x = DecryptAuditRecordsResponse{} - mi := &file_audit_svc_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DecryptAuditRecordsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DecryptAuditRecordsResponse) ProtoMessage() {} - -func (x *DecryptAuditRecordsResponse) ProtoReflect() protoreflect.Message { - mi := &file_audit_svc_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 DecryptAuditRecordsResponse.ProtoReflect.Descriptor instead. -func (*DecryptAuditRecordsResponse) Descriptor() ([]byte, []int) { - return file_audit_svc_proto_rawDescGZIP(), []int{1} -} - -func (x *DecryptAuditRecordsResponse) GetAuditRecords() []*audit.Record { - if x != nil { - return x.AuditRecords - } - return nil -} - -var File_audit_svc_proto protoreflect.FileDescriptor - -var file_audit_svc_proto_rawDesc = []byte{ - 0x0a, 0x0f, 0x61, 0x75, 0x64, 0x69, 0x74, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x12, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x64, 0x61, 0x73, 0x68, - 0x62, 0x6f, 0x61, 0x72, 0x64, 0x1a, 0x11, 0x61, 0x75, 0x64, 0x69, 0x74, 0x2f, 0x61, 0x75, 0x64, - 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x63, 0x72, 0x79, 0x70, 0x74, 0x2f, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6d, 0x0a, 0x1a, 0x44, - 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x41, 0x75, 0x64, 0x69, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x14, 0x73, 0x65, 0x61, - 0x6c, 0x65, 0x64, 0x5f, 0x61, 0x75, 0x64, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, - 0x75, 0x6d, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x2e, 0x53, 0x65, 0x61, 0x6c, 0x65, 0x64, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x12, 0x73, 0x65, 0x61, 0x6c, 0x65, 0x64, 0x41, 0x75, - 0x64, 0x69, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x5a, 0x0a, 0x1b, 0x44, 0x65, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x41, 0x75, 0x64, 0x69, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0d, 0x61, 0x75, 0x64, - 0x69, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x61, 0x75, 0x64, 0x69, - 0x74, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x0c, 0x61, 0x75, 0x64, 0x69, 0x74, 0x52, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x32, 0x86, 0x01, 0x0a, 0x0c, 0x41, 0x75, 0x64, 0x69, 0x74, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x76, 0x0a, 0x13, 0x44, 0x65, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x41, 0x75, 0x64, 0x69, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x2e, - 0x2e, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, - 0x61, 0x72, 0x64, 0x2e, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x41, 0x75, 0x64, 0x69, 0x74, - 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, - 0x2e, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, - 0x61, 0x72, 0x64, 0x2e, 0x44, 0x65, 0x63, 0x72, 0x79, 0x70, 0x74, 0x41, 0x75, 0x64, 0x69, 0x74, - 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, - 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6f, - 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2f, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2d, - 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_audit_svc_proto_rawDescOnce sync.Once - file_audit_svc_proto_rawDescData = file_audit_svc_proto_rawDesc -) - -func file_audit_svc_proto_rawDescGZIP() []byte { - file_audit_svc_proto_rawDescOnce.Do(func() { - file_audit_svc_proto_rawDescData = protoimpl.X.CompressGZIP(file_audit_svc_proto_rawDescData) - }) - return file_audit_svc_proto_rawDescData -} - -var file_audit_svc_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_audit_svc_proto_goTypes = []any{ - (*DecryptAuditRecordsRequest)(nil), // 0: pomerium.dashboard.DecryptAuditRecordsRequest - (*DecryptAuditRecordsResponse)(nil), // 1: pomerium.dashboard.DecryptAuditRecordsResponse - (*crypt.SealedMessage)(nil), // 2: pomerium.crypt.SealedMessage - (*audit.Record)(nil), // 3: pomerium.audit.Record -} -var file_audit_svc_proto_depIdxs = []int32{ - 2, // 0: pomerium.dashboard.DecryptAuditRecordsRequest.sealed_audit_records:type_name -> pomerium.crypt.SealedMessage - 3, // 1: pomerium.dashboard.DecryptAuditRecordsResponse.audit_records:type_name -> pomerium.audit.Record - 0, // 2: pomerium.dashboard.AuditService.DecryptAuditRecords:input_type -> pomerium.dashboard.DecryptAuditRecordsRequest - 1, // 3: pomerium.dashboard.AuditService.DecryptAuditRecords:output_type -> pomerium.dashboard.DecryptAuditRecordsResponse - 3, // [3:4] is the sub-list for method output_type - 2, // [2:3] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_audit_svc_proto_init() } -func file_audit_svc_proto_init() { - if File_audit_svc_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_audit_svc_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_audit_svc_proto_goTypes, - DependencyIndexes: file_audit_svc_proto_depIdxs, - MessageInfos: file_audit_svc_proto_msgTypes, - }.Build() - File_audit_svc_proto = out.File - file_audit_svc_proto_rawDesc = nil - file_audit_svc_proto_goTypes = nil - file_audit_svc_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// AuditServiceClient is the client API for AuditService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type AuditServiceClient interface { - DecryptAuditRecords(ctx context.Context, in *DecryptAuditRecordsRequest, opts ...grpc.CallOption) (*DecryptAuditRecordsResponse, error) -} - -type auditServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewAuditServiceClient(cc grpc.ClientConnInterface) AuditServiceClient { - return &auditServiceClient{cc} -} - -func (c *auditServiceClient) DecryptAuditRecords(ctx context.Context, in *DecryptAuditRecordsRequest, opts ...grpc.CallOption) (*DecryptAuditRecordsResponse, error) { - out := new(DecryptAuditRecordsResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.AuditService/DecryptAuditRecords", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// AuditServiceServer is the server API for AuditService service. -type AuditServiceServer interface { - DecryptAuditRecords(context.Context, *DecryptAuditRecordsRequest) (*DecryptAuditRecordsResponse, error) -} - -// UnimplementedAuditServiceServer can be embedded to have forward compatible implementations. -type UnimplementedAuditServiceServer struct { -} - -func (*UnimplementedAuditServiceServer) DecryptAuditRecords(context.Context, *DecryptAuditRecordsRequest) (*DecryptAuditRecordsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DecryptAuditRecords not implemented") -} - -func RegisterAuditServiceServer(s *grpc.Server, srv AuditServiceServer) { - s.RegisterService(&_AuditService_serviceDesc, srv) -} - -func _AuditService_DecryptAuditRecords_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DecryptAuditRecordsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuditServiceServer).DecryptAuditRecords(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.AuditService/DecryptAuditRecords", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuditServiceServer).DecryptAuditRecords(ctx, req.(*DecryptAuditRecordsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _AuditService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "pomerium.dashboard.AuditService", - HandlerType: (*AuditServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "DecryptAuditRecords", - Handler: _AuditService_DecryptAuditRecords_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "audit_svc.proto", -} diff --git a/pb/changesets.pb.go b/pb/changesets.pb.go new file mode 100644 index 0000000..0f1f625 --- /dev/null +++ b/pb/changesets.pb.go @@ -0,0 +1,1200 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v3.20.3 +// source: changesets.proto + +package pb + +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" + reflect "reflect" + sync "sync" +) + +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 Changeset struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + ModifiedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=modified_at,json=modifiedAt,proto3" json:"modified_at,omitempty"` + DeployedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=deployed_at,json=deployedAt,proto3" json:"deployed_at,omitempty"` +} + +func (x *Changeset) Reset() { + *x = Changeset{} + if protoimpl.UnsafeEnabled { + mi := &file_changesets_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Changeset) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Changeset) ProtoMessage() {} + +func (x *Changeset) ProtoReflect() protoreflect.Message { + mi := &file_changesets_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Changeset.ProtoReflect.Descriptor instead. +func (*Changeset) Descriptor() ([]byte, []int) { + return file_changesets_proto_rawDescGZIP(), []int{0} +} + +func (x *Changeset) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Changeset) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Changeset) GetModifiedAt() *timestamppb.Timestamp { + if x != nil { + return x.ModifiedAt + } + return nil +} + +func (x *Changeset) GetDeployedAt() *timestamppb.Timestamp { + if x != nil { + return x.DeployedAt + } + return nil +} + +type ChangesetRecord struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + RecordId string `protobuf:"bytes,2,opt,name=record_id,json=recordId,proto3" json:"record_id,omitempty"` + RecordProtoMd5 string `protobuf:"bytes,3,opt,name=record_proto_md5,json=recordProtoMd5,proto3" json:"record_proto_md5,omitempty"` + RecordProto []byte `protobuf:"bytes,4,opt,name=record_proto,json=recordProto,proto3" json:"record_proto,omitempty"` +} + +func (x *ChangesetRecord) Reset() { + *x = ChangesetRecord{} + if protoimpl.UnsafeEnabled { + mi := &file_changesets_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChangesetRecord) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangesetRecord) ProtoMessage() {} + +func (x *ChangesetRecord) ProtoReflect() protoreflect.Message { + mi := &file_changesets_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangesetRecord.ProtoReflect.Descriptor instead. +func (*ChangesetRecord) Descriptor() ([]byte, []int) { + return file_changesets_proto_rawDescGZIP(), []int{1} +} + +func (x *ChangesetRecord) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ChangesetRecord) GetRecordId() string { + if x != nil { + return x.RecordId + } + return "" +} + +func (x *ChangesetRecord) GetRecordProtoMd5() string { + if x != nil { + return x.RecordProtoMd5 + } + return "" +} + +func (x *ChangesetRecord) GetRecordProto() []byte { + if x != nil { + return x.RecordProto + } + return nil +} + +type ChangesetWithRecords struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Changeset *Changeset `protobuf:"bytes,1,opt,name=changeset,proto3" json:"changeset,omitempty"` + Records []*ChangesetRecord `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"` +} + +func (x *ChangesetWithRecords) Reset() { + *x = ChangesetWithRecords{} + if protoimpl.UnsafeEnabled { + mi := &file_changesets_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChangesetWithRecords) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangesetWithRecords) ProtoMessage() {} + +func (x *ChangesetWithRecords) ProtoReflect() protoreflect.Message { + mi := &file_changesets_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangesetWithRecords.ProtoReflect.Descriptor instead. +func (*ChangesetWithRecords) Descriptor() ([]byte, []int) { + return file_changesets_proto_rawDescGZIP(), []int{2} +} + +func (x *ChangesetWithRecords) GetChangeset() *Changeset { + if x != nil { + return x.Changeset + } + return nil +} + +func (x *ChangesetWithRecords) GetRecords() []*ChangesetRecord { + if x != nil { + return x.Records + } + return nil +} + +type ChangesetDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + ModifiedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=modified_at,json=modifiedAt,proto3" json:"modified_at,omitempty"` + DeployedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=deployed_at,json=deployedAt,proto3" json:"deployed_at,omitempty"` + Approvers []*ChangesetDetails_Approver `protobuf:"bytes,5,rep,name=approvers,proto3" json:"approvers,omitempty"` + RequiredApprovalCount int64 `protobuf:"varint,10,opt,name=required_approval_count,json=requiredApprovalCount,proto3" json:"required_approval_count,omitempty"` + CanApprove bool `protobuf:"varint,6,opt,name=can_approve,json=canApprove,proto3" json:"can_approve,omitempty"` + CanDeploy bool `protobuf:"varint,7,opt,name=can_deploy,json=canDeploy,proto3" json:"can_deploy,omitempty"` + CanRollback bool `protobuf:"varint,8,opt,name=can_rollback,json=canRollback,proto3" json:"can_rollback,omitempty"` + LastChange *ActivityLogEntry `protobuf:"bytes,9,opt,name=last_change,json=lastChange,proto3,oneof" json:"last_change,omitempty"` + Status string `protobuf:"bytes,11,opt,name=status,proto3" json:"status,omitempty"` +} + +func (x *ChangesetDetails) Reset() { + *x = ChangesetDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_changesets_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChangesetDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangesetDetails) ProtoMessage() {} + +func (x *ChangesetDetails) ProtoReflect() protoreflect.Message { + mi := &file_changesets_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangesetDetails.ProtoReflect.Descriptor instead. +func (*ChangesetDetails) Descriptor() ([]byte, []int) { + return file_changesets_proto_rawDescGZIP(), []int{3} +} + +func (x *ChangesetDetails) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ChangesetDetails) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *ChangesetDetails) GetModifiedAt() *timestamppb.Timestamp { + if x != nil { + return x.ModifiedAt + } + return nil +} + +func (x *ChangesetDetails) GetDeployedAt() *timestamppb.Timestamp { + if x != nil { + return x.DeployedAt + } + return nil +} + +func (x *ChangesetDetails) GetApprovers() []*ChangesetDetails_Approver { + if x != nil { + return x.Approvers + } + return nil +} + +func (x *ChangesetDetails) GetRequiredApprovalCount() int64 { + if x != nil { + return x.RequiredApprovalCount + } + return 0 +} + +func (x *ChangesetDetails) GetCanApprove() bool { + if x != nil { + return x.CanApprove + } + return false +} + +func (x *ChangesetDetails) GetCanDeploy() bool { + if x != nil { + return x.CanDeploy + } + return false +} + +func (x *ChangesetDetails) GetCanRollback() bool { + if x != nil { + return x.CanRollback + } + return false +} + +func (x *ChangesetDetails) GetLastChange() *ActivityLogEntry { + if x != nil { + return x.LastChange + } + return nil +} + +func (x *ChangesetDetails) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +type ApproveChangesetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChangesetId string `protobuf:"bytes,1,opt,name=changeset_id,json=changesetId,proto3" json:"changeset_id,omitempty"` +} + +func (x *ApproveChangesetRequest) Reset() { + *x = ApproveChangesetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_changesets_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ApproveChangesetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApproveChangesetRequest) ProtoMessage() {} + +func (x *ApproveChangesetRequest) ProtoReflect() protoreflect.Message { + mi := &file_changesets_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApproveChangesetRequest.ProtoReflect.Descriptor instead. +func (*ApproveChangesetRequest) Descriptor() ([]byte, []int) { + return file_changesets_proto_rawDescGZIP(), []int{4} +} + +func (x *ApproveChangesetRequest) GetChangesetId() string { + if x != nil { + return x.ChangesetId + } + return "" +} + +type DeployChangesetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChangesetId string `protobuf:"bytes,1,opt,name=changeset_id,json=changesetId,proto3" json:"changeset_id,omitempty"` +} + +func (x *DeployChangesetRequest) Reset() { + *x = DeployChangesetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_changesets_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeployChangesetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeployChangesetRequest) ProtoMessage() {} + +func (x *DeployChangesetRequest) ProtoReflect() protoreflect.Message { + mi := &file_changesets_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeployChangesetRequest.ProtoReflect.Descriptor instead. +func (*DeployChangesetRequest) Descriptor() ([]byte, []int) { + return file_changesets_proto_rawDescGZIP(), []int{5} +} + +func (x *DeployChangesetRequest) GetChangesetId() string { + if x != nil { + return x.ChangesetId + } + return "" +} + +type DiffChangesetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChangesetId string `protobuf:"bytes,1,opt,name=changeset_id,json=changesetId,proto3" json:"changeset_id,omitempty"` +} + +func (x *DiffChangesetRequest) Reset() { + *x = DiffChangesetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_changesets_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DiffChangesetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiffChangesetRequest) ProtoMessage() {} + +func (x *DiffChangesetRequest) ProtoReflect() protoreflect.Message { + mi := &file_changesets_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiffChangesetRequest.ProtoReflect.Descriptor instead. +func (*DiffChangesetRequest) Descriptor() ([]byte, []int) { + return file_changesets_proto_rawDescGZIP(), []int{6} +} + +func (x *DiffChangesetRequest) GetChangesetId() string { + if x != nil { + return x.ChangesetId + } + return "" +} + +type DiffChangesetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChangesetRecords []*DiffChangesetResponse_Record `protobuf:"bytes,1,rep,name=changeset_records,json=changesetRecords,proto3" json:"changeset_records,omitempty"` + CurrentlyDeployedChangesetRecords []*DiffChangesetResponse_Record `protobuf:"bytes,2,rep,name=currently_deployed_changeset_records,json=currentlyDeployedChangesetRecords,proto3" json:"currently_deployed_changeset_records,omitempty"` +} + +func (x *DiffChangesetResponse) Reset() { + *x = DiffChangesetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_changesets_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DiffChangesetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiffChangesetResponse) ProtoMessage() {} + +func (x *DiffChangesetResponse) ProtoReflect() protoreflect.Message { + mi := &file_changesets_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiffChangesetResponse.ProtoReflect.Descriptor instead. +func (*DiffChangesetResponse) Descriptor() ([]byte, []int) { + return file_changesets_proto_rawDescGZIP(), []int{7} +} + +func (x *DiffChangesetResponse) GetChangesetRecords() []*DiffChangesetResponse_Record { + if x != nil { + return x.ChangesetRecords + } + return nil +} + +func (x *DiffChangesetResponse) GetCurrentlyDeployedChangesetRecords() []*DiffChangesetResponse_Record { + if x != nil { + return x.CurrentlyDeployedChangesetRecords + } + return nil +} + +type ListChangesetsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Limit int64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` + OrderBy string `protobuf:"bytes,2,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` +} + +func (x *ListChangesetsRequest) Reset() { + *x = ListChangesetsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_changesets_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListChangesetsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListChangesetsRequest) ProtoMessage() {} + +func (x *ListChangesetsRequest) ProtoReflect() protoreflect.Message { + mi := &file_changesets_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListChangesetsRequest.ProtoReflect.Descriptor instead. +func (*ListChangesetsRequest) Descriptor() ([]byte, []int) { + return file_changesets_proto_rawDescGZIP(), []int{8} +} + +func (x *ListChangesetsRequest) GetLimit() int64 { + if x != nil { + return x.Limit + } + return 0 +} + +func (x *ListChangesetsRequest) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +type ListChangesetsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Changesets []*ChangesetDetails `protobuf:"bytes,1,rep,name=changesets,proto3" json:"changesets,omitempty"` + CurrentlyDeployedChangesetId *string `protobuf:"bytes,2,opt,name=currently_deployed_changeset_id,json=currentlyDeployedChangesetId,proto3,oneof" json:"currently_deployed_changeset_id,omitempty"` + PreviouslyDeployedChangesetId *string `protobuf:"bytes,3,opt,name=previously_deployed_changeset_id,json=previouslyDeployedChangesetId,proto3,oneof" json:"previously_deployed_changeset_id,omitempty"` +} + +func (x *ListChangesetsResponse) Reset() { + *x = ListChangesetsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_changesets_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListChangesetsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListChangesetsResponse) ProtoMessage() {} + +func (x *ListChangesetsResponse) ProtoReflect() protoreflect.Message { + mi := &file_changesets_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListChangesetsResponse.ProtoReflect.Descriptor instead. +func (*ListChangesetsResponse) Descriptor() ([]byte, []int) { + return file_changesets_proto_rawDescGZIP(), []int{9} +} + +func (x *ListChangesetsResponse) GetChangesets() []*ChangesetDetails { + if x != nil { + return x.Changesets + } + return nil +} + +func (x *ListChangesetsResponse) GetCurrentlyDeployedChangesetId() string { + if x != nil && x.CurrentlyDeployedChangesetId != nil { + return *x.CurrentlyDeployedChangesetId + } + return "" +} + +func (x *ListChangesetsResponse) GetPreviouslyDeployedChangesetId() string { + if x != nil && x.PreviouslyDeployedChangesetId != nil { + return *x.PreviouslyDeployedChangesetId + } + return "" +} + +type ChangesetDetails_Approver struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` + ApprovedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=approved_at,json=approvedAt,proto3" json:"approved_at,omitempty"` +} + +func (x *ChangesetDetails_Approver) Reset() { + *x = ChangesetDetails_Approver{} + if protoimpl.UnsafeEnabled { + mi := &file_changesets_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChangesetDetails_Approver) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangesetDetails_Approver) ProtoMessage() {} + +func (x *ChangesetDetails_Approver) ProtoReflect() protoreflect.Message { + mi := &file_changesets_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangesetDetails_Approver.ProtoReflect.Descriptor instead. +func (*ChangesetDetails_Approver) Descriptor() ([]byte, []int) { + return file_changesets_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *ChangesetDetails_Approver) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ChangesetDetails_Approver) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *ChangesetDetails_Approver) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *ChangesetDetails_Approver) GetApprovedAt() *timestamppb.Timestamp { + if x != nil { + return x.ApprovedAt + } + return nil +} + +type DiffChangesetResponse_Record struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Json string `protobuf:"bytes,2,opt,name=json,proto3" json:"json,omitempty"` +} + +func (x *DiffChangesetResponse_Record) Reset() { + *x = DiffChangesetResponse_Record{} + if protoimpl.UnsafeEnabled { + mi := &file_changesets_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DiffChangesetResponse_Record) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiffChangesetResponse_Record) ProtoMessage() {} + +func (x *DiffChangesetResponse_Record) ProtoReflect() protoreflect.Message { + mi := &file_changesets_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiffChangesetResponse_Record.ProtoReflect.Descriptor instead. +func (*DiffChangesetResponse_Record) Descriptor() ([]byte, []int) { + return file_changesets_proto_rawDescGZIP(), []int{7, 0} +} + +func (x *DiffChangesetResponse_Record) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *DiffChangesetResponse_Record) GetJson() string { + if x != nil { + return x.Json + } + return "" +} + +var File_changesets_proto protoreflect.FileDescriptor + +var file_changesets_proto_rawDesc = []byte{ + 0x0a, 0x10, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x12, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x64, 0x61, 0x73, + 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x5f, 0x6c, + 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd0, 0x01, 0x0a, 0x09, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3b, + 0x0a, 0x0b, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x0a, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x41, 0x74, 0x22, 0x8b, 0x01, 0x0a, 0x0f, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x10, + 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x6d, 0x64, 0x35, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x4d, 0x64, 0x35, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, + 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x72, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x92, 0x01, 0x0a, 0x14, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65, 0x63, 0x6f, 0x72, + 0x64, 0x73, 0x12, 0x3b, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, + 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x73, 0x65, 0x74, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x12, + 0x3d, 0x0a, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x64, 0x61, 0x73, 0x68, + 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x52, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x07, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0xc6, + 0x05, 0x0a, 0x10, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3b, + 0x0a, 0x0b, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x0a, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x64, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x64, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x41, 0x74, 0x12, 0x4b, 0x0a, 0x09, 0x61, 0x70, 0x70, 0x72, + 0x6f, 0x76, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x70, 0x6f, + 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, + 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x2e, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x09, 0x61, 0x70, 0x70, 0x72, + 0x6f, 0x76, 0x65, 0x72, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x64, 0x5f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x0a, + 0x0b, 0x63, 0x61, 0x6e, 0x5f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0a, 0x63, 0x61, 0x6e, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x12, 0x1d, + 0x0a, 0x0a, 0x63, 0x61, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x09, 0x63, 0x61, 0x6e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x12, 0x21, 0x0a, + 0x0c, 0x63, 0x61, 0x6e, 0x5f, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0b, 0x63, 0x61, 0x6e, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, + 0x12, 0x4a, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, + 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x69, 0x74, 0x79, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x48, 0x00, 0x52, 0x0a, 0x6c, + 0x61, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x88, 0x01, 0x01, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x1a, 0x90, 0x01, 0x0a, 0x08, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, + 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x3b, 0x0a, 0x0b, 0x61, 0x70, + 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x61, 0x70, 0x70, + 0x72, 0x6f, 0x76, 0x65, 0x64, 0x41, 0x74, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x6c, 0x61, 0x73, 0x74, + 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x3c, 0x0a, 0x17, 0x41, 0x70, 0x70, 0x72, 0x6f, + 0x76, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x73, 0x65, 0x74, 0x49, 0x64, 0x22, 0x3b, 0x0a, 0x16, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x21, 0x0a, 0x0c, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, + 0x49, 0x64, 0x22, 0x39, 0x0a, 0x14, 0x44, 0x69, 0x66, 0x66, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x49, 0x64, 0x22, 0xa8, 0x02, + 0x0a, 0x15, 0x44, 0x69, 0x66, 0x66, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x11, 0x63, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x73, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x64, 0x61, + 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x52, 0x10, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x52, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x81, 0x01, 0x0a, 0x24, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x6c, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x5f, 0x63, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, + 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x21, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x6c, 0x79, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x73, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x1a, 0x2c, 0x0a, 0x06, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x22, 0x48, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x5f, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x42, 0x79, 0x22, 0xc1, 0x02, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, + 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x64, 0x61, 0x73, + 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, + 0x65, 0x74, 0x73, 0x12, 0x4a, 0x0a, 0x1f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x6c, 0x79, + 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x1c, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, + 0x64, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, + 0x4c, 0x0a, 0x20, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x6c, 0x79, 0x5f, 0x64, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x1d, 0x70, 0x72, 0x65, + 0x76, 0x69, 0x6f, 0x75, 0x73, 0x6c, 0x79, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x22, 0x0a, + 0x20, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x6c, + 0x6f, 0x79, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x69, + 0x64, 0x42, 0x23, 0x0a, 0x21, 0x5f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x6c, 0x79, + 0x5f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x32, 0xd6, 0x03, 0x0a, 0x10, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x73, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x41, + 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x12, + 0x2b, 0x2e, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, + 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x12, 0x55, 0x0a, 0x0f, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x43, 0x68, + 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x12, 0x2a, 0x2e, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, + 0x75, 0x6d, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x44, 0x65, 0x70, + 0x6c, 0x6f, 0x79, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x64, 0x0a, 0x0d, 0x44, + 0x69, 0x66, 0x66, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x12, 0x28, 0x2e, 0x70, + 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, + 0x64, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, + 0x6d, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x44, 0x69, 0x66, 0x66, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x67, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, + 0x65, 0x74, 0x73, 0x12, 0x29, 0x2e, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x64, + 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, + 0x2e, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, + 0x61, 0x72, 0x64, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x11, 0x52, 0x6f, + 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x65, 0x74, 0x12, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, + 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6f, + 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2f, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2d, + 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_changesets_proto_rawDescOnce sync.Once + file_changesets_proto_rawDescData = file_changesets_proto_rawDesc +) + +func file_changesets_proto_rawDescGZIP() []byte { + file_changesets_proto_rawDescOnce.Do(func() { + file_changesets_proto_rawDescData = protoimpl.X.CompressGZIP(file_changesets_proto_rawDescData) + }) + return file_changesets_proto_rawDescData +} + +var file_changesets_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_changesets_proto_goTypes = []any{ + (*Changeset)(nil), // 0: pomerium.dashboard.Changeset + (*ChangesetRecord)(nil), // 1: pomerium.dashboard.ChangesetRecord + (*ChangesetWithRecords)(nil), // 2: pomerium.dashboard.ChangesetWithRecords + (*ChangesetDetails)(nil), // 3: pomerium.dashboard.ChangesetDetails + (*ApproveChangesetRequest)(nil), // 4: pomerium.dashboard.ApproveChangesetRequest + (*DeployChangesetRequest)(nil), // 5: pomerium.dashboard.DeployChangesetRequest + (*DiffChangesetRequest)(nil), // 6: pomerium.dashboard.DiffChangesetRequest + (*DiffChangesetResponse)(nil), // 7: pomerium.dashboard.DiffChangesetResponse + (*ListChangesetsRequest)(nil), // 8: pomerium.dashboard.ListChangesetsRequest + (*ListChangesetsResponse)(nil), // 9: pomerium.dashboard.ListChangesetsResponse + (*ChangesetDetails_Approver)(nil), // 10: pomerium.dashboard.ChangesetDetails.Approver + (*DiffChangesetResponse_Record)(nil), // 11: pomerium.dashboard.DiffChangesetResponse.Record + (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp + (*ActivityLogEntry)(nil), // 13: pomerium.dashboard.ActivityLogEntry + (*emptypb.Empty)(nil), // 14: google.protobuf.Empty +} +var file_changesets_proto_depIdxs = []int32{ + 12, // 0: pomerium.dashboard.Changeset.created_at:type_name -> google.protobuf.Timestamp + 12, // 1: pomerium.dashboard.Changeset.modified_at:type_name -> google.protobuf.Timestamp + 12, // 2: pomerium.dashboard.Changeset.deployed_at:type_name -> google.protobuf.Timestamp + 0, // 3: pomerium.dashboard.ChangesetWithRecords.changeset:type_name -> pomerium.dashboard.Changeset + 1, // 4: pomerium.dashboard.ChangesetWithRecords.records:type_name -> pomerium.dashboard.ChangesetRecord + 12, // 5: pomerium.dashboard.ChangesetDetails.created_at:type_name -> google.protobuf.Timestamp + 12, // 6: pomerium.dashboard.ChangesetDetails.modified_at:type_name -> google.protobuf.Timestamp + 12, // 7: pomerium.dashboard.ChangesetDetails.deployed_at:type_name -> google.protobuf.Timestamp + 10, // 8: pomerium.dashboard.ChangesetDetails.approvers:type_name -> pomerium.dashboard.ChangesetDetails.Approver + 13, // 9: pomerium.dashboard.ChangesetDetails.last_change:type_name -> pomerium.dashboard.ActivityLogEntry + 11, // 10: pomerium.dashboard.DiffChangesetResponse.changeset_records:type_name -> pomerium.dashboard.DiffChangesetResponse.Record + 11, // 11: pomerium.dashboard.DiffChangesetResponse.currently_deployed_changeset_records:type_name -> pomerium.dashboard.DiffChangesetResponse.Record + 3, // 12: pomerium.dashboard.ListChangesetsResponse.changesets:type_name -> pomerium.dashboard.ChangesetDetails + 12, // 13: pomerium.dashboard.ChangesetDetails.Approver.approved_at:type_name -> google.protobuf.Timestamp + 4, // 14: pomerium.dashboard.ChangesetService.ApproveChangeset:input_type -> pomerium.dashboard.ApproveChangesetRequest + 5, // 15: pomerium.dashboard.ChangesetService.DeployChangeset:input_type -> pomerium.dashboard.DeployChangesetRequest + 6, // 16: pomerium.dashboard.ChangesetService.DiffChangeset:input_type -> pomerium.dashboard.DiffChangesetRequest + 8, // 17: pomerium.dashboard.ChangesetService.ListChangesets:input_type -> pomerium.dashboard.ListChangesetsRequest + 14, // 18: pomerium.dashboard.ChangesetService.RollbackChangeset:input_type -> google.protobuf.Empty + 14, // 19: pomerium.dashboard.ChangesetService.ApproveChangeset:output_type -> google.protobuf.Empty + 14, // 20: pomerium.dashboard.ChangesetService.DeployChangeset:output_type -> google.protobuf.Empty + 7, // 21: pomerium.dashboard.ChangesetService.DiffChangeset:output_type -> pomerium.dashboard.DiffChangesetResponse + 9, // 22: pomerium.dashboard.ChangesetService.ListChangesets:output_type -> pomerium.dashboard.ListChangesetsResponse + 14, // 23: pomerium.dashboard.ChangesetService.RollbackChangeset:output_type -> google.protobuf.Empty + 19, // [19:24] is the sub-list for method output_type + 14, // [14:19] 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_changesets_proto_init() } +func file_changesets_proto_init() { + if File_changesets_proto != nil { + return + } + file_activity_log_proto_init() + if !protoimpl.UnsafeEnabled { + file_changesets_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Changeset); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_changesets_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ChangesetRecord); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_changesets_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ChangesetWithRecords); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_changesets_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*ChangesetDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_changesets_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*ApproveChangesetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_changesets_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*DeployChangesetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_changesets_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*DiffChangesetRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_changesets_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*DiffChangesetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_changesets_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*ListChangesetsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_changesets_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*ListChangesetsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_changesets_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*ChangesetDetails_Approver); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_changesets_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*DiffChangesetResponse_Record); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_changesets_proto_msgTypes[3].OneofWrappers = []any{} + file_changesets_proto_msgTypes[9].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_changesets_proto_rawDesc, + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_changesets_proto_goTypes, + DependencyIndexes: file_changesets_proto_depIdxs, + MessageInfos: file_changesets_proto_msgTypes, + }.Build() + File_changesets_proto = out.File + file_changesets_proto_rawDesc = nil + file_changesets_proto_goTypes = nil + file_changesets_proto_depIdxs = nil +} diff --git a/pb/changesets_grpc.pb.go b/pb/changesets_grpc.pb.go new file mode 100644 index 0000000..aa99451 --- /dev/null +++ b/pb/changesets_grpc.pb.go @@ -0,0 +1,272 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v3.20.3 +// source: changesets.proto + +package pb + +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 ( + ChangesetService_ApproveChangeset_FullMethodName = "/pomerium.dashboard.ChangesetService/ApproveChangeset" + ChangesetService_DeployChangeset_FullMethodName = "/pomerium.dashboard.ChangesetService/DeployChangeset" + ChangesetService_DiffChangeset_FullMethodName = "/pomerium.dashboard.ChangesetService/DiffChangeset" + ChangesetService_ListChangesets_FullMethodName = "/pomerium.dashboard.ChangesetService/ListChangesets" + ChangesetService_RollbackChangeset_FullMethodName = "/pomerium.dashboard.ChangesetService/RollbackChangeset" +) + +// ChangesetServiceClient is the client API for ChangesetService 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 ChangesetServiceClient interface { + ApproveChangeset(ctx context.Context, in *ApproveChangesetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + DeployChangeset(ctx context.Context, in *DeployChangesetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + DiffChangeset(ctx context.Context, in *DiffChangesetRequest, opts ...grpc.CallOption) (*DiffChangesetResponse, error) + ListChangesets(ctx context.Context, in *ListChangesetsRequest, opts ...grpc.CallOption) (*ListChangesetsResponse, error) + RollbackChangeset(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) +} + +type changesetServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewChangesetServiceClient(cc grpc.ClientConnInterface) ChangesetServiceClient { + return &changesetServiceClient{cc} +} + +func (c *changesetServiceClient) ApproveChangeset(ctx context.Context, in *ApproveChangesetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, ChangesetService_ApproveChangeset_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *changesetServiceClient) DeployChangeset(ctx context.Context, in *DeployChangesetRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, ChangesetService_DeployChangeset_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *changesetServiceClient) DiffChangeset(ctx context.Context, in *DiffChangesetRequest, opts ...grpc.CallOption) (*DiffChangesetResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DiffChangesetResponse) + err := c.cc.Invoke(ctx, ChangesetService_DiffChangeset_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *changesetServiceClient) ListChangesets(ctx context.Context, in *ListChangesetsRequest, opts ...grpc.CallOption) (*ListChangesetsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListChangesetsResponse) + err := c.cc.Invoke(ctx, ChangesetService_ListChangesets_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *changesetServiceClient) RollbackChangeset(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, ChangesetService_RollbackChangeset_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ChangesetServiceServer is the server API for ChangesetService service. +// All implementations should embed UnimplementedChangesetServiceServer +// for forward compatibility. +type ChangesetServiceServer interface { + ApproveChangeset(context.Context, *ApproveChangesetRequest) (*emptypb.Empty, error) + DeployChangeset(context.Context, *DeployChangesetRequest) (*emptypb.Empty, error) + DiffChangeset(context.Context, *DiffChangesetRequest) (*DiffChangesetResponse, error) + ListChangesets(context.Context, *ListChangesetsRequest) (*ListChangesetsResponse, error) + RollbackChangeset(context.Context, *emptypb.Empty) (*emptypb.Empty, error) +} + +// UnimplementedChangesetServiceServer should 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 UnimplementedChangesetServiceServer struct{} + +func (UnimplementedChangesetServiceServer) ApproveChangeset(context.Context, *ApproveChangesetRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method ApproveChangeset not implemented") +} +func (UnimplementedChangesetServiceServer) DeployChangeset(context.Context, *DeployChangesetRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeployChangeset not implemented") +} +func (UnimplementedChangesetServiceServer) DiffChangeset(context.Context, *DiffChangesetRequest) (*DiffChangesetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DiffChangeset not implemented") +} +func (UnimplementedChangesetServiceServer) ListChangesets(context.Context, *ListChangesetsRequest) (*ListChangesetsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListChangesets not implemented") +} +func (UnimplementedChangesetServiceServer) RollbackChangeset(context.Context, *emptypb.Empty) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method RollbackChangeset not implemented") +} +func (UnimplementedChangesetServiceServer) testEmbeddedByValue() {} + +// UnsafeChangesetServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ChangesetServiceServer will +// result in compilation errors. +type UnsafeChangesetServiceServer interface { + mustEmbedUnimplementedChangesetServiceServer() +} + +func RegisterChangesetServiceServer(s grpc.ServiceRegistrar, srv ChangesetServiceServer) { + // If the following call pancis, it indicates UnimplementedChangesetServiceServer 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(&ChangesetService_ServiceDesc, srv) +} + +func _ChangesetService_ApproveChangeset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ApproveChangesetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChangesetServiceServer).ApproveChangeset(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ChangesetService_ApproveChangeset_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChangesetServiceServer).ApproveChangeset(ctx, req.(*ApproveChangesetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ChangesetService_DeployChangeset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeployChangesetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChangesetServiceServer).DeployChangeset(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ChangesetService_DeployChangeset_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChangesetServiceServer).DeployChangeset(ctx, req.(*DeployChangesetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ChangesetService_DiffChangeset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DiffChangesetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChangesetServiceServer).DiffChangeset(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ChangesetService_DiffChangeset_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChangesetServiceServer).DiffChangeset(ctx, req.(*DiffChangesetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ChangesetService_ListChangesets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListChangesetsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChangesetServiceServer).ListChangesets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ChangesetService_ListChangesets_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChangesetServiceServer).ListChangesets(ctx, req.(*ListChangesetsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ChangesetService_RollbackChangeset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChangesetServiceServer).RollbackChangeset(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ChangesetService_RollbackChangeset_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChangesetServiceServer).RollbackChangeset(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +// ChangesetService_ServiceDesc is the grpc.ServiceDesc for ChangesetService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ChangesetService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pomerium.dashboard.ChangesetService", + HandlerType: (*ChangesetServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ApproveChangeset", + Handler: _ChangesetService_ApproveChangeset_Handler, + }, + { + MethodName: "DeployChangeset", + Handler: _ChangesetService_DeployChangeset_Handler, + }, + { + MethodName: "DiffChangeset", + Handler: _ChangesetService_DiffChangeset_Handler, + }, + { + MethodName: "ListChangesets", + Handler: _ChangesetService_ListChangesets_Handler, + }, + { + MethodName: "RollbackChangeset", + Handler: _ChangesetService_RollbackChangeset_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "changesets.proto", +} diff --git a/pb/console_config.pb.go b/pb/console_config.pb.go index 6a50b0f..87774f6 100644 --- a/pb/console_config.pb.go +++ b/pb/console_config.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 -// protoc v4.24.4 +// protoc-gen-go v1.34.2 +// protoc v3.20.3 // source: console_config.proto package pb @@ -34,9 +34,11 @@ type ConsoleConfig struct { func (x *ConsoleConfig) Reset() { *x = ConsoleConfig{} - mi := &file_console_config_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_console_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ConsoleConfig) String() string { @@ -47,7 +49,7 @@ func (*ConsoleConfig) ProtoMessage() {} func (x *ConsoleConfig) ProtoReflect() protoreflect.Message { mi := &file_console_config_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -176,6 +178,20 @@ func file_console_config_proto_init() { file_policy_proto_init() file_routes_proto_init() file_settings_proto_init() + if !protoimpl.UnsafeEnabled { + file_console_config_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*ConsoleConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/pb/console_last_error.pb.go b/pb/console_last_error.pb.go new file mode 100644 index 0000000..bc8985f --- /dev/null +++ b/pb/console_last_error.pb.go @@ -0,0 +1,427 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc v3.20.3 +// source: console_last_error.proto + +package pb + +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" +) + +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 LastError_Service int32 + +const ( + LastError_UNKNOWN LastError_Service = 0 + LastError_EXTERNAL_DATA_SOURCE LastError_Service = 1 +) + +// Enum value maps for LastError_Service. +var ( + LastError_Service_name = map[int32]string{ + 0: "UNKNOWN", + 1: "EXTERNAL_DATA_SOURCE", + } + LastError_Service_value = map[string]int32{ + "UNKNOWN": 0, + "EXTERNAL_DATA_SOURCE": 1, + } +) + +func (x LastError_Service) Enum() *LastError_Service { + p := new(LastError_Service) + *p = x + return p +} + +func (x LastError_Service) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LastError_Service) Descriptor() protoreflect.EnumDescriptor { + return file_console_last_error_proto_enumTypes[0].Descriptor() +} + +func (LastError_Service) Type() protoreflect.EnumType { + return &file_console_last_error_proto_enumTypes[0] +} + +func (x LastError_Service) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LastError_Service.Descriptor instead. +func (LastError_Service) EnumDescriptor() ([]byte, []int) { + return file_console_last_error_proto_rawDescGZIP(), []int{0, 0} +} + +type LastError struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Service LastError_Service `protobuf:"varint,1,opt,name=service,proto3,enum=pomerium.dashboard.LastError_Service" json:"service,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Time *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=time,proto3" json:"time,omitempty"` + Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"` + Metadata map[string]string `protobuf:"bytes,5,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ContentType *string `protobuf:"bytes,6,opt,name=content_type,json=contentType,proto3,oneof" json:"content_type,omitempty"` + Data []byte `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *LastError) Reset() { + *x = LastError{} + if protoimpl.UnsafeEnabled { + mi := &file_console_last_error_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LastError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LastError) ProtoMessage() {} + +func (x *LastError) ProtoReflect() protoreflect.Message { + mi := &file_console_last_error_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LastError.ProtoReflect.Descriptor instead. +func (*LastError) Descriptor() ([]byte, []int) { + return file_console_last_error_proto_rawDescGZIP(), []int{0} +} + +func (x *LastError) GetService() LastError_Service { + if x != nil { + return x.Service + } + return LastError_UNKNOWN +} + +func (x *LastError) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *LastError) GetTime() *timestamppb.Timestamp { + if x != nil { + return x.Time + } + return nil +} + +func (x *LastError) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *LastError) GetMetadata() map[string]string { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *LastError) GetContentType() string { + if x != nil && x.ContentType != nil { + return *x.ContentType + } + return "" +} + +func (x *LastError) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +type GetLastErrorRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Service LastError_Service `protobuf:"varint,1,opt,name=service,proto3,enum=pomerium.dashboard.LastError_Service" json:"service,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetLastErrorRequest) Reset() { + *x = GetLastErrorRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_console_last_error_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetLastErrorRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLastErrorRequest) ProtoMessage() {} + +func (x *GetLastErrorRequest) ProtoReflect() protoreflect.Message { + mi := &file_console_last_error_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLastErrorRequest.ProtoReflect.Descriptor instead. +func (*GetLastErrorRequest) Descriptor() ([]byte, []int) { + return file_console_last_error_proto_rawDescGZIP(), []int{1} +} + +func (x *GetLastErrorRequest) GetService() LastError_Service { + if x != nil { + return x.Service + } + return LastError_UNKNOWN +} + +func (x *GetLastErrorRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetLastErrorResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LastError *LastError `protobuf:"bytes,1,opt,name=last_error,json=lastError,proto3" json:"last_error,omitempty"` +} + +func (x *GetLastErrorResponse) Reset() { + *x = GetLastErrorResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_console_last_error_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetLastErrorResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLastErrorResponse) ProtoMessage() {} + +func (x *GetLastErrorResponse) ProtoReflect() protoreflect.Message { + mi := &file_console_last_error_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLastErrorResponse.ProtoReflect.Descriptor instead. +func (*GetLastErrorResponse) Descriptor() ([]byte, []int) { + return file_console_last_error_proto_rawDescGZIP(), []int{2} +} + +func (x *GetLastErrorResponse) GetLastError() *LastError { + if x != nil { + return x.LastError + } + return nil +} + +var File_console_last_error_proto protoreflect.FileDescriptor + +var file_console_last_error_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x70, 0x6f, 0x6d, 0x65, + 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x1a, 0x1f, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xab, 0x03, 0x0a, 0x09, 0x4c, 0x61, 0x73, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x3f, 0x0a, + 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, + 0x2e, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, + 0x61, 0x72, 0x64, 0x2e, 0x4c, 0x61, 0x73, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2e, + 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x47, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x70, 0x6f, 0x6d, + 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, + 0x4c, 0x61, 0x73, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x26, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3b, 0x0a, + 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x30, 0x0a, 0x07, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x45, 0x58, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c, 0x5f, 0x44, + 0x41, 0x54, 0x41, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, 0x01, 0x42, 0x0f, 0x0a, 0x0d, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x66, 0x0a, + 0x13, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, + 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x4c, 0x61, 0x73, 0x74, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x54, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, + 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x64, 0x61, 0x73, + 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x4c, 0x61, 0x73, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x52, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x32, 0x75, 0x0a, 0x10, 0x4c, + 0x61, 0x73, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x61, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, + 0x27, 0x2e, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, + 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x70, 0x6f, 0x6d, 0x65, 0x72, + 0x69, 0x75, 0x6d, 0x2e, 0x64, 0x61, 0x73, 0x68, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x2e, 0x47, 0x65, + 0x74, 0x4c, 0x61, 0x73, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2f, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, + 0x75, 0x6d, 0x2d, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_console_last_error_proto_rawDescOnce sync.Once + file_console_last_error_proto_rawDescData = file_console_last_error_proto_rawDesc +) + +func file_console_last_error_proto_rawDescGZIP() []byte { + file_console_last_error_proto_rawDescOnce.Do(func() { + file_console_last_error_proto_rawDescData = protoimpl.X.CompressGZIP(file_console_last_error_proto_rawDescData) + }) + return file_console_last_error_proto_rawDescData +} + +var file_console_last_error_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_console_last_error_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_console_last_error_proto_goTypes = []any{ + (LastError_Service)(0), // 0: pomerium.dashboard.LastError.Service + (*LastError)(nil), // 1: pomerium.dashboard.LastError + (*GetLastErrorRequest)(nil), // 2: pomerium.dashboard.GetLastErrorRequest + (*GetLastErrorResponse)(nil), // 3: pomerium.dashboard.GetLastErrorResponse + nil, // 4: pomerium.dashboard.LastError.MetadataEntry + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp +} +var file_console_last_error_proto_depIdxs = []int32{ + 0, // 0: pomerium.dashboard.LastError.service:type_name -> pomerium.dashboard.LastError.Service + 5, // 1: pomerium.dashboard.LastError.time:type_name -> google.protobuf.Timestamp + 4, // 2: pomerium.dashboard.LastError.metadata:type_name -> pomerium.dashboard.LastError.MetadataEntry + 0, // 3: pomerium.dashboard.GetLastErrorRequest.service:type_name -> pomerium.dashboard.LastError.Service + 1, // 4: pomerium.dashboard.GetLastErrorResponse.last_error:type_name -> pomerium.dashboard.LastError + 2, // 5: pomerium.dashboard.LastErrorService.GetLastError:input_type -> pomerium.dashboard.GetLastErrorRequest + 3, // 6: pomerium.dashboard.LastErrorService.GetLastError:output_type -> pomerium.dashboard.GetLastErrorResponse + 6, // [6:7] is the sub-list for method output_type + 5, // [5:6] 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_console_last_error_proto_init() } +func file_console_last_error_proto_init() { + if File_console_last_error_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_console_last_error_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*LastError); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_console_last_error_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetLastErrorRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_console_last_error_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*GetLastErrorResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_console_last_error_proto_msgTypes[0].OneofWrappers = []any{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_console_last_error_proto_rawDesc, + NumEnums: 1, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_console_last_error_proto_goTypes, + DependencyIndexes: file_console_last_error_proto_depIdxs, + EnumInfos: file_console_last_error_proto_enumTypes, + MessageInfos: file_console_last_error_proto_msgTypes, + }.Build() + File_console_last_error_proto = out.File + file_console_last_error_proto_rawDesc = nil + file_console_last_error_proto_goTypes = nil + file_console_last_error_proto_depIdxs = nil +} diff --git a/pb/console_last_error_grpc.pb.go b/pb/console_last_error_grpc.pb.go new file mode 100644 index 0000000..7e55831 --- /dev/null +++ b/pb/console_last_error_grpc.pb.go @@ -0,0 +1,119 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v3.20.3 +// source: console_last_error.proto + +package pb + +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 ( + LastErrorService_GetLastError_FullMethodName = "/pomerium.dashboard.LastErrorService/GetLastError" +) + +// LastErrorServiceClient is the client API for LastErrorService 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 LastErrorServiceClient interface { + GetLastError(ctx context.Context, in *GetLastErrorRequest, opts ...grpc.CallOption) (*GetLastErrorResponse, error) +} + +type lastErrorServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewLastErrorServiceClient(cc grpc.ClientConnInterface) LastErrorServiceClient { + return &lastErrorServiceClient{cc} +} + +func (c *lastErrorServiceClient) GetLastError(ctx context.Context, in *GetLastErrorRequest, opts ...grpc.CallOption) (*GetLastErrorResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetLastErrorResponse) + err := c.cc.Invoke(ctx, LastErrorService_GetLastError_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// LastErrorServiceServer is the server API for LastErrorService service. +// All implementations should embed UnimplementedLastErrorServiceServer +// for forward compatibility. +type LastErrorServiceServer interface { + GetLastError(context.Context, *GetLastErrorRequest) (*GetLastErrorResponse, error) +} + +// UnimplementedLastErrorServiceServer should 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 UnimplementedLastErrorServiceServer struct{} + +func (UnimplementedLastErrorServiceServer) GetLastError(context.Context, *GetLastErrorRequest) (*GetLastErrorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLastError not implemented") +} +func (UnimplementedLastErrorServiceServer) testEmbeddedByValue() {} + +// UnsafeLastErrorServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to LastErrorServiceServer will +// result in compilation errors. +type UnsafeLastErrorServiceServer interface { + mustEmbedUnimplementedLastErrorServiceServer() +} + +func RegisterLastErrorServiceServer(s grpc.ServiceRegistrar, srv LastErrorServiceServer) { + // If the following call pancis, it indicates UnimplementedLastErrorServiceServer 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(&LastErrorService_ServiceDesc, srv) +} + +func _LastErrorService_GetLastError_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetLastErrorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LastErrorServiceServer).GetLastError(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: LastErrorService_GetLastError_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LastErrorServiceServer).GetLastError(ctx, req.(*GetLastErrorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// LastErrorService_ServiceDesc is the grpc.ServiceDesc for LastErrorService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var LastErrorService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pomerium.dashboard.LastErrorService", + HandlerType: (*LastErrorServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetLastError", + Handler: _LastErrorService_GetLastError_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "console_last_error.proto", +} diff --git a/pb/databroker_svc.pb.go b/pb/databroker_svc.pb.go index bbb4156..e904cee 100644 --- a/pb/databroker_svc.pb.go +++ b/pb/databroker_svc.pb.go @@ -1,17 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 -// protoc v4.24.4 +// protoc-gen-go v1.34.2 +// protoc v3.20.3 // source: databroker_svc.proto package pb import ( - context "context" databroker "github.com/pomerium/pomerium/pkg/grpc/databroker" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" @@ -37,9 +33,11 @@ type ListDataBrokerRecordsRequest struct { func (x *ListDataBrokerRecordsRequest) Reset() { *x = ListDataBrokerRecordsRequest{} - mi := &file_databroker_svc_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_databroker_svc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListDataBrokerRecordsRequest) String() string { @@ -50,7 +48,7 @@ func (*ListDataBrokerRecordsRequest) ProtoMessage() {} func (x *ListDataBrokerRecordsRequest) ProtoReflect() protoreflect.Message { mi := &file_databroker_svc_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -82,9 +80,11 @@ type ListDataBrokerRecordsResponse struct { func (x *ListDataBrokerRecordsResponse) Reset() { *x = ListDataBrokerRecordsResponse{} - mi := &file_databroker_svc_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_databroker_svc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListDataBrokerRecordsResponse) String() string { @@ -95,7 +95,7 @@ func (*ListDataBrokerRecordsResponse) ProtoMessage() {} func (x *ListDataBrokerRecordsResponse) ProtoReflect() protoreflect.Message { mi := &file_databroker_svc_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -127,9 +127,11 @@ type ListDataBrokerRecordTypesResponse struct { func (x *ListDataBrokerRecordTypesResponse) Reset() { *x = ListDataBrokerRecordTypesResponse{} - mi := &file_databroker_svc_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_databroker_svc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListDataBrokerRecordTypesResponse) String() string { @@ -140,7 +142,7 @@ func (*ListDataBrokerRecordTypesResponse) ProtoMessage() {} func (x *ListDataBrokerRecordTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_databroker_svc_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -178,9 +180,11 @@ type QueryDataBrokerRecordsRequest struct { func (x *QueryDataBrokerRecordsRequest) Reset() { *x = QueryDataBrokerRecordsRequest{} - mi := &file_databroker_svc_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_databroker_svc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *QueryDataBrokerRecordsRequest) String() string { @@ -191,7 +195,7 @@ func (*QueryDataBrokerRecordsRequest) ProtoMessage() {} func (x *QueryDataBrokerRecordsRequest) ProtoReflect() protoreflect.Message { mi := &file_databroker_svc_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -247,9 +251,11 @@ type Record struct { func (x *Record) Reset() { *x = Record{} - mi := &file_databroker_svc_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_databroker_svc_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Record) String() string { @@ -260,7 +266,7 @@ func (*Record) ProtoMessage() {} func (x *Record) ProtoReflect() protoreflect.Message { mi := &file_databroker_svc_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -301,9 +307,11 @@ type QueryDataBrokerRecordsResponse struct { func (x *QueryDataBrokerRecordsResponse) Reset() { *x = QueryDataBrokerRecordsResponse{} - mi := &file_databroker_svc_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_databroker_svc_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *QueryDataBrokerRecordsResponse) String() string { @@ -314,7 +322,7 @@ func (*QueryDataBrokerRecordsResponse) ProtoMessage() {} func (x *QueryDataBrokerRecordsResponse) ProtoReflect() protoreflect.Message { mi := &file_databroker_svc_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -467,6 +475,80 @@ func file_databroker_svc_proto_init() { if File_databroker_svc_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_databroker_svc_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*ListDataBrokerRecordsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_databroker_svc_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ListDataBrokerRecordsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_databroker_svc_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*ListDataBrokerRecordTypesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_databroker_svc_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*QueryDataBrokerRecordsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_databroker_svc_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*Record); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_databroker_svc_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*QueryDataBrokerRecordsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ @@ -486,155 +568,3 @@ func file_databroker_svc_proto_init() { file_databroker_svc_proto_goTypes = nil file_databroker_svc_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// DataBrokerClient is the client API for DataBroker service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type DataBrokerClient interface { - ListDataBrokerRecords(ctx context.Context, in *ListDataBrokerRecordsRequest, opts ...grpc.CallOption) (*ListDataBrokerRecordsResponse, error) - ListDataBrokerRecordTypes(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListDataBrokerRecordTypesResponse, error) - QueryDataBrokerRecords(ctx context.Context, in *QueryDataBrokerRecordsRequest, opts ...grpc.CallOption) (*QueryDataBrokerRecordsResponse, error) -} - -type dataBrokerClient struct { - cc grpc.ClientConnInterface -} - -func NewDataBrokerClient(cc grpc.ClientConnInterface) DataBrokerClient { - return &dataBrokerClient{cc} -} - -func (c *dataBrokerClient) ListDataBrokerRecords(ctx context.Context, in *ListDataBrokerRecordsRequest, opts ...grpc.CallOption) (*ListDataBrokerRecordsResponse, error) { - out := new(ListDataBrokerRecordsResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.DataBroker/ListDataBrokerRecords", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *dataBrokerClient) ListDataBrokerRecordTypes(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListDataBrokerRecordTypesResponse, error) { - out := new(ListDataBrokerRecordTypesResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.DataBroker/ListDataBrokerRecordTypes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *dataBrokerClient) QueryDataBrokerRecords(ctx context.Context, in *QueryDataBrokerRecordsRequest, opts ...grpc.CallOption) (*QueryDataBrokerRecordsResponse, error) { - out := new(QueryDataBrokerRecordsResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.DataBroker/QueryDataBrokerRecords", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// DataBrokerServer is the server API for DataBroker service. -type DataBrokerServer interface { - ListDataBrokerRecords(context.Context, *ListDataBrokerRecordsRequest) (*ListDataBrokerRecordsResponse, error) - ListDataBrokerRecordTypes(context.Context, *emptypb.Empty) (*ListDataBrokerRecordTypesResponse, error) - QueryDataBrokerRecords(context.Context, *QueryDataBrokerRecordsRequest) (*QueryDataBrokerRecordsResponse, error) -} - -// UnimplementedDataBrokerServer can be embedded to have forward compatible implementations. -type UnimplementedDataBrokerServer struct { -} - -func (*UnimplementedDataBrokerServer) ListDataBrokerRecords(context.Context, *ListDataBrokerRecordsRequest) (*ListDataBrokerRecordsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListDataBrokerRecords not implemented") -} -func (*UnimplementedDataBrokerServer) ListDataBrokerRecordTypes(context.Context, *emptypb.Empty) (*ListDataBrokerRecordTypesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListDataBrokerRecordTypes not implemented") -} -func (*UnimplementedDataBrokerServer) QueryDataBrokerRecords(context.Context, *QueryDataBrokerRecordsRequest) (*QueryDataBrokerRecordsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method QueryDataBrokerRecords not implemented") -} - -func RegisterDataBrokerServer(s *grpc.Server, srv DataBrokerServer) { - s.RegisterService(&_DataBroker_serviceDesc, srv) -} - -func _DataBroker_ListDataBrokerRecords_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListDataBrokerRecordsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DataBrokerServer).ListDataBrokerRecords(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.DataBroker/ListDataBrokerRecords", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DataBrokerServer).ListDataBrokerRecords(ctx, req.(*ListDataBrokerRecordsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _DataBroker_ListDataBrokerRecordTypes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(emptypb.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DataBrokerServer).ListDataBrokerRecordTypes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.DataBroker/ListDataBrokerRecordTypes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DataBrokerServer).ListDataBrokerRecordTypes(ctx, req.(*emptypb.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _DataBroker_QueryDataBrokerRecords_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryDataBrokerRecordsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DataBrokerServer).QueryDataBrokerRecords(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.DataBroker/QueryDataBrokerRecords", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DataBrokerServer).QueryDataBrokerRecords(ctx, req.(*QueryDataBrokerRecordsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _DataBroker_serviceDesc = grpc.ServiceDesc{ - ServiceName: "pomerium.dashboard.DataBroker", - HandlerType: (*DataBrokerServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListDataBrokerRecords", - Handler: _DataBroker_ListDataBrokerRecords_Handler, - }, - { - MethodName: "ListDataBrokerRecordTypes", - Handler: _DataBroker_ListDataBrokerRecordTypes_Handler, - }, - { - MethodName: "QueryDataBrokerRecords", - Handler: _DataBroker_QueryDataBrokerRecords_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "databroker_svc.proto", -} diff --git a/pb/databroker_svc_grpc.pb.go b/pb/databroker_svc_grpc.pb.go new file mode 100644 index 0000000..c500efc --- /dev/null +++ b/pb/databroker_svc_grpc.pb.go @@ -0,0 +1,196 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v3.20.3 +// source: databroker_svc.proto + +package pb + +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 ( + DataBroker_ListDataBrokerRecords_FullMethodName = "/pomerium.dashboard.DataBroker/ListDataBrokerRecords" + DataBroker_ListDataBrokerRecordTypes_FullMethodName = "/pomerium.dashboard.DataBroker/ListDataBrokerRecordTypes" + DataBroker_QueryDataBrokerRecords_FullMethodName = "/pomerium.dashboard.DataBroker/QueryDataBrokerRecords" +) + +// DataBrokerClient is the client API for DataBroker 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 DataBrokerClient interface { + ListDataBrokerRecords(ctx context.Context, in *ListDataBrokerRecordsRequest, opts ...grpc.CallOption) (*ListDataBrokerRecordsResponse, error) + ListDataBrokerRecordTypes(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListDataBrokerRecordTypesResponse, error) + QueryDataBrokerRecords(ctx context.Context, in *QueryDataBrokerRecordsRequest, opts ...grpc.CallOption) (*QueryDataBrokerRecordsResponse, error) +} + +type dataBrokerClient struct { + cc grpc.ClientConnInterface +} + +func NewDataBrokerClient(cc grpc.ClientConnInterface) DataBrokerClient { + return &dataBrokerClient{cc} +} + +func (c *dataBrokerClient) ListDataBrokerRecords(ctx context.Context, in *ListDataBrokerRecordsRequest, opts ...grpc.CallOption) (*ListDataBrokerRecordsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListDataBrokerRecordsResponse) + err := c.cc.Invoke(ctx, DataBroker_ListDataBrokerRecords_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataBrokerClient) ListDataBrokerRecordTypes(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListDataBrokerRecordTypesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListDataBrokerRecordTypesResponse) + err := c.cc.Invoke(ctx, DataBroker_ListDataBrokerRecordTypes_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *dataBrokerClient) QueryDataBrokerRecords(ctx context.Context, in *QueryDataBrokerRecordsRequest, opts ...grpc.CallOption) (*QueryDataBrokerRecordsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryDataBrokerRecordsResponse) + err := c.cc.Invoke(ctx, DataBroker_QueryDataBrokerRecords_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// DataBrokerServer is the server API for DataBroker service. +// All implementations should embed UnimplementedDataBrokerServer +// for forward compatibility. +type DataBrokerServer interface { + ListDataBrokerRecords(context.Context, *ListDataBrokerRecordsRequest) (*ListDataBrokerRecordsResponse, error) + ListDataBrokerRecordTypes(context.Context, *emptypb.Empty) (*ListDataBrokerRecordTypesResponse, error) + QueryDataBrokerRecords(context.Context, *QueryDataBrokerRecordsRequest) (*QueryDataBrokerRecordsResponse, error) +} + +// UnimplementedDataBrokerServer should 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 UnimplementedDataBrokerServer struct{} + +func (UnimplementedDataBrokerServer) ListDataBrokerRecords(context.Context, *ListDataBrokerRecordsRequest) (*ListDataBrokerRecordsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListDataBrokerRecords not implemented") +} +func (UnimplementedDataBrokerServer) ListDataBrokerRecordTypes(context.Context, *emptypb.Empty) (*ListDataBrokerRecordTypesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListDataBrokerRecordTypes not implemented") +} +func (UnimplementedDataBrokerServer) QueryDataBrokerRecords(context.Context, *QueryDataBrokerRecordsRequest) (*QueryDataBrokerRecordsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryDataBrokerRecords not implemented") +} +func (UnimplementedDataBrokerServer) testEmbeddedByValue() {} + +// UnsafeDataBrokerServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to DataBrokerServer will +// result in compilation errors. +type UnsafeDataBrokerServer interface { + mustEmbedUnimplementedDataBrokerServer() +} + +func RegisterDataBrokerServer(s grpc.ServiceRegistrar, srv DataBrokerServer) { + // If the following call pancis, it indicates UnimplementedDataBrokerServer 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(&DataBroker_ServiceDesc, srv) +} + +func _DataBroker_ListDataBrokerRecords_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListDataBrokerRecordsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataBrokerServer).ListDataBrokerRecords(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DataBroker_ListDataBrokerRecords_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataBrokerServer).ListDataBrokerRecords(ctx, req.(*ListDataBrokerRecordsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataBroker_ListDataBrokerRecordTypes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataBrokerServer).ListDataBrokerRecordTypes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DataBroker_ListDataBrokerRecordTypes_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataBrokerServer).ListDataBrokerRecordTypes(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _DataBroker_QueryDataBrokerRecords_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryDataBrokerRecordsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DataBrokerServer).QueryDataBrokerRecords(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DataBroker_QueryDataBrokerRecords_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DataBrokerServer).QueryDataBrokerRecords(ctx, req.(*QueryDataBrokerRecordsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// DataBroker_ServiceDesc is the grpc.ServiceDesc for DataBroker service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var DataBroker_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pomerium.dashboard.DataBroker", + HandlerType: (*DataBrokerServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListDataBrokerRecords", + Handler: _DataBroker_ListDataBrokerRecords_Handler, + }, + { + MethodName: "ListDataBrokerRecordTypes", + Handler: _DataBroker_ListDataBrokerRecordTypes_Handler, + }, + { + MethodName: "QueryDataBrokerRecords", + Handler: _DataBroker_QueryDataBrokerRecords_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "databroker_svc.proto", +} diff --git a/pb/devices.pb.go b/pb/devices.pb.go index 015feea..67359cb 100644 --- a/pb/devices.pb.go +++ b/pb/devices.pb.go @@ -1,16 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 -// protoc v4.24.4 +// protoc-gen-go v1.34.2 +// protoc v3.20.3 // source: devices.proto package pb import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" emptypb "google.golang.org/protobuf/types/known/emptypb" @@ -335,9 +331,11 @@ type WebAuthnOptions struct { func (x *WebAuthnOptions) Reset() { *x = WebAuthnOptions{} - mi := &file_devices_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_devices_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *WebAuthnOptions) String() string { @@ -348,7 +346,7 @@ func (*WebAuthnOptions) ProtoMessage() {} func (x *WebAuthnOptions) ProtoReflect() protoreflect.Message { mi := &file_devices_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -403,9 +401,11 @@ type DeviceType struct { func (x *DeviceType) Reset() { *x = DeviceType{} - mi := &file_devices_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_devices_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeviceType) String() string { @@ -416,7 +416,7 @@ func (*DeviceType) ProtoMessage() {} func (x *DeviceType) ProtoReflect() protoreflect.Message { mi := &file_devices_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -512,9 +512,11 @@ type DeviceEnrollment struct { func (x *DeviceEnrollment) Reset() { *x = DeviceEnrollment{} - mi := &file_devices_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_devices_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeviceEnrollment) String() string { @@ -525,7 +527,7 @@ func (*DeviceEnrollment) ProtoMessage() {} func (x *DeviceEnrollment) ProtoReflect() protoreflect.Message { mi := &file_devices_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -645,9 +647,11 @@ type DeviceCredential struct { func (x *DeviceCredential) Reset() { *x = DeviceCredential{} - mi := &file_devices_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_devices_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeviceCredential) String() string { @@ -658,7 +662,7 @@ func (*DeviceCredential) ProtoMessage() {} func (x *DeviceCredential) ProtoReflect() protoreflect.Message { mi := &file_devices_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -760,9 +764,11 @@ type DeviceOwnerCredentialRecord struct { func (x *DeviceOwnerCredentialRecord) Reset() { *x = DeviceOwnerCredentialRecord{} - mi := &file_devices_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_devices_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeviceOwnerCredentialRecord) String() string { @@ -773,7 +779,7 @@ func (*DeviceOwnerCredentialRecord) ProtoMessage() {} func (x *DeviceOwnerCredentialRecord) ProtoReflect() protoreflect.Message { mi := &file_devices_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -823,9 +829,11 @@ type ApproveDeviceRequest struct { func (x *ApproveDeviceRequest) Reset() { *x = ApproveDeviceRequest{} - mi := &file_devices_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_devices_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ApproveDeviceRequest) String() string { @@ -836,7 +844,7 @@ func (*ApproveDeviceRequest) ProtoMessage() {} func (x *ApproveDeviceRequest) ProtoReflect() protoreflect.Message { mi := &file_devices_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -900,9 +908,11 @@ type CreateDeviceEnrollmentRequest struct { func (x *CreateDeviceEnrollmentRequest) Reset() { *x = CreateDeviceEnrollmentRequest{} - mi := &file_devices_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_devices_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreateDeviceEnrollmentRequest) String() string { @@ -913,7 +923,7 @@ func (*CreateDeviceEnrollmentRequest) ProtoMessage() {} func (x *CreateDeviceEnrollmentRequest) ProtoReflect() protoreflect.Message { mi := &file_devices_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -960,9 +970,11 @@ type CreateDeviceEnrollmentResponse struct { func (x *CreateDeviceEnrollmentResponse) Reset() { *x = CreateDeviceEnrollmentResponse{} - mi := &file_devices_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_devices_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreateDeviceEnrollmentResponse) String() string { @@ -973,7 +985,7 @@ func (*CreateDeviceEnrollmentResponse) ProtoMessage() {} func (x *CreateDeviceEnrollmentResponse) ProtoReflect() protoreflect.Message { mi := &file_devices_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1016,9 +1028,11 @@ type DeleteDeviceRequest struct { func (x *DeleteDeviceRequest) Reset() { *x = DeleteDeviceRequest{} - mi := &file_devices_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_devices_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeleteDeviceRequest) String() string { @@ -1029,7 +1043,7 @@ func (*DeleteDeviceRequest) ProtoMessage() {} func (x *DeleteDeviceRequest) ProtoReflect() protoreflect.Message { mi := &file_devices_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1091,9 +1105,11 @@ type DeleteDeviceTypeRequest struct { func (x *DeleteDeviceTypeRequest) Reset() { *x = DeleteDeviceTypeRequest{} - mi := &file_devices_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_devices_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeleteDeviceTypeRequest) String() string { @@ -1104,7 +1120,7 @@ func (*DeleteDeviceTypeRequest) ProtoMessage() {} func (x *DeleteDeviceTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_devices_proto_msgTypes[9] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1138,9 +1154,11 @@ type ListDevicesRequest struct { func (x *ListDevicesRequest) Reset() { *x = ListDevicesRequest{} - mi := &file_devices_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_devices_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListDevicesRequest) String() string { @@ -1151,7 +1169,7 @@ func (*ListDevicesRequest) ProtoMessage() {} func (x *ListDevicesRequest) ProtoReflect() protoreflect.Message { mi := &file_devices_proto_msgTypes[10] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1197,9 +1215,11 @@ type ListDevicesResponse struct { func (x *ListDevicesResponse) Reset() { *x = ListDevicesResponse{} - mi := &file_devices_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_devices_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListDevicesResponse) String() string { @@ -1210,7 +1230,7 @@ func (*ListDevicesResponse) ProtoMessage() {} func (x *ListDevicesResponse) ProtoReflect() protoreflect.Message { mi := &file_devices_proto_msgTypes[11] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1242,9 +1262,11 @@ type ListDeviceTypesResponse struct { func (x *ListDeviceTypesResponse) Reset() { *x = ListDeviceTypesResponse{} - mi := &file_devices_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_devices_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListDeviceTypesResponse) String() string { @@ -1255,7 +1277,7 @@ func (*ListDeviceTypesResponse) ProtoMessage() {} func (x *ListDeviceTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_devices_proto_msgTypes[12] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1287,9 +1309,11 @@ type SetDeviceTypeRequest struct { func (x *SetDeviceTypeRequest) Reset() { *x = SetDeviceTypeRequest{} - mi := &file_devices_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_devices_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetDeviceTypeRequest) String() string { @@ -1300,7 +1324,7 @@ func (*SetDeviceTypeRequest) ProtoMessage() {} func (x *SetDeviceTypeRequest) ProtoReflect() protoreflect.Message { mi := &file_devices_proto_msgTypes[13] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1332,9 +1356,11 @@ type SetDeviceTypeResponse struct { func (x *SetDeviceTypeResponse) Reset() { *x = SetDeviceTypeResponse{} - mi := &file_devices_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_devices_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetDeviceTypeResponse) String() string { @@ -1345,7 +1371,7 @@ func (*SetDeviceTypeResponse) ProtoMessage() {} func (x *SetDeviceTypeResponse) ProtoReflect() protoreflect.Message { mi := &file_devices_proto_msgTypes[14] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1380,9 +1406,11 @@ type WebAuthnOptions_AuthenticatorSelectionCriteria struct { func (x *WebAuthnOptions_AuthenticatorSelectionCriteria) Reset() { *x = WebAuthnOptions_AuthenticatorSelectionCriteria{} - mi := &file_devices_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_devices_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *WebAuthnOptions_AuthenticatorSelectionCriteria) String() string { @@ -1393,7 +1421,7 @@ func (*WebAuthnOptions_AuthenticatorSelectionCriteria) ProtoMessage() {} func (x *WebAuthnOptions_AuthenticatorSelectionCriteria) ProtoReflect() protoreflect.Message { mi := &file_devices_proto_msgTypes[15] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1447,9 +1475,11 @@ type WebAuthnOptions_PublicKeyCredentialParameters struct { func (x *WebAuthnOptions_PublicKeyCredentialParameters) Reset() { *x = WebAuthnOptions_PublicKeyCredentialParameters{} - mi := &file_devices_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_devices_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *WebAuthnOptions_PublicKeyCredentialParameters) String() string { @@ -1460,7 +1490,7 @@ func (*WebAuthnOptions_PublicKeyCredentialParameters) ProtoMessage() {} func (x *WebAuthnOptions_PublicKeyCredentialParameters) ProtoReflect() protoreflect.Message { mi := &file_devices_proto_msgTypes[16] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1499,9 +1529,11 @@ type DeviceType_WebAuthn struct { func (x *DeviceType_WebAuthn) Reset() { *x = DeviceType_WebAuthn{} - mi := &file_devices_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_devices_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeviceType_WebAuthn) String() string { @@ -1512,7 +1544,7 @@ func (*DeviceType_WebAuthn) ProtoMessage() {} func (x *DeviceType_WebAuthn) ProtoReflect() protoreflect.Message { mi := &file_devices_proto_msgTypes[17] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1551,9 +1583,11 @@ type DeviceCredential_WebAuthn struct { func (x *DeviceCredential_WebAuthn) Reset() { *x = DeviceCredential_WebAuthn{} - mi := &file_devices_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_devices_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeviceCredential_WebAuthn) String() string { @@ -1564,7 +1598,7 @@ func (*DeviceCredential_WebAuthn) ProtoMessage() {} func (x *DeviceCredential_WebAuthn) ProtoReflect() protoreflect.Message { mi := &file_devices_proto_msgTypes[18] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1629,9 +1663,11 @@ type ListDevicesResponse_Device struct { func (x *ListDevicesResponse_Device) Reset() { *x = ListDevicesResponse_Device{} - mi := &file_devices_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_devices_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListDevicesResponse_Device) String() string { @@ -1642,7 +1678,7 @@ func (*ListDevicesResponse_Device) ProtoMessage() {} func (x *ListDevicesResponse_Device) ProtoReflect() protoreflect.Message { mi := &file_devices_proto_msgTypes[19] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2153,6 +2189,248 @@ func file_devices_proto_init() { if File_devices_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_devices_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*WebAuthnOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_devices_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*DeviceType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_devices_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*DeviceEnrollment); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_devices_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*DeviceCredential); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_devices_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*DeviceOwnerCredentialRecord); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_devices_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*ApproveDeviceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_devices_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*CreateDeviceEnrollmentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_devices_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*CreateDeviceEnrollmentResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_devices_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*DeleteDeviceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_devices_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*DeleteDeviceTypeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_devices_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*ListDevicesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_devices_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*ListDevicesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_devices_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*ListDeviceTypesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_devices_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*SetDeviceTypeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_devices_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*SetDeviceTypeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_devices_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*WebAuthnOptions_AuthenticatorSelectionCriteria); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_devices_proto_msgTypes[16].Exporter = func(v any, i int) any { + switch v := v.(*WebAuthnOptions_PublicKeyCredentialParameters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_devices_proto_msgTypes[17].Exporter = func(v any, i int) any { + switch v := v.(*DeviceType_WebAuthn); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_devices_proto_msgTypes[18].Exporter = func(v any, i int) any { + switch v := v.(*DeviceCredential_WebAuthn); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_devices_proto_msgTypes[19].Exporter = func(v any, i int) any { + switch v := v.(*ListDevicesResponse_Device); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } file_devices_proto_msgTypes[0].OneofWrappers = []any{} file_devices_proto_msgTypes[1].OneofWrappers = []any{ (*DeviceType_Webauthn)(nil), @@ -2190,299 +2468,3 @@ func file_devices_proto_init() { file_devices_proto_goTypes = nil file_devices_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// DeviceServiceClient is the client API for DeviceService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type DeviceServiceClient interface { - ApproveDevice(ctx context.Context, in *ApproveDeviceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - CreateDeviceEnrollment(ctx context.Context, in *CreateDeviceEnrollmentRequest, opts ...grpc.CallOption) (*CreateDeviceEnrollmentResponse, error) - SetDeviceType(ctx context.Context, in *SetDeviceTypeRequest, opts ...grpc.CallOption) (*SetDeviceTypeResponse, error) - DeleteDevice(ctx context.Context, in *DeleteDeviceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - DeleteDeviceType(ctx context.Context, in *DeleteDeviceTypeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - ListDevices(ctx context.Context, in *ListDevicesRequest, opts ...grpc.CallOption) (*ListDevicesResponse, error) - ListDeviceTypes(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListDeviceTypesResponse, error) -} - -type deviceServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewDeviceServiceClient(cc grpc.ClientConnInterface) DeviceServiceClient { - return &deviceServiceClient{cc} -} - -func (c *deviceServiceClient) ApproveDevice(ctx context.Context, in *ApproveDeviceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.DeviceService/ApproveDevice", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *deviceServiceClient) CreateDeviceEnrollment(ctx context.Context, in *CreateDeviceEnrollmentRequest, opts ...grpc.CallOption) (*CreateDeviceEnrollmentResponse, error) { - out := new(CreateDeviceEnrollmentResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.DeviceService/CreateDeviceEnrollment", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *deviceServiceClient) SetDeviceType(ctx context.Context, in *SetDeviceTypeRequest, opts ...grpc.CallOption) (*SetDeviceTypeResponse, error) { - out := new(SetDeviceTypeResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.DeviceService/SetDeviceType", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *deviceServiceClient) DeleteDevice(ctx context.Context, in *DeleteDeviceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.DeviceService/DeleteDevice", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *deviceServiceClient) DeleteDeviceType(ctx context.Context, in *DeleteDeviceTypeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.DeviceService/DeleteDeviceType", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *deviceServiceClient) ListDevices(ctx context.Context, in *ListDevicesRequest, opts ...grpc.CallOption) (*ListDevicesResponse, error) { - out := new(ListDevicesResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.DeviceService/ListDevices", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *deviceServiceClient) ListDeviceTypes(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListDeviceTypesResponse, error) { - out := new(ListDeviceTypesResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.DeviceService/ListDeviceTypes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// DeviceServiceServer is the server API for DeviceService service. -type DeviceServiceServer interface { - ApproveDevice(context.Context, *ApproveDeviceRequest) (*emptypb.Empty, error) - CreateDeviceEnrollment(context.Context, *CreateDeviceEnrollmentRequest) (*CreateDeviceEnrollmentResponse, error) - SetDeviceType(context.Context, *SetDeviceTypeRequest) (*SetDeviceTypeResponse, error) - DeleteDevice(context.Context, *DeleteDeviceRequest) (*emptypb.Empty, error) - DeleteDeviceType(context.Context, *DeleteDeviceTypeRequest) (*emptypb.Empty, error) - ListDevices(context.Context, *ListDevicesRequest) (*ListDevicesResponse, error) - ListDeviceTypes(context.Context, *emptypb.Empty) (*ListDeviceTypesResponse, error) -} - -// UnimplementedDeviceServiceServer can be embedded to have forward compatible implementations. -type UnimplementedDeviceServiceServer struct { -} - -func (*UnimplementedDeviceServiceServer) ApproveDevice(context.Context, *ApproveDeviceRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method ApproveDevice not implemented") -} -func (*UnimplementedDeviceServiceServer) CreateDeviceEnrollment(context.Context, *CreateDeviceEnrollmentRequest) (*CreateDeviceEnrollmentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateDeviceEnrollment not implemented") -} -func (*UnimplementedDeviceServiceServer) SetDeviceType(context.Context, *SetDeviceTypeRequest) (*SetDeviceTypeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetDeviceType not implemented") -} -func (*UnimplementedDeviceServiceServer) DeleteDevice(context.Context, *DeleteDeviceRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteDevice not implemented") -} -func (*UnimplementedDeviceServiceServer) DeleteDeviceType(context.Context, *DeleteDeviceTypeRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteDeviceType not implemented") -} -func (*UnimplementedDeviceServiceServer) ListDevices(context.Context, *ListDevicesRequest) (*ListDevicesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListDevices not implemented") -} -func (*UnimplementedDeviceServiceServer) ListDeviceTypes(context.Context, *emptypb.Empty) (*ListDeviceTypesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListDeviceTypes not implemented") -} - -func RegisterDeviceServiceServer(s *grpc.Server, srv DeviceServiceServer) { - s.RegisterService(&_DeviceService_serviceDesc, srv) -} - -func _DeviceService_ApproveDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ApproveDeviceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DeviceServiceServer).ApproveDevice(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.DeviceService/ApproveDevice", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DeviceServiceServer).ApproveDevice(ctx, req.(*ApproveDeviceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _DeviceService_CreateDeviceEnrollment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateDeviceEnrollmentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DeviceServiceServer).CreateDeviceEnrollment(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.DeviceService/CreateDeviceEnrollment", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DeviceServiceServer).CreateDeviceEnrollment(ctx, req.(*CreateDeviceEnrollmentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _DeviceService_SetDeviceType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetDeviceTypeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DeviceServiceServer).SetDeviceType(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.DeviceService/SetDeviceType", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DeviceServiceServer).SetDeviceType(ctx, req.(*SetDeviceTypeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _DeviceService_DeleteDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteDeviceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DeviceServiceServer).DeleteDevice(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.DeviceService/DeleteDevice", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DeviceServiceServer).DeleteDevice(ctx, req.(*DeleteDeviceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _DeviceService_DeleteDeviceType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteDeviceTypeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DeviceServiceServer).DeleteDeviceType(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.DeviceService/DeleteDeviceType", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DeviceServiceServer).DeleteDeviceType(ctx, req.(*DeleteDeviceTypeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _DeviceService_ListDevices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListDevicesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DeviceServiceServer).ListDevices(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.DeviceService/ListDevices", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DeviceServiceServer).ListDevices(ctx, req.(*ListDevicesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _DeviceService_ListDeviceTypes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(emptypb.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DeviceServiceServer).ListDeviceTypes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.DeviceService/ListDeviceTypes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DeviceServiceServer).ListDeviceTypes(ctx, req.(*emptypb.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -var _DeviceService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "pomerium.dashboard.DeviceService", - HandlerType: (*DeviceServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ApproveDevice", - Handler: _DeviceService_ApproveDevice_Handler, - }, - { - MethodName: "CreateDeviceEnrollment", - Handler: _DeviceService_CreateDeviceEnrollment_Handler, - }, - { - MethodName: "SetDeviceType", - Handler: _DeviceService_SetDeviceType_Handler, - }, - { - MethodName: "DeleteDevice", - Handler: _DeviceService_DeleteDevice_Handler, - }, - { - MethodName: "DeleteDeviceType", - Handler: _DeviceService_DeleteDeviceType_Handler, - }, - { - MethodName: "ListDevices", - Handler: _DeviceService_ListDevices_Handler, - }, - { - MethodName: "ListDeviceTypes", - Handler: _DeviceService_ListDeviceTypes_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "devices.proto", -} diff --git a/pb/devices_grpc.pb.go b/pb/devices_grpc.pb.go new file mode 100644 index 0000000..bf04a7b --- /dev/null +++ b/pb/devices_grpc.pb.go @@ -0,0 +1,352 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v3.20.3 +// source: devices.proto + +package pb + +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 ( + DeviceService_ApproveDevice_FullMethodName = "/pomerium.dashboard.DeviceService/ApproveDevice" + DeviceService_CreateDeviceEnrollment_FullMethodName = "/pomerium.dashboard.DeviceService/CreateDeviceEnrollment" + DeviceService_SetDeviceType_FullMethodName = "/pomerium.dashboard.DeviceService/SetDeviceType" + DeviceService_DeleteDevice_FullMethodName = "/pomerium.dashboard.DeviceService/DeleteDevice" + DeviceService_DeleteDeviceType_FullMethodName = "/pomerium.dashboard.DeviceService/DeleteDeviceType" + DeviceService_ListDevices_FullMethodName = "/pomerium.dashboard.DeviceService/ListDevices" + DeviceService_ListDeviceTypes_FullMethodName = "/pomerium.dashboard.DeviceService/ListDeviceTypes" +) + +// DeviceServiceClient is the client API for DeviceService 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. +// +// DeviceService manages device credentials, enrollments and types +type DeviceServiceClient interface { + ApproveDevice(ctx context.Context, in *ApproveDeviceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + CreateDeviceEnrollment(ctx context.Context, in *CreateDeviceEnrollmentRequest, opts ...grpc.CallOption) (*CreateDeviceEnrollmentResponse, error) + SetDeviceType(ctx context.Context, in *SetDeviceTypeRequest, opts ...grpc.CallOption) (*SetDeviceTypeResponse, error) + DeleteDevice(ctx context.Context, in *DeleteDeviceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + DeleteDeviceType(ctx context.Context, in *DeleteDeviceTypeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + ListDevices(ctx context.Context, in *ListDevicesRequest, opts ...grpc.CallOption) (*ListDevicesResponse, error) + ListDeviceTypes(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListDeviceTypesResponse, error) +} + +type deviceServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewDeviceServiceClient(cc grpc.ClientConnInterface) DeviceServiceClient { + return &deviceServiceClient{cc} +} + +func (c *deviceServiceClient) ApproveDevice(ctx context.Context, in *ApproveDeviceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, DeviceService_ApproveDevice_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *deviceServiceClient) CreateDeviceEnrollment(ctx context.Context, in *CreateDeviceEnrollmentRequest, opts ...grpc.CallOption) (*CreateDeviceEnrollmentResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreateDeviceEnrollmentResponse) + err := c.cc.Invoke(ctx, DeviceService_CreateDeviceEnrollment_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *deviceServiceClient) SetDeviceType(ctx context.Context, in *SetDeviceTypeRequest, opts ...grpc.CallOption) (*SetDeviceTypeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetDeviceTypeResponse) + err := c.cc.Invoke(ctx, DeviceService_SetDeviceType_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *deviceServiceClient) DeleteDevice(ctx context.Context, in *DeleteDeviceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, DeviceService_DeleteDevice_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *deviceServiceClient) DeleteDeviceType(ctx context.Context, in *DeleteDeviceTypeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, DeviceService_DeleteDeviceType_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *deviceServiceClient) ListDevices(ctx context.Context, in *ListDevicesRequest, opts ...grpc.CallOption) (*ListDevicesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListDevicesResponse) + err := c.cc.Invoke(ctx, DeviceService_ListDevices_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *deviceServiceClient) ListDeviceTypes(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListDeviceTypesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListDeviceTypesResponse) + err := c.cc.Invoke(ctx, DeviceService_ListDeviceTypes_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// DeviceServiceServer is the server API for DeviceService service. +// All implementations should embed UnimplementedDeviceServiceServer +// for forward compatibility. +// +// DeviceService manages device credentials, enrollments and types +type DeviceServiceServer interface { + ApproveDevice(context.Context, *ApproveDeviceRequest) (*emptypb.Empty, error) + CreateDeviceEnrollment(context.Context, *CreateDeviceEnrollmentRequest) (*CreateDeviceEnrollmentResponse, error) + SetDeviceType(context.Context, *SetDeviceTypeRequest) (*SetDeviceTypeResponse, error) + DeleteDevice(context.Context, *DeleteDeviceRequest) (*emptypb.Empty, error) + DeleteDeviceType(context.Context, *DeleteDeviceTypeRequest) (*emptypb.Empty, error) + ListDevices(context.Context, *ListDevicesRequest) (*ListDevicesResponse, error) + ListDeviceTypes(context.Context, *emptypb.Empty) (*ListDeviceTypesResponse, error) +} + +// UnimplementedDeviceServiceServer should 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 UnimplementedDeviceServiceServer struct{} + +func (UnimplementedDeviceServiceServer) ApproveDevice(context.Context, *ApproveDeviceRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method ApproveDevice not implemented") +} +func (UnimplementedDeviceServiceServer) CreateDeviceEnrollment(context.Context, *CreateDeviceEnrollmentRequest) (*CreateDeviceEnrollmentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateDeviceEnrollment not implemented") +} +func (UnimplementedDeviceServiceServer) SetDeviceType(context.Context, *SetDeviceTypeRequest) (*SetDeviceTypeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetDeviceType not implemented") +} +func (UnimplementedDeviceServiceServer) DeleteDevice(context.Context, *DeleteDeviceRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteDevice not implemented") +} +func (UnimplementedDeviceServiceServer) DeleteDeviceType(context.Context, *DeleteDeviceTypeRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteDeviceType not implemented") +} +func (UnimplementedDeviceServiceServer) ListDevices(context.Context, *ListDevicesRequest) (*ListDevicesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListDevices not implemented") +} +func (UnimplementedDeviceServiceServer) ListDeviceTypes(context.Context, *emptypb.Empty) (*ListDeviceTypesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListDeviceTypes not implemented") +} +func (UnimplementedDeviceServiceServer) testEmbeddedByValue() {} + +// UnsafeDeviceServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to DeviceServiceServer will +// result in compilation errors. +type UnsafeDeviceServiceServer interface { + mustEmbedUnimplementedDeviceServiceServer() +} + +func RegisterDeviceServiceServer(s grpc.ServiceRegistrar, srv DeviceServiceServer) { + // If the following call pancis, it indicates UnimplementedDeviceServiceServer 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(&DeviceService_ServiceDesc, srv) +} + +func _DeviceService_ApproveDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ApproveDeviceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DeviceServiceServer).ApproveDevice(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DeviceService_ApproveDevice_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DeviceServiceServer).ApproveDevice(ctx, req.(*ApproveDeviceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DeviceService_CreateDeviceEnrollment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateDeviceEnrollmentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DeviceServiceServer).CreateDeviceEnrollment(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DeviceService_CreateDeviceEnrollment_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DeviceServiceServer).CreateDeviceEnrollment(ctx, req.(*CreateDeviceEnrollmentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DeviceService_SetDeviceType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetDeviceTypeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DeviceServiceServer).SetDeviceType(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DeviceService_SetDeviceType_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DeviceServiceServer).SetDeviceType(ctx, req.(*SetDeviceTypeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DeviceService_DeleteDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteDeviceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DeviceServiceServer).DeleteDevice(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DeviceService_DeleteDevice_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DeviceServiceServer).DeleteDevice(ctx, req.(*DeleteDeviceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DeviceService_DeleteDeviceType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteDeviceTypeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DeviceServiceServer).DeleteDeviceType(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DeviceService_DeleteDeviceType_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DeviceServiceServer).DeleteDeviceType(ctx, req.(*DeleteDeviceTypeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DeviceService_ListDevices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListDevicesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DeviceServiceServer).ListDevices(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DeviceService_ListDevices_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DeviceServiceServer).ListDevices(ctx, req.(*ListDevicesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _DeviceService_ListDeviceTypes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DeviceServiceServer).ListDeviceTypes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DeviceService_ListDeviceTypes_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DeviceServiceServer).ListDeviceTypes(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +// DeviceService_ServiceDesc is the grpc.ServiceDesc for DeviceService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var DeviceService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pomerium.dashboard.DeviceService", + HandlerType: (*DeviceServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ApproveDevice", + Handler: _DeviceService_ApproveDevice_Handler, + }, + { + MethodName: "CreateDeviceEnrollment", + Handler: _DeviceService_CreateDeviceEnrollment_Handler, + }, + { + MethodName: "SetDeviceType", + Handler: _DeviceService_SetDeviceType_Handler, + }, + { + MethodName: "DeleteDevice", + Handler: _DeviceService_DeleteDevice_Handler, + }, + { + MethodName: "DeleteDeviceType", + Handler: _DeviceService_DeleteDeviceType_Handler, + }, + { + MethodName: "ListDevices", + Handler: _DeviceService_ListDevices_Handler, + }, + { + MethodName: "ListDeviceTypes", + Handler: _DeviceService_ListDeviceTypes_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "devices.proto", +} diff --git a/pb/external_data_sources.pb.go b/pb/external_data_sources.pb.go index 6b55e1c..dce5ce8 100644 --- a/pb/external_data_sources.pb.go +++ b/pb/external_data_sources.pb.go @@ -1,16 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 -// protoc v4.24.4 +// protoc-gen-go v1.34.2 +// protoc v3.20.3 // source: external_data_sources.proto package pb import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" @@ -56,9 +52,11 @@ type ExternalDataSource struct { func (x *ExternalDataSource) Reset() { *x = ExternalDataSource{} - mi := &file_external_data_sources_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_external_data_sources_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ExternalDataSource) String() string { @@ -69,7 +67,7 @@ func (*ExternalDataSource) ProtoMessage() {} func (x *ExternalDataSource) ProtoReflect() protoreflect.Message { mi := &file_external_data_sources_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -178,9 +176,11 @@ type DeleteExternalDataSourceRequest struct { func (x *DeleteExternalDataSourceRequest) Reset() { *x = DeleteExternalDataSourceRequest{} - mi := &file_external_data_sources_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_external_data_sources_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeleteExternalDataSourceRequest) String() string { @@ -191,7 +191,7 @@ func (*DeleteExternalDataSourceRequest) ProtoMessage() {} func (x *DeleteExternalDataSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_external_data_sources_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -223,9 +223,11 @@ type GetExternalDataSourceRequest struct { func (x *GetExternalDataSourceRequest) Reset() { *x = GetExternalDataSourceRequest{} - mi := &file_external_data_sources_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_external_data_sources_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetExternalDataSourceRequest) String() string { @@ -236,7 +238,7 @@ func (*GetExternalDataSourceRequest) ProtoMessage() {} func (x *GetExternalDataSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_external_data_sources_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -268,9 +270,11 @@ type GetExternalDataSourceResponse struct { func (x *GetExternalDataSourceResponse) Reset() { *x = GetExternalDataSourceResponse{} - mi := &file_external_data_sources_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_external_data_sources_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetExternalDataSourceResponse) String() string { @@ -281,7 +285,7 @@ func (*GetExternalDataSourceResponse) ProtoMessage() {} func (x *GetExternalDataSourceResponse) ProtoReflect() protoreflect.Message { mi := &file_external_data_sources_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -311,9 +315,11 @@ type ListExternalDataSourcesRequest struct { func (x *ListExternalDataSourcesRequest) Reset() { *x = ListExternalDataSourcesRequest{} - mi := &file_external_data_sources_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_external_data_sources_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListExternalDataSourcesRequest) String() string { @@ -324,7 +330,7 @@ func (*ListExternalDataSourcesRequest) ProtoMessage() {} func (x *ListExternalDataSourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_external_data_sources_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -349,9 +355,11 @@ type ListExternalDataSourcesResponse struct { func (x *ListExternalDataSourcesResponse) Reset() { *x = ListExternalDataSourcesResponse{} - mi := &file_external_data_sources_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_external_data_sources_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListExternalDataSourcesResponse) String() string { @@ -362,7 +370,7 @@ func (*ListExternalDataSourcesResponse) ProtoMessage() {} func (x *ListExternalDataSourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_external_data_sources_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -392,9 +400,11 @@ type ListExternalDataSourceRecordTypesRequest struct { func (x *ListExternalDataSourceRecordTypesRequest) Reset() { *x = ListExternalDataSourceRecordTypesRequest{} - mi := &file_external_data_sources_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_external_data_sources_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListExternalDataSourceRecordTypesRequest) String() string { @@ -405,7 +415,7 @@ func (*ListExternalDataSourceRecordTypesRequest) ProtoMessage() {} func (x *ListExternalDataSourceRecordTypesRequest) ProtoReflect() protoreflect.Message { mi := &file_external_data_sources_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -430,9 +440,11 @@ type ListExternalDataSourceRecordTypesResponse struct { func (x *ListExternalDataSourceRecordTypesResponse) Reset() { *x = ListExternalDataSourceRecordTypesResponse{} - mi := &file_external_data_sources_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_external_data_sources_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListExternalDataSourceRecordTypesResponse) String() string { @@ -443,7 +455,7 @@ func (*ListExternalDataSourceRecordTypesResponse) ProtoMessage() {} func (x *ListExternalDataSourceRecordTypesResponse) ProtoReflect() protoreflect.Message { mi := &file_external_data_sources_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -475,9 +487,11 @@ type ListExternalDataSourceRecordFieldsRequest struct { func (x *ListExternalDataSourceRecordFieldsRequest) Reset() { *x = ListExternalDataSourceRecordFieldsRequest{} - mi := &file_external_data_sources_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_external_data_sources_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListExternalDataSourceRecordFieldsRequest) String() string { @@ -488,7 +502,7 @@ func (*ListExternalDataSourceRecordFieldsRequest) ProtoMessage() {} func (x *ListExternalDataSourceRecordFieldsRequest) ProtoReflect() protoreflect.Message { mi := &file_external_data_sources_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -520,9 +534,11 @@ type ListExternalDataSourceRecordFieldsResponse struct { func (x *ListExternalDataSourceRecordFieldsResponse) Reset() { *x = ListExternalDataSourceRecordFieldsResponse{} - mi := &file_external_data_sources_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_external_data_sources_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListExternalDataSourceRecordFieldsResponse) String() string { @@ -533,7 +549,7 @@ func (*ListExternalDataSourceRecordFieldsResponse) ProtoMessage() {} func (x *ListExternalDataSourceRecordFieldsResponse) ProtoReflect() protoreflect.Message { mi := &file_external_data_sources_proto_msgTypes[9] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -565,9 +581,11 @@ type SetExternalDataSourceRequest struct { func (x *SetExternalDataSourceRequest) Reset() { *x = SetExternalDataSourceRequest{} - mi := &file_external_data_sources_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_external_data_sources_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetExternalDataSourceRequest) String() string { @@ -578,7 +596,7 @@ func (*SetExternalDataSourceRequest) ProtoMessage() {} func (x *SetExternalDataSourceRequest) ProtoReflect() protoreflect.Message { mi := &file_external_data_sources_proto_msgTypes[10] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -610,9 +628,11 @@ type SetExternalDataSourceResponse struct { func (x *SetExternalDataSourceResponse) Reset() { *x = SetExternalDataSourceResponse{} - mi := &file_external_data_sources_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_external_data_sources_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetExternalDataSourceResponse) String() string { @@ -623,7 +643,7 @@ func (*SetExternalDataSourceResponse) ProtoMessage() {} func (x *SetExternalDataSourceResponse) ProtoReflect() protoreflect.Message { mi := &file_external_data_sources_proto_msgTypes[11] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -888,6 +908,152 @@ func file_external_data_sources_proto_init() { if File_external_data_sources_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_external_data_sources_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*ExternalDataSource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_external_data_sources_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*DeleteExternalDataSourceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_external_data_sources_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*GetExternalDataSourceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_external_data_sources_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*GetExternalDataSourceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_external_data_sources_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*ListExternalDataSourcesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_external_data_sources_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*ListExternalDataSourcesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_external_data_sources_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*ListExternalDataSourceRecordTypesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_external_data_sources_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*ListExternalDataSourceRecordTypesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_external_data_sources_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*ListExternalDataSourceRecordFieldsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_external_data_sources_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*ListExternalDataSourceRecordFieldsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_external_data_sources_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*SetExternalDataSourceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_external_data_sources_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*SetExternalDataSourceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } file_external_data_sources_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ @@ -908,263 +1074,3 @@ func file_external_data_sources_proto_init() { file_external_data_sources_proto_goTypes = nil file_external_data_sources_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// ExternalDataSourceServiceClient is the client API for ExternalDataSourceService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ExternalDataSourceServiceClient interface { - DeleteExternalDataSource(ctx context.Context, in *DeleteExternalDataSourceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - GetExternalDataSource(ctx context.Context, in *GetExternalDataSourceRequest, opts ...grpc.CallOption) (*GetExternalDataSourceResponse, error) - ListExternalDataSources(ctx context.Context, in *ListExternalDataSourcesRequest, opts ...grpc.CallOption) (*ListExternalDataSourcesResponse, error) - ListExternalDataSourceRecordTypes(ctx context.Context, in *ListExternalDataSourceRecordTypesRequest, opts ...grpc.CallOption) (*ListExternalDataSourceRecordTypesResponse, error) - ListExternalDataSourceRecordFields(ctx context.Context, in *ListExternalDataSourceRecordFieldsRequest, opts ...grpc.CallOption) (*ListExternalDataSourceRecordFieldsResponse, error) - SetExternalDataSource(ctx context.Context, in *SetExternalDataSourceRequest, opts ...grpc.CallOption) (*SetExternalDataSourceResponse, error) -} - -type externalDataSourceServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewExternalDataSourceServiceClient(cc grpc.ClientConnInterface) ExternalDataSourceServiceClient { - return &externalDataSourceServiceClient{cc} -} - -func (c *externalDataSourceServiceClient) DeleteExternalDataSource(ctx context.Context, in *DeleteExternalDataSourceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.ExternalDataSourceService/DeleteExternalDataSource", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *externalDataSourceServiceClient) GetExternalDataSource(ctx context.Context, in *GetExternalDataSourceRequest, opts ...grpc.CallOption) (*GetExternalDataSourceResponse, error) { - out := new(GetExternalDataSourceResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.ExternalDataSourceService/GetExternalDataSource", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *externalDataSourceServiceClient) ListExternalDataSources(ctx context.Context, in *ListExternalDataSourcesRequest, opts ...grpc.CallOption) (*ListExternalDataSourcesResponse, error) { - out := new(ListExternalDataSourcesResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.ExternalDataSourceService/ListExternalDataSources", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *externalDataSourceServiceClient) ListExternalDataSourceRecordTypes(ctx context.Context, in *ListExternalDataSourceRecordTypesRequest, opts ...grpc.CallOption) (*ListExternalDataSourceRecordTypesResponse, error) { - out := new(ListExternalDataSourceRecordTypesResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.ExternalDataSourceService/ListExternalDataSourceRecordTypes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *externalDataSourceServiceClient) ListExternalDataSourceRecordFields(ctx context.Context, in *ListExternalDataSourceRecordFieldsRequest, opts ...grpc.CallOption) (*ListExternalDataSourceRecordFieldsResponse, error) { - out := new(ListExternalDataSourceRecordFieldsResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.ExternalDataSourceService/ListExternalDataSourceRecordFields", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *externalDataSourceServiceClient) SetExternalDataSource(ctx context.Context, in *SetExternalDataSourceRequest, opts ...grpc.CallOption) (*SetExternalDataSourceResponse, error) { - out := new(SetExternalDataSourceResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.ExternalDataSourceService/SetExternalDataSource", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ExternalDataSourceServiceServer is the server API for ExternalDataSourceService service. -type ExternalDataSourceServiceServer interface { - DeleteExternalDataSource(context.Context, *DeleteExternalDataSourceRequest) (*emptypb.Empty, error) - GetExternalDataSource(context.Context, *GetExternalDataSourceRequest) (*GetExternalDataSourceResponse, error) - ListExternalDataSources(context.Context, *ListExternalDataSourcesRequest) (*ListExternalDataSourcesResponse, error) - ListExternalDataSourceRecordTypes(context.Context, *ListExternalDataSourceRecordTypesRequest) (*ListExternalDataSourceRecordTypesResponse, error) - ListExternalDataSourceRecordFields(context.Context, *ListExternalDataSourceRecordFieldsRequest) (*ListExternalDataSourceRecordFieldsResponse, error) - SetExternalDataSource(context.Context, *SetExternalDataSourceRequest) (*SetExternalDataSourceResponse, error) -} - -// UnimplementedExternalDataSourceServiceServer can be embedded to have forward compatible implementations. -type UnimplementedExternalDataSourceServiceServer struct { -} - -func (*UnimplementedExternalDataSourceServiceServer) DeleteExternalDataSource(context.Context, *DeleteExternalDataSourceRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteExternalDataSource not implemented") -} -func (*UnimplementedExternalDataSourceServiceServer) GetExternalDataSource(context.Context, *GetExternalDataSourceRequest) (*GetExternalDataSourceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetExternalDataSource not implemented") -} -func (*UnimplementedExternalDataSourceServiceServer) ListExternalDataSources(context.Context, *ListExternalDataSourcesRequest) (*ListExternalDataSourcesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListExternalDataSources not implemented") -} -func (*UnimplementedExternalDataSourceServiceServer) ListExternalDataSourceRecordTypes(context.Context, *ListExternalDataSourceRecordTypesRequest) (*ListExternalDataSourceRecordTypesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListExternalDataSourceRecordTypes not implemented") -} -func (*UnimplementedExternalDataSourceServiceServer) ListExternalDataSourceRecordFields(context.Context, *ListExternalDataSourceRecordFieldsRequest) (*ListExternalDataSourceRecordFieldsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListExternalDataSourceRecordFields not implemented") -} -func (*UnimplementedExternalDataSourceServiceServer) SetExternalDataSource(context.Context, *SetExternalDataSourceRequest) (*SetExternalDataSourceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetExternalDataSource not implemented") -} - -func RegisterExternalDataSourceServiceServer(s *grpc.Server, srv ExternalDataSourceServiceServer) { - s.RegisterService(&_ExternalDataSourceService_serviceDesc, srv) -} - -func _ExternalDataSourceService_DeleteExternalDataSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteExternalDataSourceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ExternalDataSourceServiceServer).DeleteExternalDataSource(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.ExternalDataSourceService/DeleteExternalDataSource", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExternalDataSourceServiceServer).DeleteExternalDataSource(ctx, req.(*DeleteExternalDataSourceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ExternalDataSourceService_GetExternalDataSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetExternalDataSourceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ExternalDataSourceServiceServer).GetExternalDataSource(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.ExternalDataSourceService/GetExternalDataSource", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExternalDataSourceServiceServer).GetExternalDataSource(ctx, req.(*GetExternalDataSourceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ExternalDataSourceService_ListExternalDataSources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListExternalDataSourcesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ExternalDataSourceServiceServer).ListExternalDataSources(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.ExternalDataSourceService/ListExternalDataSources", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExternalDataSourceServiceServer).ListExternalDataSources(ctx, req.(*ListExternalDataSourcesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ExternalDataSourceService_ListExternalDataSourceRecordTypes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListExternalDataSourceRecordTypesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ExternalDataSourceServiceServer).ListExternalDataSourceRecordTypes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.ExternalDataSourceService/ListExternalDataSourceRecordTypes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExternalDataSourceServiceServer).ListExternalDataSourceRecordTypes(ctx, req.(*ListExternalDataSourceRecordTypesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ExternalDataSourceService_ListExternalDataSourceRecordFields_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListExternalDataSourceRecordFieldsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ExternalDataSourceServiceServer).ListExternalDataSourceRecordFields(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.ExternalDataSourceService/ListExternalDataSourceRecordFields", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExternalDataSourceServiceServer).ListExternalDataSourceRecordFields(ctx, req.(*ListExternalDataSourceRecordFieldsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ExternalDataSourceService_SetExternalDataSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetExternalDataSourceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ExternalDataSourceServiceServer).SetExternalDataSource(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.ExternalDataSourceService/SetExternalDataSource", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ExternalDataSourceServiceServer).SetExternalDataSource(ctx, req.(*SetExternalDataSourceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ExternalDataSourceService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "pomerium.dashboard.ExternalDataSourceService", - HandlerType: (*ExternalDataSourceServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "DeleteExternalDataSource", - Handler: _ExternalDataSourceService_DeleteExternalDataSource_Handler, - }, - { - MethodName: "GetExternalDataSource", - Handler: _ExternalDataSourceService_GetExternalDataSource_Handler, - }, - { - MethodName: "ListExternalDataSources", - Handler: _ExternalDataSourceService_ListExternalDataSources_Handler, - }, - { - MethodName: "ListExternalDataSourceRecordTypes", - Handler: _ExternalDataSourceService_ListExternalDataSourceRecordTypes_Handler, - }, - { - MethodName: "ListExternalDataSourceRecordFields", - Handler: _ExternalDataSourceService_ListExternalDataSourceRecordFields_Handler, - }, - { - MethodName: "SetExternalDataSource", - Handler: _ExternalDataSourceService_SetExternalDataSource_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "external_data_sources.proto", -} diff --git a/pb/external_data_sources_grpc.pb.go b/pb/external_data_sources_grpc.pb.go new file mode 100644 index 0000000..6692b87 --- /dev/null +++ b/pb/external_data_sources_grpc.pb.go @@ -0,0 +1,310 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v3.20.3 +// source: external_data_sources.proto + +package pb + +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 ( + ExternalDataSourceService_DeleteExternalDataSource_FullMethodName = "/pomerium.dashboard.ExternalDataSourceService/DeleteExternalDataSource" + ExternalDataSourceService_GetExternalDataSource_FullMethodName = "/pomerium.dashboard.ExternalDataSourceService/GetExternalDataSource" + ExternalDataSourceService_ListExternalDataSources_FullMethodName = "/pomerium.dashboard.ExternalDataSourceService/ListExternalDataSources" + ExternalDataSourceService_ListExternalDataSourceRecordTypes_FullMethodName = "/pomerium.dashboard.ExternalDataSourceService/ListExternalDataSourceRecordTypes" + ExternalDataSourceService_ListExternalDataSourceRecordFields_FullMethodName = "/pomerium.dashboard.ExternalDataSourceService/ListExternalDataSourceRecordFields" + ExternalDataSourceService_SetExternalDataSource_FullMethodName = "/pomerium.dashboard.ExternalDataSourceService/SetExternalDataSource" +) + +// ExternalDataSourceServiceClient is the client API for ExternalDataSourceService 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 ExternalDataSourceServiceClient interface { + DeleteExternalDataSource(ctx context.Context, in *DeleteExternalDataSourceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + GetExternalDataSource(ctx context.Context, in *GetExternalDataSourceRequest, opts ...grpc.CallOption) (*GetExternalDataSourceResponse, error) + ListExternalDataSources(ctx context.Context, in *ListExternalDataSourcesRequest, opts ...grpc.CallOption) (*ListExternalDataSourcesResponse, error) + ListExternalDataSourceRecordTypes(ctx context.Context, in *ListExternalDataSourceRecordTypesRequest, opts ...grpc.CallOption) (*ListExternalDataSourceRecordTypesResponse, error) + ListExternalDataSourceRecordFields(ctx context.Context, in *ListExternalDataSourceRecordFieldsRequest, opts ...grpc.CallOption) (*ListExternalDataSourceRecordFieldsResponse, error) + SetExternalDataSource(ctx context.Context, in *SetExternalDataSourceRequest, opts ...grpc.CallOption) (*SetExternalDataSourceResponse, error) +} + +type externalDataSourceServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewExternalDataSourceServiceClient(cc grpc.ClientConnInterface) ExternalDataSourceServiceClient { + return &externalDataSourceServiceClient{cc} +} + +func (c *externalDataSourceServiceClient) DeleteExternalDataSource(ctx context.Context, in *DeleteExternalDataSourceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, ExternalDataSourceService_DeleteExternalDataSource_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *externalDataSourceServiceClient) GetExternalDataSource(ctx context.Context, in *GetExternalDataSourceRequest, opts ...grpc.CallOption) (*GetExternalDataSourceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetExternalDataSourceResponse) + err := c.cc.Invoke(ctx, ExternalDataSourceService_GetExternalDataSource_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *externalDataSourceServiceClient) ListExternalDataSources(ctx context.Context, in *ListExternalDataSourcesRequest, opts ...grpc.CallOption) (*ListExternalDataSourcesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListExternalDataSourcesResponse) + err := c.cc.Invoke(ctx, ExternalDataSourceService_ListExternalDataSources_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *externalDataSourceServiceClient) ListExternalDataSourceRecordTypes(ctx context.Context, in *ListExternalDataSourceRecordTypesRequest, opts ...grpc.CallOption) (*ListExternalDataSourceRecordTypesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListExternalDataSourceRecordTypesResponse) + err := c.cc.Invoke(ctx, ExternalDataSourceService_ListExternalDataSourceRecordTypes_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *externalDataSourceServiceClient) ListExternalDataSourceRecordFields(ctx context.Context, in *ListExternalDataSourceRecordFieldsRequest, opts ...grpc.CallOption) (*ListExternalDataSourceRecordFieldsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListExternalDataSourceRecordFieldsResponse) + err := c.cc.Invoke(ctx, ExternalDataSourceService_ListExternalDataSourceRecordFields_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *externalDataSourceServiceClient) SetExternalDataSource(ctx context.Context, in *SetExternalDataSourceRequest, opts ...grpc.CallOption) (*SetExternalDataSourceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetExternalDataSourceResponse) + err := c.cc.Invoke(ctx, ExternalDataSourceService_SetExternalDataSource_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ExternalDataSourceServiceServer is the server API for ExternalDataSourceService service. +// All implementations should embed UnimplementedExternalDataSourceServiceServer +// for forward compatibility. +type ExternalDataSourceServiceServer interface { + DeleteExternalDataSource(context.Context, *DeleteExternalDataSourceRequest) (*emptypb.Empty, error) + GetExternalDataSource(context.Context, *GetExternalDataSourceRequest) (*GetExternalDataSourceResponse, error) + ListExternalDataSources(context.Context, *ListExternalDataSourcesRequest) (*ListExternalDataSourcesResponse, error) + ListExternalDataSourceRecordTypes(context.Context, *ListExternalDataSourceRecordTypesRequest) (*ListExternalDataSourceRecordTypesResponse, error) + ListExternalDataSourceRecordFields(context.Context, *ListExternalDataSourceRecordFieldsRequest) (*ListExternalDataSourceRecordFieldsResponse, error) + SetExternalDataSource(context.Context, *SetExternalDataSourceRequest) (*SetExternalDataSourceResponse, error) +} + +// UnimplementedExternalDataSourceServiceServer should 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 UnimplementedExternalDataSourceServiceServer struct{} + +func (UnimplementedExternalDataSourceServiceServer) DeleteExternalDataSource(context.Context, *DeleteExternalDataSourceRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteExternalDataSource not implemented") +} +func (UnimplementedExternalDataSourceServiceServer) GetExternalDataSource(context.Context, *GetExternalDataSourceRequest) (*GetExternalDataSourceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetExternalDataSource not implemented") +} +func (UnimplementedExternalDataSourceServiceServer) ListExternalDataSources(context.Context, *ListExternalDataSourcesRequest) (*ListExternalDataSourcesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListExternalDataSources not implemented") +} +func (UnimplementedExternalDataSourceServiceServer) ListExternalDataSourceRecordTypes(context.Context, *ListExternalDataSourceRecordTypesRequest) (*ListExternalDataSourceRecordTypesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListExternalDataSourceRecordTypes not implemented") +} +func (UnimplementedExternalDataSourceServiceServer) ListExternalDataSourceRecordFields(context.Context, *ListExternalDataSourceRecordFieldsRequest) (*ListExternalDataSourceRecordFieldsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListExternalDataSourceRecordFields not implemented") +} +func (UnimplementedExternalDataSourceServiceServer) SetExternalDataSource(context.Context, *SetExternalDataSourceRequest) (*SetExternalDataSourceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetExternalDataSource not implemented") +} +func (UnimplementedExternalDataSourceServiceServer) testEmbeddedByValue() {} + +// UnsafeExternalDataSourceServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ExternalDataSourceServiceServer will +// result in compilation errors. +type UnsafeExternalDataSourceServiceServer interface { + mustEmbedUnimplementedExternalDataSourceServiceServer() +} + +func RegisterExternalDataSourceServiceServer(s grpc.ServiceRegistrar, srv ExternalDataSourceServiceServer) { + // If the following call pancis, it indicates UnimplementedExternalDataSourceServiceServer 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(&ExternalDataSourceService_ServiceDesc, srv) +} + +func _ExternalDataSourceService_DeleteExternalDataSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteExternalDataSourceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExternalDataSourceServiceServer).DeleteExternalDataSource(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ExternalDataSourceService_DeleteExternalDataSource_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExternalDataSourceServiceServer).DeleteExternalDataSource(ctx, req.(*DeleteExternalDataSourceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ExternalDataSourceService_GetExternalDataSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetExternalDataSourceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExternalDataSourceServiceServer).GetExternalDataSource(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ExternalDataSourceService_GetExternalDataSource_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExternalDataSourceServiceServer).GetExternalDataSource(ctx, req.(*GetExternalDataSourceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ExternalDataSourceService_ListExternalDataSources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListExternalDataSourcesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExternalDataSourceServiceServer).ListExternalDataSources(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ExternalDataSourceService_ListExternalDataSources_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExternalDataSourceServiceServer).ListExternalDataSources(ctx, req.(*ListExternalDataSourcesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ExternalDataSourceService_ListExternalDataSourceRecordTypes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListExternalDataSourceRecordTypesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExternalDataSourceServiceServer).ListExternalDataSourceRecordTypes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ExternalDataSourceService_ListExternalDataSourceRecordTypes_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExternalDataSourceServiceServer).ListExternalDataSourceRecordTypes(ctx, req.(*ListExternalDataSourceRecordTypesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ExternalDataSourceService_ListExternalDataSourceRecordFields_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListExternalDataSourceRecordFieldsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExternalDataSourceServiceServer).ListExternalDataSourceRecordFields(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ExternalDataSourceService_ListExternalDataSourceRecordFields_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExternalDataSourceServiceServer).ListExternalDataSourceRecordFields(ctx, req.(*ListExternalDataSourceRecordFieldsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ExternalDataSourceService_SetExternalDataSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetExternalDataSourceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ExternalDataSourceServiceServer).SetExternalDataSource(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ExternalDataSourceService_SetExternalDataSource_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ExternalDataSourceServiceServer).SetExternalDataSource(ctx, req.(*SetExternalDataSourceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ExternalDataSourceService_ServiceDesc is the grpc.ServiceDesc for ExternalDataSourceService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ExternalDataSourceService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pomerium.dashboard.ExternalDataSourceService", + HandlerType: (*ExternalDataSourceServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "DeleteExternalDataSource", + Handler: _ExternalDataSourceService_DeleteExternalDataSource_Handler, + }, + { + MethodName: "GetExternalDataSource", + Handler: _ExternalDataSourceService_GetExternalDataSource_Handler, + }, + { + MethodName: "ListExternalDataSources", + Handler: _ExternalDataSourceService_ListExternalDataSources_Handler, + }, + { + MethodName: "ListExternalDataSourceRecordTypes", + Handler: _ExternalDataSourceService_ListExternalDataSourceRecordTypes_Handler, + }, + { + MethodName: "ListExternalDataSourceRecordFields", + Handler: _ExternalDataSourceService_ListExternalDataSourceRecordFields_Handler, + }, + { + MethodName: "SetExternalDataSource", + Handler: _ExternalDataSourceService_SetExternalDataSource_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "external_data_sources.proto", +} diff --git a/pb/key_chain.pb.go b/pb/key_chain.pb.go index ae498bd..661d196 100644 --- a/pb/key_chain.pb.go +++ b/pb/key_chain.pb.go @@ -1,16 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 -// protoc v4.24.4 +// protoc-gen-go v1.34.2 +// protoc v3.20.3 // source: key_chain.proto package pb import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" @@ -147,9 +143,11 @@ type KeyPair struct { func (x *KeyPair) Reset() { *x = KeyPair{} - mi := &file_key_chain_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_key_chain_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *KeyPair) String() string { @@ -160,7 +158,7 @@ func (*KeyPair) ProtoMessage() {} func (x *KeyPair) ProtoReflect() protoreflect.Message { mi := &file_key_chain_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -250,9 +248,11 @@ type KeyUsage struct { func (x *KeyUsage) Reset() { *x = KeyUsage{} - mi := &file_key_chain_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_key_chain_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *KeyUsage) String() string { @@ -263,7 +263,7 @@ func (*KeyUsage) ProtoMessage() {} func (x *KeyUsage) ProtoReflect() protoreflect.Message { mi := &file_key_chain_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -374,9 +374,11 @@ type Name struct { func (x *Name) Reset() { *x = Name{} - mi := &file_key_chain_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_key_chain_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Name) String() string { @@ -387,7 +389,7 @@ func (*Name) ProtoMessage() {} func (x *Name) ProtoReflect() protoreflect.Message { mi := &file_key_chain_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -496,9 +498,11 @@ type CertificateInfo struct { func (x *CertificateInfo) Reset() { *x = CertificateInfo{} - mi := &file_key_chain_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_key_chain_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CertificateInfo) String() string { @@ -509,7 +513,7 @@ func (*CertificateInfo) ProtoMessage() {} func (x *CertificateInfo) ProtoReflect() protoreflect.Message { mi := &file_key_chain_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -687,9 +691,11 @@ type KeyPairRecord struct { func (x *KeyPairRecord) Reset() { *x = KeyPairRecord{} - mi := &file_key_chain_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_key_chain_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *KeyPairRecord) String() string { @@ -700,7 +706,7 @@ func (*KeyPairRecord) ProtoMessage() {} func (x *KeyPairRecord) ProtoReflect() protoreflect.Message { mi := &file_key_chain_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -781,9 +787,11 @@ type DeleteKeyPairRequest struct { func (x *DeleteKeyPairRequest) Reset() { *x = DeleteKeyPairRequest{} - mi := &file_key_chain_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_key_chain_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeleteKeyPairRequest) String() string { @@ -794,7 +802,7 @@ func (*DeleteKeyPairRequest) ProtoMessage() {} func (x *DeleteKeyPairRequest) ProtoReflect() protoreflect.Message { mi := &file_key_chain_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -824,9 +832,11 @@ type DeleteKeyPairResponse struct { func (x *DeleteKeyPairResponse) Reset() { *x = DeleteKeyPairResponse{} - mi := &file_key_chain_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_key_chain_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeleteKeyPairResponse) String() string { @@ -837,7 +847,7 @@ func (*DeleteKeyPairResponse) ProtoMessage() {} func (x *DeleteKeyPairResponse) ProtoReflect() protoreflect.Message { mi := &file_key_chain_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -862,9 +872,11 @@ type GetKeyPairRequest struct { func (x *GetKeyPairRequest) Reset() { *x = GetKeyPairRequest{} - mi := &file_key_chain_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_key_chain_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetKeyPairRequest) String() string { @@ -875,7 +887,7 @@ func (*GetKeyPairRequest) ProtoMessage() {} func (x *GetKeyPairRequest) ProtoReflect() protoreflect.Message { mi := &file_key_chain_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -907,9 +919,11 @@ type GetKeyPairResponse struct { func (x *GetKeyPairResponse) Reset() { *x = GetKeyPairResponse{} - mi := &file_key_chain_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_key_chain_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetKeyPairResponse) String() string { @@ -920,7 +934,7 @@ func (*GetKeyPairResponse) ProtoMessage() {} func (x *GetKeyPairResponse) ProtoReflect() protoreflect.Message { mi := &file_key_chain_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -963,9 +977,11 @@ type ListKeyPairsRequest struct { func (x *ListKeyPairsRequest) Reset() { *x = ListKeyPairsRequest{} - mi := &file_key_chain_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_key_chain_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListKeyPairsRequest) String() string { @@ -976,7 +992,7 @@ func (*ListKeyPairsRequest) ProtoMessage() {} func (x *ListKeyPairsRequest) ProtoReflect() protoreflect.Message { mi := &file_key_chain_proto_msgTypes[9] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1047,9 +1063,11 @@ type ListKeyPairsResponse struct { func (x *ListKeyPairsResponse) Reset() { *x = ListKeyPairsResponse{} - mi := &file_key_chain_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_key_chain_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListKeyPairsResponse) String() string { @@ -1060,7 +1078,7 @@ func (*ListKeyPairsResponse) ProtoMessage() {} func (x *ListKeyPairsResponse) ProtoReflect() protoreflect.Message { mi := &file_key_chain_proto_msgTypes[10] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1107,9 +1125,11 @@ type CreateKeyPairRequest struct { func (x *CreateKeyPairRequest) Reset() { *x = CreateKeyPairRequest{} - mi := &file_key_chain_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_key_chain_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreateKeyPairRequest) String() string { @@ -1120,7 +1140,7 @@ func (*CreateKeyPairRequest) ProtoMessage() {} func (x *CreateKeyPairRequest) ProtoReflect() protoreflect.Message { mi := &file_key_chain_proto_msgTypes[11] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1180,9 +1200,11 @@ type CreateKeyPairResponse struct { func (x *CreateKeyPairResponse) Reset() { *x = CreateKeyPairResponse{} - mi := &file_key_chain_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_key_chain_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *CreateKeyPairResponse) String() string { @@ -1193,7 +1215,7 @@ func (*CreateKeyPairResponse) ProtoMessage() {} func (x *CreateKeyPairResponse) ProtoReflect() protoreflect.Message { mi := &file_key_chain_proto_msgTypes[12] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1232,9 +1254,11 @@ type UpdateKeyPairRequest struct { func (x *UpdateKeyPairRequest) Reset() { *x = UpdateKeyPairRequest{} - mi := &file_key_chain_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_key_chain_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UpdateKeyPairRequest) String() string { @@ -1245,7 +1269,7 @@ func (*UpdateKeyPairRequest) ProtoMessage() {} func (x *UpdateKeyPairRequest) ProtoReflect() protoreflect.Message { mi := &file_key_chain_proto_msgTypes[13] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1305,9 +1329,11 @@ type UpdateKeyPairResponse struct { func (x *UpdateKeyPairResponse) Reset() { *x = UpdateKeyPairResponse{} - mi := &file_key_chain_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_key_chain_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UpdateKeyPairResponse) String() string { @@ -1318,7 +1344,7 @@ func (*UpdateKeyPairResponse) ProtoMessage() {} func (x *UpdateKeyPairResponse) ProtoReflect() protoreflect.Message { mi := &file_key_chain_proto_msgTypes[14] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1684,6 +1710,188 @@ func file_key_chain_proto_init() { if File_key_chain_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_key_chain_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*KeyPair); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_key_chain_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*KeyUsage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_key_chain_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*Name); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_key_chain_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*CertificateInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_key_chain_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*KeyPairRecord); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_key_chain_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*DeleteKeyPairRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_key_chain_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*DeleteKeyPairResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_key_chain_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*GetKeyPairRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_key_chain_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*GetKeyPairResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_key_chain_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*ListKeyPairsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_key_chain_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*ListKeyPairsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_key_chain_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*CreateKeyPairRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_key_chain_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*CreateKeyPairResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_key_chain_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*UpdateKeyPairRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_key_chain_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*UpdateKeyPairResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } file_key_chain_proto_msgTypes[9].OneofWrappers = []any{} file_key_chain_proto_msgTypes[13].OneofWrappers = []any{} type x struct{} @@ -1706,239 +1914,3 @@ func file_key_chain_proto_init() { file_key_chain_proto_goTypes = nil file_key_chain_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// KeyChainServiceClient is the client API for KeyChainService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type KeyChainServiceClient interface { - // DeleteKeyPair remove an x509 key pair based on a DeleteKeyPairRequest - DeleteKeyPair(ctx context.Context, in *DeleteKeyPairRequest, opts ...grpc.CallOption) (*DeleteKeyPairResponse, error) - // GetKeyPair retrieves an existing key pair - GetKeyPair(ctx context.Context, in *GetKeyPairRequest, opts ...grpc.CallOption) (*GetKeyPairResponse, error) - // ListKeyPairs lists existing key pairs based on parameters in - // ListKeyPairsRequest - ListKeyPairs(ctx context.Context, in *ListKeyPairsRequest, opts ...grpc.CallOption) (*ListKeyPairsResponse, error) - // CreateKeyPair creates a new key pair - CreateKeyPair(ctx context.Context, in *CreateKeyPairRequest, opts ...grpc.CallOption) (*CreateKeyPairResponse, error) - // CreateKeyPair creates a new key pair - UpdateKeyPair(ctx context.Context, in *UpdateKeyPairRequest, opts ...grpc.CallOption) (*UpdateKeyPairResponse, error) -} - -type keyChainServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewKeyChainServiceClient(cc grpc.ClientConnInterface) KeyChainServiceClient { - return &keyChainServiceClient{cc} -} - -func (c *keyChainServiceClient) DeleteKeyPair(ctx context.Context, in *DeleteKeyPairRequest, opts ...grpc.CallOption) (*DeleteKeyPairResponse, error) { - out := new(DeleteKeyPairResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.KeyChainService/DeleteKeyPair", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyChainServiceClient) GetKeyPair(ctx context.Context, in *GetKeyPairRequest, opts ...grpc.CallOption) (*GetKeyPairResponse, error) { - out := new(GetKeyPairResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.KeyChainService/GetKeyPair", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyChainServiceClient) ListKeyPairs(ctx context.Context, in *ListKeyPairsRequest, opts ...grpc.CallOption) (*ListKeyPairsResponse, error) { - out := new(ListKeyPairsResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.KeyChainService/ListKeyPairs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyChainServiceClient) CreateKeyPair(ctx context.Context, in *CreateKeyPairRequest, opts ...grpc.CallOption) (*CreateKeyPairResponse, error) { - out := new(CreateKeyPairResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.KeyChainService/CreateKeyPair", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyChainServiceClient) UpdateKeyPair(ctx context.Context, in *UpdateKeyPairRequest, opts ...grpc.CallOption) (*UpdateKeyPairResponse, error) { - out := new(UpdateKeyPairResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.KeyChainService/UpdateKeyPair", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// KeyChainServiceServer is the server API for KeyChainService service. -type KeyChainServiceServer interface { - // DeleteKeyPair remove an x509 key pair based on a DeleteKeyPairRequest - DeleteKeyPair(context.Context, *DeleteKeyPairRequest) (*DeleteKeyPairResponse, error) - // GetKeyPair retrieves an existing key pair - GetKeyPair(context.Context, *GetKeyPairRequest) (*GetKeyPairResponse, error) - // ListKeyPairs lists existing key pairs based on parameters in - // ListKeyPairsRequest - ListKeyPairs(context.Context, *ListKeyPairsRequest) (*ListKeyPairsResponse, error) - // CreateKeyPair creates a new key pair - CreateKeyPair(context.Context, *CreateKeyPairRequest) (*CreateKeyPairResponse, error) - // CreateKeyPair creates a new key pair - UpdateKeyPair(context.Context, *UpdateKeyPairRequest) (*UpdateKeyPairResponse, error) -} - -// UnimplementedKeyChainServiceServer can be embedded to have forward compatible implementations. -type UnimplementedKeyChainServiceServer struct { -} - -func (*UnimplementedKeyChainServiceServer) DeleteKeyPair(context.Context, *DeleteKeyPairRequest) (*DeleteKeyPairResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteKeyPair not implemented") -} -func (*UnimplementedKeyChainServiceServer) GetKeyPair(context.Context, *GetKeyPairRequest) (*GetKeyPairResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetKeyPair not implemented") -} -func (*UnimplementedKeyChainServiceServer) ListKeyPairs(context.Context, *ListKeyPairsRequest) (*ListKeyPairsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListKeyPairs not implemented") -} -func (*UnimplementedKeyChainServiceServer) CreateKeyPair(context.Context, *CreateKeyPairRequest) (*CreateKeyPairResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateKeyPair not implemented") -} -func (*UnimplementedKeyChainServiceServer) UpdateKeyPair(context.Context, *UpdateKeyPairRequest) (*UpdateKeyPairResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateKeyPair not implemented") -} - -func RegisterKeyChainServiceServer(s *grpc.Server, srv KeyChainServiceServer) { - s.RegisterService(&_KeyChainService_serviceDesc, srv) -} - -func _KeyChainService_DeleteKeyPair_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteKeyPairRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyChainServiceServer).DeleteKeyPair(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.KeyChainService/DeleteKeyPair", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyChainServiceServer).DeleteKeyPair(ctx, req.(*DeleteKeyPairRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyChainService_GetKeyPair_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetKeyPairRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyChainServiceServer).GetKeyPair(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.KeyChainService/GetKeyPair", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyChainServiceServer).GetKeyPair(ctx, req.(*GetKeyPairRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyChainService_ListKeyPairs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListKeyPairsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyChainServiceServer).ListKeyPairs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.KeyChainService/ListKeyPairs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyChainServiceServer).ListKeyPairs(ctx, req.(*ListKeyPairsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyChainService_CreateKeyPair_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateKeyPairRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyChainServiceServer).CreateKeyPair(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.KeyChainService/CreateKeyPair", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyChainServiceServer).CreateKeyPair(ctx, req.(*CreateKeyPairRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyChainService_UpdateKeyPair_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateKeyPairRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyChainServiceServer).UpdateKeyPair(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.KeyChainService/UpdateKeyPair", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyChainServiceServer).UpdateKeyPair(ctx, req.(*UpdateKeyPairRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _KeyChainService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "pomerium.dashboard.KeyChainService", - HandlerType: (*KeyChainServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "DeleteKeyPair", - Handler: _KeyChainService_DeleteKeyPair_Handler, - }, - { - MethodName: "GetKeyPair", - Handler: _KeyChainService_GetKeyPair_Handler, - }, - { - MethodName: "ListKeyPairs", - Handler: _KeyChainService_ListKeyPairs_Handler, - }, - { - MethodName: "CreateKeyPair", - Handler: _KeyChainService_CreateKeyPair_Handler, - }, - { - MethodName: "UpdateKeyPair", - Handler: _KeyChainService_UpdateKeyPair_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "key_chain.proto", -} diff --git a/pb/key_chain_grpc.pb.go b/pb/key_chain_grpc.pb.go new file mode 100644 index 0000000..3a80d17 --- /dev/null +++ b/pb/key_chain_grpc.pb.go @@ -0,0 +1,289 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v3.20.3 +// source: key_chain.proto + +package pb + +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 ( + KeyChainService_DeleteKeyPair_FullMethodName = "/pomerium.dashboard.KeyChainService/DeleteKeyPair" + KeyChainService_GetKeyPair_FullMethodName = "/pomerium.dashboard.KeyChainService/GetKeyPair" + KeyChainService_ListKeyPairs_FullMethodName = "/pomerium.dashboard.KeyChainService/ListKeyPairs" + KeyChainService_CreateKeyPair_FullMethodName = "/pomerium.dashboard.KeyChainService/CreateKeyPair" + KeyChainService_UpdateKeyPair_FullMethodName = "/pomerium.dashboard.KeyChainService/UpdateKeyPair" +) + +// KeyChainServiceClient is the client API for KeyChainService 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. +// +// KeyChainService manages and store TLS Certificates, Keys and CAs, known as +// Key Pairs +type KeyChainServiceClient interface { + // DeleteKeyPair remove an x509 key pair based on a DeleteKeyPairRequest + DeleteKeyPair(ctx context.Context, in *DeleteKeyPairRequest, opts ...grpc.CallOption) (*DeleteKeyPairResponse, error) + // GetKeyPair retrieves an existing key pair + GetKeyPair(ctx context.Context, in *GetKeyPairRequest, opts ...grpc.CallOption) (*GetKeyPairResponse, error) + // ListKeyPairs lists existing key pairs based on parameters in + // ListKeyPairsRequest + ListKeyPairs(ctx context.Context, in *ListKeyPairsRequest, opts ...grpc.CallOption) (*ListKeyPairsResponse, error) + // CreateKeyPair creates a new key pair + CreateKeyPair(ctx context.Context, in *CreateKeyPairRequest, opts ...grpc.CallOption) (*CreateKeyPairResponse, error) + // CreateKeyPair creates a new key pair + UpdateKeyPair(ctx context.Context, in *UpdateKeyPairRequest, opts ...grpc.CallOption) (*UpdateKeyPairResponse, error) +} + +type keyChainServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewKeyChainServiceClient(cc grpc.ClientConnInterface) KeyChainServiceClient { + return &keyChainServiceClient{cc} +} + +func (c *keyChainServiceClient) DeleteKeyPair(ctx context.Context, in *DeleteKeyPairRequest, opts ...grpc.CallOption) (*DeleteKeyPairResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeleteKeyPairResponse) + err := c.cc.Invoke(ctx, KeyChainService_DeleteKeyPair_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyChainServiceClient) GetKeyPair(ctx context.Context, in *GetKeyPairRequest, opts ...grpc.CallOption) (*GetKeyPairResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetKeyPairResponse) + err := c.cc.Invoke(ctx, KeyChainService_GetKeyPair_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyChainServiceClient) ListKeyPairs(ctx context.Context, in *ListKeyPairsRequest, opts ...grpc.CallOption) (*ListKeyPairsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListKeyPairsResponse) + err := c.cc.Invoke(ctx, KeyChainService_ListKeyPairs_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyChainServiceClient) CreateKeyPair(ctx context.Context, in *CreateKeyPairRequest, opts ...grpc.CallOption) (*CreateKeyPairResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreateKeyPairResponse) + err := c.cc.Invoke(ctx, KeyChainService_CreateKeyPair_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyChainServiceClient) UpdateKeyPair(ctx context.Context, in *UpdateKeyPairRequest, opts ...grpc.CallOption) (*UpdateKeyPairResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UpdateKeyPairResponse) + err := c.cc.Invoke(ctx, KeyChainService_UpdateKeyPair_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// KeyChainServiceServer is the server API for KeyChainService service. +// All implementations should embed UnimplementedKeyChainServiceServer +// for forward compatibility. +// +// KeyChainService manages and store TLS Certificates, Keys and CAs, known as +// Key Pairs +type KeyChainServiceServer interface { + // DeleteKeyPair remove an x509 key pair based on a DeleteKeyPairRequest + DeleteKeyPair(context.Context, *DeleteKeyPairRequest) (*DeleteKeyPairResponse, error) + // GetKeyPair retrieves an existing key pair + GetKeyPair(context.Context, *GetKeyPairRequest) (*GetKeyPairResponse, error) + // ListKeyPairs lists existing key pairs based on parameters in + // ListKeyPairsRequest + ListKeyPairs(context.Context, *ListKeyPairsRequest) (*ListKeyPairsResponse, error) + // CreateKeyPair creates a new key pair + CreateKeyPair(context.Context, *CreateKeyPairRequest) (*CreateKeyPairResponse, error) + // CreateKeyPair creates a new key pair + UpdateKeyPair(context.Context, *UpdateKeyPairRequest) (*UpdateKeyPairResponse, error) +} + +// UnimplementedKeyChainServiceServer should 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 UnimplementedKeyChainServiceServer struct{} + +func (UnimplementedKeyChainServiceServer) DeleteKeyPair(context.Context, *DeleteKeyPairRequest) (*DeleteKeyPairResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteKeyPair not implemented") +} +func (UnimplementedKeyChainServiceServer) GetKeyPair(context.Context, *GetKeyPairRequest) (*GetKeyPairResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetKeyPair not implemented") +} +func (UnimplementedKeyChainServiceServer) ListKeyPairs(context.Context, *ListKeyPairsRequest) (*ListKeyPairsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListKeyPairs not implemented") +} +func (UnimplementedKeyChainServiceServer) CreateKeyPair(context.Context, *CreateKeyPairRequest) (*CreateKeyPairResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateKeyPair not implemented") +} +func (UnimplementedKeyChainServiceServer) UpdateKeyPair(context.Context, *UpdateKeyPairRequest) (*UpdateKeyPairResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateKeyPair not implemented") +} +func (UnimplementedKeyChainServiceServer) testEmbeddedByValue() {} + +// UnsafeKeyChainServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to KeyChainServiceServer will +// result in compilation errors. +type UnsafeKeyChainServiceServer interface { + mustEmbedUnimplementedKeyChainServiceServer() +} + +func RegisterKeyChainServiceServer(s grpc.ServiceRegistrar, srv KeyChainServiceServer) { + // If the following call pancis, it indicates UnimplementedKeyChainServiceServer 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(&KeyChainService_ServiceDesc, srv) +} + +func _KeyChainService_DeleteKeyPair_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteKeyPairRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyChainServiceServer).DeleteKeyPair(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyChainService_DeleteKeyPair_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyChainServiceServer).DeleteKeyPair(ctx, req.(*DeleteKeyPairRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyChainService_GetKeyPair_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetKeyPairRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyChainServiceServer).GetKeyPair(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyChainService_GetKeyPair_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyChainServiceServer).GetKeyPair(ctx, req.(*GetKeyPairRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyChainService_ListKeyPairs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListKeyPairsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyChainServiceServer).ListKeyPairs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyChainService_ListKeyPairs_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyChainServiceServer).ListKeyPairs(ctx, req.(*ListKeyPairsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyChainService_CreateKeyPair_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateKeyPairRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyChainServiceServer).CreateKeyPair(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyChainService_CreateKeyPair_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyChainServiceServer).CreateKeyPair(ctx, req.(*CreateKeyPairRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyChainService_UpdateKeyPair_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateKeyPairRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyChainServiceServer).UpdateKeyPair(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyChainService_UpdateKeyPair_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyChainServiceServer).UpdateKeyPair(ctx, req.(*UpdateKeyPairRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// KeyChainService_ServiceDesc is the grpc.ServiceDesc for KeyChainService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var KeyChainService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pomerium.dashboard.KeyChainService", + HandlerType: (*KeyChainServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "DeleteKeyPair", + Handler: _KeyChainService_DeleteKeyPair_Handler, + }, + { + MethodName: "GetKeyPair", + Handler: _KeyChainService_GetKeyPair_Handler, + }, + { + MethodName: "ListKeyPairs", + Handler: _KeyChainService_ListKeyPairs_Handler, + }, + { + MethodName: "CreateKeyPair", + Handler: _KeyChainService_CreateKeyPair_Handler, + }, + { + MethodName: "UpdateKeyPair", + Handler: _KeyChainService_UpdateKeyPair_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "key_chain.proto", +} diff --git a/pb/namespaces.pb.go b/pb/namespaces.pb.go index dfed37a..fc87a26 100644 --- a/pb/namespaces.pb.go +++ b/pb/namespaces.pb.go @@ -1,16 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 -// protoc v4.24.4 +// protoc-gen-go v1.34.2 +// protoc v3.20.3 // source: namespaces.proto package pb import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" @@ -46,9 +42,11 @@ type Namespace struct { func (x *Namespace) Reset() { *x = Namespace{} - mi := &file_namespaces_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Namespace) String() string { @@ -59,7 +57,7 @@ func (*Namespace) ProtoMessage() {} func (x *Namespace) ProtoReflect() protoreflect.Message { mi := &file_namespaces_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -147,9 +145,11 @@ type DeleteNamespaceRequest struct { func (x *DeleteNamespaceRequest) Reset() { *x = DeleteNamespaceRequest{} - mi := &file_namespaces_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeleteNamespaceRequest) String() string { @@ -160,7 +160,7 @@ func (*DeleteNamespaceRequest) ProtoMessage() {} func (x *DeleteNamespaceRequest) ProtoReflect() protoreflect.Message { mi := &file_namespaces_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -190,9 +190,11 @@ type DeleteNamespaceResponse struct { func (x *DeleteNamespaceResponse) Reset() { *x = DeleteNamespaceResponse{} - mi := &file_namespaces_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeleteNamespaceResponse) String() string { @@ -203,7 +205,7 @@ func (*DeleteNamespaceResponse) ProtoMessage() {} func (x *DeleteNamespaceResponse) ProtoReflect() protoreflect.Message { mi := &file_namespaces_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -228,9 +230,11 @@ type GetNamespaceRequest struct { func (x *GetNamespaceRequest) Reset() { *x = GetNamespaceRequest{} - mi := &file_namespaces_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetNamespaceRequest) String() string { @@ -241,7 +245,7 @@ func (*GetNamespaceRequest) ProtoMessage() {} func (x *GetNamespaceRequest) ProtoReflect() protoreflect.Message { mi := &file_namespaces_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -273,9 +277,11 @@ type GetNamespaceResponse struct { func (x *GetNamespaceResponse) Reset() { *x = GetNamespaceResponse{} - mi := &file_namespaces_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetNamespaceResponse) String() string { @@ -286,7 +292,7 @@ func (*GetNamespaceResponse) ProtoMessage() {} func (x *GetNamespaceResponse) ProtoReflect() protoreflect.Message { mi := &file_namespaces_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -316,9 +322,11 @@ type ListNamespacesRequest struct { func (x *ListNamespacesRequest) Reset() { *x = ListNamespacesRequest{} - mi := &file_namespaces_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListNamespacesRequest) String() string { @@ -329,7 +337,7 @@ func (*ListNamespacesRequest) ProtoMessage() {} func (x *ListNamespacesRequest) ProtoReflect() protoreflect.Message { mi := &file_namespaces_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -354,9 +362,11 @@ type ListNamespacesResponse struct { func (x *ListNamespacesResponse) Reset() { *x = ListNamespacesResponse{} - mi := &file_namespaces_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListNamespacesResponse) String() string { @@ -367,7 +377,7 @@ func (*ListNamespacesResponse) ProtoMessage() {} func (x *ListNamespacesResponse) ProtoReflect() protoreflect.Message { mi := &file_namespaces_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -399,9 +409,11 @@ type ListNamespaceResourcesRequest struct { func (x *ListNamespaceResourcesRequest) Reset() { *x = ListNamespaceResourcesRequest{} - mi := &file_namespaces_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListNamespaceResourcesRequest) String() string { @@ -412,7 +424,7 @@ func (*ListNamespaceResourcesRequest) ProtoMessage() {} func (x *ListNamespaceResourcesRequest) ProtoReflect() protoreflect.Message { mi := &file_namespaces_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -444,9 +456,11 @@ type ListNamespaceResourcesResponse struct { func (x *ListNamespaceResourcesResponse) Reset() { *x = ListNamespaceResourcesResponse{} - mi := &file_namespaces_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListNamespaceResourcesResponse) String() string { @@ -457,7 +471,7 @@ func (*ListNamespaceResourcesResponse) ProtoMessage() {} func (x *ListNamespaceResourcesResponse) ProtoReflect() protoreflect.Message { mi := &file_namespaces_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -489,9 +503,11 @@ type SetNamespaceRequest struct { func (x *SetNamespaceRequest) Reset() { *x = SetNamespaceRequest{} - mi := &file_namespaces_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetNamespaceRequest) String() string { @@ -502,7 +518,7 @@ func (*SetNamespaceRequest) ProtoMessage() {} func (x *SetNamespaceRequest) ProtoReflect() protoreflect.Message { mi := &file_namespaces_proto_msgTypes[9] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -534,9 +550,11 @@ type SetNamespaceResponse struct { func (x *SetNamespaceResponse) Reset() { *x = SetNamespaceResponse{} - mi := &file_namespaces_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetNamespaceResponse) String() string { @@ -547,7 +565,7 @@ func (*SetNamespaceResponse) ProtoMessage() {} func (x *SetNamespaceResponse) ProtoReflect() protoreflect.Message { mi := &file_namespaces_proto_msgTypes[10] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -587,9 +605,11 @@ type NamespacePermission struct { func (x *NamespacePermission) Reset() { *x = NamespacePermission{} - mi := &file_namespaces_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamespacePermission) String() string { @@ -600,7 +620,7 @@ func (*NamespacePermission) ProtoMessage() {} func (x *NamespacePermission) ProtoReflect() protoreflect.Message { mi := &file_namespaces_proto_msgTypes[11] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -687,9 +707,11 @@ type NamespacePermissionGroup struct { func (x *NamespacePermissionGroup) Reset() { *x = NamespacePermissionGroup{} - mi := &file_namespaces_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamespacePermissionGroup) String() string { @@ -700,7 +722,7 @@ func (*NamespacePermissionGroup) ProtoMessage() {} func (x *NamespacePermissionGroup) ProtoReflect() protoreflect.Message { mi := &file_namespaces_proto_msgTypes[12] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -774,9 +796,11 @@ type NamespacePermissionUser struct { func (x *NamespacePermissionUser) Reset() { *x = NamespacePermissionUser{} - mi := &file_namespaces_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *NamespacePermissionUser) String() string { @@ -787,7 +811,7 @@ func (*NamespacePermissionUser) ProtoMessage() {} func (x *NamespacePermissionUser) ProtoReflect() protoreflect.Message { mi := &file_namespaces_proto_msgTypes[13] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -861,9 +885,11 @@ type DeleteNamespacePermissionRequest struct { func (x *DeleteNamespacePermissionRequest) Reset() { *x = DeleteNamespacePermissionRequest{} - mi := &file_namespaces_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeleteNamespacePermissionRequest) String() string { @@ -874,7 +900,7 @@ func (*DeleteNamespacePermissionRequest) ProtoMessage() {} func (x *DeleteNamespacePermissionRequest) ProtoReflect() protoreflect.Message { mi := &file_namespaces_proto_msgTypes[14] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -904,9 +930,11 @@ type DeleteNamespacePermissionResponse struct { func (x *DeleteNamespacePermissionResponse) Reset() { *x = DeleteNamespacePermissionResponse{} - mi := &file_namespaces_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeleteNamespacePermissionResponse) String() string { @@ -917,7 +945,7 @@ func (*DeleteNamespacePermissionResponse) ProtoMessage() {} func (x *DeleteNamespacePermissionResponse) ProtoReflect() protoreflect.Message { mi := &file_namespaces_proto_msgTypes[15] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -942,9 +970,11 @@ type GetNamespacePermissionRequest struct { func (x *GetNamespacePermissionRequest) Reset() { *x = GetNamespacePermissionRequest{} - mi := &file_namespaces_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetNamespacePermissionRequest) String() string { @@ -955,7 +985,7 @@ func (*GetNamespacePermissionRequest) ProtoMessage() {} func (x *GetNamespacePermissionRequest) ProtoReflect() protoreflect.Message { mi := &file_namespaces_proto_msgTypes[16] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -987,9 +1017,11 @@ type GetNamespacePermissionResponse struct { func (x *GetNamespacePermissionResponse) Reset() { *x = GetNamespacePermissionResponse{} - mi := &file_namespaces_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetNamespacePermissionResponse) String() string { @@ -1000,7 +1032,7 @@ func (*GetNamespacePermissionResponse) ProtoMessage() {} func (x *GetNamespacePermissionResponse) ProtoReflect() protoreflect.Message { mi := &file_namespaces_proto_msgTypes[17] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1030,9 +1062,11 @@ type ListNamespacePermissionsRequest struct { func (x *ListNamespacePermissionsRequest) Reset() { *x = ListNamespacePermissionsRequest{} - mi := &file_namespaces_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListNamespacePermissionsRequest) String() string { @@ -1043,7 +1077,7 @@ func (*ListNamespacePermissionsRequest) ProtoMessage() {} func (x *ListNamespacePermissionsRequest) ProtoReflect() protoreflect.Message { mi := &file_namespaces_proto_msgTypes[18] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1068,9 +1102,11 @@ type ListNamespacePermissionsResponse struct { func (x *ListNamespacePermissionsResponse) Reset() { *x = ListNamespacePermissionsResponse{} - mi := &file_namespaces_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListNamespacePermissionsResponse) String() string { @@ -1081,7 +1117,7 @@ func (*ListNamespacePermissionsResponse) ProtoMessage() {} func (x *ListNamespacePermissionsResponse) ProtoReflect() protoreflect.Message { mi := &file_namespaces_proto_msgTypes[19] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1113,9 +1149,11 @@ type ListNamespacePermissionGroupsRequest struct { func (x *ListNamespacePermissionGroupsRequest) Reset() { *x = ListNamespacePermissionGroupsRequest{} - mi := &file_namespaces_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListNamespacePermissionGroupsRequest) String() string { @@ -1126,7 +1164,7 @@ func (*ListNamespacePermissionGroupsRequest) ProtoMessage() {} func (x *ListNamespacePermissionGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_namespaces_proto_msgTypes[20] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1158,9 +1196,11 @@ type ListNamespacePermissionGroupsResponse struct { func (x *ListNamespacePermissionGroupsResponse) Reset() { *x = ListNamespacePermissionGroupsResponse{} - mi := &file_namespaces_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListNamespacePermissionGroupsResponse) String() string { @@ -1171,7 +1211,7 @@ func (*ListNamespacePermissionGroupsResponse) ProtoMessage() {} func (x *ListNamespacePermissionGroupsResponse) ProtoReflect() protoreflect.Message { mi := &file_namespaces_proto_msgTypes[21] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1203,9 +1243,11 @@ type ListNamespacePermissionUsersRequest struct { func (x *ListNamespacePermissionUsersRequest) Reset() { *x = ListNamespacePermissionUsersRequest{} - mi := &file_namespaces_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListNamespacePermissionUsersRequest) String() string { @@ -1216,7 +1258,7 @@ func (*ListNamespacePermissionUsersRequest) ProtoMessage() {} func (x *ListNamespacePermissionUsersRequest) ProtoReflect() protoreflect.Message { mi := &file_namespaces_proto_msgTypes[22] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1248,9 +1290,11 @@ type ListNamespacePermissionUsersResponse struct { func (x *ListNamespacePermissionUsersResponse) Reset() { *x = ListNamespacePermissionUsersResponse{} - mi := &file_namespaces_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListNamespacePermissionUsersResponse) String() string { @@ -1261,7 +1305,7 @@ func (*ListNamespacePermissionUsersResponse) ProtoMessage() {} func (x *ListNamespacePermissionUsersResponse) ProtoReflect() protoreflect.Message { mi := &file_namespaces_proto_msgTypes[23] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1293,9 +1337,11 @@ type SetNamespacePermissionRequest struct { func (x *SetNamespacePermissionRequest) Reset() { *x = SetNamespacePermissionRequest{} - mi := &file_namespaces_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetNamespacePermissionRequest) String() string { @@ -1306,7 +1352,7 @@ func (*SetNamespacePermissionRequest) ProtoMessage() {} func (x *SetNamespacePermissionRequest) ProtoReflect() protoreflect.Message { mi := &file_namespaces_proto_msgTypes[24] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1338,9 +1384,11 @@ type SetNamespacePermissionResponse struct { func (x *SetNamespacePermissionResponse) Reset() { *x = SetNamespacePermissionResponse{} - mi := &file_namespaces_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetNamespacePermissionResponse) String() string { @@ -1351,7 +1399,7 @@ func (*SetNamespacePermissionResponse) ProtoMessage() {} func (x *SetNamespacePermissionResponse) ProtoReflect() protoreflect.Message { mi := &file_namespaces_proto_msgTypes[25] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1385,9 +1433,11 @@ type ListNamespaceResourcesResponse_Resource struct { func (x *ListNamespaceResourcesResponse_Resource) Reset() { *x = ListNamespaceResourcesResponse_Resource{} - mi := &file_namespaces_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListNamespaceResourcesResponse_Resource) String() string { @@ -1398,7 +1448,7 @@ func (*ListNamespaceResourcesResponse_Resource) ProtoMessage() {} func (x *ListNamespaceResourcesResponse_Resource) ProtoReflect() protoreflect.Message { mi := &file_namespaces_proto_msgTypes[26] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1812,6 +1862,332 @@ func file_namespaces_proto_init() { if File_namespaces_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_namespaces_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Namespace); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*DeleteNamespaceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*DeleteNamespaceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*GetNamespaceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*GetNamespaceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*ListNamespacesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*ListNamespacesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*ListNamespaceResourcesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*ListNamespaceResourcesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*SetNamespaceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*SetNamespaceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*NamespacePermission); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*NamespacePermissionGroup); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*NamespacePermissionUser); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*DeleteNamespacePermissionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*DeleteNamespacePermissionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_proto_msgTypes[16].Exporter = func(v any, i int) any { + switch v := v.(*GetNamespacePermissionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_proto_msgTypes[17].Exporter = func(v any, i int) any { + switch v := v.(*GetNamespacePermissionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_proto_msgTypes[18].Exporter = func(v any, i int) any { + switch v := v.(*ListNamespacePermissionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_proto_msgTypes[19].Exporter = func(v any, i int) any { + switch v := v.(*ListNamespacePermissionsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_proto_msgTypes[20].Exporter = func(v any, i int) any { + switch v := v.(*ListNamespacePermissionGroupsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_proto_msgTypes[21].Exporter = func(v any, i int) any { + switch v := v.(*ListNamespacePermissionGroupsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_proto_msgTypes[22].Exporter = func(v any, i int) any { + switch v := v.(*ListNamespacePermissionUsersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_proto_msgTypes[23].Exporter = func(v any, i int) any { + switch v := v.(*ListNamespacePermissionUsersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_proto_msgTypes[24].Exporter = func(v any, i int) any { + switch v := v.(*SetNamespacePermissionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_proto_msgTypes[25].Exporter = func(v any, i int) any { + switch v := v.(*SetNamespacePermissionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_proto_msgTypes[26].Exporter = func(v any, i int) any { + switch v := v.(*ListNamespaceResourcesResponse_Resource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ @@ -1831,507 +2207,3 @@ func file_namespaces_proto_init() { file_namespaces_proto_goTypes = nil file_namespaces_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// NamespaceServiceClient is the client API for NamespaceService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type NamespaceServiceClient interface { - // DeleteNamespace deletes a namespace - DeleteNamespace(ctx context.Context, in *DeleteNamespaceRequest, opts ...grpc.CallOption) (*DeleteNamespaceResponse, error) - // GetNamespace retrieves a namespace - GetNamespace(ctx context.Context, in *GetNamespaceRequest, opts ...grpc.CallOption) (*GetNamespaceResponse, error) - // ListNamespaces lists all namespaces - ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) - // ListNamespaceResources lists all the resources for a namespace. - ListNamespaceResources(ctx context.Context, in *ListNamespaceResourcesRequest, opts ...grpc.CallOption) (*ListNamespaceResourcesResponse, error) - // SetNamespace creates a namespace or, if the id is specified, updates an - // existing namespace - SetNamespace(ctx context.Context, in *SetNamespaceRequest, opts ...grpc.CallOption) (*SetNamespaceResponse, error) -} - -type namespaceServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewNamespaceServiceClient(cc grpc.ClientConnInterface) NamespaceServiceClient { - return &namespaceServiceClient{cc} -} - -func (c *namespaceServiceClient) DeleteNamespace(ctx context.Context, in *DeleteNamespaceRequest, opts ...grpc.CallOption) (*DeleteNamespaceResponse, error) { - out := new(DeleteNamespaceResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.NamespaceService/DeleteNamespace", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *namespaceServiceClient) GetNamespace(ctx context.Context, in *GetNamespaceRequest, opts ...grpc.CallOption) (*GetNamespaceResponse, error) { - out := new(GetNamespaceResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.NamespaceService/GetNamespace", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *namespaceServiceClient) ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) { - out := new(ListNamespacesResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.NamespaceService/ListNamespaces", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *namespaceServiceClient) ListNamespaceResources(ctx context.Context, in *ListNamespaceResourcesRequest, opts ...grpc.CallOption) (*ListNamespaceResourcesResponse, error) { - out := new(ListNamespaceResourcesResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.NamespaceService/ListNamespaceResources", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *namespaceServiceClient) SetNamespace(ctx context.Context, in *SetNamespaceRequest, opts ...grpc.CallOption) (*SetNamespaceResponse, error) { - out := new(SetNamespaceResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.NamespaceService/SetNamespace", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// NamespaceServiceServer is the server API for NamespaceService service. -type NamespaceServiceServer interface { - // DeleteNamespace deletes a namespace - DeleteNamespace(context.Context, *DeleteNamespaceRequest) (*DeleteNamespaceResponse, error) - // GetNamespace retrieves a namespace - GetNamespace(context.Context, *GetNamespaceRequest) (*GetNamespaceResponse, error) - // ListNamespaces lists all namespaces - ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error) - // ListNamespaceResources lists all the resources for a namespace. - ListNamespaceResources(context.Context, *ListNamespaceResourcesRequest) (*ListNamespaceResourcesResponse, error) - // SetNamespace creates a namespace or, if the id is specified, updates an - // existing namespace - SetNamespace(context.Context, *SetNamespaceRequest) (*SetNamespaceResponse, error) -} - -// UnimplementedNamespaceServiceServer can be embedded to have forward compatible implementations. -type UnimplementedNamespaceServiceServer struct { -} - -func (*UnimplementedNamespaceServiceServer) DeleteNamespace(context.Context, *DeleteNamespaceRequest) (*DeleteNamespaceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteNamespace not implemented") -} -func (*UnimplementedNamespaceServiceServer) GetNamespace(context.Context, *GetNamespaceRequest) (*GetNamespaceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNamespace not implemented") -} -func (*UnimplementedNamespaceServiceServer) ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListNamespaces not implemented") -} -func (*UnimplementedNamespaceServiceServer) ListNamespaceResources(context.Context, *ListNamespaceResourcesRequest) (*ListNamespaceResourcesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListNamespaceResources not implemented") -} -func (*UnimplementedNamespaceServiceServer) SetNamespace(context.Context, *SetNamespaceRequest) (*SetNamespaceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetNamespace not implemented") -} - -func RegisterNamespaceServiceServer(s *grpc.Server, srv NamespaceServiceServer) { - s.RegisterService(&_NamespaceService_serviceDesc, srv) -} - -func _NamespaceService_DeleteNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteNamespaceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NamespaceServiceServer).DeleteNamespace(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.NamespaceService/DeleteNamespace", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NamespaceServiceServer).DeleteNamespace(ctx, req.(*DeleteNamespaceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _NamespaceService_GetNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetNamespaceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NamespaceServiceServer).GetNamespace(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.NamespaceService/GetNamespace", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NamespaceServiceServer).GetNamespace(ctx, req.(*GetNamespaceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _NamespaceService_ListNamespaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListNamespacesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NamespaceServiceServer).ListNamespaces(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.NamespaceService/ListNamespaces", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NamespaceServiceServer).ListNamespaces(ctx, req.(*ListNamespacesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _NamespaceService_ListNamespaceResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListNamespaceResourcesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NamespaceServiceServer).ListNamespaceResources(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.NamespaceService/ListNamespaceResources", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NamespaceServiceServer).ListNamespaceResources(ctx, req.(*ListNamespaceResourcesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _NamespaceService_SetNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetNamespaceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NamespaceServiceServer).SetNamespace(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.NamespaceService/SetNamespace", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NamespaceServiceServer).SetNamespace(ctx, req.(*SetNamespaceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _NamespaceService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "pomerium.dashboard.NamespaceService", - HandlerType: (*NamespaceServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "DeleteNamespace", - Handler: _NamespaceService_DeleteNamespace_Handler, - }, - { - MethodName: "GetNamespace", - Handler: _NamespaceService_GetNamespace_Handler, - }, - { - MethodName: "ListNamespaces", - Handler: _NamespaceService_ListNamespaces_Handler, - }, - { - MethodName: "ListNamespaceResources", - Handler: _NamespaceService_ListNamespaceResources_Handler, - }, - { - MethodName: "SetNamespace", - Handler: _NamespaceService_SetNamespace_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "namespaces.proto", -} - -// NamespacePermissionServiceClient is the client API for NamespacePermissionService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type NamespacePermissionServiceClient interface { - // DeleteNamespacePermission removes an existing permission definition - DeleteNamespacePermission(ctx context.Context, in *DeleteNamespacePermissionRequest, opts ...grpc.CallOption) (*DeleteNamespacePermissionResponse, error) - // GetNamespacePermission retrieves an existing permission definition - GetNamespacePermission(ctx context.Context, in *GetNamespacePermissionRequest, opts ...grpc.CallOption) (*GetNamespacePermissionResponse, error) - // ListNamespacePermissions retrieves existing permissions for all namespaces - ListNamespacePermissions(ctx context.Context, in *ListNamespacePermissionsRequest, opts ...grpc.CallOption) (*ListNamespacePermissionsResponse, error) - // ListNamespacePermissionGroups retrieves existing group based permissions on - // a namespace - ListNamespacePermissionGroups(ctx context.Context, in *ListNamespacePermissionGroupsRequest, opts ...grpc.CallOption) (*ListNamespacePermissionGroupsResponse, error) - // ListNamespacePermissionUsers retrieves existing user based permissions on a - // namespace - ListNamespacePermissionUsers(ctx context.Context, in *ListNamespacePermissionUsersRequest, opts ...grpc.CallOption) (*ListNamespacePermissionUsersResponse, error) - // SetNamespacePermission set a new permission definition on a namespace - SetNamespacePermission(ctx context.Context, in *SetNamespacePermissionRequest, opts ...grpc.CallOption) (*SetNamespacePermissionResponse, error) -} - -type namespacePermissionServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewNamespacePermissionServiceClient(cc grpc.ClientConnInterface) NamespacePermissionServiceClient { - return &namespacePermissionServiceClient{cc} -} - -func (c *namespacePermissionServiceClient) DeleteNamespacePermission(ctx context.Context, in *DeleteNamespacePermissionRequest, opts ...grpc.CallOption) (*DeleteNamespacePermissionResponse, error) { - out := new(DeleteNamespacePermissionResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.NamespacePermissionService/DeleteNamespacePermission", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *namespacePermissionServiceClient) GetNamespacePermission(ctx context.Context, in *GetNamespacePermissionRequest, opts ...grpc.CallOption) (*GetNamespacePermissionResponse, error) { - out := new(GetNamespacePermissionResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.NamespacePermissionService/GetNamespacePermission", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *namespacePermissionServiceClient) ListNamespacePermissions(ctx context.Context, in *ListNamespacePermissionsRequest, opts ...grpc.CallOption) (*ListNamespacePermissionsResponse, error) { - out := new(ListNamespacePermissionsResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.NamespacePermissionService/ListNamespacePermissions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *namespacePermissionServiceClient) ListNamespacePermissionGroups(ctx context.Context, in *ListNamespacePermissionGroupsRequest, opts ...grpc.CallOption) (*ListNamespacePermissionGroupsResponse, error) { - out := new(ListNamespacePermissionGroupsResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.NamespacePermissionService/ListNamespacePermissionGroups", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *namespacePermissionServiceClient) ListNamespacePermissionUsers(ctx context.Context, in *ListNamespacePermissionUsersRequest, opts ...grpc.CallOption) (*ListNamespacePermissionUsersResponse, error) { - out := new(ListNamespacePermissionUsersResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.NamespacePermissionService/ListNamespacePermissionUsers", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *namespacePermissionServiceClient) SetNamespacePermission(ctx context.Context, in *SetNamespacePermissionRequest, opts ...grpc.CallOption) (*SetNamespacePermissionResponse, error) { - out := new(SetNamespacePermissionResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.NamespacePermissionService/SetNamespacePermission", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// NamespacePermissionServiceServer is the server API for NamespacePermissionService service. -type NamespacePermissionServiceServer interface { - // DeleteNamespacePermission removes an existing permission definition - DeleteNamespacePermission(context.Context, *DeleteNamespacePermissionRequest) (*DeleteNamespacePermissionResponse, error) - // GetNamespacePermission retrieves an existing permission definition - GetNamespacePermission(context.Context, *GetNamespacePermissionRequest) (*GetNamespacePermissionResponse, error) - // ListNamespacePermissions retrieves existing permissions for all namespaces - ListNamespacePermissions(context.Context, *ListNamespacePermissionsRequest) (*ListNamespacePermissionsResponse, error) - // ListNamespacePermissionGroups retrieves existing group based permissions on - // a namespace - ListNamespacePermissionGroups(context.Context, *ListNamespacePermissionGroupsRequest) (*ListNamespacePermissionGroupsResponse, error) - // ListNamespacePermissionUsers retrieves existing user based permissions on a - // namespace - ListNamespacePermissionUsers(context.Context, *ListNamespacePermissionUsersRequest) (*ListNamespacePermissionUsersResponse, error) - // SetNamespacePermission set a new permission definition on a namespace - SetNamespacePermission(context.Context, *SetNamespacePermissionRequest) (*SetNamespacePermissionResponse, error) -} - -// UnimplementedNamespacePermissionServiceServer can be embedded to have forward compatible implementations. -type UnimplementedNamespacePermissionServiceServer struct { -} - -func (*UnimplementedNamespacePermissionServiceServer) DeleteNamespacePermission(context.Context, *DeleteNamespacePermissionRequest) (*DeleteNamespacePermissionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteNamespacePermission not implemented") -} -func (*UnimplementedNamespacePermissionServiceServer) GetNamespacePermission(context.Context, *GetNamespacePermissionRequest) (*GetNamespacePermissionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNamespacePermission not implemented") -} -func (*UnimplementedNamespacePermissionServiceServer) ListNamespacePermissions(context.Context, *ListNamespacePermissionsRequest) (*ListNamespacePermissionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListNamespacePermissions not implemented") -} -func (*UnimplementedNamespacePermissionServiceServer) ListNamespacePermissionGroups(context.Context, *ListNamespacePermissionGroupsRequest) (*ListNamespacePermissionGroupsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListNamespacePermissionGroups not implemented") -} -func (*UnimplementedNamespacePermissionServiceServer) ListNamespacePermissionUsers(context.Context, *ListNamespacePermissionUsersRequest) (*ListNamespacePermissionUsersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListNamespacePermissionUsers not implemented") -} -func (*UnimplementedNamespacePermissionServiceServer) SetNamespacePermission(context.Context, *SetNamespacePermissionRequest) (*SetNamespacePermissionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetNamespacePermission not implemented") -} - -func RegisterNamespacePermissionServiceServer(s *grpc.Server, srv NamespacePermissionServiceServer) { - s.RegisterService(&_NamespacePermissionService_serviceDesc, srv) -} - -func _NamespacePermissionService_DeleteNamespacePermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteNamespacePermissionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NamespacePermissionServiceServer).DeleteNamespacePermission(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.NamespacePermissionService/DeleteNamespacePermission", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NamespacePermissionServiceServer).DeleteNamespacePermission(ctx, req.(*DeleteNamespacePermissionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _NamespacePermissionService_GetNamespacePermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetNamespacePermissionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NamespacePermissionServiceServer).GetNamespacePermission(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.NamespacePermissionService/GetNamespacePermission", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NamespacePermissionServiceServer).GetNamespacePermission(ctx, req.(*GetNamespacePermissionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _NamespacePermissionService_ListNamespacePermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListNamespacePermissionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NamespacePermissionServiceServer).ListNamespacePermissions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.NamespacePermissionService/ListNamespacePermissions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NamespacePermissionServiceServer).ListNamespacePermissions(ctx, req.(*ListNamespacePermissionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _NamespacePermissionService_ListNamespacePermissionGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListNamespacePermissionGroupsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NamespacePermissionServiceServer).ListNamespacePermissionGroups(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.NamespacePermissionService/ListNamespacePermissionGroups", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NamespacePermissionServiceServer).ListNamespacePermissionGroups(ctx, req.(*ListNamespacePermissionGroupsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _NamespacePermissionService_ListNamespacePermissionUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListNamespacePermissionUsersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NamespacePermissionServiceServer).ListNamespacePermissionUsers(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.NamespacePermissionService/ListNamespacePermissionUsers", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NamespacePermissionServiceServer).ListNamespacePermissionUsers(ctx, req.(*ListNamespacePermissionUsersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _NamespacePermissionService_SetNamespacePermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetNamespacePermissionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NamespacePermissionServiceServer).SetNamespacePermission(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.NamespacePermissionService/SetNamespacePermission", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NamespacePermissionServiceServer).SetNamespacePermission(ctx, req.(*SetNamespacePermissionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _NamespacePermissionService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "pomerium.dashboard.NamespacePermissionService", - HandlerType: (*NamespacePermissionServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "DeleteNamespacePermission", - Handler: _NamespacePermissionService_DeleteNamespacePermission_Handler, - }, - { - MethodName: "GetNamespacePermission", - Handler: _NamespacePermissionService_GetNamespacePermission_Handler, - }, - { - MethodName: "ListNamespacePermissions", - Handler: _NamespacePermissionService_ListNamespacePermissions_Handler, - }, - { - MethodName: "ListNamespacePermissionGroups", - Handler: _NamespacePermissionService_ListNamespacePermissionGroups_Handler, - }, - { - MethodName: "ListNamespacePermissionUsers", - Handler: _NamespacePermissionService_ListNamespacePermissionUsers_Handler, - }, - { - MethodName: "SetNamespacePermission", - Handler: _NamespacePermissionService_SetNamespacePermission_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "namespaces.proto", -} diff --git a/pb/namespaces_grpc.pb.go b/pb/namespaces_grpc.pb.go new file mode 100644 index 0000000..e3570f6 --- /dev/null +++ b/pb/namespaces_grpc.pb.go @@ -0,0 +1,597 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v3.20.3 +// source: namespaces.proto + +package pb + +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 ( + NamespaceService_DeleteNamespace_FullMethodName = "/pomerium.dashboard.NamespaceService/DeleteNamespace" + NamespaceService_GetNamespace_FullMethodName = "/pomerium.dashboard.NamespaceService/GetNamespace" + NamespaceService_ListNamespaces_FullMethodName = "/pomerium.dashboard.NamespaceService/ListNamespaces" + NamespaceService_ListNamespaceResources_FullMethodName = "/pomerium.dashboard.NamespaceService/ListNamespaceResources" + NamespaceService_SetNamespace_FullMethodName = "/pomerium.dashboard.NamespaceService/SetNamespace" +) + +// NamespaceServiceClient is the client API for NamespaceService 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. +// +// NamespaceService manages namespaces +type NamespaceServiceClient interface { + // DeleteNamespace deletes a namespace + DeleteNamespace(ctx context.Context, in *DeleteNamespaceRequest, opts ...grpc.CallOption) (*DeleteNamespaceResponse, error) + // GetNamespace retrieves a namespace + GetNamespace(ctx context.Context, in *GetNamespaceRequest, opts ...grpc.CallOption) (*GetNamespaceResponse, error) + // ListNamespaces lists all namespaces + ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) + // ListNamespaceResources lists all the resources for a namespace. + ListNamespaceResources(ctx context.Context, in *ListNamespaceResourcesRequest, opts ...grpc.CallOption) (*ListNamespaceResourcesResponse, error) + // SetNamespace creates a namespace or, if the id is specified, updates an + // existing namespace + SetNamespace(ctx context.Context, in *SetNamespaceRequest, opts ...grpc.CallOption) (*SetNamespaceResponse, error) +} + +type namespaceServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewNamespaceServiceClient(cc grpc.ClientConnInterface) NamespaceServiceClient { + return &namespaceServiceClient{cc} +} + +func (c *namespaceServiceClient) DeleteNamespace(ctx context.Context, in *DeleteNamespaceRequest, opts ...grpc.CallOption) (*DeleteNamespaceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeleteNamespaceResponse) + err := c.cc.Invoke(ctx, NamespaceService_DeleteNamespace_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *namespaceServiceClient) GetNamespace(ctx context.Context, in *GetNamespaceRequest, opts ...grpc.CallOption) (*GetNamespaceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetNamespaceResponse) + err := c.cc.Invoke(ctx, NamespaceService_GetNamespace_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *namespaceServiceClient) ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListNamespacesResponse) + err := c.cc.Invoke(ctx, NamespaceService_ListNamespaces_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *namespaceServiceClient) ListNamespaceResources(ctx context.Context, in *ListNamespaceResourcesRequest, opts ...grpc.CallOption) (*ListNamespaceResourcesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListNamespaceResourcesResponse) + err := c.cc.Invoke(ctx, NamespaceService_ListNamespaceResources_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *namespaceServiceClient) SetNamespace(ctx context.Context, in *SetNamespaceRequest, opts ...grpc.CallOption) (*SetNamespaceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetNamespaceResponse) + err := c.cc.Invoke(ctx, NamespaceService_SetNamespace_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// NamespaceServiceServer is the server API for NamespaceService service. +// All implementations should embed UnimplementedNamespaceServiceServer +// for forward compatibility. +// +// NamespaceService manages namespaces +type NamespaceServiceServer interface { + // DeleteNamespace deletes a namespace + DeleteNamespace(context.Context, *DeleteNamespaceRequest) (*DeleteNamespaceResponse, error) + // GetNamespace retrieves a namespace + GetNamespace(context.Context, *GetNamespaceRequest) (*GetNamespaceResponse, error) + // ListNamespaces lists all namespaces + ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error) + // ListNamespaceResources lists all the resources for a namespace. + ListNamespaceResources(context.Context, *ListNamespaceResourcesRequest) (*ListNamespaceResourcesResponse, error) + // SetNamespace creates a namespace or, if the id is specified, updates an + // existing namespace + SetNamespace(context.Context, *SetNamespaceRequest) (*SetNamespaceResponse, error) +} + +// UnimplementedNamespaceServiceServer should 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 UnimplementedNamespaceServiceServer struct{} + +func (UnimplementedNamespaceServiceServer) DeleteNamespace(context.Context, *DeleteNamespaceRequest) (*DeleteNamespaceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteNamespace not implemented") +} +func (UnimplementedNamespaceServiceServer) GetNamespace(context.Context, *GetNamespaceRequest) (*GetNamespaceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNamespace not implemented") +} +func (UnimplementedNamespaceServiceServer) ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListNamespaces not implemented") +} +func (UnimplementedNamespaceServiceServer) ListNamespaceResources(context.Context, *ListNamespaceResourcesRequest) (*ListNamespaceResourcesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListNamespaceResources not implemented") +} +func (UnimplementedNamespaceServiceServer) SetNamespace(context.Context, *SetNamespaceRequest) (*SetNamespaceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetNamespace not implemented") +} +func (UnimplementedNamespaceServiceServer) testEmbeddedByValue() {} + +// UnsafeNamespaceServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to NamespaceServiceServer will +// result in compilation errors. +type UnsafeNamespaceServiceServer interface { + mustEmbedUnimplementedNamespaceServiceServer() +} + +func RegisterNamespaceServiceServer(s grpc.ServiceRegistrar, srv NamespaceServiceServer) { + // If the following call pancis, it indicates UnimplementedNamespaceServiceServer 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(&NamespaceService_ServiceDesc, srv) +} + +func _NamespaceService_DeleteNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteNamespaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NamespaceServiceServer).DeleteNamespace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NamespaceService_DeleteNamespace_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NamespaceServiceServer).DeleteNamespace(ctx, req.(*DeleteNamespaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NamespaceService_GetNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNamespaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NamespaceServiceServer).GetNamespace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NamespaceService_GetNamespace_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NamespaceServiceServer).GetNamespace(ctx, req.(*GetNamespaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NamespaceService_ListNamespaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListNamespacesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NamespaceServiceServer).ListNamespaces(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NamespaceService_ListNamespaces_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NamespaceServiceServer).ListNamespaces(ctx, req.(*ListNamespacesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NamespaceService_ListNamespaceResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListNamespaceResourcesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NamespaceServiceServer).ListNamespaceResources(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NamespaceService_ListNamespaceResources_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NamespaceServiceServer).ListNamespaceResources(ctx, req.(*ListNamespaceResourcesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NamespaceService_SetNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetNamespaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NamespaceServiceServer).SetNamespace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NamespaceService_SetNamespace_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NamespaceServiceServer).SetNamespace(ctx, req.(*SetNamespaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// NamespaceService_ServiceDesc is the grpc.ServiceDesc for NamespaceService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var NamespaceService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pomerium.dashboard.NamespaceService", + HandlerType: (*NamespaceServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "DeleteNamespace", + Handler: _NamespaceService_DeleteNamespace_Handler, + }, + { + MethodName: "GetNamespace", + Handler: _NamespaceService_GetNamespace_Handler, + }, + { + MethodName: "ListNamespaces", + Handler: _NamespaceService_ListNamespaces_Handler, + }, + { + MethodName: "ListNamespaceResources", + Handler: _NamespaceService_ListNamespaceResources_Handler, + }, + { + MethodName: "SetNamespace", + Handler: _NamespaceService_SetNamespace_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "namespaces.proto", +} + +const ( + NamespacePermissionService_DeleteNamespacePermission_FullMethodName = "/pomerium.dashboard.NamespacePermissionService/DeleteNamespacePermission" + NamespacePermissionService_GetNamespacePermission_FullMethodName = "/pomerium.dashboard.NamespacePermissionService/GetNamespacePermission" + NamespacePermissionService_ListNamespacePermissions_FullMethodName = "/pomerium.dashboard.NamespacePermissionService/ListNamespacePermissions" + NamespacePermissionService_ListNamespacePermissionGroups_FullMethodName = "/pomerium.dashboard.NamespacePermissionService/ListNamespacePermissionGroups" + NamespacePermissionService_ListNamespacePermissionUsers_FullMethodName = "/pomerium.dashboard.NamespacePermissionService/ListNamespacePermissionUsers" + NamespacePermissionService_SetNamespacePermission_FullMethodName = "/pomerium.dashboard.NamespacePermissionService/SetNamespacePermission" +) + +// NamespacePermissionServiceClient is the client API for NamespacePermissionService 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. +// +// NamespacePermissionService manages permissions set on namespaces +type NamespacePermissionServiceClient interface { + // DeleteNamespacePermission removes an existing permission definition + DeleteNamespacePermission(ctx context.Context, in *DeleteNamespacePermissionRequest, opts ...grpc.CallOption) (*DeleteNamespacePermissionResponse, error) + // GetNamespacePermission retrieves an existing permission definition + GetNamespacePermission(ctx context.Context, in *GetNamespacePermissionRequest, opts ...grpc.CallOption) (*GetNamespacePermissionResponse, error) + // ListNamespacePermissions retrieves existing permissions for all namespaces + ListNamespacePermissions(ctx context.Context, in *ListNamespacePermissionsRequest, opts ...grpc.CallOption) (*ListNamespacePermissionsResponse, error) + // ListNamespacePermissionGroups retrieves existing group based permissions on + // a namespace + ListNamespacePermissionGroups(ctx context.Context, in *ListNamespacePermissionGroupsRequest, opts ...grpc.CallOption) (*ListNamespacePermissionGroupsResponse, error) + // ListNamespacePermissionUsers retrieves existing user based permissions on a + // namespace + ListNamespacePermissionUsers(ctx context.Context, in *ListNamespacePermissionUsersRequest, opts ...grpc.CallOption) (*ListNamespacePermissionUsersResponse, error) + // SetNamespacePermission set a new permission definition on a namespace + SetNamespacePermission(ctx context.Context, in *SetNamespacePermissionRequest, opts ...grpc.CallOption) (*SetNamespacePermissionResponse, error) +} + +type namespacePermissionServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewNamespacePermissionServiceClient(cc grpc.ClientConnInterface) NamespacePermissionServiceClient { + return &namespacePermissionServiceClient{cc} +} + +func (c *namespacePermissionServiceClient) DeleteNamespacePermission(ctx context.Context, in *DeleteNamespacePermissionRequest, opts ...grpc.CallOption) (*DeleteNamespacePermissionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeleteNamespacePermissionResponse) + err := c.cc.Invoke(ctx, NamespacePermissionService_DeleteNamespacePermission_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *namespacePermissionServiceClient) GetNamespacePermission(ctx context.Context, in *GetNamespacePermissionRequest, opts ...grpc.CallOption) (*GetNamespacePermissionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetNamespacePermissionResponse) + err := c.cc.Invoke(ctx, NamespacePermissionService_GetNamespacePermission_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *namespacePermissionServiceClient) ListNamespacePermissions(ctx context.Context, in *ListNamespacePermissionsRequest, opts ...grpc.CallOption) (*ListNamespacePermissionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListNamespacePermissionsResponse) + err := c.cc.Invoke(ctx, NamespacePermissionService_ListNamespacePermissions_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *namespacePermissionServiceClient) ListNamespacePermissionGroups(ctx context.Context, in *ListNamespacePermissionGroupsRequest, opts ...grpc.CallOption) (*ListNamespacePermissionGroupsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListNamespacePermissionGroupsResponse) + err := c.cc.Invoke(ctx, NamespacePermissionService_ListNamespacePermissionGroups_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *namespacePermissionServiceClient) ListNamespacePermissionUsers(ctx context.Context, in *ListNamespacePermissionUsersRequest, opts ...grpc.CallOption) (*ListNamespacePermissionUsersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListNamespacePermissionUsersResponse) + err := c.cc.Invoke(ctx, NamespacePermissionService_ListNamespacePermissionUsers_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *namespacePermissionServiceClient) SetNamespacePermission(ctx context.Context, in *SetNamespacePermissionRequest, opts ...grpc.CallOption) (*SetNamespacePermissionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetNamespacePermissionResponse) + err := c.cc.Invoke(ctx, NamespacePermissionService_SetNamespacePermission_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// NamespacePermissionServiceServer is the server API for NamespacePermissionService service. +// All implementations should embed UnimplementedNamespacePermissionServiceServer +// for forward compatibility. +// +// NamespacePermissionService manages permissions set on namespaces +type NamespacePermissionServiceServer interface { + // DeleteNamespacePermission removes an existing permission definition + DeleteNamespacePermission(context.Context, *DeleteNamespacePermissionRequest) (*DeleteNamespacePermissionResponse, error) + // GetNamespacePermission retrieves an existing permission definition + GetNamespacePermission(context.Context, *GetNamespacePermissionRequest) (*GetNamespacePermissionResponse, error) + // ListNamespacePermissions retrieves existing permissions for all namespaces + ListNamespacePermissions(context.Context, *ListNamespacePermissionsRequest) (*ListNamespacePermissionsResponse, error) + // ListNamespacePermissionGroups retrieves existing group based permissions on + // a namespace + ListNamespacePermissionGroups(context.Context, *ListNamespacePermissionGroupsRequest) (*ListNamespacePermissionGroupsResponse, error) + // ListNamespacePermissionUsers retrieves existing user based permissions on a + // namespace + ListNamespacePermissionUsers(context.Context, *ListNamespacePermissionUsersRequest) (*ListNamespacePermissionUsersResponse, error) + // SetNamespacePermission set a new permission definition on a namespace + SetNamespacePermission(context.Context, *SetNamespacePermissionRequest) (*SetNamespacePermissionResponse, error) +} + +// UnimplementedNamespacePermissionServiceServer should 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 UnimplementedNamespacePermissionServiceServer struct{} + +func (UnimplementedNamespacePermissionServiceServer) DeleteNamespacePermission(context.Context, *DeleteNamespacePermissionRequest) (*DeleteNamespacePermissionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteNamespacePermission not implemented") +} +func (UnimplementedNamespacePermissionServiceServer) GetNamespacePermission(context.Context, *GetNamespacePermissionRequest) (*GetNamespacePermissionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNamespacePermission not implemented") +} +func (UnimplementedNamespacePermissionServiceServer) ListNamespacePermissions(context.Context, *ListNamespacePermissionsRequest) (*ListNamespacePermissionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListNamespacePermissions not implemented") +} +func (UnimplementedNamespacePermissionServiceServer) ListNamespacePermissionGroups(context.Context, *ListNamespacePermissionGroupsRequest) (*ListNamespacePermissionGroupsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListNamespacePermissionGroups not implemented") +} +func (UnimplementedNamespacePermissionServiceServer) ListNamespacePermissionUsers(context.Context, *ListNamespacePermissionUsersRequest) (*ListNamespacePermissionUsersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListNamespacePermissionUsers not implemented") +} +func (UnimplementedNamespacePermissionServiceServer) SetNamespacePermission(context.Context, *SetNamespacePermissionRequest) (*SetNamespacePermissionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetNamespacePermission not implemented") +} +func (UnimplementedNamespacePermissionServiceServer) testEmbeddedByValue() {} + +// UnsafeNamespacePermissionServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to NamespacePermissionServiceServer will +// result in compilation errors. +type UnsafeNamespacePermissionServiceServer interface { + mustEmbedUnimplementedNamespacePermissionServiceServer() +} + +func RegisterNamespacePermissionServiceServer(s grpc.ServiceRegistrar, srv NamespacePermissionServiceServer) { + // If the following call pancis, it indicates UnimplementedNamespacePermissionServiceServer 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(&NamespacePermissionService_ServiceDesc, srv) +} + +func _NamespacePermissionService_DeleteNamespacePermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteNamespacePermissionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NamespacePermissionServiceServer).DeleteNamespacePermission(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NamespacePermissionService_DeleteNamespacePermission_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NamespacePermissionServiceServer).DeleteNamespacePermission(ctx, req.(*DeleteNamespacePermissionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NamespacePermissionService_GetNamespacePermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNamespacePermissionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NamespacePermissionServiceServer).GetNamespacePermission(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NamespacePermissionService_GetNamespacePermission_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NamespacePermissionServiceServer).GetNamespacePermission(ctx, req.(*GetNamespacePermissionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NamespacePermissionService_ListNamespacePermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListNamespacePermissionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NamespacePermissionServiceServer).ListNamespacePermissions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NamespacePermissionService_ListNamespacePermissions_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NamespacePermissionServiceServer).ListNamespacePermissions(ctx, req.(*ListNamespacePermissionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NamespacePermissionService_ListNamespacePermissionGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListNamespacePermissionGroupsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NamespacePermissionServiceServer).ListNamespacePermissionGroups(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NamespacePermissionService_ListNamespacePermissionGroups_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NamespacePermissionServiceServer).ListNamespacePermissionGroups(ctx, req.(*ListNamespacePermissionGroupsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NamespacePermissionService_ListNamespacePermissionUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListNamespacePermissionUsersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NamespacePermissionServiceServer).ListNamespacePermissionUsers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NamespacePermissionService_ListNamespacePermissionUsers_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NamespacePermissionServiceServer).ListNamespacePermissionUsers(ctx, req.(*ListNamespacePermissionUsersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NamespacePermissionService_SetNamespacePermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetNamespacePermissionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NamespacePermissionServiceServer).SetNamespacePermission(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NamespacePermissionService_SetNamespacePermission_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NamespacePermissionServiceServer).SetNamespacePermission(ctx, req.(*SetNamespacePermissionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// NamespacePermissionService_ServiceDesc is the grpc.ServiceDesc for NamespacePermissionService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var NamespacePermissionService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pomerium.dashboard.NamespacePermissionService", + HandlerType: (*NamespacePermissionServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "DeleteNamespacePermission", + Handler: _NamespacePermissionService_DeleteNamespacePermission_Handler, + }, + { + MethodName: "GetNamespacePermission", + Handler: _NamespacePermissionService_GetNamespacePermission_Handler, + }, + { + MethodName: "ListNamespacePermissions", + Handler: _NamespacePermissionService_ListNamespacePermissions_Handler, + }, + { + MethodName: "ListNamespacePermissionGroups", + Handler: _NamespacePermissionService_ListNamespacePermissionGroups_Handler, + }, + { + MethodName: "ListNamespacePermissionUsers", + Handler: _NamespacePermissionService_ListNamespacePermissionUsers_Handler, + }, + { + MethodName: "SetNamespacePermission", + Handler: _NamespacePermissionService_SetNamespacePermission_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "namespaces.proto", +} diff --git a/pb/policy.pb.go b/pb/policy.pb.go index 2dba0bd..961373d 100644 --- a/pb/policy.pb.go +++ b/pb/policy.pb.go @@ -1,16 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 -// protoc v4.24.4 +// protoc-gen-go v1.34.2 +// protoc v3.20.3 // source: policy.proto package pb import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" structpb "google.golang.org/protobuf/types/known/structpb" @@ -61,9 +57,11 @@ type Policy struct { func (x *Policy) Reset() { *x = Policy{} - mi := &file_policy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_policy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Policy) String() string { @@ -74,7 +72,7 @@ func (*Policy) ProtoMessage() {} func (x *Policy) ProtoReflect() protoreflect.Message { mi := &file_policy_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -225,9 +223,11 @@ type DeletePolicyRequest struct { func (x *DeletePolicyRequest) Reset() { *x = DeletePolicyRequest{} - mi := &file_policy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_policy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeletePolicyRequest) String() string { @@ -238,7 +238,7 @@ func (*DeletePolicyRequest) ProtoMessage() {} func (x *DeletePolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_policy_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -268,9 +268,11 @@ type DeletePolicyResponse struct { func (x *DeletePolicyResponse) Reset() { *x = DeletePolicyResponse{} - mi := &file_policy_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_policy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeletePolicyResponse) String() string { @@ -281,7 +283,7 @@ func (*DeletePolicyResponse) ProtoMessage() {} func (x *DeletePolicyResponse) ProtoReflect() protoreflect.Message { mi := &file_policy_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -306,9 +308,11 @@ type GetPolicyRequest struct { func (x *GetPolicyRequest) Reset() { *x = GetPolicyRequest{} - mi := &file_policy_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_policy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetPolicyRequest) String() string { @@ -319,7 +323,7 @@ func (*GetPolicyRequest) ProtoMessage() {} func (x *GetPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_policy_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -351,9 +355,11 @@ type GetPolicyResponse struct { func (x *GetPolicyResponse) Reset() { *x = GetPolicyResponse{} - mi := &file_policy_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_policy_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetPolicyResponse) String() string { @@ -364,7 +370,7 @@ func (*GetPolicyResponse) ProtoMessage() {} func (x *GetPolicyResponse) ProtoReflect() protoreflect.Message { mi := &file_policy_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -405,9 +411,11 @@ type ListPoliciesRequest struct { func (x *ListPoliciesRequest) Reset() { *x = ListPoliciesRequest{} - mi := &file_policy_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_policy_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListPoliciesRequest) String() string { @@ -418,7 +426,7 @@ func (*ListPoliciesRequest) ProtoMessage() {} func (x *ListPoliciesRequest) ProtoReflect() protoreflect.Message { mi := &file_policy_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -480,9 +488,11 @@ type ListPoliciesResponse struct { func (x *ListPoliciesResponse) Reset() { *x = ListPoliciesResponse{} - mi := &file_policy_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_policy_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListPoliciesResponse) String() string { @@ -493,7 +503,7 @@ func (*ListPoliciesResponse) ProtoMessage() {} func (x *ListPoliciesResponse) ProtoReflect() protoreflect.Message { mi := &file_policy_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -532,9 +542,11 @@ type SetPolicyRequest struct { func (x *SetPolicyRequest) Reset() { *x = SetPolicyRequest{} - mi := &file_policy_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_policy_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetPolicyRequest) String() string { @@ -545,7 +557,7 @@ func (*SetPolicyRequest) ProtoMessage() {} func (x *SetPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_policy_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -577,9 +589,11 @@ type SetPolicyResponse struct { func (x *SetPolicyResponse) Reset() { *x = SetPolicyResponse{} - mi := &file_policy_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_policy_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetPolicyResponse) String() string { @@ -590,7 +604,7 @@ func (*SetPolicyResponse) ProtoMessage() {} func (x *SetPolicyResponse) ProtoReflect() protoreflect.Message { mi := &file_policy_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -807,6 +821,116 @@ func file_policy_proto_init() { if File_policy_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_policy_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Policy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_policy_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*DeletePolicyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_policy_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*DeletePolicyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_policy_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*GetPolicyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_policy_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*GetPolicyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_policy_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*ListPoliciesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_policy_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*ListPoliciesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_policy_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*SetPolicyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_policy_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*SetPolicyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } file_policy_proto_msgTypes[5].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ @@ -827,203 +951,3 @@ func file_policy_proto_init() { file_policy_proto_goTypes = nil file_policy_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// PolicyServiceClient is the client API for PolicyService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type PolicyServiceClient interface { - // DeletePolicy deletes an existing policy - DeletePolicy(ctx context.Context, in *DeletePolicyRequest, opts ...grpc.CallOption) (*DeletePolicyResponse, error) - // GetPolicy retrieves an existing policy - GetPolicy(ctx context.Context, in *GetPolicyRequest, opts ...grpc.CallOption) (*GetPolicyResponse, error) - // ListPolicies lists existing policies based on the ListPoliciesRequest - // parameters - ListPolicies(ctx context.Context, in *ListPoliciesRequest, opts ...grpc.CallOption) (*ListPoliciesResponse, error) - // SetPolicy creates a new policy or, if the id is specified, updates an - // existing policy - SetPolicy(ctx context.Context, in *SetPolicyRequest, opts ...grpc.CallOption) (*SetPolicyResponse, error) -} - -type policyServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewPolicyServiceClient(cc grpc.ClientConnInterface) PolicyServiceClient { - return &policyServiceClient{cc} -} - -func (c *policyServiceClient) DeletePolicy(ctx context.Context, in *DeletePolicyRequest, opts ...grpc.CallOption) (*DeletePolicyResponse, error) { - out := new(DeletePolicyResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.PolicyService/DeletePolicy", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *policyServiceClient) GetPolicy(ctx context.Context, in *GetPolicyRequest, opts ...grpc.CallOption) (*GetPolicyResponse, error) { - out := new(GetPolicyResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.PolicyService/GetPolicy", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *policyServiceClient) ListPolicies(ctx context.Context, in *ListPoliciesRequest, opts ...grpc.CallOption) (*ListPoliciesResponse, error) { - out := new(ListPoliciesResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.PolicyService/ListPolicies", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *policyServiceClient) SetPolicy(ctx context.Context, in *SetPolicyRequest, opts ...grpc.CallOption) (*SetPolicyResponse, error) { - out := new(SetPolicyResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.PolicyService/SetPolicy", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// PolicyServiceServer is the server API for PolicyService service. -type PolicyServiceServer interface { - // DeletePolicy deletes an existing policy - DeletePolicy(context.Context, *DeletePolicyRequest) (*DeletePolicyResponse, error) - // GetPolicy retrieves an existing policy - GetPolicy(context.Context, *GetPolicyRequest) (*GetPolicyResponse, error) - // ListPolicies lists existing policies based on the ListPoliciesRequest - // parameters - ListPolicies(context.Context, *ListPoliciesRequest) (*ListPoliciesResponse, error) - // SetPolicy creates a new policy or, if the id is specified, updates an - // existing policy - SetPolicy(context.Context, *SetPolicyRequest) (*SetPolicyResponse, error) -} - -// UnimplementedPolicyServiceServer can be embedded to have forward compatible implementations. -type UnimplementedPolicyServiceServer struct { -} - -func (*UnimplementedPolicyServiceServer) DeletePolicy(context.Context, *DeletePolicyRequest) (*DeletePolicyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeletePolicy not implemented") -} -func (*UnimplementedPolicyServiceServer) GetPolicy(context.Context, *GetPolicyRequest) (*GetPolicyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPolicy not implemented") -} -func (*UnimplementedPolicyServiceServer) ListPolicies(context.Context, *ListPoliciesRequest) (*ListPoliciesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListPolicies not implemented") -} -func (*UnimplementedPolicyServiceServer) SetPolicy(context.Context, *SetPolicyRequest) (*SetPolicyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetPolicy not implemented") -} - -func RegisterPolicyServiceServer(s *grpc.Server, srv PolicyServiceServer) { - s.RegisterService(&_PolicyService_serviceDesc, srv) -} - -func _PolicyService_DeletePolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeletePolicyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PolicyServiceServer).DeletePolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.PolicyService/DeletePolicy", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PolicyServiceServer).DeletePolicy(ctx, req.(*DeletePolicyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PolicyService_GetPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPolicyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PolicyServiceServer).GetPolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.PolicyService/GetPolicy", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PolicyServiceServer).GetPolicy(ctx, req.(*GetPolicyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PolicyService_ListPolicies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListPoliciesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PolicyServiceServer).ListPolicies(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.PolicyService/ListPolicies", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PolicyServiceServer).ListPolicies(ctx, req.(*ListPoliciesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PolicyService_SetPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetPolicyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PolicyServiceServer).SetPolicy(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.PolicyService/SetPolicy", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PolicyServiceServer).SetPolicy(ctx, req.(*SetPolicyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _PolicyService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "pomerium.dashboard.PolicyService", - HandlerType: (*PolicyServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "DeletePolicy", - Handler: _PolicyService_DeletePolicy_Handler, - }, - { - MethodName: "GetPolicy", - Handler: _PolicyService_GetPolicy_Handler, - }, - { - MethodName: "ListPolicies", - Handler: _PolicyService_ListPolicies_Handler, - }, - { - MethodName: "SetPolicy", - Handler: _PolicyService_SetPolicy_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "policy.proto", -} diff --git a/pb/policy_grpc.pb.go b/pb/policy_grpc.pb.go new file mode 100644 index 0000000..4e36509 --- /dev/null +++ b/pb/policy_grpc.pb.go @@ -0,0 +1,249 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v3.20.3 +// source: policy.proto + +package pb + +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 ( + PolicyService_DeletePolicy_FullMethodName = "/pomerium.dashboard.PolicyService/DeletePolicy" + PolicyService_GetPolicy_FullMethodName = "/pomerium.dashboard.PolicyService/GetPolicy" + PolicyService_ListPolicies_FullMethodName = "/pomerium.dashboard.PolicyService/ListPolicies" + PolicyService_SetPolicy_FullMethodName = "/pomerium.dashboard.PolicyService/SetPolicy" +) + +// PolicyServiceClient is the client API for PolicyService 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. +// +// PolicyService manages policy creation and definition +type PolicyServiceClient interface { + // DeletePolicy deletes an existing policy + DeletePolicy(ctx context.Context, in *DeletePolicyRequest, opts ...grpc.CallOption) (*DeletePolicyResponse, error) + // GetPolicy retrieves an existing policy + GetPolicy(ctx context.Context, in *GetPolicyRequest, opts ...grpc.CallOption) (*GetPolicyResponse, error) + // ListPolicies lists existing policies based on the ListPoliciesRequest + // parameters + ListPolicies(ctx context.Context, in *ListPoliciesRequest, opts ...grpc.CallOption) (*ListPoliciesResponse, error) + // SetPolicy creates a new policy or, if the id is specified, updates an + // existing policy + SetPolicy(ctx context.Context, in *SetPolicyRequest, opts ...grpc.CallOption) (*SetPolicyResponse, error) +} + +type policyServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewPolicyServiceClient(cc grpc.ClientConnInterface) PolicyServiceClient { + return &policyServiceClient{cc} +} + +func (c *policyServiceClient) DeletePolicy(ctx context.Context, in *DeletePolicyRequest, opts ...grpc.CallOption) (*DeletePolicyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeletePolicyResponse) + err := c.cc.Invoke(ctx, PolicyService_DeletePolicy_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *policyServiceClient) GetPolicy(ctx context.Context, in *GetPolicyRequest, opts ...grpc.CallOption) (*GetPolicyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetPolicyResponse) + err := c.cc.Invoke(ctx, PolicyService_GetPolicy_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *policyServiceClient) ListPolicies(ctx context.Context, in *ListPoliciesRequest, opts ...grpc.CallOption) (*ListPoliciesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListPoliciesResponse) + err := c.cc.Invoke(ctx, PolicyService_ListPolicies_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *policyServiceClient) SetPolicy(ctx context.Context, in *SetPolicyRequest, opts ...grpc.CallOption) (*SetPolicyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetPolicyResponse) + err := c.cc.Invoke(ctx, PolicyService_SetPolicy_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PolicyServiceServer is the server API for PolicyService service. +// All implementations should embed UnimplementedPolicyServiceServer +// for forward compatibility. +// +// PolicyService manages policy creation and definition +type PolicyServiceServer interface { + // DeletePolicy deletes an existing policy + DeletePolicy(context.Context, *DeletePolicyRequest) (*DeletePolicyResponse, error) + // GetPolicy retrieves an existing policy + GetPolicy(context.Context, *GetPolicyRequest) (*GetPolicyResponse, error) + // ListPolicies lists existing policies based on the ListPoliciesRequest + // parameters + ListPolicies(context.Context, *ListPoliciesRequest) (*ListPoliciesResponse, error) + // SetPolicy creates a new policy or, if the id is specified, updates an + // existing policy + SetPolicy(context.Context, *SetPolicyRequest) (*SetPolicyResponse, error) +} + +// UnimplementedPolicyServiceServer should 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 UnimplementedPolicyServiceServer struct{} + +func (UnimplementedPolicyServiceServer) DeletePolicy(context.Context, *DeletePolicyRequest) (*DeletePolicyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeletePolicy not implemented") +} +func (UnimplementedPolicyServiceServer) GetPolicy(context.Context, *GetPolicyRequest) (*GetPolicyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPolicy not implemented") +} +func (UnimplementedPolicyServiceServer) ListPolicies(context.Context, *ListPoliciesRequest) (*ListPoliciesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListPolicies not implemented") +} +func (UnimplementedPolicyServiceServer) SetPolicy(context.Context, *SetPolicyRequest) (*SetPolicyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetPolicy not implemented") +} +func (UnimplementedPolicyServiceServer) testEmbeddedByValue() {} + +// UnsafePolicyServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PolicyServiceServer will +// result in compilation errors. +type UnsafePolicyServiceServer interface { + mustEmbedUnimplementedPolicyServiceServer() +} + +func RegisterPolicyServiceServer(s grpc.ServiceRegistrar, srv PolicyServiceServer) { + // If the following call pancis, it indicates UnimplementedPolicyServiceServer 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(&PolicyService_ServiceDesc, srv) +} + +func _PolicyService_DeletePolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeletePolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PolicyServiceServer).DeletePolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PolicyService_DeletePolicy_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PolicyServiceServer).DeletePolicy(ctx, req.(*DeletePolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PolicyService_GetPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PolicyServiceServer).GetPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PolicyService_GetPolicy_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PolicyServiceServer).GetPolicy(ctx, req.(*GetPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PolicyService_ListPolicies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPoliciesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PolicyServiceServer).ListPolicies(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PolicyService_ListPolicies_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PolicyServiceServer).ListPolicies(ctx, req.(*ListPoliciesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PolicyService_SetPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PolicyServiceServer).SetPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PolicyService_SetPolicy_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PolicyServiceServer).SetPolicy(ctx, req.(*SetPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// PolicyService_ServiceDesc is the grpc.ServiceDesc for PolicyService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var PolicyService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pomerium.dashboard.PolicyService", + HandlerType: (*PolicyServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "DeletePolicy", + Handler: _PolicyService_DeletePolicy_Handler, + }, + { + MethodName: "GetPolicy", + Handler: _PolicyService_GetPolicy_Handler, + }, + { + MethodName: "ListPolicies", + Handler: _PolicyService_ListPolicies_Handler, + }, + { + MethodName: "SetPolicy", + Handler: _PolicyService_SetPolicy_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "policy.proto", +} diff --git a/pb/report.pb.go b/pb/report.pb.go index abe7189..155c7a0 100644 --- a/pb/report.pb.go +++ b/pb/report.pb.go @@ -1,16 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 -// protoc v4.24.4 +// protoc-gen-go v1.34.2 +// protoc v3.20.3 // source: report.proto package pb import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -37,9 +33,11 @@ type PolicyReportRequest struct { func (x *PolicyReportRequest) Reset() { *x = PolicyReportRequest{} - mi := &file_report_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_report_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PolicyReportRequest) String() string { @@ -50,7 +48,7 @@ func (*PolicyReportRequest) ProtoMessage() {} func (x *PolicyReportRequest) ProtoReflect() protoreflect.Message { mi := &file_report_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -90,9 +88,11 @@ type PolicyReportResponse struct { func (x *PolicyReportResponse) Reset() { *x = PolicyReportResponse{} - mi := &file_report_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_report_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PolicyReportResponse) String() string { @@ -103,7 +103,7 @@ func (*PolicyReportResponse) ProtoMessage() {} func (x *PolicyReportResponse) ProtoReflect() protoreflect.Message { mi := &file_report_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -203,6 +203,32 @@ func file_report_proto_init() { } file_policy_proto_init() file_routes_proto_init() + if !protoimpl.UnsafeEnabled { + file_report_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*PolicyReportRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_report_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*PolicyReportResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ @@ -222,85 +248,3 @@ func file_report_proto_init() { file_report_proto_goTypes = nil file_report_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// ReportClient is the client API for Report service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ReportClient interface { - // PolicyReport generates a policy report - PolicyReport(ctx context.Context, in *PolicyReportRequest, opts ...grpc.CallOption) (*PolicyReportResponse, error) -} - -type reportClient struct { - cc grpc.ClientConnInterface -} - -func NewReportClient(cc grpc.ClientConnInterface) ReportClient { - return &reportClient{cc} -} - -func (c *reportClient) PolicyReport(ctx context.Context, in *PolicyReportRequest, opts ...grpc.CallOption) (*PolicyReportResponse, error) { - out := new(PolicyReportResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.Report/PolicyReport", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ReportServer is the server API for Report service. -type ReportServer interface { - // PolicyReport generates a policy report - PolicyReport(context.Context, *PolicyReportRequest) (*PolicyReportResponse, error) -} - -// UnimplementedReportServer can be embedded to have forward compatible implementations. -type UnimplementedReportServer struct { -} - -func (*UnimplementedReportServer) PolicyReport(context.Context, *PolicyReportRequest) (*PolicyReportResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PolicyReport not implemented") -} - -func RegisterReportServer(s *grpc.Server, srv ReportServer) { - s.RegisterService(&_Report_serviceDesc, srv) -} - -func _Report_PolicyReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PolicyReportRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ReportServer).PolicyReport(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.Report/PolicyReport", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ReportServer).PolicyReport(ctx, req.(*PolicyReportRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Report_serviceDesc = grpc.ServiceDesc{ - ServiceName: "pomerium.dashboard.Report", - HandlerType: (*ReportServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "PolicyReport", - Handler: _Report_PolicyReport_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "report.proto", -} diff --git a/pb/report_grpc.pb.go b/pb/report_grpc.pb.go new file mode 100644 index 0000000..9b5c518 --- /dev/null +++ b/pb/report_grpc.pb.go @@ -0,0 +1,121 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v3.20.3 +// source: report.proto + +package pb + +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 ( + Report_PolicyReport_FullMethodName = "/pomerium.dashboard.Report/PolicyReport" +) + +// ReportClient is the client API for Report 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 ReportClient interface { + // PolicyReport generates a policy report + PolicyReport(ctx context.Context, in *PolicyReportRequest, opts ...grpc.CallOption) (*PolicyReportResponse, error) +} + +type reportClient struct { + cc grpc.ClientConnInterface +} + +func NewReportClient(cc grpc.ClientConnInterface) ReportClient { + return &reportClient{cc} +} + +func (c *reportClient) PolicyReport(ctx context.Context, in *PolicyReportRequest, opts ...grpc.CallOption) (*PolicyReportResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(PolicyReportResponse) + err := c.cc.Invoke(ctx, Report_PolicyReport_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ReportServer is the server API for Report service. +// All implementations should embed UnimplementedReportServer +// for forward compatibility. +type ReportServer interface { + // PolicyReport generates a policy report + PolicyReport(context.Context, *PolicyReportRequest) (*PolicyReportResponse, error) +} + +// UnimplementedReportServer should 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 UnimplementedReportServer struct{} + +func (UnimplementedReportServer) PolicyReport(context.Context, *PolicyReportRequest) (*PolicyReportResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PolicyReport not implemented") +} +func (UnimplementedReportServer) testEmbeddedByValue() {} + +// UnsafeReportServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ReportServer will +// result in compilation errors. +type UnsafeReportServer interface { + mustEmbedUnimplementedReportServer() +} + +func RegisterReportServer(s grpc.ServiceRegistrar, srv ReportServer) { + // If the following call pancis, it indicates UnimplementedReportServer 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(&Report_ServiceDesc, srv) +} + +func _Report_PolicyReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PolicyReportRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ReportServer).PolicyReport(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Report_PolicyReport_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ReportServer).PolicyReport(ctx, req.(*PolicyReportRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Report_ServiceDesc is the grpc.ServiceDesc for Report service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Report_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pomerium.dashboard.Report", + HandlerType: (*ReportServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "PolicyReport", + Handler: _Report_PolicyReport_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "report.proto", +} diff --git a/pb/routes.pb.go b/pb/routes.pb.go index 5a60736..c925601 100644 --- a/pb/routes.pb.go +++ b/pb/routes.pb.go @@ -1,18 +1,14 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 -// protoc v4.24.4 +// protoc-gen-go v1.34.2 +// protoc v3.20.3 // source: routes.proto package pb import ( - context "context" v31 "github.com/envoyproxy/go-control-plane/envoy/config/cluster/v3" v3 "github.com/envoyproxy/go-control-plane/envoy/config/route/v3" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" @@ -93,9 +89,11 @@ type RouteRewriteHeader struct { func (x *RouteRewriteHeader) Reset() { *x = RouteRewriteHeader{} - mi := &file_routes_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_routes_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RouteRewriteHeader) String() string { @@ -106,7 +104,7 @@ func (*RouteRewriteHeader) ProtoMessage() {} func (x *RouteRewriteHeader) ProtoReflect() protoreflect.Message { mi := &file_routes_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -170,9 +168,11 @@ type RouteDirectResponse struct { func (x *RouteDirectResponse) Reset() { *x = RouteDirectResponse{} - mi := &file_routes_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_routes_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RouteDirectResponse) String() string { @@ -183,7 +183,7 @@ func (*RouteDirectResponse) ProtoMessage() {} func (x *RouteDirectResponse) ProtoReflect() protoreflect.Message { mi := &file_routes_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -226,9 +226,11 @@ type JwtGroupsFilter struct { func (x *JwtGroupsFilter) Reset() { *x = JwtGroupsFilter{} - mi := &file_routes_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_routes_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *JwtGroupsFilter) String() string { @@ -239,7 +241,7 @@ func (*JwtGroupsFilter) ProtoMessage() {} func (x *JwtGroupsFilter) ProtoReflect() protoreflect.Message { mi := &file_routes_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -338,9 +340,11 @@ type Route struct { func (x *Route) Reset() { *x = Route{} - mi := &file_routes_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_routes_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Route) String() string { @@ -351,7 +355,7 @@ func (*Route) ProtoMessage() {} func (x *Route) ProtoReflect() protoreflect.Message { mi := &file_routes_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -757,9 +761,11 @@ type RouteWithPolicies struct { func (x *RouteWithPolicies) Reset() { *x = RouteWithPolicies{} - mi := &file_routes_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_routes_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RouteWithPolicies) String() string { @@ -770,7 +776,7 @@ func (*RouteWithPolicies) ProtoMessage() {} func (x *RouteWithPolicies) ProtoReflect() protoreflect.Message { mi := &file_routes_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -809,9 +815,11 @@ type DeleteRouteRequest struct { func (x *DeleteRouteRequest) Reset() { *x = DeleteRouteRequest{} - mi := &file_routes_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_routes_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeleteRouteRequest) String() string { @@ -822,7 +830,7 @@ func (*DeleteRouteRequest) ProtoMessage() {} func (x *DeleteRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_routes_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -852,9 +860,11 @@ type DeleteRouteResponse struct { func (x *DeleteRouteResponse) Reset() { *x = DeleteRouteResponse{} - mi := &file_routes_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_routes_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeleteRouteResponse) String() string { @@ -865,7 +875,7 @@ func (*DeleteRouteResponse) ProtoMessage() {} func (x *DeleteRouteResponse) ProtoReflect() protoreflect.Message { mi := &file_routes_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -890,9 +900,11 @@ type DeleteRoutesRequest struct { func (x *DeleteRoutesRequest) Reset() { *x = DeleteRoutesRequest{} - mi := &file_routes_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_routes_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeleteRoutesRequest) String() string { @@ -903,7 +915,7 @@ func (*DeleteRoutesRequest) ProtoMessage() {} func (x *DeleteRoutesRequest) ProtoReflect() protoreflect.Message { mi := &file_routes_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -933,9 +945,11 @@ type DeleteRoutesResponse struct { func (x *DeleteRoutesResponse) Reset() { *x = DeleteRoutesResponse{} - mi := &file_routes_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_routes_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeleteRoutesResponse) String() string { @@ -946,7 +960,7 @@ func (*DeleteRoutesResponse) ProtoMessage() {} func (x *DeleteRoutesResponse) ProtoReflect() protoreflect.Message { mi := &file_routes_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -971,9 +985,11 @@ type GetRouteRequest struct { func (x *GetRouteRequest) Reset() { *x = GetRouteRequest{} - mi := &file_routes_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_routes_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetRouteRequest) String() string { @@ -984,7 +1000,7 @@ func (*GetRouteRequest) ProtoMessage() {} func (x *GetRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_routes_proto_msgTypes[9] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1016,9 +1032,11 @@ type GetRouteResponse struct { func (x *GetRouteResponse) Reset() { *x = GetRouteResponse{} - mi := &file_routes_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_routes_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetRouteResponse) String() string { @@ -1029,7 +1047,7 @@ func (*GetRouteResponse) ProtoMessage() {} func (x *GetRouteResponse) ProtoReflect() protoreflect.Message { mi := &file_routes_proto_msgTypes[10] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1070,9 +1088,11 @@ type ListRoutesRequest struct { func (x *ListRoutesRequest) Reset() { *x = ListRoutesRequest{} - mi := &file_routes_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_routes_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListRoutesRequest) String() string { @@ -1083,7 +1103,7 @@ func (*ListRoutesRequest) ProtoMessage() {} func (x *ListRoutesRequest) ProtoReflect() protoreflect.Message { mi := &file_routes_proto_msgTypes[11] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1145,9 +1165,11 @@ type ListRoutesResponse struct { func (x *ListRoutesResponse) Reset() { *x = ListRoutesResponse{} - mi := &file_routes_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_routes_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListRoutesResponse) String() string { @@ -1158,7 +1180,7 @@ func (*ListRoutesResponse) ProtoMessage() {} func (x *ListRoutesResponse) ProtoReflect() protoreflect.Message { mi := &file_routes_proto_msgTypes[12] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1200,9 +1222,11 @@ type LoadRoutesRequest struct { func (x *LoadRoutesRequest) Reset() { *x = LoadRoutesRequest{} - mi := &file_routes_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_routes_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *LoadRoutesRequest) String() string { @@ -1213,7 +1237,7 @@ func (*LoadRoutesRequest) ProtoMessage() {} func (x *LoadRoutesRequest) ProtoReflect() protoreflect.Message { mi := &file_routes_proto_msgTypes[13] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1254,9 +1278,11 @@ type LoadRoutesResponse struct { func (x *LoadRoutesResponse) Reset() { *x = LoadRoutesResponse{} - mi := &file_routes_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_routes_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *LoadRoutesResponse) String() string { @@ -1267,7 +1293,7 @@ func (*LoadRoutesResponse) ProtoMessage() {} func (x *LoadRoutesResponse) ProtoReflect() protoreflect.Message { mi := &file_routes_proto_msgTypes[14] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1299,9 +1325,11 @@ type SetRouteRequest struct { func (x *SetRouteRequest) Reset() { *x = SetRouteRequest{} - mi := &file_routes_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_routes_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetRouteRequest) String() string { @@ -1312,7 +1340,7 @@ func (*SetRouteRequest) ProtoMessage() {} func (x *SetRouteRequest) ProtoReflect() protoreflect.Message { mi := &file_routes_proto_msgTypes[15] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1344,9 +1372,11 @@ type SetRouteResponse struct { func (x *SetRouteResponse) Reset() { *x = SetRouteResponse{} - mi := &file_routes_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_routes_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetRouteResponse) String() string { @@ -1357,7 +1387,7 @@ func (*SetRouteResponse) ProtoMessage() {} func (x *SetRouteResponse) ProtoReflect() protoreflect.Message { mi := &file_routes_proto_msgTypes[16] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1389,9 +1419,11 @@ type SetRoutesRequest struct { func (x *SetRoutesRequest) Reset() { *x = SetRoutesRequest{} - mi := &file_routes_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_routes_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetRoutesRequest) String() string { @@ -1402,7 +1434,7 @@ func (*SetRoutesRequest) ProtoMessage() {} func (x *SetRoutesRequest) ProtoReflect() protoreflect.Message { mi := &file_routes_proto_msgTypes[17] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1434,9 +1466,11 @@ type SetRoutesResponse struct { func (x *SetRoutesResponse) Reset() { *x = SetRoutesResponse{} - mi := &file_routes_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_routes_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetRoutesResponse) String() string { @@ -1447,7 +1481,7 @@ func (*SetRoutesResponse) ProtoMessage() {} func (x *SetRoutesResponse) ProtoReflect() protoreflect.Message { mi := &file_routes_proto_msgTypes[18] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1480,9 +1514,11 @@ type MoveRoutesRequest struct { func (x *MoveRoutesRequest) Reset() { *x = MoveRoutesRequest{} - mi := &file_routes_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_routes_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *MoveRoutesRequest) String() string { @@ -1493,7 +1529,7 @@ func (*MoveRoutesRequest) ProtoMessage() {} func (x *MoveRoutesRequest) ProtoReflect() protoreflect.Message { mi := &file_routes_proto_msgTypes[19] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1530,9 +1566,11 @@ type MoveRoutesResponse struct { func (x *MoveRoutesResponse) Reset() { *x = MoveRoutesResponse{} - mi := &file_routes_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_routes_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *MoveRoutesResponse) String() string { @@ -1543,7 +1581,7 @@ func (*MoveRoutesResponse) ProtoMessage() {} func (x *MoveRoutesResponse) ProtoReflect() protoreflect.Message { mi := &file_routes_proto_msgTypes[20] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2060,6 +2098,260 @@ func file_routes_proto_init() { return } file_policy_proto_init() + if !protoimpl.UnsafeEnabled { + file_routes_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*RouteRewriteHeader); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_routes_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*RouteDirectResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_routes_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*JwtGroupsFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_routes_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*Route); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_routes_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*RouteWithPolicies); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_routes_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*DeleteRouteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_routes_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*DeleteRouteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_routes_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*DeleteRoutesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_routes_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*DeleteRoutesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_routes_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*GetRouteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_routes_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*GetRouteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_routes_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*ListRoutesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_routes_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*ListRoutesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_routes_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*LoadRoutesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_routes_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*LoadRoutesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_routes_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*SetRouteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_routes_proto_msgTypes[16].Exporter = func(v any, i int) any { + switch v := v.(*SetRouteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_routes_proto_msgTypes[17].Exporter = func(v any, i int) any { + switch v := v.(*SetRoutesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_routes_proto_msgTypes[18].Exporter = func(v any, i int) any { + switch v := v.(*SetRoutesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_routes_proto_msgTypes[19].Exporter = func(v any, i int) any { + switch v := v.(*MoveRoutesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_routes_proto_msgTypes[20].Exporter = func(v any, i int) any { + switch v := v.(*MoveRoutesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } file_routes_proto_msgTypes[0].OneofWrappers = []any{ (*RouteRewriteHeader_Prefix)(nil), } @@ -2085,351 +2377,3 @@ func file_routes_proto_init() { file_routes_proto_goTypes = nil file_routes_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// RouteServiceClient is the client API for RouteService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type RouteServiceClient interface { - // DeleteRoute removes an existing route - DeleteRoute(ctx context.Context, in *DeleteRouteRequest, opts ...grpc.CallOption) (*DeleteRouteResponse, error) - // DeleteRoutes removes existing routes. - DeleteRoutes(ctx context.Context, in *DeleteRoutesRequest, opts ...grpc.CallOption) (*DeleteRoutesResponse, error) - // GetRoute retrieves an existing route - GetRoute(ctx context.Context, in *GetRouteRequest, opts ...grpc.CallOption) (*GetRouteResponse, error) - // ListRoutes lists routes based on ListRoutesRequest - ListRoutes(ctx context.Context, in *ListRoutesRequest, opts ...grpc.CallOption) (*ListRoutesResponse, error) - // LoadRoutes imports routes from an existing OSS configuration - LoadRoutes(ctx context.Context, in *LoadRoutesRequest, opts ...grpc.CallOption) (*LoadRoutesResponse, error) - // SetRoute creates or, if id is defined, updates an existing route - SetRoute(ctx context.Context, in *SetRouteRequest, opts ...grpc.CallOption) (*SetRouteResponse, error) - // SetRoutes creates or, if id is defined, updates existing routes - SetRoutes(ctx context.Context, in *SetRoutesRequest, opts ...grpc.CallOption) (*SetRoutesResponse, error) - // MoveRoutes takes an array of routeIds and moves them to a new namespace - MoveRoutes(ctx context.Context, in *MoveRoutesRequest, opts ...grpc.CallOption) (*MoveRoutesResponse, error) -} - -type routeServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewRouteServiceClient(cc grpc.ClientConnInterface) RouteServiceClient { - return &routeServiceClient{cc} -} - -func (c *routeServiceClient) DeleteRoute(ctx context.Context, in *DeleteRouteRequest, opts ...grpc.CallOption) (*DeleteRouteResponse, error) { - out := new(DeleteRouteResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.RouteService/DeleteRoute", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *routeServiceClient) DeleteRoutes(ctx context.Context, in *DeleteRoutesRequest, opts ...grpc.CallOption) (*DeleteRoutesResponse, error) { - out := new(DeleteRoutesResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.RouteService/DeleteRoutes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *routeServiceClient) GetRoute(ctx context.Context, in *GetRouteRequest, opts ...grpc.CallOption) (*GetRouteResponse, error) { - out := new(GetRouteResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.RouteService/GetRoute", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *routeServiceClient) ListRoutes(ctx context.Context, in *ListRoutesRequest, opts ...grpc.CallOption) (*ListRoutesResponse, error) { - out := new(ListRoutesResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.RouteService/ListRoutes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *routeServiceClient) LoadRoutes(ctx context.Context, in *LoadRoutesRequest, opts ...grpc.CallOption) (*LoadRoutesResponse, error) { - out := new(LoadRoutesResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.RouteService/LoadRoutes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *routeServiceClient) SetRoute(ctx context.Context, in *SetRouteRequest, opts ...grpc.CallOption) (*SetRouteResponse, error) { - out := new(SetRouteResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.RouteService/SetRoute", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *routeServiceClient) SetRoutes(ctx context.Context, in *SetRoutesRequest, opts ...grpc.CallOption) (*SetRoutesResponse, error) { - out := new(SetRoutesResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.RouteService/SetRoutes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *routeServiceClient) MoveRoutes(ctx context.Context, in *MoveRoutesRequest, opts ...grpc.CallOption) (*MoveRoutesResponse, error) { - out := new(MoveRoutesResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.RouteService/MoveRoutes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// RouteServiceServer is the server API for RouteService service. -type RouteServiceServer interface { - // DeleteRoute removes an existing route - DeleteRoute(context.Context, *DeleteRouteRequest) (*DeleteRouteResponse, error) - // DeleteRoutes removes existing routes. - DeleteRoutes(context.Context, *DeleteRoutesRequest) (*DeleteRoutesResponse, error) - // GetRoute retrieves an existing route - GetRoute(context.Context, *GetRouteRequest) (*GetRouteResponse, error) - // ListRoutes lists routes based on ListRoutesRequest - ListRoutes(context.Context, *ListRoutesRequest) (*ListRoutesResponse, error) - // LoadRoutes imports routes from an existing OSS configuration - LoadRoutes(context.Context, *LoadRoutesRequest) (*LoadRoutesResponse, error) - // SetRoute creates or, if id is defined, updates an existing route - SetRoute(context.Context, *SetRouteRequest) (*SetRouteResponse, error) - // SetRoutes creates or, if id is defined, updates existing routes - SetRoutes(context.Context, *SetRoutesRequest) (*SetRoutesResponse, error) - // MoveRoutes takes an array of routeIds and moves them to a new namespace - MoveRoutes(context.Context, *MoveRoutesRequest) (*MoveRoutesResponse, error) -} - -// UnimplementedRouteServiceServer can be embedded to have forward compatible implementations. -type UnimplementedRouteServiceServer struct { -} - -func (*UnimplementedRouteServiceServer) DeleteRoute(context.Context, *DeleteRouteRequest) (*DeleteRouteResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteRoute not implemented") -} -func (*UnimplementedRouteServiceServer) DeleteRoutes(context.Context, *DeleteRoutesRequest) (*DeleteRoutesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteRoutes not implemented") -} -func (*UnimplementedRouteServiceServer) GetRoute(context.Context, *GetRouteRequest) (*GetRouteResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetRoute not implemented") -} -func (*UnimplementedRouteServiceServer) ListRoutes(context.Context, *ListRoutesRequest) (*ListRoutesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListRoutes not implemented") -} -func (*UnimplementedRouteServiceServer) LoadRoutes(context.Context, *LoadRoutesRequest) (*LoadRoutesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LoadRoutes not implemented") -} -func (*UnimplementedRouteServiceServer) SetRoute(context.Context, *SetRouteRequest) (*SetRouteResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetRoute not implemented") -} -func (*UnimplementedRouteServiceServer) SetRoutes(context.Context, *SetRoutesRequest) (*SetRoutesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetRoutes not implemented") -} -func (*UnimplementedRouteServiceServer) MoveRoutes(context.Context, *MoveRoutesRequest) (*MoveRoutesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method MoveRoutes not implemented") -} - -func RegisterRouteServiceServer(s *grpc.Server, srv RouteServiceServer) { - s.RegisterService(&_RouteService_serviceDesc, srv) -} - -func _RouteService_DeleteRoute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteRouteRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RouteServiceServer).DeleteRoute(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.RouteService/DeleteRoute", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RouteServiceServer).DeleteRoute(ctx, req.(*DeleteRouteRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RouteService_DeleteRoutes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteRoutesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RouteServiceServer).DeleteRoutes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.RouteService/DeleteRoutes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RouteServiceServer).DeleteRoutes(ctx, req.(*DeleteRoutesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RouteService_GetRoute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRouteRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RouteServiceServer).GetRoute(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.RouteService/GetRoute", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RouteServiceServer).GetRoute(ctx, req.(*GetRouteRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RouteService_ListRoutes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListRoutesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RouteServiceServer).ListRoutes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.RouteService/ListRoutes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RouteServiceServer).ListRoutes(ctx, req.(*ListRoutesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RouteService_LoadRoutes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LoadRoutesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RouteServiceServer).LoadRoutes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.RouteService/LoadRoutes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RouteServiceServer).LoadRoutes(ctx, req.(*LoadRoutesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RouteService_SetRoute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetRouteRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RouteServiceServer).SetRoute(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.RouteService/SetRoute", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RouteServiceServer).SetRoute(ctx, req.(*SetRouteRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RouteService_SetRoutes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetRoutesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RouteServiceServer).SetRoutes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.RouteService/SetRoutes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RouteServiceServer).SetRoutes(ctx, req.(*SetRoutesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RouteService_MoveRoutes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MoveRoutesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RouteServiceServer).MoveRoutes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.RouteService/MoveRoutes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RouteServiceServer).MoveRoutes(ctx, req.(*MoveRoutesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _RouteService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "pomerium.dashboard.RouteService", - HandlerType: (*RouteServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "DeleteRoute", - Handler: _RouteService_DeleteRoute_Handler, - }, - { - MethodName: "DeleteRoutes", - Handler: _RouteService_DeleteRoutes_Handler, - }, - { - MethodName: "GetRoute", - Handler: _RouteService_GetRoute_Handler, - }, - { - MethodName: "ListRoutes", - Handler: _RouteService_ListRoutes_Handler, - }, - { - MethodName: "LoadRoutes", - Handler: _RouteService_LoadRoutes_Handler, - }, - { - MethodName: "SetRoute", - Handler: _RouteService_SetRoute_Handler, - }, - { - MethodName: "SetRoutes", - Handler: _RouteService_SetRoutes_Handler, - }, - { - MethodName: "MoveRoutes", - Handler: _RouteService_MoveRoutes_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "routes.proto", -} diff --git a/pb/routes_grpc.pb.go b/pb/routes_grpc.pb.go new file mode 100644 index 0000000..c3c085b --- /dev/null +++ b/pb/routes_grpc.pb.go @@ -0,0 +1,405 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v3.20.3 +// source: routes.proto + +package pb + +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 ( + RouteService_DeleteRoute_FullMethodName = "/pomerium.dashboard.RouteService/DeleteRoute" + RouteService_DeleteRoutes_FullMethodName = "/pomerium.dashboard.RouteService/DeleteRoutes" + RouteService_GetRoute_FullMethodName = "/pomerium.dashboard.RouteService/GetRoute" + RouteService_ListRoutes_FullMethodName = "/pomerium.dashboard.RouteService/ListRoutes" + RouteService_LoadRoutes_FullMethodName = "/pomerium.dashboard.RouteService/LoadRoutes" + RouteService_SetRoute_FullMethodName = "/pomerium.dashboard.RouteService/SetRoute" + RouteService_SetRoutes_FullMethodName = "/pomerium.dashboard.RouteService/SetRoutes" + RouteService_MoveRoutes_FullMethodName = "/pomerium.dashboard.RouteService/MoveRoutes" +) + +// RouteServiceClient is the client API for RouteService 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. +// +// RouteService manages proxy route definitions +type RouteServiceClient interface { + // DeleteRoute removes an existing route + DeleteRoute(ctx context.Context, in *DeleteRouteRequest, opts ...grpc.CallOption) (*DeleteRouteResponse, error) + // DeleteRoutes removes existing routes. + DeleteRoutes(ctx context.Context, in *DeleteRoutesRequest, opts ...grpc.CallOption) (*DeleteRoutesResponse, error) + // GetRoute retrieves an existing route + GetRoute(ctx context.Context, in *GetRouteRequest, opts ...grpc.CallOption) (*GetRouteResponse, error) + // ListRoutes lists routes based on ListRoutesRequest + ListRoutes(ctx context.Context, in *ListRoutesRequest, opts ...grpc.CallOption) (*ListRoutesResponse, error) + // LoadRoutes imports routes from an existing OSS configuration + LoadRoutes(ctx context.Context, in *LoadRoutesRequest, opts ...grpc.CallOption) (*LoadRoutesResponse, error) + // SetRoute creates or, if id is defined, updates an existing route + SetRoute(ctx context.Context, in *SetRouteRequest, opts ...grpc.CallOption) (*SetRouteResponse, error) + // SetRoutes creates or, if id is defined, updates existing routes + SetRoutes(ctx context.Context, in *SetRoutesRequest, opts ...grpc.CallOption) (*SetRoutesResponse, error) + // MoveRoutes takes an array of routeIds and moves them to a new namespace + MoveRoutes(ctx context.Context, in *MoveRoutesRequest, opts ...grpc.CallOption) (*MoveRoutesResponse, error) +} + +type routeServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewRouteServiceClient(cc grpc.ClientConnInterface) RouteServiceClient { + return &routeServiceClient{cc} +} + +func (c *routeServiceClient) DeleteRoute(ctx context.Context, in *DeleteRouteRequest, opts ...grpc.CallOption) (*DeleteRouteResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeleteRouteResponse) + err := c.cc.Invoke(ctx, RouteService_DeleteRoute_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *routeServiceClient) DeleteRoutes(ctx context.Context, in *DeleteRoutesRequest, opts ...grpc.CallOption) (*DeleteRoutesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeleteRoutesResponse) + err := c.cc.Invoke(ctx, RouteService_DeleteRoutes_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *routeServiceClient) GetRoute(ctx context.Context, in *GetRouteRequest, opts ...grpc.CallOption) (*GetRouteResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetRouteResponse) + err := c.cc.Invoke(ctx, RouteService_GetRoute_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *routeServiceClient) ListRoutes(ctx context.Context, in *ListRoutesRequest, opts ...grpc.CallOption) (*ListRoutesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListRoutesResponse) + err := c.cc.Invoke(ctx, RouteService_ListRoutes_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *routeServiceClient) LoadRoutes(ctx context.Context, in *LoadRoutesRequest, opts ...grpc.CallOption) (*LoadRoutesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(LoadRoutesResponse) + err := c.cc.Invoke(ctx, RouteService_LoadRoutes_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *routeServiceClient) SetRoute(ctx context.Context, in *SetRouteRequest, opts ...grpc.CallOption) (*SetRouteResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetRouteResponse) + err := c.cc.Invoke(ctx, RouteService_SetRoute_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *routeServiceClient) SetRoutes(ctx context.Context, in *SetRoutesRequest, opts ...grpc.CallOption) (*SetRoutesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetRoutesResponse) + err := c.cc.Invoke(ctx, RouteService_SetRoutes_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *routeServiceClient) MoveRoutes(ctx context.Context, in *MoveRoutesRequest, opts ...grpc.CallOption) (*MoveRoutesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MoveRoutesResponse) + err := c.cc.Invoke(ctx, RouteService_MoveRoutes_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RouteServiceServer is the server API for RouteService service. +// All implementations should embed UnimplementedRouteServiceServer +// for forward compatibility. +// +// RouteService manages proxy route definitions +type RouteServiceServer interface { + // DeleteRoute removes an existing route + DeleteRoute(context.Context, *DeleteRouteRequest) (*DeleteRouteResponse, error) + // DeleteRoutes removes existing routes. + DeleteRoutes(context.Context, *DeleteRoutesRequest) (*DeleteRoutesResponse, error) + // GetRoute retrieves an existing route + GetRoute(context.Context, *GetRouteRequest) (*GetRouteResponse, error) + // ListRoutes lists routes based on ListRoutesRequest + ListRoutes(context.Context, *ListRoutesRequest) (*ListRoutesResponse, error) + // LoadRoutes imports routes from an existing OSS configuration + LoadRoutes(context.Context, *LoadRoutesRequest) (*LoadRoutesResponse, error) + // SetRoute creates or, if id is defined, updates an existing route + SetRoute(context.Context, *SetRouteRequest) (*SetRouteResponse, error) + // SetRoutes creates or, if id is defined, updates existing routes + SetRoutes(context.Context, *SetRoutesRequest) (*SetRoutesResponse, error) + // MoveRoutes takes an array of routeIds and moves them to a new namespace + MoveRoutes(context.Context, *MoveRoutesRequest) (*MoveRoutesResponse, error) +} + +// UnimplementedRouteServiceServer should 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 UnimplementedRouteServiceServer struct{} + +func (UnimplementedRouteServiceServer) DeleteRoute(context.Context, *DeleteRouteRequest) (*DeleteRouteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteRoute not implemented") +} +func (UnimplementedRouteServiceServer) DeleteRoutes(context.Context, *DeleteRoutesRequest) (*DeleteRoutesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteRoutes not implemented") +} +func (UnimplementedRouteServiceServer) GetRoute(context.Context, *GetRouteRequest) (*GetRouteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRoute not implemented") +} +func (UnimplementedRouteServiceServer) ListRoutes(context.Context, *ListRoutesRequest) (*ListRoutesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListRoutes not implemented") +} +func (UnimplementedRouteServiceServer) LoadRoutes(context.Context, *LoadRoutesRequest) (*LoadRoutesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LoadRoutes not implemented") +} +func (UnimplementedRouteServiceServer) SetRoute(context.Context, *SetRouteRequest) (*SetRouteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetRoute not implemented") +} +func (UnimplementedRouteServiceServer) SetRoutes(context.Context, *SetRoutesRequest) (*SetRoutesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetRoutes not implemented") +} +func (UnimplementedRouteServiceServer) MoveRoutes(context.Context, *MoveRoutesRequest) (*MoveRoutesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MoveRoutes not implemented") +} +func (UnimplementedRouteServiceServer) testEmbeddedByValue() {} + +// UnsafeRouteServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RouteServiceServer will +// result in compilation errors. +type UnsafeRouteServiceServer interface { + mustEmbedUnimplementedRouteServiceServer() +} + +func RegisterRouteServiceServer(s grpc.ServiceRegistrar, srv RouteServiceServer) { + // If the following call pancis, it indicates UnimplementedRouteServiceServer 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(&RouteService_ServiceDesc, srv) +} + +func _RouteService_DeleteRoute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteRouteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RouteServiceServer).DeleteRoute(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RouteService_DeleteRoute_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RouteServiceServer).DeleteRoute(ctx, req.(*DeleteRouteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RouteService_DeleteRoutes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteRoutesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RouteServiceServer).DeleteRoutes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RouteService_DeleteRoutes_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RouteServiceServer).DeleteRoutes(ctx, req.(*DeleteRoutesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RouteService_GetRoute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRouteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RouteServiceServer).GetRoute(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RouteService_GetRoute_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RouteServiceServer).GetRoute(ctx, req.(*GetRouteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RouteService_ListRoutes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListRoutesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RouteServiceServer).ListRoutes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RouteService_ListRoutes_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RouteServiceServer).ListRoutes(ctx, req.(*ListRoutesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RouteService_LoadRoutes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LoadRoutesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RouteServiceServer).LoadRoutes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RouteService_LoadRoutes_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RouteServiceServer).LoadRoutes(ctx, req.(*LoadRoutesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RouteService_SetRoute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetRouteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RouteServiceServer).SetRoute(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RouteService_SetRoute_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RouteServiceServer).SetRoute(ctx, req.(*SetRouteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RouteService_SetRoutes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetRoutesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RouteServiceServer).SetRoutes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RouteService_SetRoutes_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RouteServiceServer).SetRoutes(ctx, req.(*SetRoutesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RouteService_MoveRoutes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MoveRoutesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RouteServiceServer).MoveRoutes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RouteService_MoveRoutes_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RouteServiceServer).MoveRoutes(ctx, req.(*MoveRoutesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// RouteService_ServiceDesc is the grpc.ServiceDesc for RouteService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var RouteService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pomerium.dashboard.RouteService", + HandlerType: (*RouteServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "DeleteRoute", + Handler: _RouteService_DeleteRoute_Handler, + }, + { + MethodName: "DeleteRoutes", + Handler: _RouteService_DeleteRoutes_Handler, + }, + { + MethodName: "GetRoute", + Handler: _RouteService_GetRoute_Handler, + }, + { + MethodName: "ListRoutes", + Handler: _RouteService_ListRoutes_Handler, + }, + { + MethodName: "LoadRoutes", + Handler: _RouteService_LoadRoutes_Handler, + }, + { + MethodName: "SetRoute", + Handler: _RouteService_SetRoute_Handler, + }, + { + MethodName: "SetRoutes", + Handler: _RouteService_SetRoutes_Handler, + }, + { + MethodName: "MoveRoutes", + Handler: _RouteService_MoveRoutes_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "routes.proto", +} diff --git a/pb/settings.pb.go b/pb/settings.pb.go index ed28d7b..0f9259b 100644 --- a/pb/settings.pb.go +++ b/pb/settings.pb.go @@ -1,16 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 -// protoc v4.24.4 +// protoc-gen-go v1.34.2 +// protoc v3.20.3 // source: settings.proto package pb import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" @@ -38,9 +34,11 @@ type ConsoleSettings struct { func (x *ConsoleSettings) Reset() { *x = ConsoleSettings{} - mi := &file_settings_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_settings_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ConsoleSettings) String() string { @@ -51,7 +49,7 @@ func (*ConsoleSettings) ProtoMessage() {} func (x *ConsoleSettings) ProtoReflect() protoreflect.Message { mi := &file_settings_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -163,9 +161,11 @@ type Settings struct { func (x *Settings) Reset() { *x = Settings{} - mi := &file_settings_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_settings_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Settings) String() string { @@ -176,7 +176,7 @@ func (*Settings) ProtoMessage() {} func (x *Settings) ProtoReflect() protoreflect.Message { mi := &file_settings_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -703,9 +703,11 @@ type GetConsoleSettingsRequest struct { func (x *GetConsoleSettingsRequest) Reset() { *x = GetConsoleSettingsRequest{} - mi := &file_settings_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_settings_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetConsoleSettingsRequest) String() string { @@ -716,7 +718,7 @@ func (*GetConsoleSettingsRequest) ProtoMessage() {} func (x *GetConsoleSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_settings_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -741,9 +743,11 @@ type GetConsoleSettingsResponse struct { func (x *GetConsoleSettingsResponse) Reset() { *x = GetConsoleSettingsResponse{} - mi := &file_settings_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_settings_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetConsoleSettingsResponse) String() string { @@ -754,7 +758,7 @@ func (*GetConsoleSettingsResponse) ProtoMessage() {} func (x *GetConsoleSettingsResponse) ProtoReflect() protoreflect.Message { mi := &file_settings_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -784,9 +788,11 @@ type GetSettingsRequest struct { func (x *GetSettingsRequest) Reset() { *x = GetSettingsRequest{} - mi := &file_settings_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_settings_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetSettingsRequest) String() string { @@ -797,7 +803,7 @@ func (*GetSettingsRequest) ProtoMessage() {} func (x *GetSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_settings_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -822,9 +828,11 @@ type GetSettingsResponse struct { func (x *GetSettingsResponse) Reset() { *x = GetSettingsResponse{} - mi := &file_settings_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_settings_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetSettingsResponse) String() string { @@ -835,7 +843,7 @@ func (*GetSettingsResponse) ProtoMessage() {} func (x *GetSettingsResponse) ProtoReflect() protoreflect.Message { mi := &file_settings_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -867,9 +875,11 @@ type SetSettingsRequest struct { func (x *SetSettingsRequest) Reset() { *x = SetSettingsRequest{} - mi := &file_settings_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_settings_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetSettingsRequest) String() string { @@ -880,7 +890,7 @@ func (*SetSettingsRequest) ProtoMessage() {} func (x *SetSettingsRequest) ProtoReflect() protoreflect.Message { mi := &file_settings_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -912,9 +922,11 @@ type SetSettingsResponse struct { func (x *SetSettingsResponse) Reset() { *x = SetSettingsResponse{} - mi := &file_settings_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_settings_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetSettingsResponse) String() string { @@ -925,7 +937,7 @@ func (*SetSettingsResponse) ProtoMessage() {} func (x *SetSettingsResponse) ProtoReflect() protoreflect.Message { mi := &file_settings_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -959,9 +971,11 @@ type Settings_Certificate struct { func (x *Settings_Certificate) Reset() { *x = Settings_Certificate{} - mi := &file_settings_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_settings_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Settings_Certificate) String() string { @@ -972,7 +986,7 @@ func (*Settings_Certificate) ProtoMessage() {} func (x *Settings_Certificate) ProtoReflect() protoreflect.Message { mi := &file_settings_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1018,9 +1032,11 @@ type Settings_StringList struct { func (x *Settings_StringList) Reset() { *x = Settings_StringList{} - mi := &file_settings_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_settings_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Settings_StringList) String() string { @@ -1031,7 +1047,7 @@ func (*Settings_StringList) ProtoMessage() {} func (x *Settings_StringList) ProtoReflect() protoreflect.Message { mi := &file_settings_proto_msgTypes[9] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1588,6 +1604,128 @@ func file_settings_proto_init() { return } file_routes_proto_init() + if !protoimpl.UnsafeEnabled { + file_settings_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*ConsoleSettings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_settings_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*Settings); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_settings_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*GetConsoleSettingsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_settings_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*GetConsoleSettingsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_settings_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*GetSettingsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_settings_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*GetSettingsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_settings_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*SetSettingsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_settings_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*SetSettingsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_settings_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*Settings_Certificate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_settings_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*Settings_StringList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } file_settings_proto_msgTypes[1].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ @@ -1608,199 +1746,3 @@ func file_settings_proto_init() { file_settings_proto_goTypes = nil file_settings_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// SettingsServiceClient is the client API for SettingsService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type SettingsServiceClient interface { - // GetSettings retrieves the currently applied settings - GetSettings(ctx context.Context, in *GetSettingsRequest, opts ...grpc.CallOption) (*GetSettingsResponse, error) - // SetSettings applies new global settings - SetSettings(ctx context.Context, in *SetSettingsRequest, opts ...grpc.CallOption) (*SetSettingsResponse, error) - // GetBrandingSettings retrieves just the branding part of the settings - GetBrandingSettings(ctx context.Context, in *GetSettingsRequest, opts ...grpc.CallOption) (*GetSettingsResponse, error) - // GetConsoleSettings retrieves the console settings. - GetConsoleSettings(ctx context.Context, in *GetConsoleSettingsRequest, opts ...grpc.CallOption) (*GetConsoleSettingsResponse, error) -} - -type settingsServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewSettingsServiceClient(cc grpc.ClientConnInterface) SettingsServiceClient { - return &settingsServiceClient{cc} -} - -func (c *settingsServiceClient) GetSettings(ctx context.Context, in *GetSettingsRequest, opts ...grpc.CallOption) (*GetSettingsResponse, error) { - out := new(GetSettingsResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.SettingsService/GetSettings", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *settingsServiceClient) SetSettings(ctx context.Context, in *SetSettingsRequest, opts ...grpc.CallOption) (*SetSettingsResponse, error) { - out := new(SetSettingsResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.SettingsService/SetSettings", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *settingsServiceClient) GetBrandingSettings(ctx context.Context, in *GetSettingsRequest, opts ...grpc.CallOption) (*GetSettingsResponse, error) { - out := new(GetSettingsResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.SettingsService/GetBrandingSettings", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *settingsServiceClient) GetConsoleSettings(ctx context.Context, in *GetConsoleSettingsRequest, opts ...grpc.CallOption) (*GetConsoleSettingsResponse, error) { - out := new(GetConsoleSettingsResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.SettingsService/GetConsoleSettings", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// SettingsServiceServer is the server API for SettingsService service. -type SettingsServiceServer interface { - // GetSettings retrieves the currently applied settings - GetSettings(context.Context, *GetSettingsRequest) (*GetSettingsResponse, error) - // SetSettings applies new global settings - SetSettings(context.Context, *SetSettingsRequest) (*SetSettingsResponse, error) - // GetBrandingSettings retrieves just the branding part of the settings - GetBrandingSettings(context.Context, *GetSettingsRequest) (*GetSettingsResponse, error) - // GetConsoleSettings retrieves the console settings. - GetConsoleSettings(context.Context, *GetConsoleSettingsRequest) (*GetConsoleSettingsResponse, error) -} - -// UnimplementedSettingsServiceServer can be embedded to have forward compatible implementations. -type UnimplementedSettingsServiceServer struct { -} - -func (*UnimplementedSettingsServiceServer) GetSettings(context.Context, *GetSettingsRequest) (*GetSettingsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSettings not implemented") -} -func (*UnimplementedSettingsServiceServer) SetSettings(context.Context, *SetSettingsRequest) (*SetSettingsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetSettings not implemented") -} -func (*UnimplementedSettingsServiceServer) GetBrandingSettings(context.Context, *GetSettingsRequest) (*GetSettingsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBrandingSettings not implemented") -} -func (*UnimplementedSettingsServiceServer) GetConsoleSettings(context.Context, *GetConsoleSettingsRequest) (*GetConsoleSettingsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetConsoleSettings not implemented") -} - -func RegisterSettingsServiceServer(s *grpc.Server, srv SettingsServiceServer) { - s.RegisterService(&_SettingsService_serviceDesc, srv) -} - -func _SettingsService_GetSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSettingsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SettingsServiceServer).GetSettings(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.SettingsService/GetSettings", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SettingsServiceServer).GetSettings(ctx, req.(*GetSettingsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SettingsService_SetSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetSettingsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SettingsServiceServer).SetSettings(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.SettingsService/SetSettings", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SettingsServiceServer).SetSettings(ctx, req.(*SetSettingsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SettingsService_GetBrandingSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSettingsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SettingsServiceServer).GetBrandingSettings(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.SettingsService/GetBrandingSettings", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SettingsServiceServer).GetBrandingSettings(ctx, req.(*GetSettingsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SettingsService_GetConsoleSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetConsoleSettingsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SettingsServiceServer).GetConsoleSettings(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.SettingsService/GetConsoleSettings", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SettingsServiceServer).GetConsoleSettings(ctx, req.(*GetConsoleSettingsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _SettingsService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "pomerium.dashboard.SettingsService", - HandlerType: (*SettingsServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetSettings", - Handler: _SettingsService_GetSettings_Handler, - }, - { - MethodName: "SetSettings", - Handler: _SettingsService_SetSettings_Handler, - }, - { - MethodName: "GetBrandingSettings", - Handler: _SettingsService_GetBrandingSettings_Handler, - }, - { - MethodName: "GetConsoleSettings", - Handler: _SettingsService_GetConsoleSettings_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "settings.proto", -} diff --git a/pb/settings_grpc.pb.go b/pb/settings_grpc.pb.go new file mode 100644 index 0000000..2863673 --- /dev/null +++ b/pb/settings_grpc.pb.go @@ -0,0 +1,245 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v3.20.3 +// source: settings.proto + +package pb + +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 ( + SettingsService_GetSettings_FullMethodName = "/pomerium.dashboard.SettingsService/GetSettings" + SettingsService_SetSettings_FullMethodName = "/pomerium.dashboard.SettingsService/SetSettings" + SettingsService_GetBrandingSettings_FullMethodName = "/pomerium.dashboard.SettingsService/GetBrandingSettings" + SettingsService_GetConsoleSettings_FullMethodName = "/pomerium.dashboard.SettingsService/GetConsoleSettings" +) + +// SettingsServiceClient is the client API for SettingsService 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. +// +// SettingsService manages global pomerium settings +type SettingsServiceClient interface { + // GetSettings retrieves the currently applied settings + GetSettings(ctx context.Context, in *GetSettingsRequest, opts ...grpc.CallOption) (*GetSettingsResponse, error) + // SetSettings applies new global settings + SetSettings(ctx context.Context, in *SetSettingsRequest, opts ...grpc.CallOption) (*SetSettingsResponse, error) + // GetBrandingSettings retrieves just the branding part of the settings + GetBrandingSettings(ctx context.Context, in *GetSettingsRequest, opts ...grpc.CallOption) (*GetSettingsResponse, error) + // GetConsoleSettings retrieves the console settings. + GetConsoleSettings(ctx context.Context, in *GetConsoleSettingsRequest, opts ...grpc.CallOption) (*GetConsoleSettingsResponse, error) +} + +type settingsServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewSettingsServiceClient(cc grpc.ClientConnInterface) SettingsServiceClient { + return &settingsServiceClient{cc} +} + +func (c *settingsServiceClient) GetSettings(ctx context.Context, in *GetSettingsRequest, opts ...grpc.CallOption) (*GetSettingsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetSettingsResponse) + err := c.cc.Invoke(ctx, SettingsService_GetSettings_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *settingsServiceClient) SetSettings(ctx context.Context, in *SetSettingsRequest, opts ...grpc.CallOption) (*SetSettingsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetSettingsResponse) + err := c.cc.Invoke(ctx, SettingsService_SetSettings_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *settingsServiceClient) GetBrandingSettings(ctx context.Context, in *GetSettingsRequest, opts ...grpc.CallOption) (*GetSettingsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetSettingsResponse) + err := c.cc.Invoke(ctx, SettingsService_GetBrandingSettings_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *settingsServiceClient) GetConsoleSettings(ctx context.Context, in *GetConsoleSettingsRequest, opts ...grpc.CallOption) (*GetConsoleSettingsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetConsoleSettingsResponse) + err := c.cc.Invoke(ctx, SettingsService_GetConsoleSettings_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SettingsServiceServer is the server API for SettingsService service. +// All implementations should embed UnimplementedSettingsServiceServer +// for forward compatibility. +// +// SettingsService manages global pomerium settings +type SettingsServiceServer interface { + // GetSettings retrieves the currently applied settings + GetSettings(context.Context, *GetSettingsRequest) (*GetSettingsResponse, error) + // SetSettings applies new global settings + SetSettings(context.Context, *SetSettingsRequest) (*SetSettingsResponse, error) + // GetBrandingSettings retrieves just the branding part of the settings + GetBrandingSettings(context.Context, *GetSettingsRequest) (*GetSettingsResponse, error) + // GetConsoleSettings retrieves the console settings. + GetConsoleSettings(context.Context, *GetConsoleSettingsRequest) (*GetConsoleSettingsResponse, error) +} + +// UnimplementedSettingsServiceServer should 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 UnimplementedSettingsServiceServer struct{} + +func (UnimplementedSettingsServiceServer) GetSettings(context.Context, *GetSettingsRequest) (*GetSettingsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSettings not implemented") +} +func (UnimplementedSettingsServiceServer) SetSettings(context.Context, *SetSettingsRequest) (*SetSettingsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetSettings not implemented") +} +func (UnimplementedSettingsServiceServer) GetBrandingSettings(context.Context, *GetSettingsRequest) (*GetSettingsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBrandingSettings not implemented") +} +func (UnimplementedSettingsServiceServer) GetConsoleSettings(context.Context, *GetConsoleSettingsRequest) (*GetConsoleSettingsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetConsoleSettings not implemented") +} +func (UnimplementedSettingsServiceServer) testEmbeddedByValue() {} + +// UnsafeSettingsServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SettingsServiceServer will +// result in compilation errors. +type UnsafeSettingsServiceServer interface { + mustEmbedUnimplementedSettingsServiceServer() +} + +func RegisterSettingsServiceServer(s grpc.ServiceRegistrar, srv SettingsServiceServer) { + // If the following call pancis, it indicates UnimplementedSettingsServiceServer 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(&SettingsService_ServiceDesc, srv) +} + +func _SettingsService_GetSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSettingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SettingsServiceServer).GetSettings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SettingsService_GetSettings_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SettingsServiceServer).GetSettings(ctx, req.(*GetSettingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SettingsService_SetSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetSettingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SettingsServiceServer).SetSettings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SettingsService_SetSettings_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SettingsServiceServer).SetSettings(ctx, req.(*SetSettingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SettingsService_GetBrandingSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSettingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SettingsServiceServer).GetBrandingSettings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SettingsService_GetBrandingSettings_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SettingsServiceServer).GetBrandingSettings(ctx, req.(*GetSettingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SettingsService_GetConsoleSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetConsoleSettingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SettingsServiceServer).GetConsoleSettings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SettingsService_GetConsoleSettings_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SettingsServiceServer).GetConsoleSettings(ctx, req.(*GetConsoleSettingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// SettingsService_ServiceDesc is the grpc.ServiceDesc for SettingsService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var SettingsService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pomerium.dashboard.SettingsService", + HandlerType: (*SettingsServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetSettings", + Handler: _SettingsService_GetSettings_Handler, + }, + { + MethodName: "SetSettings", + Handler: _SettingsService_SetSettings_Handler, + }, + { + MethodName: "GetBrandingSettings", + Handler: _SettingsService_GetBrandingSettings_Handler, + }, + { + MethodName: "GetConsoleSettings", + Handler: _SettingsService_GetConsoleSettings_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "settings.proto", +} diff --git a/pb/tsdb.pb.go b/pb/tsdb.pb.go index 6e15364..09a6711 100644 --- a/pb/tsdb.pb.go +++ b/pb/tsdb.pb.go @@ -1,17 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 -// protoc v4.24.4 +// protoc-gen-go v1.34.2 +// protoc v3.20.3 // source: tsdb.proto package pb import ( - context "context" _ "github.com/envoyproxy/protoc-gen-validate/validate" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" @@ -479,9 +475,11 @@ type Range struct { func (x *Range) Reset() { *x = Range{} - mi := &file_tsdb_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Range) String() string { @@ -492,7 +490,7 @@ func (*Range) ProtoMessage() {} func (x *Range) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -544,9 +542,11 @@ type RouteMatcher struct { func (x *RouteMatcher) Reset() { *x = RouteMatcher{} - mi := &file_tsdb_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RouteMatcher) String() string { @@ -557,7 +557,7 @@ func (*RouteMatcher) ProtoMessage() {} func (x *RouteMatcher) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -636,9 +636,11 @@ type String struct { func (x *String) Reset() { *x = String{} - mi := &file_tsdb_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *String) String() string { @@ -649,7 +651,7 @@ func (*String) ProtoMessage() {} func (x *String) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -689,9 +691,11 @@ type Scalar struct { func (x *Scalar) Reset() { *x = Scalar{} - mi := &file_tsdb_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Scalar) String() string { @@ -702,7 +706,7 @@ func (*Scalar) ProtoMessage() {} func (x *Scalar) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -742,9 +746,11 @@ type TimeSeries struct { func (x *TimeSeries) Reset() { *x = TimeSeries{} - mi := &file_tsdb_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TimeSeries) String() string { @@ -755,7 +761,7 @@ func (*TimeSeries) ProtoMessage() {} func (x *TimeSeries) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -794,9 +800,11 @@ type Matrix struct { func (x *Matrix) Reset() { *x = Matrix{} - mi := &file_tsdb_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Matrix) String() string { @@ -807,7 +815,7 @@ func (*Matrix) ProtoMessage() {} func (x *Matrix) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -840,9 +848,11 @@ type Sample struct { func (x *Sample) Reset() { *x = Sample{} - mi := &file_tsdb_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Sample) String() string { @@ -853,7 +863,7 @@ func (*Sample) ProtoMessage() {} func (x *Sample) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -892,9 +902,11 @@ type Vector struct { func (x *Vector) Reset() { *x = Vector{} - mi := &file_tsdb_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Vector) String() string { @@ -905,7 +917,7 @@ func (*Vector) ProtoMessage() {} func (x *Vector) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -943,9 +955,11 @@ type RouteMetricSeriesRequest struct { func (x *RouteMetricSeriesRequest) Reset() { *x = RouteMetricSeriesRequest{} - mi := &file_tsdb_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RouteMetricSeriesRequest) String() string { @@ -956,7 +970,7 @@ func (*RouteMetricSeriesRequest) ProtoMessage() {} func (x *RouteMetricSeriesRequest) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1011,9 +1025,11 @@ type RouteMetricSeriesHistogramRequest struct { func (x *RouteMetricSeriesHistogramRequest) Reset() { *x = RouteMetricSeriesHistogramRequest{} - mi := &file_tsdb_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RouteMetricSeriesHistogramRequest) String() string { @@ -1024,7 +1040,7 @@ func (*RouteMetricSeriesHistogramRequest) ProtoMessage() {} func (x *RouteMetricSeriesHistogramRequest) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[9] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1086,9 +1102,11 @@ type ServerMetricSeriesRequest struct { func (x *ServerMetricSeriesRequest) Reset() { *x = ServerMetricSeriesRequest{} - mi := &file_tsdb_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ServerMetricSeriesRequest) String() string { @@ -1099,7 +1117,7 @@ func (*ServerMetricSeriesRequest) ProtoMessage() {} func (x *ServerMetricSeriesRequest) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[10] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1162,9 +1180,11 @@ type ServerMetricRequest struct { func (x *ServerMetricRequest) Reset() { *x = ServerMetricRequest{} - mi := &file_tsdb_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ServerMetricRequest) String() string { @@ -1175,7 +1195,7 @@ func (*ServerMetricRequest) ProtoMessage() {} func (x *ServerMetricRequest) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[11] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1221,9 +1241,11 @@ type ConsoleMetricRequest struct { func (x *ConsoleMetricRequest) Reset() { *x = ConsoleMetricRequest{} - mi := &file_tsdb_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ConsoleMetricRequest) String() string { @@ -1234,7 +1256,7 @@ func (*ConsoleMetricRequest) ProtoMessage() {} func (x *ConsoleMetricRequest) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[12] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1272,9 +1294,11 @@ type ConsoleMetricSeriesRequest struct { func (x *ConsoleMetricSeriesRequest) Reset() { *x = ConsoleMetricSeriesRequest{} - mi := &file_tsdb_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ConsoleMetricSeriesRequest) String() string { @@ -1285,7 +1309,7 @@ func (*ConsoleMetricSeriesRequest) ProtoMessage() {} func (x *ConsoleMetricSeriesRequest) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[13] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1333,9 +1357,11 @@ type LastErrorRequest struct { func (x *LastErrorRequest) Reset() { *x = LastErrorRequest{} - mi := &file_tsdb_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *LastErrorRequest) String() string { @@ -1346,7 +1372,7 @@ func (*LastErrorRequest) ProtoMessage() {} func (x *LastErrorRequest) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[14] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1380,9 +1406,11 @@ type LastErrorResponse struct { func (x *LastErrorResponse) Reset() { *x = LastErrorResponse{} - mi := &file_tsdb_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *LastErrorResponse) String() string { @@ -1393,7 +1421,7 @@ func (*LastErrorResponse) ProtoMessage() {} func (x *LastErrorResponse) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[15] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1440,9 +1468,11 @@ type RouteMetricChangeRequest struct { func (x *RouteMetricChangeRequest) Reset() { *x = RouteMetricChangeRequest{} - mi := &file_tsdb_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RouteMetricChangeRequest) String() string { @@ -1453,7 +1483,7 @@ func (*RouteMetricChangeRequest) ProtoMessage() {} func (x *RouteMetricChangeRequest) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[16] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1510,9 +1540,11 @@ type TimeSeriesResponse struct { func (x *TimeSeriesResponse) Reset() { *x = TimeSeriesResponse{} - mi := &file_tsdb_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TimeSeriesResponse) String() string { @@ -1523,7 +1555,7 @@ func (*TimeSeriesResponse) ProtoMessage() {} func (x *TimeSeriesResponse) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[17] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1564,9 +1596,11 @@ type TimeSeriesResponseMulti struct { func (x *TimeSeriesResponseMulti) Reset() { *x = TimeSeriesResponseMulti{} - mi := &file_tsdb_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *TimeSeriesResponseMulti) String() string { @@ -1577,7 +1611,7 @@ func (*TimeSeriesResponseMulti) ProtoMessage() {} func (x *TimeSeriesResponseMulti) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[18] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1617,9 +1651,11 @@ type ScalarBuckets struct { func (x *ScalarBuckets) Reset() { *x = ScalarBuckets{} - mi := &file_tsdb_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ScalarBuckets) String() string { @@ -1630,7 +1666,7 @@ func (*ScalarBuckets) ProtoMessage() {} func (x *ScalarBuckets) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[19] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1666,9 +1702,11 @@ type UptimeRequest struct { func (x *UptimeRequest) Reset() { *x = UptimeRequest{} - mi := &file_tsdb_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UptimeRequest) String() string { @@ -1679,7 +1717,7 @@ func (*UptimeRequest) ProtoMessage() {} func (x *UptimeRequest) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[20] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1736,9 +1774,11 @@ type UptimeResponse struct { func (x *UptimeResponse) Reset() { *x = UptimeResponse{} - mi := &file_tsdb_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UptimeResponse) String() string { @@ -1749,7 +1789,7 @@ func (*UptimeResponse) ProtoMessage() {} func (x *UptimeResponse) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[21] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1782,9 +1822,11 @@ type GetInstancesRequest struct { func (x *GetInstancesRequest) Reset() { *x = GetInstancesRequest{} - mi := &file_tsdb_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetInstancesRequest) String() string { @@ -1795,7 +1837,7 @@ func (*GetInstancesRequest) ProtoMessage() {} func (x *GetInstancesRequest) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[22] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1834,9 +1876,11 @@ type Instances struct { func (x *Instances) Reset() { *x = Instances{} - mi := &file_tsdb_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Instances) String() string { @@ -1847,7 +1891,7 @@ func (*Instances) ProtoMessage() {} func (x *Instances) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[23] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1880,9 +1924,11 @@ type GetInstanceInfoRequest struct { func (x *GetInstanceInfoRequest) Reset() { *x = GetInstanceInfoRequest{} - mi := &file_tsdb_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetInstanceInfoRequest) String() string { @@ -1893,7 +1939,7 @@ func (*GetInstanceInfoRequest) ProtoMessage() {} func (x *GetInstanceInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[24] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1930,9 +1976,11 @@ type GetStatusRequest struct { func (x *GetStatusRequest) Reset() { *x = GetStatusRequest{} - mi := &file_tsdb_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetStatusRequest) String() string { @@ -1943,7 +1991,7 @@ func (*GetStatusRequest) ProtoMessage() {} func (x *GetStatusRequest) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[25] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1973,9 +2021,11 @@ type GetStatusResponse struct { func (x *GetStatusResponse) Reset() { *x = GetStatusResponse{} - mi := &file_tsdb_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetStatusResponse) String() string { @@ -1986,7 +2036,7 @@ func (*GetStatusResponse) ProtoMessage() {} func (x *GetStatusResponse) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[26] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2053,9 +2103,11 @@ type UsageReportRequest struct { func (x *UsageReportRequest) Reset() { *x = UsageReportRequest{} - mi := &file_tsdb_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UsageReportRequest) String() string { @@ -2066,7 +2118,7 @@ func (*UsageReportRequest) ProtoMessage() {} func (x *UsageReportRequest) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[27] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2091,9 +2143,11 @@ type UsageReportResponse struct { func (x *UsageReportResponse) Reset() { *x = UsageReportResponse{} - mi := &file_tsdb_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UsageReportResponse) String() string { @@ -2104,7 +2158,7 @@ func (*UsageReportResponse) ProtoMessage() {} func (x *UsageReportResponse) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[28] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2136,9 +2190,11 @@ type Labels struct { func (x *Labels) Reset() { *x = Labels{} - mi := &file_tsdb_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Labels) String() string { @@ -2149,7 +2205,7 @@ func (*Labels) ProtoMessage() {} func (x *Labels) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[29] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2184,9 +2240,11 @@ type ScalarBuckets_Bucket struct { func (x *ScalarBuckets_Bucket) Reset() { *x = ScalarBuckets_Bucket{} - mi := &file_tsdb_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ScalarBuckets_Bucket) String() string { @@ -2197,7 +2255,7 @@ func (*ScalarBuckets_Bucket) ProtoMessage() {} func (x *ScalarBuckets_Bucket) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[32] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2240,9 +2298,11 @@ type UptimeResponse_Summary struct { func (x *UptimeResponse_Summary) Reset() { *x = UptimeResponse_Summary{} - mi := &file_tsdb_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UptimeResponse_Summary) String() string { @@ -2253,7 +2313,7 @@ func (*UptimeResponse_Summary) ProtoMessage() {} func (x *UptimeResponse_Summary) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[33] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2303,9 +2363,11 @@ type Instances_Instance struct { func (x *Instances_Instance) Reset() { *x = Instances_Instance{} - mi := &file_tsdb_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *Instances_Instance) String() string { @@ -2316,7 +2378,7 @@ func (*Instances_Instance) ProtoMessage() {} func (x *Instances_Instance) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[34] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2366,9 +2428,11 @@ type GetStatusResponse_Target struct { func (x *GetStatusResponse_Target) Reset() { *x = GetStatusResponse_Target{} - mi := &file_tsdb_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_tsdb_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetStatusResponse_Target) String() string { @@ -2379,7 +2443,7 @@ func (*GetStatusResponse_Target) ProtoMessage() {} func (x *GetStatusResponse_Target) ProtoReflect() protoreflect.Message { mi := &file_tsdb_proto_msgTypes[35] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -3082,6 +3146,416 @@ func file_tsdb_proto_init() { if File_tsdb_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_tsdb_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*Range); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*RouteMatcher); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*String); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*Scalar); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*TimeSeries); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*Matrix); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*Sample); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*Vector); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*RouteMetricSeriesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*RouteMetricSeriesHistogramRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*ServerMetricSeriesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*ServerMetricRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*ConsoleMetricRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*ConsoleMetricSeriesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*LastErrorRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*LastErrorResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[16].Exporter = func(v any, i int) any { + switch v := v.(*RouteMetricChangeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[17].Exporter = func(v any, i int) any { + switch v := v.(*TimeSeriesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[18].Exporter = func(v any, i int) any { + switch v := v.(*TimeSeriesResponseMulti); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[19].Exporter = func(v any, i int) any { + switch v := v.(*ScalarBuckets); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[20].Exporter = func(v any, i int) any { + switch v := v.(*UptimeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[21].Exporter = func(v any, i int) any { + switch v := v.(*UptimeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[22].Exporter = func(v any, i int) any { + switch v := v.(*GetInstancesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[23].Exporter = func(v any, i int) any { + switch v := v.(*Instances); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[24].Exporter = func(v any, i int) any { + switch v := v.(*GetInstanceInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[25].Exporter = func(v any, i int) any { + switch v := v.(*GetStatusRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[26].Exporter = func(v any, i int) any { + switch v := v.(*GetStatusResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[27].Exporter = func(v any, i int) any { + switch v := v.(*UsageReportRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[28].Exporter = func(v any, i int) any { + switch v := v.(*UsageReportResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[29].Exporter = func(v any, i int) any { + switch v := v.(*Labels); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[32].Exporter = func(v any, i int) any { + switch v := v.(*ScalarBuckets_Bucket); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[33].Exporter = func(v any, i int) any { + switch v := v.(*UptimeResponse_Summary); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[34].Exporter = func(v any, i int) any { + switch v := v.(*Instances_Instance); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_tsdb_proto_msgTypes[35].Exporter = func(v any, i int) any { + switch v := v.(*GetStatusResponse_Target); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } file_tsdb_proto_msgTypes[1].OneofWrappers = []any{ (*RouteMatcher_RouteId)(nil), (*RouteMatcher_NamespaceId)(nil), @@ -3111,503 +3585,3 @@ func file_tsdb_proto_init() { file_tsdb_proto_goTypes = nil file_tsdb_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// TimeSeriesDBClient is the client API for TimeSeriesDB service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type TimeSeriesDBClient interface { - // returns metric change for a period of time - GetRouteMetricChange(ctx context.Context, in *RouteMetricChangeRequest, opts ...grpc.CallOption) (*Scalar, error) - // returns buckets of values for a given metric - GetRouteMetricChangeHistogram(ctx context.Context, in *RouteMetricChangeRequest, opts ...grpc.CallOption) (*ScalarBuckets, error) - // returns metric change as time series - GetRouteMetricSeries(ctx context.Context, in *RouteMetricSeriesRequest, opts ...grpc.CallOption) (*TimeSeriesResponse, error) - // returns metric change as time series - GetRouteMetricSeriesHistogram(ctx context.Context, in *RouteMetricSeriesHistogramRequest, opts ...grpc.CallOption) (*TimeSeriesResponse, error) - // returns multiple annotated time series - GetRouteMetricSeriesMulti(ctx context.Context, in *RouteMetricSeriesRequest, opts ...grpc.CallOption) (*TimeSeriesResponseMulti, error) - // returns service uptime statistics - GetUptime(ctx context.Context, in *UptimeRequest, opts ...grpc.CallOption) (*UptimeResponse, error) - // returns list of system services with metrics - GetInstances(ctx context.Context, in *GetInstancesRequest, opts ...grpc.CallOption) (*Instances, error) - // returns server queries - GetServerMetricSeries(ctx context.Context, in *ServerMetricSeriesRequest, opts ...grpc.CallOption) (*TimeSeriesResponse, error) - // returns current metric value - GetServerMetric(ctx context.Context, in *ServerMetricRequest, opts ...grpc.CallOption) (*Sample, error) - // returns current status of scraping targets - GetStatus(ctx context.Context, in *GetStatusRequest, opts ...grpc.CallOption) (*GetStatusResponse, error) - // returns last known error for a metric, if available - GetLastMetricError(ctx context.Context, in *LastErrorRequest, opts ...grpc.CallOption) (*LastErrorResponse, error) - // returns usage report - GetUsageReport(ctx context.Context, in *UsageReportRequest, opts ...grpc.CallOption) (*UsageReportResponse, error) -} - -type timeSeriesDBClient struct { - cc grpc.ClientConnInterface -} - -func NewTimeSeriesDBClient(cc grpc.ClientConnInterface) TimeSeriesDBClient { - return &timeSeriesDBClient{cc} -} - -func (c *timeSeriesDBClient) GetRouteMetricChange(ctx context.Context, in *RouteMetricChangeRequest, opts ...grpc.CallOption) (*Scalar, error) { - out := new(Scalar) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.TimeSeriesDB/GetRouteMetricChange", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *timeSeriesDBClient) GetRouteMetricChangeHistogram(ctx context.Context, in *RouteMetricChangeRequest, opts ...grpc.CallOption) (*ScalarBuckets, error) { - out := new(ScalarBuckets) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.TimeSeriesDB/GetRouteMetricChangeHistogram", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *timeSeriesDBClient) GetRouteMetricSeries(ctx context.Context, in *RouteMetricSeriesRequest, opts ...grpc.CallOption) (*TimeSeriesResponse, error) { - out := new(TimeSeriesResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.TimeSeriesDB/GetRouteMetricSeries", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *timeSeriesDBClient) GetRouteMetricSeriesHistogram(ctx context.Context, in *RouteMetricSeriesHistogramRequest, opts ...grpc.CallOption) (*TimeSeriesResponse, error) { - out := new(TimeSeriesResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.TimeSeriesDB/GetRouteMetricSeriesHistogram", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *timeSeriesDBClient) GetRouteMetricSeriesMulti(ctx context.Context, in *RouteMetricSeriesRequest, opts ...grpc.CallOption) (*TimeSeriesResponseMulti, error) { - out := new(TimeSeriesResponseMulti) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.TimeSeriesDB/GetRouteMetricSeriesMulti", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *timeSeriesDBClient) GetUptime(ctx context.Context, in *UptimeRequest, opts ...grpc.CallOption) (*UptimeResponse, error) { - out := new(UptimeResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.TimeSeriesDB/GetUptime", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *timeSeriesDBClient) GetInstances(ctx context.Context, in *GetInstancesRequest, opts ...grpc.CallOption) (*Instances, error) { - out := new(Instances) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.TimeSeriesDB/GetInstances", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *timeSeriesDBClient) GetServerMetricSeries(ctx context.Context, in *ServerMetricSeriesRequest, opts ...grpc.CallOption) (*TimeSeriesResponse, error) { - out := new(TimeSeriesResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.TimeSeriesDB/GetServerMetricSeries", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *timeSeriesDBClient) GetServerMetric(ctx context.Context, in *ServerMetricRequest, opts ...grpc.CallOption) (*Sample, error) { - out := new(Sample) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.TimeSeriesDB/GetServerMetric", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *timeSeriesDBClient) GetStatus(ctx context.Context, in *GetStatusRequest, opts ...grpc.CallOption) (*GetStatusResponse, error) { - out := new(GetStatusResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.TimeSeriesDB/GetStatus", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *timeSeriesDBClient) GetLastMetricError(ctx context.Context, in *LastErrorRequest, opts ...grpc.CallOption) (*LastErrorResponse, error) { - out := new(LastErrorResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.TimeSeriesDB/GetLastMetricError", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *timeSeriesDBClient) GetUsageReport(ctx context.Context, in *UsageReportRequest, opts ...grpc.CallOption) (*UsageReportResponse, error) { - out := new(UsageReportResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.TimeSeriesDB/GetUsageReport", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// TimeSeriesDBServer is the server API for TimeSeriesDB service. -type TimeSeriesDBServer interface { - // returns metric change for a period of time - GetRouteMetricChange(context.Context, *RouteMetricChangeRequest) (*Scalar, error) - // returns buckets of values for a given metric - GetRouteMetricChangeHistogram(context.Context, *RouteMetricChangeRequest) (*ScalarBuckets, error) - // returns metric change as time series - GetRouteMetricSeries(context.Context, *RouteMetricSeriesRequest) (*TimeSeriesResponse, error) - // returns metric change as time series - GetRouteMetricSeriesHistogram(context.Context, *RouteMetricSeriesHistogramRequest) (*TimeSeriesResponse, error) - // returns multiple annotated time series - GetRouteMetricSeriesMulti(context.Context, *RouteMetricSeriesRequest) (*TimeSeriesResponseMulti, error) - // returns service uptime statistics - GetUptime(context.Context, *UptimeRequest) (*UptimeResponse, error) - // returns list of system services with metrics - GetInstances(context.Context, *GetInstancesRequest) (*Instances, error) - // returns server queries - GetServerMetricSeries(context.Context, *ServerMetricSeriesRequest) (*TimeSeriesResponse, error) - // returns current metric value - GetServerMetric(context.Context, *ServerMetricRequest) (*Sample, error) - // returns current status of scraping targets - GetStatus(context.Context, *GetStatusRequest) (*GetStatusResponse, error) - // returns last known error for a metric, if available - GetLastMetricError(context.Context, *LastErrorRequest) (*LastErrorResponse, error) - // returns usage report - GetUsageReport(context.Context, *UsageReportRequest) (*UsageReportResponse, error) -} - -// UnimplementedTimeSeriesDBServer can be embedded to have forward compatible implementations. -type UnimplementedTimeSeriesDBServer struct { -} - -func (*UnimplementedTimeSeriesDBServer) GetRouteMetricChange(context.Context, *RouteMetricChangeRequest) (*Scalar, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetRouteMetricChange not implemented") -} -func (*UnimplementedTimeSeriesDBServer) GetRouteMetricChangeHistogram(context.Context, *RouteMetricChangeRequest) (*ScalarBuckets, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetRouteMetricChangeHistogram not implemented") -} -func (*UnimplementedTimeSeriesDBServer) GetRouteMetricSeries(context.Context, *RouteMetricSeriesRequest) (*TimeSeriesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetRouteMetricSeries not implemented") -} -func (*UnimplementedTimeSeriesDBServer) GetRouteMetricSeriesHistogram(context.Context, *RouteMetricSeriesHistogramRequest) (*TimeSeriesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetRouteMetricSeriesHistogram not implemented") -} -func (*UnimplementedTimeSeriesDBServer) GetRouteMetricSeriesMulti(context.Context, *RouteMetricSeriesRequest) (*TimeSeriesResponseMulti, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetRouteMetricSeriesMulti not implemented") -} -func (*UnimplementedTimeSeriesDBServer) GetUptime(context.Context, *UptimeRequest) (*UptimeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetUptime not implemented") -} -func (*UnimplementedTimeSeriesDBServer) GetInstances(context.Context, *GetInstancesRequest) (*Instances, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetInstances not implemented") -} -func (*UnimplementedTimeSeriesDBServer) GetServerMetricSeries(context.Context, *ServerMetricSeriesRequest) (*TimeSeriesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetServerMetricSeries not implemented") -} -func (*UnimplementedTimeSeriesDBServer) GetServerMetric(context.Context, *ServerMetricRequest) (*Sample, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetServerMetric not implemented") -} -func (*UnimplementedTimeSeriesDBServer) GetStatus(context.Context, *GetStatusRequest) (*GetStatusResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") -} -func (*UnimplementedTimeSeriesDBServer) GetLastMetricError(context.Context, *LastErrorRequest) (*LastErrorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetLastMetricError not implemented") -} -func (*UnimplementedTimeSeriesDBServer) GetUsageReport(context.Context, *UsageReportRequest) (*UsageReportResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetUsageReport not implemented") -} - -func RegisterTimeSeriesDBServer(s *grpc.Server, srv TimeSeriesDBServer) { - s.RegisterService(&_TimeSeriesDB_serviceDesc, srv) -} - -func _TimeSeriesDB_GetRouteMetricChange_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RouteMetricChangeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TimeSeriesDBServer).GetRouteMetricChange(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.TimeSeriesDB/GetRouteMetricChange", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TimeSeriesDBServer).GetRouteMetricChange(ctx, req.(*RouteMetricChangeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TimeSeriesDB_GetRouteMetricChangeHistogram_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RouteMetricChangeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TimeSeriesDBServer).GetRouteMetricChangeHistogram(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.TimeSeriesDB/GetRouteMetricChangeHistogram", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TimeSeriesDBServer).GetRouteMetricChangeHistogram(ctx, req.(*RouteMetricChangeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TimeSeriesDB_GetRouteMetricSeries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RouteMetricSeriesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TimeSeriesDBServer).GetRouteMetricSeries(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.TimeSeriesDB/GetRouteMetricSeries", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TimeSeriesDBServer).GetRouteMetricSeries(ctx, req.(*RouteMetricSeriesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TimeSeriesDB_GetRouteMetricSeriesHistogram_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RouteMetricSeriesHistogramRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TimeSeriesDBServer).GetRouteMetricSeriesHistogram(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.TimeSeriesDB/GetRouteMetricSeriesHistogram", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TimeSeriesDBServer).GetRouteMetricSeriesHistogram(ctx, req.(*RouteMetricSeriesHistogramRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TimeSeriesDB_GetRouteMetricSeriesMulti_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RouteMetricSeriesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TimeSeriesDBServer).GetRouteMetricSeriesMulti(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.TimeSeriesDB/GetRouteMetricSeriesMulti", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TimeSeriesDBServer).GetRouteMetricSeriesMulti(ctx, req.(*RouteMetricSeriesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TimeSeriesDB_GetUptime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UptimeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TimeSeriesDBServer).GetUptime(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.TimeSeriesDB/GetUptime", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TimeSeriesDBServer).GetUptime(ctx, req.(*UptimeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TimeSeriesDB_GetInstances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetInstancesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TimeSeriesDBServer).GetInstances(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.TimeSeriesDB/GetInstances", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TimeSeriesDBServer).GetInstances(ctx, req.(*GetInstancesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TimeSeriesDB_GetServerMetricSeries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ServerMetricSeriesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TimeSeriesDBServer).GetServerMetricSeries(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.TimeSeriesDB/GetServerMetricSeries", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TimeSeriesDBServer).GetServerMetricSeries(ctx, req.(*ServerMetricSeriesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TimeSeriesDB_GetServerMetric_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ServerMetricRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TimeSeriesDBServer).GetServerMetric(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.TimeSeriesDB/GetServerMetric", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TimeSeriesDBServer).GetServerMetric(ctx, req.(*ServerMetricRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TimeSeriesDB_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetStatusRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TimeSeriesDBServer).GetStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.TimeSeriesDB/GetStatus", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TimeSeriesDBServer).GetStatus(ctx, req.(*GetStatusRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TimeSeriesDB_GetLastMetricError_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LastErrorRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TimeSeriesDBServer).GetLastMetricError(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.TimeSeriesDB/GetLastMetricError", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TimeSeriesDBServer).GetLastMetricError(ctx, req.(*LastErrorRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TimeSeriesDB_GetUsageReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UsageReportRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TimeSeriesDBServer).GetUsageReport(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.TimeSeriesDB/GetUsageReport", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TimeSeriesDBServer).GetUsageReport(ctx, req.(*UsageReportRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _TimeSeriesDB_serviceDesc = grpc.ServiceDesc{ - ServiceName: "pomerium.dashboard.TimeSeriesDB", - HandlerType: (*TimeSeriesDBServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetRouteMetricChange", - Handler: _TimeSeriesDB_GetRouteMetricChange_Handler, - }, - { - MethodName: "GetRouteMetricChangeHistogram", - Handler: _TimeSeriesDB_GetRouteMetricChangeHistogram_Handler, - }, - { - MethodName: "GetRouteMetricSeries", - Handler: _TimeSeriesDB_GetRouteMetricSeries_Handler, - }, - { - MethodName: "GetRouteMetricSeriesHistogram", - Handler: _TimeSeriesDB_GetRouteMetricSeriesHistogram_Handler, - }, - { - MethodName: "GetRouteMetricSeriesMulti", - Handler: _TimeSeriesDB_GetRouteMetricSeriesMulti_Handler, - }, - { - MethodName: "GetUptime", - Handler: _TimeSeriesDB_GetUptime_Handler, - }, - { - MethodName: "GetInstances", - Handler: _TimeSeriesDB_GetInstances_Handler, - }, - { - MethodName: "GetServerMetricSeries", - Handler: _TimeSeriesDB_GetServerMetricSeries_Handler, - }, - { - MethodName: "GetServerMetric", - Handler: _TimeSeriesDB_GetServerMetric_Handler, - }, - { - MethodName: "GetStatus", - Handler: _TimeSeriesDB_GetStatus_Handler, - }, - { - MethodName: "GetLastMetricError", - Handler: _TimeSeriesDB_GetLastMetricError_Handler, - }, - { - MethodName: "GetUsageReport", - Handler: _TimeSeriesDB_GetUsageReport_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "tsdb.proto", -} diff --git a/pb/tsdb_grpc.pb.go b/pb/tsdb_grpc.pb.go new file mode 100644 index 0000000..cbbfaa1 --- /dev/null +++ b/pb/tsdb_grpc.pb.go @@ -0,0 +1,571 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v3.20.3 +// source: tsdb.proto + +package pb + +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 ( + TimeSeriesDB_GetRouteMetricChange_FullMethodName = "/pomerium.dashboard.TimeSeriesDB/GetRouteMetricChange" + TimeSeriesDB_GetRouteMetricChangeHistogram_FullMethodName = "/pomerium.dashboard.TimeSeriesDB/GetRouteMetricChangeHistogram" + TimeSeriesDB_GetRouteMetricSeries_FullMethodName = "/pomerium.dashboard.TimeSeriesDB/GetRouteMetricSeries" + TimeSeriesDB_GetRouteMetricSeriesHistogram_FullMethodName = "/pomerium.dashboard.TimeSeriesDB/GetRouteMetricSeriesHistogram" + TimeSeriesDB_GetRouteMetricSeriesMulti_FullMethodName = "/pomerium.dashboard.TimeSeriesDB/GetRouteMetricSeriesMulti" + TimeSeriesDB_GetUptime_FullMethodName = "/pomerium.dashboard.TimeSeriesDB/GetUptime" + TimeSeriesDB_GetInstances_FullMethodName = "/pomerium.dashboard.TimeSeriesDB/GetInstances" + TimeSeriesDB_GetServerMetricSeries_FullMethodName = "/pomerium.dashboard.TimeSeriesDB/GetServerMetricSeries" + TimeSeriesDB_GetServerMetric_FullMethodName = "/pomerium.dashboard.TimeSeriesDB/GetServerMetric" + TimeSeriesDB_GetStatus_FullMethodName = "/pomerium.dashboard.TimeSeriesDB/GetStatus" + TimeSeriesDB_GetLastMetricError_FullMethodName = "/pomerium.dashboard.TimeSeriesDB/GetLastMetricError" + TimeSeriesDB_GetUsageReport_FullMethodName = "/pomerium.dashboard.TimeSeriesDB/GetUsageReport" +) + +// TimeSeriesDBClient is the client API for TimeSeriesDB 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. +// +// TimeSeriesDB is a generic service that is meant to be able to query for +// historical metrics and should provide a sufficient abstraction between the UI +// and underlying time series service, would it be Prometheus, embedded TSDB or +// other 3rd party provider +type TimeSeriesDBClient interface { + // returns metric change for a period of time + GetRouteMetricChange(ctx context.Context, in *RouteMetricChangeRequest, opts ...grpc.CallOption) (*Scalar, error) + // returns buckets of values for a given metric + GetRouteMetricChangeHistogram(ctx context.Context, in *RouteMetricChangeRequest, opts ...grpc.CallOption) (*ScalarBuckets, error) + // returns metric change as time series + GetRouteMetricSeries(ctx context.Context, in *RouteMetricSeriesRequest, opts ...grpc.CallOption) (*TimeSeriesResponse, error) + // returns metric change as time series + GetRouteMetricSeriesHistogram(ctx context.Context, in *RouteMetricSeriesHistogramRequest, opts ...grpc.CallOption) (*TimeSeriesResponse, error) + // returns multiple annotated time series + GetRouteMetricSeriesMulti(ctx context.Context, in *RouteMetricSeriesRequest, opts ...grpc.CallOption) (*TimeSeriesResponseMulti, error) + // returns service uptime statistics + GetUptime(ctx context.Context, in *UptimeRequest, opts ...grpc.CallOption) (*UptimeResponse, error) + // returns list of system services with metrics + GetInstances(ctx context.Context, in *GetInstancesRequest, opts ...grpc.CallOption) (*Instances, error) + // returns server queries + GetServerMetricSeries(ctx context.Context, in *ServerMetricSeriesRequest, opts ...grpc.CallOption) (*TimeSeriesResponse, error) + // returns current metric value + GetServerMetric(ctx context.Context, in *ServerMetricRequest, opts ...grpc.CallOption) (*Sample, error) + // returns current status of scraping targets + GetStatus(ctx context.Context, in *GetStatusRequest, opts ...grpc.CallOption) (*GetStatusResponse, error) + // returns last known error for a metric, if available + GetLastMetricError(ctx context.Context, in *LastErrorRequest, opts ...grpc.CallOption) (*LastErrorResponse, error) + // returns usage report + GetUsageReport(ctx context.Context, in *UsageReportRequest, opts ...grpc.CallOption) (*UsageReportResponse, error) +} + +type timeSeriesDBClient struct { + cc grpc.ClientConnInterface +} + +func NewTimeSeriesDBClient(cc grpc.ClientConnInterface) TimeSeriesDBClient { + return &timeSeriesDBClient{cc} +} + +func (c *timeSeriesDBClient) GetRouteMetricChange(ctx context.Context, in *RouteMetricChangeRequest, opts ...grpc.CallOption) (*Scalar, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Scalar) + err := c.cc.Invoke(ctx, TimeSeriesDB_GetRouteMetricChange_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *timeSeriesDBClient) GetRouteMetricChangeHistogram(ctx context.Context, in *RouteMetricChangeRequest, opts ...grpc.CallOption) (*ScalarBuckets, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ScalarBuckets) + err := c.cc.Invoke(ctx, TimeSeriesDB_GetRouteMetricChangeHistogram_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *timeSeriesDBClient) GetRouteMetricSeries(ctx context.Context, in *RouteMetricSeriesRequest, opts ...grpc.CallOption) (*TimeSeriesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(TimeSeriesResponse) + err := c.cc.Invoke(ctx, TimeSeriesDB_GetRouteMetricSeries_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *timeSeriesDBClient) GetRouteMetricSeriesHistogram(ctx context.Context, in *RouteMetricSeriesHistogramRequest, opts ...grpc.CallOption) (*TimeSeriesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(TimeSeriesResponse) + err := c.cc.Invoke(ctx, TimeSeriesDB_GetRouteMetricSeriesHistogram_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *timeSeriesDBClient) GetRouteMetricSeriesMulti(ctx context.Context, in *RouteMetricSeriesRequest, opts ...grpc.CallOption) (*TimeSeriesResponseMulti, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(TimeSeriesResponseMulti) + err := c.cc.Invoke(ctx, TimeSeriesDB_GetRouteMetricSeriesMulti_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *timeSeriesDBClient) GetUptime(ctx context.Context, in *UptimeRequest, opts ...grpc.CallOption) (*UptimeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UptimeResponse) + err := c.cc.Invoke(ctx, TimeSeriesDB_GetUptime_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *timeSeriesDBClient) GetInstances(ctx context.Context, in *GetInstancesRequest, opts ...grpc.CallOption) (*Instances, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Instances) + err := c.cc.Invoke(ctx, TimeSeriesDB_GetInstances_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *timeSeriesDBClient) GetServerMetricSeries(ctx context.Context, in *ServerMetricSeriesRequest, opts ...grpc.CallOption) (*TimeSeriesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(TimeSeriesResponse) + err := c.cc.Invoke(ctx, TimeSeriesDB_GetServerMetricSeries_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *timeSeriesDBClient) GetServerMetric(ctx context.Context, in *ServerMetricRequest, opts ...grpc.CallOption) (*Sample, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Sample) + err := c.cc.Invoke(ctx, TimeSeriesDB_GetServerMetric_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *timeSeriesDBClient) GetStatus(ctx context.Context, in *GetStatusRequest, opts ...grpc.CallOption) (*GetStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetStatusResponse) + err := c.cc.Invoke(ctx, TimeSeriesDB_GetStatus_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *timeSeriesDBClient) GetLastMetricError(ctx context.Context, in *LastErrorRequest, opts ...grpc.CallOption) (*LastErrorResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(LastErrorResponse) + err := c.cc.Invoke(ctx, TimeSeriesDB_GetLastMetricError_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *timeSeriesDBClient) GetUsageReport(ctx context.Context, in *UsageReportRequest, opts ...grpc.CallOption) (*UsageReportResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UsageReportResponse) + err := c.cc.Invoke(ctx, TimeSeriesDB_GetUsageReport_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TimeSeriesDBServer is the server API for TimeSeriesDB service. +// All implementations should embed UnimplementedTimeSeriesDBServer +// for forward compatibility. +// +// TimeSeriesDB is a generic service that is meant to be able to query for +// historical metrics and should provide a sufficient abstraction between the UI +// and underlying time series service, would it be Prometheus, embedded TSDB or +// other 3rd party provider +type TimeSeriesDBServer interface { + // returns metric change for a period of time + GetRouteMetricChange(context.Context, *RouteMetricChangeRequest) (*Scalar, error) + // returns buckets of values for a given metric + GetRouteMetricChangeHistogram(context.Context, *RouteMetricChangeRequest) (*ScalarBuckets, error) + // returns metric change as time series + GetRouteMetricSeries(context.Context, *RouteMetricSeriesRequest) (*TimeSeriesResponse, error) + // returns metric change as time series + GetRouteMetricSeriesHistogram(context.Context, *RouteMetricSeriesHistogramRequest) (*TimeSeriesResponse, error) + // returns multiple annotated time series + GetRouteMetricSeriesMulti(context.Context, *RouteMetricSeriesRequest) (*TimeSeriesResponseMulti, error) + // returns service uptime statistics + GetUptime(context.Context, *UptimeRequest) (*UptimeResponse, error) + // returns list of system services with metrics + GetInstances(context.Context, *GetInstancesRequest) (*Instances, error) + // returns server queries + GetServerMetricSeries(context.Context, *ServerMetricSeriesRequest) (*TimeSeriesResponse, error) + // returns current metric value + GetServerMetric(context.Context, *ServerMetricRequest) (*Sample, error) + // returns current status of scraping targets + GetStatus(context.Context, *GetStatusRequest) (*GetStatusResponse, error) + // returns last known error for a metric, if available + GetLastMetricError(context.Context, *LastErrorRequest) (*LastErrorResponse, error) + // returns usage report + GetUsageReport(context.Context, *UsageReportRequest) (*UsageReportResponse, error) +} + +// UnimplementedTimeSeriesDBServer should 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 UnimplementedTimeSeriesDBServer struct{} + +func (UnimplementedTimeSeriesDBServer) GetRouteMetricChange(context.Context, *RouteMetricChangeRequest) (*Scalar, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRouteMetricChange not implemented") +} +func (UnimplementedTimeSeriesDBServer) GetRouteMetricChangeHistogram(context.Context, *RouteMetricChangeRequest) (*ScalarBuckets, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRouteMetricChangeHistogram not implemented") +} +func (UnimplementedTimeSeriesDBServer) GetRouteMetricSeries(context.Context, *RouteMetricSeriesRequest) (*TimeSeriesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRouteMetricSeries not implemented") +} +func (UnimplementedTimeSeriesDBServer) GetRouteMetricSeriesHistogram(context.Context, *RouteMetricSeriesHistogramRequest) (*TimeSeriesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRouteMetricSeriesHistogram not implemented") +} +func (UnimplementedTimeSeriesDBServer) GetRouteMetricSeriesMulti(context.Context, *RouteMetricSeriesRequest) (*TimeSeriesResponseMulti, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRouteMetricSeriesMulti not implemented") +} +func (UnimplementedTimeSeriesDBServer) GetUptime(context.Context, *UptimeRequest) (*UptimeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUptime not implemented") +} +func (UnimplementedTimeSeriesDBServer) GetInstances(context.Context, *GetInstancesRequest) (*Instances, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetInstances not implemented") +} +func (UnimplementedTimeSeriesDBServer) GetServerMetricSeries(context.Context, *ServerMetricSeriesRequest) (*TimeSeriesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetServerMetricSeries not implemented") +} +func (UnimplementedTimeSeriesDBServer) GetServerMetric(context.Context, *ServerMetricRequest) (*Sample, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetServerMetric not implemented") +} +func (UnimplementedTimeSeriesDBServer) GetStatus(context.Context, *GetStatusRequest) (*GetStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") +} +func (UnimplementedTimeSeriesDBServer) GetLastMetricError(context.Context, *LastErrorRequest) (*LastErrorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLastMetricError not implemented") +} +func (UnimplementedTimeSeriesDBServer) GetUsageReport(context.Context, *UsageReportRequest) (*UsageReportResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUsageReport not implemented") +} +func (UnimplementedTimeSeriesDBServer) testEmbeddedByValue() {} + +// UnsafeTimeSeriesDBServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to TimeSeriesDBServer will +// result in compilation errors. +type UnsafeTimeSeriesDBServer interface { + mustEmbedUnimplementedTimeSeriesDBServer() +} + +func RegisterTimeSeriesDBServer(s grpc.ServiceRegistrar, srv TimeSeriesDBServer) { + // If the following call pancis, it indicates UnimplementedTimeSeriesDBServer 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(&TimeSeriesDB_ServiceDesc, srv) +} + +func _TimeSeriesDB_GetRouteMetricChange_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RouteMetricChangeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TimeSeriesDBServer).GetRouteMetricChange(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TimeSeriesDB_GetRouteMetricChange_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TimeSeriesDBServer).GetRouteMetricChange(ctx, req.(*RouteMetricChangeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TimeSeriesDB_GetRouteMetricChangeHistogram_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RouteMetricChangeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TimeSeriesDBServer).GetRouteMetricChangeHistogram(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TimeSeriesDB_GetRouteMetricChangeHistogram_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TimeSeriesDBServer).GetRouteMetricChangeHistogram(ctx, req.(*RouteMetricChangeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TimeSeriesDB_GetRouteMetricSeries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RouteMetricSeriesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TimeSeriesDBServer).GetRouteMetricSeries(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TimeSeriesDB_GetRouteMetricSeries_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TimeSeriesDBServer).GetRouteMetricSeries(ctx, req.(*RouteMetricSeriesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TimeSeriesDB_GetRouteMetricSeriesHistogram_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RouteMetricSeriesHistogramRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TimeSeriesDBServer).GetRouteMetricSeriesHistogram(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TimeSeriesDB_GetRouteMetricSeriesHistogram_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TimeSeriesDBServer).GetRouteMetricSeriesHistogram(ctx, req.(*RouteMetricSeriesHistogramRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TimeSeriesDB_GetRouteMetricSeriesMulti_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RouteMetricSeriesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TimeSeriesDBServer).GetRouteMetricSeriesMulti(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TimeSeriesDB_GetRouteMetricSeriesMulti_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TimeSeriesDBServer).GetRouteMetricSeriesMulti(ctx, req.(*RouteMetricSeriesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TimeSeriesDB_GetUptime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UptimeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TimeSeriesDBServer).GetUptime(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TimeSeriesDB_GetUptime_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TimeSeriesDBServer).GetUptime(ctx, req.(*UptimeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TimeSeriesDB_GetInstances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetInstancesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TimeSeriesDBServer).GetInstances(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TimeSeriesDB_GetInstances_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TimeSeriesDBServer).GetInstances(ctx, req.(*GetInstancesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TimeSeriesDB_GetServerMetricSeries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ServerMetricSeriesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TimeSeriesDBServer).GetServerMetricSeries(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TimeSeriesDB_GetServerMetricSeries_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TimeSeriesDBServer).GetServerMetricSeries(ctx, req.(*ServerMetricSeriesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TimeSeriesDB_GetServerMetric_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ServerMetricRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TimeSeriesDBServer).GetServerMetric(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TimeSeriesDB_GetServerMetric_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TimeSeriesDBServer).GetServerMetric(ctx, req.(*ServerMetricRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TimeSeriesDB_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TimeSeriesDBServer).GetStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TimeSeriesDB_GetStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TimeSeriesDBServer).GetStatus(ctx, req.(*GetStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TimeSeriesDB_GetLastMetricError_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LastErrorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TimeSeriesDBServer).GetLastMetricError(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TimeSeriesDB_GetLastMetricError_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TimeSeriesDBServer).GetLastMetricError(ctx, req.(*LastErrorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _TimeSeriesDB_GetUsageReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UsageReportRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TimeSeriesDBServer).GetUsageReport(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TimeSeriesDB_GetUsageReport_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TimeSeriesDBServer).GetUsageReport(ctx, req.(*UsageReportRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// TimeSeriesDB_ServiceDesc is the grpc.ServiceDesc for TimeSeriesDB service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var TimeSeriesDB_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pomerium.dashboard.TimeSeriesDB", + HandlerType: (*TimeSeriesDBServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetRouteMetricChange", + Handler: _TimeSeriesDB_GetRouteMetricChange_Handler, + }, + { + MethodName: "GetRouteMetricChangeHistogram", + Handler: _TimeSeriesDB_GetRouteMetricChangeHistogram_Handler, + }, + { + MethodName: "GetRouteMetricSeries", + Handler: _TimeSeriesDB_GetRouteMetricSeries_Handler, + }, + { + MethodName: "GetRouteMetricSeriesHistogram", + Handler: _TimeSeriesDB_GetRouteMetricSeriesHistogram_Handler, + }, + { + MethodName: "GetRouteMetricSeriesMulti", + Handler: _TimeSeriesDB_GetRouteMetricSeriesMulti_Handler, + }, + { + MethodName: "GetUptime", + Handler: _TimeSeriesDB_GetUptime_Handler, + }, + { + MethodName: "GetInstances", + Handler: _TimeSeriesDB_GetInstances_Handler, + }, + { + MethodName: "GetServerMetricSeries", + Handler: _TimeSeriesDB_GetServerMetricSeries_Handler, + }, + { + MethodName: "GetServerMetric", + Handler: _TimeSeriesDB_GetServerMetric_Handler, + }, + { + MethodName: "GetStatus", + Handler: _TimeSeriesDB_GetStatus_Handler, + }, + { + MethodName: "GetLastMetricError", + Handler: _TimeSeriesDB_GetLastMetricError_Handler, + }, + { + MethodName: "GetUsageReport", + Handler: _TimeSeriesDB_GetUsageReport_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "tsdb.proto", +} diff --git a/pb/users.pb.go b/pb/users.pb.go index 3830569..18ce697 100644 --- a/pb/users.pb.go +++ b/pb/users.pb.go @@ -1,16 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.35.2 -// protoc v4.24.4 +// protoc-gen-go v1.34.2 +// protoc v3.20.3 // source: users.proto package pb import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" structpb "google.golang.org/protobuf/types/known/structpb" @@ -43,9 +39,11 @@ type RecoveryToken struct { func (x *RecoveryToken) Reset() { *x = RecoveryToken{} - mi := &file_users_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *RecoveryToken) String() string { @@ -56,7 +54,7 @@ func (*RecoveryToken) ProtoMessage() {} func (x *RecoveryToken) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -125,9 +123,11 @@ type GroupInfo struct { func (x *GroupInfo) Reset() { *x = GroupInfo{} - mi := &file_users_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GroupInfo) String() string { @@ -138,7 +138,7 @@ func (*GroupInfo) ProtoMessage() {} func (x *GroupInfo) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -184,9 +184,11 @@ type UserInfo struct { func (x *UserInfo) Reset() { *x = UserInfo{} - mi := &file_users_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *UserInfo) String() string { @@ -197,7 +199,7 @@ func (*UserInfo) ProtoMessage() {} func (x *UserInfo) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -271,9 +273,11 @@ type GetUserInfoRequest struct { func (x *GetUserInfoRequest) Reset() { *x = GetUserInfoRequest{} - mi := &file_users_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetUserInfoRequest) String() string { @@ -284,7 +288,7 @@ func (*GetUserInfoRequest) ProtoMessage() {} func (x *GetUserInfoRequest) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -316,9 +320,11 @@ type GetUserInfoResponse struct { func (x *GetUserInfoResponse) Reset() { *x = GetUserInfoResponse{} - mi := &file_users_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetUserInfoResponse) String() string { @@ -329,7 +335,7 @@ func (*GetUserInfoResponse) ProtoMessage() {} func (x *GetUserInfoResponse) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -364,9 +370,11 @@ type QueryGroupsRequest struct { func (x *QueryGroupsRequest) Reset() { *x = QueryGroupsRequest{} - mi := &file_users_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *QueryGroupsRequest) String() string { @@ -377,7 +385,7 @@ func (*QueryGroupsRequest) ProtoMessage() {} func (x *QueryGroupsRequest) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -425,9 +433,11 @@ type QueryGroupsResponse struct { func (x *QueryGroupsResponse) Reset() { *x = QueryGroupsResponse{} - mi := &file_users_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *QueryGroupsResponse) String() string { @@ -438,7 +448,7 @@ func (*QueryGroupsResponse) ProtoMessage() {} func (x *QueryGroupsResponse) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -483,9 +493,11 @@ type QueryUsersRequest struct { func (x *QueryUsersRequest) Reset() { *x = QueryUsersRequest{} - mi := &file_users_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *QueryUsersRequest) String() string { @@ -496,7 +508,7 @@ func (*QueryUsersRequest) ProtoMessage() {} func (x *QueryUsersRequest) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[7] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -544,9 +556,11 @@ type QueryUsersResponse struct { func (x *QueryUsersResponse) Reset() { *x = QueryUsersResponse{} - mi := &file_users_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *QueryUsersResponse) String() string { @@ -557,7 +571,7 @@ func (*QueryUsersResponse) ProtoMessage() {} func (x *QueryUsersResponse) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[8] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -603,9 +617,11 @@ type PomeriumServiceAccount struct { func (x *PomeriumServiceAccount) Reset() { *x = PomeriumServiceAccount{} - mi := &file_users_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PomeriumServiceAccount) String() string { @@ -616,7 +632,7 @@ func (*PomeriumServiceAccount) ProtoMessage() {} func (x *PomeriumServiceAccount) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[9] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -690,9 +706,11 @@ type AddPomeriumServiceAccountRequest struct { func (x *AddPomeriumServiceAccountRequest) Reset() { *x = AddPomeriumServiceAccountRequest{} - mi := &file_users_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *AddPomeriumServiceAccountRequest) String() string { @@ -703,7 +721,7 @@ func (*AddPomeriumServiceAccountRequest) ProtoMessage() {} func (x *AddPomeriumServiceAccountRequest) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[10] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -736,9 +754,11 @@ type AddPomeriumServiceAccountResponse struct { func (x *AddPomeriumServiceAccountResponse) Reset() { *x = AddPomeriumServiceAccountResponse{} - mi := &file_users_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *AddPomeriumServiceAccountResponse) String() string { @@ -749,7 +769,7 @@ func (*AddPomeriumServiceAccountResponse) ProtoMessage() {} func (x *AddPomeriumServiceAccountResponse) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[11] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -788,9 +808,11 @@ type DeletePomeriumServiceAccountRequest struct { func (x *DeletePomeriumServiceAccountRequest) Reset() { *x = DeletePomeriumServiceAccountRequest{} - mi := &file_users_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeletePomeriumServiceAccountRequest) String() string { @@ -801,7 +823,7 @@ func (*DeletePomeriumServiceAccountRequest) ProtoMessage() {} func (x *DeletePomeriumServiceAccountRequest) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[12] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -831,9 +853,11 @@ type DeletePomeriumServiceAccountResponse struct { func (x *DeletePomeriumServiceAccountResponse) Reset() { *x = DeletePomeriumServiceAccountResponse{} - mi := &file_users_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeletePomeriumServiceAccountResponse) String() string { @@ -844,7 +868,7 @@ func (*DeletePomeriumServiceAccountResponse) ProtoMessage() {} func (x *DeletePomeriumServiceAccountResponse) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[13] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -869,9 +893,11 @@ type GetPomeriumServiceAccountRequest struct { func (x *GetPomeriumServiceAccountRequest) Reset() { *x = GetPomeriumServiceAccountRequest{} - mi := &file_users_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetPomeriumServiceAccountRequest) String() string { @@ -882,7 +908,7 @@ func (*GetPomeriumServiceAccountRequest) ProtoMessage() {} func (x *GetPomeriumServiceAccountRequest) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[14] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -914,9 +940,11 @@ type GetPomeriumServiceAccountResponse struct { func (x *GetPomeriumServiceAccountResponse) Reset() { *x = GetPomeriumServiceAccountResponse{} - mi := &file_users_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetPomeriumServiceAccountResponse) String() string { @@ -927,7 +955,7 @@ func (*GetPomeriumServiceAccountResponse) ProtoMessage() {} func (x *GetPomeriumServiceAccountResponse) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[15] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -960,9 +988,11 @@ type ListPomeriumServiceAccountsRequest struct { func (x *ListPomeriumServiceAccountsRequest) Reset() { *x = ListPomeriumServiceAccountsRequest{} - mi := &file_users_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListPomeriumServiceAccountsRequest) String() string { @@ -973,7 +1003,7 @@ func (*ListPomeriumServiceAccountsRequest) ProtoMessage() {} func (x *ListPomeriumServiceAccountsRequest) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[16] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1007,9 +1037,11 @@ type ListPomeriumServiceAccountsResponse struct { func (x *ListPomeriumServiceAccountsResponse) Reset() { *x = ListPomeriumServiceAccountsResponse{} - mi := &file_users_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListPomeriumServiceAccountsResponse) String() string { @@ -1020,7 +1052,7 @@ func (*ListPomeriumServiceAccountsResponse) ProtoMessage() {} func (x *ListPomeriumServiceAccountsResponse) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[17] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1052,9 +1084,11 @@ type SetPomeriumServiceAccountRequest struct { func (x *SetPomeriumServiceAccountRequest) Reset() { *x = SetPomeriumServiceAccountRequest{} - mi := &file_users_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetPomeriumServiceAccountRequest) String() string { @@ -1065,7 +1099,7 @@ func (*SetPomeriumServiceAccountRequest) ProtoMessage() {} func (x *SetPomeriumServiceAccountRequest) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[18] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1097,9 +1131,11 @@ type SetPomeriumServiceAccountResponse struct { func (x *SetPomeriumServiceAccountResponse) Reset() { *x = SetPomeriumServiceAccountResponse{} - mi := &file_users_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *SetPomeriumServiceAccountResponse) String() string { @@ -1110,7 +1146,7 @@ func (*SetPomeriumServiceAccountResponse) ProtoMessage() {} func (x *SetPomeriumServiceAccountResponse) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[19] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1151,9 +1187,11 @@ type PomeriumSession struct { func (x *PomeriumSession) Reset() { *x = PomeriumSession{} - mi := &file_users_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PomeriumSession) String() string { @@ -1164,7 +1202,7 @@ func (*PomeriumSession) ProtoMessage() {} func (x *PomeriumSession) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[20] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1252,9 +1290,11 @@ type DeletePomeriumSessionRequest struct { func (x *DeletePomeriumSessionRequest) Reset() { *x = DeletePomeriumSessionRequest{} - mi := &file_users_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeletePomeriumSessionRequest) String() string { @@ -1265,7 +1305,7 @@ func (*DeletePomeriumSessionRequest) ProtoMessage() {} func (x *DeletePomeriumSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[21] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1295,9 +1335,11 @@ type DeletePomeriumSessionResponse struct { func (x *DeletePomeriumSessionResponse) Reset() { *x = DeletePomeriumSessionResponse{} - mi := &file_users_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DeletePomeriumSessionResponse) String() string { @@ -1308,7 +1350,7 @@ func (*DeletePomeriumSessionResponse) ProtoMessage() {} func (x *DeletePomeriumSessionResponse) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[22] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1333,9 +1375,11 @@ type GetPomeriumSessionRequest struct { func (x *GetPomeriumSessionRequest) Reset() { *x = GetPomeriumSessionRequest{} - mi := &file_users_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetPomeriumSessionRequest) String() string { @@ -1346,7 +1390,7 @@ func (*GetPomeriumSessionRequest) ProtoMessage() {} func (x *GetPomeriumSessionRequest) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[23] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1379,9 +1423,11 @@ type GetPomeriumSessionResponse struct { func (x *GetPomeriumSessionResponse) Reset() { *x = GetPomeriumSessionResponse{} - mi := &file_users_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *GetPomeriumSessionResponse) String() string { @@ -1392,7 +1438,7 @@ func (*GetPomeriumSessionResponse) ProtoMessage() {} func (x *GetPomeriumSessionResponse) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[24] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1440,9 +1486,11 @@ type ListPomeriumSessionsRequest struct { func (x *ListPomeriumSessionsRequest) Reset() { *x = ListPomeriumSessionsRequest{} - mi := &file_users_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListPomeriumSessionsRequest) String() string { @@ -1453,7 +1501,7 @@ func (*ListPomeriumSessionsRequest) ProtoMessage() {} func (x *ListPomeriumSessionsRequest) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[25] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1516,9 +1564,11 @@ type ListPomeriumSessionsResponse struct { func (x *ListPomeriumSessionsResponse) Reset() { *x = ListPomeriumSessionsResponse{} - mi := &file_users_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ListPomeriumSessionsResponse) String() string { @@ -1529,7 +1579,7 @@ func (*ListPomeriumSessionsResponse) ProtoMessage() {} func (x *ListPomeriumSessionsResponse) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[26] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1569,9 +1619,11 @@ type ImpersonateRequest struct { func (x *ImpersonateRequest) Reset() { *x = ImpersonateRequest{} - mi := &file_users_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ImpersonateRequest) String() string { @@ -1582,7 +1634,7 @@ func (*ImpersonateRequest) ProtoMessage() {} func (x *ImpersonateRequest) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[27] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1612,9 +1664,11 @@ type ImpersonateResponse struct { func (x *ImpersonateResponse) Reset() { *x = ImpersonateResponse{} - mi := &file_users_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *ImpersonateResponse) String() string { @@ -1625,7 +1679,7 @@ func (*ImpersonateResponse) ProtoMessage() {} func (x *ImpersonateResponse) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[28] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1652,9 +1706,11 @@ type PomeriumSession_Group struct { func (x *PomeriumSession_Group) Reset() { *x = PomeriumSession_Group{} - mi := &file_users_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PomeriumSession_Group) String() string { @@ -1665,7 +1721,7 @@ func (*PomeriumSession_Group) ProtoMessage() {} func (x *PomeriumSession_Group) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[30] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1713,9 +1769,11 @@ type PomeriumSession_User struct { func (x *PomeriumSession_User) Reset() { *x = PomeriumSession_User{} - mi := &file_users_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_users_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *PomeriumSession_User) String() string { @@ -1726,7 +1784,7 @@ func (*PomeriumSession_User) ProtoMessage() {} func (x *PomeriumSession_User) ProtoReflect() protoreflect.Message { mi := &file_users_proto_msgTypes[31] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -2233,6 +2291,380 @@ func file_users_proto_init() { if File_users_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_users_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*RecoveryToken); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GroupInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*UserInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*GetUserInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*GetUserInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*QueryGroupsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*QueryGroupsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*QueryUsersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*QueryUsersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*PomeriumServiceAccount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*AddPomeriumServiceAccountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*AddPomeriumServiceAccountResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*DeletePomeriumServiceAccountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*DeletePomeriumServiceAccountResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*GetPomeriumServiceAccountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*GetPomeriumServiceAccountResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[16].Exporter = func(v any, i int) any { + switch v := v.(*ListPomeriumServiceAccountsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[17].Exporter = func(v any, i int) any { + switch v := v.(*ListPomeriumServiceAccountsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[18].Exporter = func(v any, i int) any { + switch v := v.(*SetPomeriumServiceAccountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[19].Exporter = func(v any, i int) any { + switch v := v.(*SetPomeriumServiceAccountResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[20].Exporter = func(v any, i int) any { + switch v := v.(*PomeriumSession); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[21].Exporter = func(v any, i int) any { + switch v := v.(*DeletePomeriumSessionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[22].Exporter = func(v any, i int) any { + switch v := v.(*DeletePomeriumSessionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[23].Exporter = func(v any, i int) any { + switch v := v.(*GetPomeriumSessionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[24].Exporter = func(v any, i int) any { + switch v := v.(*GetPomeriumSessionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[25].Exporter = func(v any, i int) any { + switch v := v.(*ListPomeriumSessionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[26].Exporter = func(v any, i int) any { + switch v := v.(*ListPomeriumSessionsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[27].Exporter = func(v any, i int) any { + switch v := v.(*ImpersonateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[28].Exporter = func(v any, i int) any { + switch v := v.(*ImpersonateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[30].Exporter = func(v any, i int) any { + switch v := v.(*PomeriumSession_Group); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_users_proto_msgTypes[31].Exporter = func(v any, i int) any { + switch v := v.(*PomeriumSession_User); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } file_users_proto_msgTypes[3].OneofWrappers = []any{} file_users_proto_msgTypes[9].OneofWrappers = []any{} file_users_proto_msgTypes[25].OneofWrappers = []any{} @@ -2255,583 +2687,3 @@ func file_users_proto_init() { file_users_proto_goTypes = nil file_users_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// UserServiceClient is the client API for UserService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type UserServiceClient interface { - // GetUserInfo retrieves identity information and permission mappings for a - // user - GetUserInfo(ctx context.Context, in *GetUserInfoRequest, opts ...grpc.CallOption) (*GetUserInfoResponse, error) - // QueryGroups retrieves groups from the databroker based on - // QueryGroupsRequest parameters - QueryGroups(ctx context.Context, in *QueryGroupsRequest, opts ...grpc.CallOption) (*QueryGroupsResponse, error) - // QueryUsers retrieves users from the databroker based on QueryUsersRequest - // parameters - QueryUsers(ctx context.Context, in *QueryUsersRequest, opts ...grpc.CallOption) (*QueryUsersResponse, error) -} - -type userServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient { - return &userServiceClient{cc} -} - -func (c *userServiceClient) GetUserInfo(ctx context.Context, in *GetUserInfoRequest, opts ...grpc.CallOption) (*GetUserInfoResponse, error) { - out := new(GetUserInfoResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.UserService/GetUserInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *userServiceClient) QueryGroups(ctx context.Context, in *QueryGroupsRequest, opts ...grpc.CallOption) (*QueryGroupsResponse, error) { - out := new(QueryGroupsResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.UserService/QueryGroups", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *userServiceClient) QueryUsers(ctx context.Context, in *QueryUsersRequest, opts ...grpc.CallOption) (*QueryUsersResponse, error) { - out := new(QueryUsersResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.UserService/QueryUsers", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// UserServiceServer is the server API for UserService service. -type UserServiceServer interface { - // GetUserInfo retrieves identity information and permission mappings for a - // user - GetUserInfo(context.Context, *GetUserInfoRequest) (*GetUserInfoResponse, error) - // QueryGroups retrieves groups from the databroker based on - // QueryGroupsRequest parameters - QueryGroups(context.Context, *QueryGroupsRequest) (*QueryGroupsResponse, error) - // QueryUsers retrieves users from the databroker based on QueryUsersRequest - // parameters - QueryUsers(context.Context, *QueryUsersRequest) (*QueryUsersResponse, error) -} - -// UnimplementedUserServiceServer can be embedded to have forward compatible implementations. -type UnimplementedUserServiceServer struct { -} - -func (*UnimplementedUserServiceServer) GetUserInfo(context.Context, *GetUserInfoRequest) (*GetUserInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetUserInfo not implemented") -} -func (*UnimplementedUserServiceServer) QueryGroups(context.Context, *QueryGroupsRequest) (*QueryGroupsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method QueryGroups not implemented") -} -func (*UnimplementedUserServiceServer) QueryUsers(context.Context, *QueryUsersRequest) (*QueryUsersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method QueryUsers not implemented") -} - -func RegisterUserServiceServer(s *grpc.Server, srv UserServiceServer) { - s.RegisterService(&_UserService_serviceDesc, srv) -} - -func _UserService_GetUserInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetUserInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServiceServer).GetUserInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.UserService/GetUserInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServiceServer).GetUserInfo(ctx, req.(*GetUserInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _UserService_QueryGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGroupsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServiceServer).QueryGroups(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.UserService/QueryGroups", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServiceServer).QueryGroups(ctx, req.(*QueryGroupsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _UserService_QueryUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryUsersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServiceServer).QueryUsers(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.UserService/QueryUsers", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServiceServer).QueryUsers(ctx, req.(*QueryUsersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _UserService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "pomerium.dashboard.UserService", - HandlerType: (*UserServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetUserInfo", - Handler: _UserService_GetUserInfo_Handler, - }, - { - MethodName: "QueryGroups", - Handler: _UserService_QueryGroups_Handler, - }, - { - MethodName: "QueryUsers", - Handler: _UserService_QueryUsers_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "users.proto", -} - -// PomeriumServiceAccountServiceClient is the client API for PomeriumServiceAccountService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type PomeriumServiceAccountServiceClient interface { - // AddPomeriumServiceAccount creates a new service account - AddPomeriumServiceAccount(ctx context.Context, in *AddPomeriumServiceAccountRequest, opts ...grpc.CallOption) (*AddPomeriumServiceAccountResponse, error) - // DeletePomeriumServiceAccount removes an existing service account - DeletePomeriumServiceAccount(ctx context.Context, in *DeletePomeriumServiceAccountRequest, opts ...grpc.CallOption) (*DeletePomeriumServiceAccountResponse, error) - // GetPomeriumServiceAccount retrieves an existing service account - GetPomeriumServiceAccount(ctx context.Context, in *GetPomeriumServiceAccountRequest, opts ...grpc.CallOption) (*GetPomeriumServiceAccountResponse, error) - // ListPomeriumServiceAccounts lists service accounts based on the parameters - // in ListPomeriumServiceAccountsRequest - ListPomeriumServiceAccounts(ctx context.Context, in *ListPomeriumServiceAccountsRequest, opts ...grpc.CallOption) (*ListPomeriumServiceAccountsResponse, error) - SetPomeriumServiceAccount(ctx context.Context, in *SetPomeriumServiceAccountRequest, opts ...grpc.CallOption) (*SetPomeriumServiceAccountResponse, error) -} - -type pomeriumServiceAccountServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewPomeriumServiceAccountServiceClient(cc grpc.ClientConnInterface) PomeriumServiceAccountServiceClient { - return &pomeriumServiceAccountServiceClient{cc} -} - -func (c *pomeriumServiceAccountServiceClient) AddPomeriumServiceAccount(ctx context.Context, in *AddPomeriumServiceAccountRequest, opts ...grpc.CallOption) (*AddPomeriumServiceAccountResponse, error) { - out := new(AddPomeriumServiceAccountResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.PomeriumServiceAccountService/AddPomeriumServiceAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pomeriumServiceAccountServiceClient) DeletePomeriumServiceAccount(ctx context.Context, in *DeletePomeriumServiceAccountRequest, opts ...grpc.CallOption) (*DeletePomeriumServiceAccountResponse, error) { - out := new(DeletePomeriumServiceAccountResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.PomeriumServiceAccountService/DeletePomeriumServiceAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pomeriumServiceAccountServiceClient) GetPomeriumServiceAccount(ctx context.Context, in *GetPomeriumServiceAccountRequest, opts ...grpc.CallOption) (*GetPomeriumServiceAccountResponse, error) { - out := new(GetPomeriumServiceAccountResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.PomeriumServiceAccountService/GetPomeriumServiceAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pomeriumServiceAccountServiceClient) ListPomeriumServiceAccounts(ctx context.Context, in *ListPomeriumServiceAccountsRequest, opts ...grpc.CallOption) (*ListPomeriumServiceAccountsResponse, error) { - out := new(ListPomeriumServiceAccountsResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.PomeriumServiceAccountService/ListPomeriumServiceAccounts", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pomeriumServiceAccountServiceClient) SetPomeriumServiceAccount(ctx context.Context, in *SetPomeriumServiceAccountRequest, opts ...grpc.CallOption) (*SetPomeriumServiceAccountResponse, error) { - out := new(SetPomeriumServiceAccountResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.PomeriumServiceAccountService/SetPomeriumServiceAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// PomeriumServiceAccountServiceServer is the server API for PomeriumServiceAccountService service. -type PomeriumServiceAccountServiceServer interface { - // AddPomeriumServiceAccount creates a new service account - AddPomeriumServiceAccount(context.Context, *AddPomeriumServiceAccountRequest) (*AddPomeriumServiceAccountResponse, error) - // DeletePomeriumServiceAccount removes an existing service account - DeletePomeriumServiceAccount(context.Context, *DeletePomeriumServiceAccountRequest) (*DeletePomeriumServiceAccountResponse, error) - // GetPomeriumServiceAccount retrieves an existing service account - GetPomeriumServiceAccount(context.Context, *GetPomeriumServiceAccountRequest) (*GetPomeriumServiceAccountResponse, error) - // ListPomeriumServiceAccounts lists service accounts based on the parameters - // in ListPomeriumServiceAccountsRequest - ListPomeriumServiceAccounts(context.Context, *ListPomeriumServiceAccountsRequest) (*ListPomeriumServiceAccountsResponse, error) - SetPomeriumServiceAccount(context.Context, *SetPomeriumServiceAccountRequest) (*SetPomeriumServiceAccountResponse, error) -} - -// UnimplementedPomeriumServiceAccountServiceServer can be embedded to have forward compatible implementations. -type UnimplementedPomeriumServiceAccountServiceServer struct { -} - -func (*UnimplementedPomeriumServiceAccountServiceServer) AddPomeriumServiceAccount(context.Context, *AddPomeriumServiceAccountRequest) (*AddPomeriumServiceAccountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddPomeriumServiceAccount not implemented") -} -func (*UnimplementedPomeriumServiceAccountServiceServer) DeletePomeriumServiceAccount(context.Context, *DeletePomeriumServiceAccountRequest) (*DeletePomeriumServiceAccountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeletePomeriumServiceAccount not implemented") -} -func (*UnimplementedPomeriumServiceAccountServiceServer) GetPomeriumServiceAccount(context.Context, *GetPomeriumServiceAccountRequest) (*GetPomeriumServiceAccountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPomeriumServiceAccount not implemented") -} -func (*UnimplementedPomeriumServiceAccountServiceServer) ListPomeriumServiceAccounts(context.Context, *ListPomeriumServiceAccountsRequest) (*ListPomeriumServiceAccountsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListPomeriumServiceAccounts not implemented") -} -func (*UnimplementedPomeriumServiceAccountServiceServer) SetPomeriumServiceAccount(context.Context, *SetPomeriumServiceAccountRequest) (*SetPomeriumServiceAccountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetPomeriumServiceAccount not implemented") -} - -func RegisterPomeriumServiceAccountServiceServer(s *grpc.Server, srv PomeriumServiceAccountServiceServer) { - s.RegisterService(&_PomeriumServiceAccountService_serviceDesc, srv) -} - -func _PomeriumServiceAccountService_AddPomeriumServiceAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddPomeriumServiceAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PomeriumServiceAccountServiceServer).AddPomeriumServiceAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.PomeriumServiceAccountService/AddPomeriumServiceAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PomeriumServiceAccountServiceServer).AddPomeriumServiceAccount(ctx, req.(*AddPomeriumServiceAccountRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PomeriumServiceAccountService_DeletePomeriumServiceAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeletePomeriumServiceAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PomeriumServiceAccountServiceServer).DeletePomeriumServiceAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.PomeriumServiceAccountService/DeletePomeriumServiceAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PomeriumServiceAccountServiceServer).DeletePomeriumServiceAccount(ctx, req.(*DeletePomeriumServiceAccountRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PomeriumServiceAccountService_GetPomeriumServiceAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPomeriumServiceAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PomeriumServiceAccountServiceServer).GetPomeriumServiceAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.PomeriumServiceAccountService/GetPomeriumServiceAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PomeriumServiceAccountServiceServer).GetPomeriumServiceAccount(ctx, req.(*GetPomeriumServiceAccountRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PomeriumServiceAccountService_ListPomeriumServiceAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListPomeriumServiceAccountsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PomeriumServiceAccountServiceServer).ListPomeriumServiceAccounts(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.PomeriumServiceAccountService/ListPomeriumServiceAccounts", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PomeriumServiceAccountServiceServer).ListPomeriumServiceAccounts(ctx, req.(*ListPomeriumServiceAccountsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PomeriumServiceAccountService_SetPomeriumServiceAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetPomeriumServiceAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PomeriumServiceAccountServiceServer).SetPomeriumServiceAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.PomeriumServiceAccountService/SetPomeriumServiceAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PomeriumServiceAccountServiceServer).SetPomeriumServiceAccount(ctx, req.(*SetPomeriumServiceAccountRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _PomeriumServiceAccountService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "pomerium.dashboard.PomeriumServiceAccountService", - HandlerType: (*PomeriumServiceAccountServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "AddPomeriumServiceAccount", - Handler: _PomeriumServiceAccountService_AddPomeriumServiceAccount_Handler, - }, - { - MethodName: "DeletePomeriumServiceAccount", - Handler: _PomeriumServiceAccountService_DeletePomeriumServiceAccount_Handler, - }, - { - MethodName: "GetPomeriumServiceAccount", - Handler: _PomeriumServiceAccountService_GetPomeriumServiceAccount_Handler, - }, - { - MethodName: "ListPomeriumServiceAccounts", - Handler: _PomeriumServiceAccountService_ListPomeriumServiceAccounts_Handler, - }, - { - MethodName: "SetPomeriumServiceAccount", - Handler: _PomeriumServiceAccountService_SetPomeriumServiceAccount_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "users.proto", -} - -// PomeriumSessionServiceClient is the client API for PomeriumSessionService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type PomeriumSessionServiceClient interface { - // DeletePomeriumSession clears an existing user session - DeletePomeriumSession(ctx context.Context, in *DeletePomeriumSessionRequest, opts ...grpc.CallOption) (*DeletePomeriumSessionResponse, error) - // GetPomeriumSession retrieves information about an existing user session - GetPomeriumSession(ctx context.Context, in *GetPomeriumSessionRequest, opts ...grpc.CallOption) (*GetPomeriumSessionResponse, error) - // Impersonate updates an existing session to impersonate another identity - Impersonate(ctx context.Context, in *ImpersonateRequest, opts ...grpc.CallOption) (*ImpersonateResponse, error) - // ListPomeriumSessions lists existing sessions based on the parameters of - // ListPomeriumSessionsRequest - ListPomeriumSessions(ctx context.Context, in *ListPomeriumSessionsRequest, opts ...grpc.CallOption) (*ListPomeriumSessionsResponse, error) -} - -type pomeriumSessionServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewPomeriumSessionServiceClient(cc grpc.ClientConnInterface) PomeriumSessionServiceClient { - return &pomeriumSessionServiceClient{cc} -} - -func (c *pomeriumSessionServiceClient) DeletePomeriumSession(ctx context.Context, in *DeletePomeriumSessionRequest, opts ...grpc.CallOption) (*DeletePomeriumSessionResponse, error) { - out := new(DeletePomeriumSessionResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.PomeriumSessionService/DeletePomeriumSession", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pomeriumSessionServiceClient) GetPomeriumSession(ctx context.Context, in *GetPomeriumSessionRequest, opts ...grpc.CallOption) (*GetPomeriumSessionResponse, error) { - out := new(GetPomeriumSessionResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.PomeriumSessionService/GetPomeriumSession", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pomeriumSessionServiceClient) Impersonate(ctx context.Context, in *ImpersonateRequest, opts ...grpc.CallOption) (*ImpersonateResponse, error) { - out := new(ImpersonateResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.PomeriumSessionService/Impersonate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pomeriumSessionServiceClient) ListPomeriumSessions(ctx context.Context, in *ListPomeriumSessionsRequest, opts ...grpc.CallOption) (*ListPomeriumSessionsResponse, error) { - out := new(ListPomeriumSessionsResponse) - err := c.cc.Invoke(ctx, "/pomerium.dashboard.PomeriumSessionService/ListPomeriumSessions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// PomeriumSessionServiceServer is the server API for PomeriumSessionService service. -type PomeriumSessionServiceServer interface { - // DeletePomeriumSession clears an existing user session - DeletePomeriumSession(context.Context, *DeletePomeriumSessionRequest) (*DeletePomeriumSessionResponse, error) - // GetPomeriumSession retrieves information about an existing user session - GetPomeriumSession(context.Context, *GetPomeriumSessionRequest) (*GetPomeriumSessionResponse, error) - // Impersonate updates an existing session to impersonate another identity - Impersonate(context.Context, *ImpersonateRequest) (*ImpersonateResponse, error) - // ListPomeriumSessions lists existing sessions based on the parameters of - // ListPomeriumSessionsRequest - ListPomeriumSessions(context.Context, *ListPomeriumSessionsRequest) (*ListPomeriumSessionsResponse, error) -} - -// UnimplementedPomeriumSessionServiceServer can be embedded to have forward compatible implementations. -type UnimplementedPomeriumSessionServiceServer struct { -} - -func (*UnimplementedPomeriumSessionServiceServer) DeletePomeriumSession(context.Context, *DeletePomeriumSessionRequest) (*DeletePomeriumSessionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeletePomeriumSession not implemented") -} -func (*UnimplementedPomeriumSessionServiceServer) GetPomeriumSession(context.Context, *GetPomeriumSessionRequest) (*GetPomeriumSessionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPomeriumSession not implemented") -} -func (*UnimplementedPomeriumSessionServiceServer) Impersonate(context.Context, *ImpersonateRequest) (*ImpersonateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Impersonate not implemented") -} -func (*UnimplementedPomeriumSessionServiceServer) ListPomeriumSessions(context.Context, *ListPomeriumSessionsRequest) (*ListPomeriumSessionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListPomeriumSessions not implemented") -} - -func RegisterPomeriumSessionServiceServer(s *grpc.Server, srv PomeriumSessionServiceServer) { - s.RegisterService(&_PomeriumSessionService_serviceDesc, srv) -} - -func _PomeriumSessionService_DeletePomeriumSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeletePomeriumSessionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PomeriumSessionServiceServer).DeletePomeriumSession(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.PomeriumSessionService/DeletePomeriumSession", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PomeriumSessionServiceServer).DeletePomeriumSession(ctx, req.(*DeletePomeriumSessionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PomeriumSessionService_GetPomeriumSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPomeriumSessionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PomeriumSessionServiceServer).GetPomeriumSession(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.PomeriumSessionService/GetPomeriumSession", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PomeriumSessionServiceServer).GetPomeriumSession(ctx, req.(*GetPomeriumSessionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PomeriumSessionService_Impersonate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ImpersonateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PomeriumSessionServiceServer).Impersonate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.PomeriumSessionService/Impersonate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PomeriumSessionServiceServer).Impersonate(ctx, req.(*ImpersonateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _PomeriumSessionService_ListPomeriumSessions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListPomeriumSessionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PomeriumSessionServiceServer).ListPomeriumSessions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pomerium.dashboard.PomeriumSessionService/ListPomeriumSessions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PomeriumSessionServiceServer).ListPomeriumSessions(ctx, req.(*ListPomeriumSessionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _PomeriumSessionService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "pomerium.dashboard.PomeriumSessionService", - HandlerType: (*PomeriumSessionServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "DeletePomeriumSession", - Handler: _PomeriumSessionService_DeletePomeriumSession_Handler, - }, - { - MethodName: "GetPomeriumSession", - Handler: _PomeriumSessionService_GetPomeriumSession_Handler, - }, - { - MethodName: "Impersonate", - Handler: _PomeriumSessionService_Impersonate_Handler, - }, - { - MethodName: "ListPomeriumSessions", - Handler: _PomeriumSessionService_ListPomeriumSessions_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "users.proto", -} diff --git a/pb/users_grpc.pb.go b/pb/users_grpc.pb.go new file mode 100644 index 0000000..45605d7 --- /dev/null +++ b/pb/users_grpc.pb.go @@ -0,0 +1,707 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v3.20.3 +// source: users.proto + +package pb + +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 ( + UserService_GetUserInfo_FullMethodName = "/pomerium.dashboard.UserService/GetUserInfo" + UserService_QueryGroups_FullMethodName = "/pomerium.dashboard.UserService/QueryGroups" + UserService_QueryUsers_FullMethodName = "/pomerium.dashboard.UserService/QueryUsers" +) + +// UserServiceClient is the client API for UserService 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. +// +// UserService supports querying directory data from the databroker +type UserServiceClient interface { + // GetUserInfo retrieves identity information and permission mappings for a + // user + GetUserInfo(ctx context.Context, in *GetUserInfoRequest, opts ...grpc.CallOption) (*GetUserInfoResponse, error) + // QueryGroups retrieves groups from the databroker based on + // QueryGroupsRequest parameters + QueryGroups(ctx context.Context, in *QueryGroupsRequest, opts ...grpc.CallOption) (*QueryGroupsResponse, error) + // QueryUsers retrieves users from the databroker based on QueryUsersRequest + // parameters + QueryUsers(ctx context.Context, in *QueryUsersRequest, opts ...grpc.CallOption) (*QueryUsersResponse, error) +} + +type userServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient { + return &userServiceClient{cc} +} + +func (c *userServiceClient) GetUserInfo(ctx context.Context, in *GetUserInfoRequest, opts ...grpc.CallOption) (*GetUserInfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetUserInfoResponse) + err := c.cc.Invoke(ctx, UserService_GetUserInfo_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userServiceClient) QueryGroups(ctx context.Context, in *QueryGroupsRequest, opts ...grpc.CallOption) (*QueryGroupsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryGroupsResponse) + err := c.cc.Invoke(ctx, UserService_QueryGroups_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userServiceClient) QueryUsers(ctx context.Context, in *QueryUsersRequest, opts ...grpc.CallOption) (*QueryUsersResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryUsersResponse) + err := c.cc.Invoke(ctx, UserService_QueryUsers_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// UserServiceServer is the server API for UserService service. +// All implementations should embed UnimplementedUserServiceServer +// for forward compatibility. +// +// UserService supports querying directory data from the databroker +type UserServiceServer interface { + // GetUserInfo retrieves identity information and permission mappings for a + // user + GetUserInfo(context.Context, *GetUserInfoRequest) (*GetUserInfoResponse, error) + // QueryGroups retrieves groups from the databroker based on + // QueryGroupsRequest parameters + QueryGroups(context.Context, *QueryGroupsRequest) (*QueryGroupsResponse, error) + // QueryUsers retrieves users from the databroker based on QueryUsersRequest + // parameters + QueryUsers(context.Context, *QueryUsersRequest) (*QueryUsersResponse, error) +} + +// UnimplementedUserServiceServer should 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 UnimplementedUserServiceServer struct{} + +func (UnimplementedUserServiceServer) GetUserInfo(context.Context, *GetUserInfoRequest) (*GetUserInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetUserInfo not implemented") +} +func (UnimplementedUserServiceServer) QueryGroups(context.Context, *QueryGroupsRequest) (*QueryGroupsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryGroups not implemented") +} +func (UnimplementedUserServiceServer) QueryUsers(context.Context, *QueryUsersRequest) (*QueryUsersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryUsers not implemented") +} +func (UnimplementedUserServiceServer) testEmbeddedByValue() {} + +// UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to UserServiceServer will +// result in compilation errors. +type UnsafeUserServiceServer interface { + mustEmbedUnimplementedUserServiceServer() +} + +func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer) { + // If the following call pancis, it indicates UnimplementedUserServiceServer 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(&UserService_ServiceDesc, srv) +} + +func _UserService_GetUserInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUserInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).GetUserInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserService_GetUserInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).GetUserInfo(ctx, req.(*GetUserInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserService_QueryGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGroupsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).QueryGroups(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserService_QueryGroups_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).QueryGroups(ctx, req.(*QueryGroupsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _UserService_QueryUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryUsersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServiceServer).QueryUsers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: UserService_QueryUsers_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServiceServer).QueryUsers(ctx, req.(*QueryUsersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var UserService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pomerium.dashboard.UserService", + HandlerType: (*UserServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetUserInfo", + Handler: _UserService_GetUserInfo_Handler, + }, + { + MethodName: "QueryGroups", + Handler: _UserService_QueryGroups_Handler, + }, + { + MethodName: "QueryUsers", + Handler: _UserService_QueryUsers_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "users.proto", +} + +const ( + PomeriumServiceAccountService_AddPomeriumServiceAccount_FullMethodName = "/pomerium.dashboard.PomeriumServiceAccountService/AddPomeriumServiceAccount" + PomeriumServiceAccountService_DeletePomeriumServiceAccount_FullMethodName = "/pomerium.dashboard.PomeriumServiceAccountService/DeletePomeriumServiceAccount" + PomeriumServiceAccountService_GetPomeriumServiceAccount_FullMethodName = "/pomerium.dashboard.PomeriumServiceAccountService/GetPomeriumServiceAccount" + PomeriumServiceAccountService_ListPomeriumServiceAccounts_FullMethodName = "/pomerium.dashboard.PomeriumServiceAccountService/ListPomeriumServiceAccounts" + PomeriumServiceAccountService_SetPomeriumServiceAccount_FullMethodName = "/pomerium.dashboard.PomeriumServiceAccountService/SetPomeriumServiceAccount" +) + +// PomeriumServiceAccountServiceClient is the client API for PomeriumServiceAccountService 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. +// +// PomeriumServiceAccountService manages service accounts for use with the +// pomerium console API +type PomeriumServiceAccountServiceClient interface { + // AddPomeriumServiceAccount creates a new service account + AddPomeriumServiceAccount(ctx context.Context, in *AddPomeriumServiceAccountRequest, opts ...grpc.CallOption) (*AddPomeriumServiceAccountResponse, error) + // DeletePomeriumServiceAccount removes an existing service account + DeletePomeriumServiceAccount(ctx context.Context, in *DeletePomeriumServiceAccountRequest, opts ...grpc.CallOption) (*DeletePomeriumServiceAccountResponse, error) + // GetPomeriumServiceAccount retrieves an existing service account + GetPomeriumServiceAccount(ctx context.Context, in *GetPomeriumServiceAccountRequest, opts ...grpc.CallOption) (*GetPomeriumServiceAccountResponse, error) + // ListPomeriumServiceAccounts lists service accounts based on the parameters + // in ListPomeriumServiceAccountsRequest + ListPomeriumServiceAccounts(ctx context.Context, in *ListPomeriumServiceAccountsRequest, opts ...grpc.CallOption) (*ListPomeriumServiceAccountsResponse, error) + SetPomeriumServiceAccount(ctx context.Context, in *SetPomeriumServiceAccountRequest, opts ...grpc.CallOption) (*SetPomeriumServiceAccountResponse, error) +} + +type pomeriumServiceAccountServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewPomeriumServiceAccountServiceClient(cc grpc.ClientConnInterface) PomeriumServiceAccountServiceClient { + return &pomeriumServiceAccountServiceClient{cc} +} + +func (c *pomeriumServiceAccountServiceClient) AddPomeriumServiceAccount(ctx context.Context, in *AddPomeriumServiceAccountRequest, opts ...grpc.CallOption) (*AddPomeriumServiceAccountResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AddPomeriumServiceAccountResponse) + err := c.cc.Invoke(ctx, PomeriumServiceAccountService_AddPomeriumServiceAccount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pomeriumServiceAccountServiceClient) DeletePomeriumServiceAccount(ctx context.Context, in *DeletePomeriumServiceAccountRequest, opts ...grpc.CallOption) (*DeletePomeriumServiceAccountResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeletePomeriumServiceAccountResponse) + err := c.cc.Invoke(ctx, PomeriumServiceAccountService_DeletePomeriumServiceAccount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pomeriumServiceAccountServiceClient) GetPomeriumServiceAccount(ctx context.Context, in *GetPomeriumServiceAccountRequest, opts ...grpc.CallOption) (*GetPomeriumServiceAccountResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetPomeriumServiceAccountResponse) + err := c.cc.Invoke(ctx, PomeriumServiceAccountService_GetPomeriumServiceAccount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pomeriumServiceAccountServiceClient) ListPomeriumServiceAccounts(ctx context.Context, in *ListPomeriumServiceAccountsRequest, opts ...grpc.CallOption) (*ListPomeriumServiceAccountsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListPomeriumServiceAccountsResponse) + err := c.cc.Invoke(ctx, PomeriumServiceAccountService_ListPomeriumServiceAccounts_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pomeriumServiceAccountServiceClient) SetPomeriumServiceAccount(ctx context.Context, in *SetPomeriumServiceAccountRequest, opts ...grpc.CallOption) (*SetPomeriumServiceAccountResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SetPomeriumServiceAccountResponse) + err := c.cc.Invoke(ctx, PomeriumServiceAccountService_SetPomeriumServiceAccount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PomeriumServiceAccountServiceServer is the server API for PomeriumServiceAccountService service. +// All implementations should embed UnimplementedPomeriumServiceAccountServiceServer +// for forward compatibility. +// +// PomeriumServiceAccountService manages service accounts for use with the +// pomerium console API +type PomeriumServiceAccountServiceServer interface { + // AddPomeriumServiceAccount creates a new service account + AddPomeriumServiceAccount(context.Context, *AddPomeriumServiceAccountRequest) (*AddPomeriumServiceAccountResponse, error) + // DeletePomeriumServiceAccount removes an existing service account + DeletePomeriumServiceAccount(context.Context, *DeletePomeriumServiceAccountRequest) (*DeletePomeriumServiceAccountResponse, error) + // GetPomeriumServiceAccount retrieves an existing service account + GetPomeriumServiceAccount(context.Context, *GetPomeriumServiceAccountRequest) (*GetPomeriumServiceAccountResponse, error) + // ListPomeriumServiceAccounts lists service accounts based on the parameters + // in ListPomeriumServiceAccountsRequest + ListPomeriumServiceAccounts(context.Context, *ListPomeriumServiceAccountsRequest) (*ListPomeriumServiceAccountsResponse, error) + SetPomeriumServiceAccount(context.Context, *SetPomeriumServiceAccountRequest) (*SetPomeriumServiceAccountResponse, error) +} + +// UnimplementedPomeriumServiceAccountServiceServer should 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 UnimplementedPomeriumServiceAccountServiceServer struct{} + +func (UnimplementedPomeriumServiceAccountServiceServer) AddPomeriumServiceAccount(context.Context, *AddPomeriumServiceAccountRequest) (*AddPomeriumServiceAccountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddPomeriumServiceAccount not implemented") +} +func (UnimplementedPomeriumServiceAccountServiceServer) DeletePomeriumServiceAccount(context.Context, *DeletePomeriumServiceAccountRequest) (*DeletePomeriumServiceAccountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeletePomeriumServiceAccount not implemented") +} +func (UnimplementedPomeriumServiceAccountServiceServer) GetPomeriumServiceAccount(context.Context, *GetPomeriumServiceAccountRequest) (*GetPomeriumServiceAccountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPomeriumServiceAccount not implemented") +} +func (UnimplementedPomeriumServiceAccountServiceServer) ListPomeriumServiceAccounts(context.Context, *ListPomeriumServiceAccountsRequest) (*ListPomeriumServiceAccountsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListPomeriumServiceAccounts not implemented") +} +func (UnimplementedPomeriumServiceAccountServiceServer) SetPomeriumServiceAccount(context.Context, *SetPomeriumServiceAccountRequest) (*SetPomeriumServiceAccountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetPomeriumServiceAccount not implemented") +} +func (UnimplementedPomeriumServiceAccountServiceServer) testEmbeddedByValue() {} + +// UnsafePomeriumServiceAccountServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PomeriumServiceAccountServiceServer will +// result in compilation errors. +type UnsafePomeriumServiceAccountServiceServer interface { + mustEmbedUnimplementedPomeriumServiceAccountServiceServer() +} + +func RegisterPomeriumServiceAccountServiceServer(s grpc.ServiceRegistrar, srv PomeriumServiceAccountServiceServer) { + // If the following call pancis, it indicates UnimplementedPomeriumServiceAccountServiceServer 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(&PomeriumServiceAccountService_ServiceDesc, srv) +} + +func _PomeriumServiceAccountService_AddPomeriumServiceAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddPomeriumServiceAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PomeriumServiceAccountServiceServer).AddPomeriumServiceAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PomeriumServiceAccountService_AddPomeriumServiceAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PomeriumServiceAccountServiceServer).AddPomeriumServiceAccount(ctx, req.(*AddPomeriumServiceAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PomeriumServiceAccountService_DeletePomeriumServiceAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeletePomeriumServiceAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PomeriumServiceAccountServiceServer).DeletePomeriumServiceAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PomeriumServiceAccountService_DeletePomeriumServiceAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PomeriumServiceAccountServiceServer).DeletePomeriumServiceAccount(ctx, req.(*DeletePomeriumServiceAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PomeriumServiceAccountService_GetPomeriumServiceAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPomeriumServiceAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PomeriumServiceAccountServiceServer).GetPomeriumServiceAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PomeriumServiceAccountService_GetPomeriumServiceAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PomeriumServiceAccountServiceServer).GetPomeriumServiceAccount(ctx, req.(*GetPomeriumServiceAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PomeriumServiceAccountService_ListPomeriumServiceAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPomeriumServiceAccountsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PomeriumServiceAccountServiceServer).ListPomeriumServiceAccounts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PomeriumServiceAccountService_ListPomeriumServiceAccounts_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PomeriumServiceAccountServiceServer).ListPomeriumServiceAccounts(ctx, req.(*ListPomeriumServiceAccountsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PomeriumServiceAccountService_SetPomeriumServiceAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetPomeriumServiceAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PomeriumServiceAccountServiceServer).SetPomeriumServiceAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PomeriumServiceAccountService_SetPomeriumServiceAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PomeriumServiceAccountServiceServer).SetPomeriumServiceAccount(ctx, req.(*SetPomeriumServiceAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// PomeriumServiceAccountService_ServiceDesc is the grpc.ServiceDesc for PomeriumServiceAccountService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var PomeriumServiceAccountService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pomerium.dashboard.PomeriumServiceAccountService", + HandlerType: (*PomeriumServiceAccountServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "AddPomeriumServiceAccount", + Handler: _PomeriumServiceAccountService_AddPomeriumServiceAccount_Handler, + }, + { + MethodName: "DeletePomeriumServiceAccount", + Handler: _PomeriumServiceAccountService_DeletePomeriumServiceAccount_Handler, + }, + { + MethodName: "GetPomeriumServiceAccount", + Handler: _PomeriumServiceAccountService_GetPomeriumServiceAccount_Handler, + }, + { + MethodName: "ListPomeriumServiceAccounts", + Handler: _PomeriumServiceAccountService_ListPomeriumServiceAccounts_Handler, + }, + { + MethodName: "SetPomeriumServiceAccount", + Handler: _PomeriumServiceAccountService_SetPomeriumServiceAccount_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "users.proto", +} + +const ( + PomeriumSessionService_DeletePomeriumSession_FullMethodName = "/pomerium.dashboard.PomeriumSessionService/DeletePomeriumSession" + PomeriumSessionService_GetPomeriumSession_FullMethodName = "/pomerium.dashboard.PomeriumSessionService/GetPomeriumSession" + PomeriumSessionService_Impersonate_FullMethodName = "/pomerium.dashboard.PomeriumSessionService/Impersonate" + PomeriumSessionService_ListPomeriumSessions_FullMethodName = "/pomerium.dashboard.PomeriumSessionService/ListPomeriumSessions" +) + +// PomeriumSessionServiceClient is the client API for PomeriumSessionService 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. +// +// PomeriumSessionService manages user sessions inside the databroker +type PomeriumSessionServiceClient interface { + // DeletePomeriumSession clears an existing user session + DeletePomeriumSession(ctx context.Context, in *DeletePomeriumSessionRequest, opts ...grpc.CallOption) (*DeletePomeriumSessionResponse, error) + // GetPomeriumSession retrieves information about an existing user session + GetPomeriumSession(ctx context.Context, in *GetPomeriumSessionRequest, opts ...grpc.CallOption) (*GetPomeriumSessionResponse, error) + // Impersonate updates an existing session to impersonate another identity + Impersonate(ctx context.Context, in *ImpersonateRequest, opts ...grpc.CallOption) (*ImpersonateResponse, error) + // ListPomeriumSessions lists existing sessions based on the parameters of + // ListPomeriumSessionsRequest + ListPomeriumSessions(ctx context.Context, in *ListPomeriumSessionsRequest, opts ...grpc.CallOption) (*ListPomeriumSessionsResponse, error) +} + +type pomeriumSessionServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewPomeriumSessionServiceClient(cc grpc.ClientConnInterface) PomeriumSessionServiceClient { + return &pomeriumSessionServiceClient{cc} +} + +func (c *pomeriumSessionServiceClient) DeletePomeriumSession(ctx context.Context, in *DeletePomeriumSessionRequest, opts ...grpc.CallOption) (*DeletePomeriumSessionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(DeletePomeriumSessionResponse) + err := c.cc.Invoke(ctx, PomeriumSessionService_DeletePomeriumSession_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pomeriumSessionServiceClient) GetPomeriumSession(ctx context.Context, in *GetPomeriumSessionRequest, opts ...grpc.CallOption) (*GetPomeriumSessionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetPomeriumSessionResponse) + err := c.cc.Invoke(ctx, PomeriumSessionService_GetPomeriumSession_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pomeriumSessionServiceClient) Impersonate(ctx context.Context, in *ImpersonateRequest, opts ...grpc.CallOption) (*ImpersonateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ImpersonateResponse) + err := c.cc.Invoke(ctx, PomeriumSessionService_Impersonate_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *pomeriumSessionServiceClient) ListPomeriumSessions(ctx context.Context, in *ListPomeriumSessionsRequest, opts ...grpc.CallOption) (*ListPomeriumSessionsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListPomeriumSessionsResponse) + err := c.cc.Invoke(ctx, PomeriumSessionService_ListPomeriumSessions_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PomeriumSessionServiceServer is the server API for PomeriumSessionService service. +// All implementations should embed UnimplementedPomeriumSessionServiceServer +// for forward compatibility. +// +// PomeriumSessionService manages user sessions inside the databroker +type PomeriumSessionServiceServer interface { + // DeletePomeriumSession clears an existing user session + DeletePomeriumSession(context.Context, *DeletePomeriumSessionRequest) (*DeletePomeriumSessionResponse, error) + // GetPomeriumSession retrieves information about an existing user session + GetPomeriumSession(context.Context, *GetPomeriumSessionRequest) (*GetPomeriumSessionResponse, error) + // Impersonate updates an existing session to impersonate another identity + Impersonate(context.Context, *ImpersonateRequest) (*ImpersonateResponse, error) + // ListPomeriumSessions lists existing sessions based on the parameters of + // ListPomeriumSessionsRequest + ListPomeriumSessions(context.Context, *ListPomeriumSessionsRequest) (*ListPomeriumSessionsResponse, error) +} + +// UnimplementedPomeriumSessionServiceServer should 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 UnimplementedPomeriumSessionServiceServer struct{} + +func (UnimplementedPomeriumSessionServiceServer) DeletePomeriumSession(context.Context, *DeletePomeriumSessionRequest) (*DeletePomeriumSessionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeletePomeriumSession not implemented") +} +func (UnimplementedPomeriumSessionServiceServer) GetPomeriumSession(context.Context, *GetPomeriumSessionRequest) (*GetPomeriumSessionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPomeriumSession not implemented") +} +func (UnimplementedPomeriumSessionServiceServer) Impersonate(context.Context, *ImpersonateRequest) (*ImpersonateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Impersonate not implemented") +} +func (UnimplementedPomeriumSessionServiceServer) ListPomeriumSessions(context.Context, *ListPomeriumSessionsRequest) (*ListPomeriumSessionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListPomeriumSessions not implemented") +} +func (UnimplementedPomeriumSessionServiceServer) testEmbeddedByValue() {} + +// UnsafePomeriumSessionServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PomeriumSessionServiceServer will +// result in compilation errors. +type UnsafePomeriumSessionServiceServer interface { + mustEmbedUnimplementedPomeriumSessionServiceServer() +} + +func RegisterPomeriumSessionServiceServer(s grpc.ServiceRegistrar, srv PomeriumSessionServiceServer) { + // If the following call pancis, it indicates UnimplementedPomeriumSessionServiceServer 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(&PomeriumSessionService_ServiceDesc, srv) +} + +func _PomeriumSessionService_DeletePomeriumSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeletePomeriumSessionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PomeriumSessionServiceServer).DeletePomeriumSession(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PomeriumSessionService_DeletePomeriumSession_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PomeriumSessionServiceServer).DeletePomeriumSession(ctx, req.(*DeletePomeriumSessionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PomeriumSessionService_GetPomeriumSession_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPomeriumSessionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PomeriumSessionServiceServer).GetPomeriumSession(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PomeriumSessionService_GetPomeriumSession_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PomeriumSessionServiceServer).GetPomeriumSession(ctx, req.(*GetPomeriumSessionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PomeriumSessionService_Impersonate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ImpersonateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PomeriumSessionServiceServer).Impersonate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PomeriumSessionService_Impersonate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PomeriumSessionServiceServer).Impersonate(ctx, req.(*ImpersonateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _PomeriumSessionService_ListPomeriumSessions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPomeriumSessionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PomeriumSessionServiceServer).ListPomeriumSessions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: PomeriumSessionService_ListPomeriumSessions_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PomeriumSessionServiceServer).ListPomeriumSessions(ctx, req.(*ListPomeriumSessionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// PomeriumSessionService_ServiceDesc is the grpc.ServiceDesc for PomeriumSessionService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var PomeriumSessionService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pomerium.dashboard.PomeriumSessionService", + HandlerType: (*PomeriumSessionServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "DeletePomeriumSession", + Handler: _PomeriumSessionService_DeletePomeriumSession_Handler, + }, + { + MethodName: "GetPomeriumSession", + Handler: _PomeriumSessionService_GetPomeriumSession_Handler, + }, + { + MethodName: "Impersonate", + Handler: _PomeriumSessionService_Impersonate_Handler, + }, + { + MethodName: "ListPomeriumSessions", + Handler: _PomeriumSessionService_ListPomeriumSessions_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "users.proto", +}