diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..49ce3c19 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +/vendor \ No newline at end of file diff --git a/.gitignore b/.gitignore index c41a1cb5..bc1f2731 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,8 @@ -vendor +/vendor +/bin trigger-travis.sh +/*.tgz +/*.zip # Binaries for programs and plugins *.exe @@ -13,8 +16,7 @@ trigger-travis.sh # Output of the go coverage tool, specifically when used with LiteIDE *.out -# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 -.glide/ - # IDE-specific settings files .idea + +/protoc-gen-gorm \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 1ff0a632..3fb1008f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ services: language: go go: -- "1.10" +- "1.16" env: - DEP_VERSION="0.4.1" @@ -17,9 +17,4 @@ install: - chmod +x $GOPATH/bin/dep script: -- make gentool-test - -# Trigger build/push of latest gentool -deploy: - provider: script - script: curl -LO --retry 3 https://raw.github.com/mernst/plume-lib/master/bin/trigger-travis.sh && sh trigger-travis.sh infobloxopen atlas-gentool $TRAVIS_ACCESS_TOKEN \ No newline at end of file +- make test diff --git a/Gopkg.lock b/Gopkg.lock deleted file mode 100644 index 6b0d5dec..00000000 --- a/Gopkg.lock +++ /dev/null @@ -1,369 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - branch = "master" - digest = "1:5771b86b64a5e64d8e3d70337813686586210131ac4fb4c6a97b43c8e25e2253" - name = "github.com/dgrijalva/jwt-go" - packages = ["."] - pruneopts = "UT" - revision = "3af4c746e1c248ee8491a3e0c6f7a9cd831e95f8" - -[[projects]] - digest = "1:2cd7915ab26ede7d95b8749e6b1f933f1c6d5398030684e6505940a10f31cfda" - name = "github.com/ghodss/yaml" - packages = ["."] - pruneopts = "UT" - revision = "0ca9ea5df5451ffdf184b4428c902747c2c11cd7" - version = "v1.0.0" - -[[projects]] - digest = "1:6926fef5e923c47b28c3935cc071b8a5f53abf81bb1c66899d65a705f5220388" - name = "github.com/gogo/protobuf" - packages = [ - "gogoproto", - "plugin/compare", - "plugin/defaultcheck", - "plugin/description", - "plugin/embedcheck", - "plugin/enumstringer", - "plugin/equal", - "plugin/face", - "plugin/gostring", - "plugin/marshalto", - "plugin/oneofcheck", - "plugin/populate", - "plugin/size", - "plugin/stringer", - "plugin/testgen", - "plugin/union", - "plugin/unmarshal", - "proto", - "protoc-gen-gogo/descriptor", - "protoc-gen-gogo/generator", - "protoc-gen-gogo/grpc", - "protoc-gen-gogo/plugin", - "vanity", - "vanity/command", - ] - pruneopts = "UT" - revision = "1adfc126b41513cc696b209667c8656ea7aac67c" - version = "v1.0.0" - -[[projects]] - branch = "master" - digest = "1:1ba1d79f2810270045c328ae5d674321db34e3aae468eb4233883b473c5c0467" - name = "github.com/golang/glog" - packages = ["."] - pruneopts = "UT" - revision = "23def4e6c14b4da8ac2ed8007337bc5eb5007998" - -[[projects]] - branch = "master" - digest = "1:b7cb6054d3dff43b38ad2e92492f220f57ae6087ee797dca298139776749ace8" - name = "github.com/golang/groupcache" - packages = ["lru"] - pruneopts = "UT" - revision = "8c9f03a8e57eb486e42badaed3fb287da51807ba" - -[[projects]] - branch = "master" - digest = "1:cf870477973b86f57a66cb02b63a7e0369cbff0fca7740076da53ee15c35e6b3" - name = "github.com/golang/protobuf" - packages = [ - "jsonpb", - "proto", - "protoc-gen-go/descriptor", - "protoc-gen-go/generator", - "protoc-gen-go/generator/internal/remap", - "protoc-gen-go/plugin", - "ptypes", - "ptypes/any", - "ptypes/duration", - "ptypes/empty", - "ptypes/struct", - "ptypes/timestamp", - "ptypes/wrappers", - ] - pruneopts = "UT" - revision = "1325a051a2753cd67556b182843b1b693d0854cd" - -[[projects]] - digest = "1:b0bb74a76da952e1e576cc2a0e53835de3ce4f3c0817fa062cd07aedbed27162" - name = "github.com/grpc-ecosystem/go-grpc-middleware" - packages = [ - ".", - "auth", - "logging/logrus/ctxlogrus", - "tags", - "util/metautils", - ] - pruneopts = "UT" - revision = "c250d6563d4d4c20252cd865923440e829844f4e" - version = "v1.0.0" - -[[projects]] - digest = "1:7bd43be58eca0c23d4ad1c157a27840e4b9c1ee30b40879078c04ce5b1095fc0" - name = "github.com/grpc-ecosystem/grpc-gateway" - packages = [ - "codegenerator", - "protoc-gen-grpc-gateway/descriptor", - "protoc-gen-grpc-gateway/generator", - "protoc-gen-grpc-gateway/httprule", - "protoc-gen-swagger", - "protoc-gen-swagger/genswagger", - "protoc-gen-swagger/options", - "runtime", - "runtime/internal", - "utilities", - ] - pruneopts = "UT" - revision = "92583770e3f01b09a0d3e9bdf64321d8bebd48f2" - version = "v1.4.1" - -[[projects]] - branch = "master" - digest = "1:a2c6774679e155ae4606ea040d1b3978fe137a52f891193adfc9e003a420c4d3" - name = "github.com/infobloxopen/atlas-app-toolkit" - packages = [ - "auth", - "errors", - "gateway", - "gorm", - "gorm/resource", - "query", - "rpc/errdetails", - "rpc/errfields", - "rpc/resource", - "util", - ] - pruneopts = "UT" - revision = "534a084bf6faeb9f286df0ba98cd9ff73bbc8786" - -[[projects]] - digest = "1:6895fbe5a10c5aebd1965cac6f6905dcdb21bee01e08912d3ba6a805c2485f6a" - name = "github.com/jinzhu/gorm" - packages = [ - ".", - "dialects/postgres", - ] - pruneopts = "UT" - revision = "6ed508ec6a4ecb3531899a69cbc746ccf65a4166" - version = "v1.9.1" - -[[projects]] - branch = "master" - digest = "1:fd97437fbb6b7dce04132cf06775bd258cce305c44add58eb55ca86c6c325160" - name = "github.com/jinzhu/inflection" - packages = ["."] - pruneopts = "UT" - revision = "04140366298a54a039076d798123ffa108fff46c" - -[[projects]] - digest = "1:0a69a1c0db3591fcefb47f115b224592c8dfa4368b7ba9fae509d5e16cdc95c8" - name = "github.com/konsorten/go-windows-terminal-sequences" - packages = ["."] - pruneopts = "UT" - revision = "5c8c8bd35d3832f5d134ae1e1e375b69a4d25242" - version = "v1.0.1" - -[[projects]] - digest = "1:b18ffc558326ebaed3b4a175617f1e12ed4e3f53d6ebfe5ba372a3de16d22278" - name = "github.com/lib/pq" - packages = [ - ".", - "hstore", - "oid", - ] - pruneopts = "UT" - revision = "4ded0e9383f75c197b3a2aaa6d590ac52df6fd79" - version = "v1.0.0" - -[[projects]] - digest = "1:274f67cb6fed9588ea2521ecdac05a6d62a8c51c074c1fccc6a49a40ba80e925" - name = "github.com/satori/go.uuid" - packages = ["."] - pruneopts = "UT" - revision = "f58768cc1a7a7e77a3bd49e98cdd21419399b6a3" - version = "v1.2.0" - -[[projects]] - digest = "1:87c2e02fb01c27060ccc5ba7c5a407cc91147726f8f40b70cceeedbc52b1f3a8" - name = "github.com/sirupsen/logrus" - packages = ["."] - pruneopts = "UT" - revision = "e1e72e9de974bd926e5c56f83753fba2df402ce5" - version = "v1.3.0" - -[[projects]] - digest = "1:f8e5e0d6157eb26a86b0c1c2316b086f4738492043ace8cc6dd39c8ffd4d96ee" - name = "go.opencensus.io" - packages = [ - ".", - "internal", - "trace", - "trace/internal", - "trace/tracestate", - ] - pruneopts = "UT" - revision = "d835ff86be02193d324330acdb7d65546b05f814" - version = "v0.22.3" - -[[projects]] - branch = "master" - digest = "1:fde12c4da6237363bf36b81b59aa36a43d28061167ec4acb0d41fc49464e28b9" - name = "golang.org/x/crypto" - packages = ["ssh/terminal"] - pruneopts = "UT" - revision = "74369b46fc6756741c016591724fd1cb8e26845f" - -[[projects]] - branch = "master" - digest = "1:fc7b6b4384e1e849d99eab58eca4f8c0a76bad4699117d5077a9a5c3c83e289e" - name = "golang.org/x/net" - packages = [ - "context", - "http/httpguts", - "http2", - "http2/hpack", - "idna", - "internal/timeseries", - "trace", - ] - pruneopts = "UT" - revision = "3a22650c66bd7f4fb6d1e8072ffd7b75c8a27898" - -[[projects]] - branch = "master" - digest = "1:0d703f14f9bbbe1070ff0ce86d749dcbc9d68fb0ae554252c09bd4bb37a072e7" - name = "golang.org/x/sys" - packages = [ - "unix", - "windows", - ] - pruneopts = "UT" - revision = "983097b1a8a340cd1cc7df17d735154d89e10b1a" - -[[projects]] - digest = "1:a2ab62866c75542dd18d2b069fec854577a20211d7c0ea6ae746072a1dccdd18" - name = "golang.org/x/text" - packages = [ - "collate", - "collate/build", - "internal/colltab", - "internal/gen", - "internal/tag", - "internal/triegen", - "internal/ucd", - "language", - "secure/bidirule", - "transform", - "unicode/bidi", - "unicode/cldr", - "unicode/norm", - "unicode/rangetable", - ] - pruneopts = "UT" - revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0" - version = "v0.3.0" - -[[projects]] - branch = "master" - digest = "1:9109b88b4156765a10ea3583857f187ffbea70d1068f3ab5dcd33a4c0fa152ce" - name = "google.golang.org/genproto" - packages = [ - "googleapis/api/annotations", - "googleapis/rpc/code", - "googleapis/rpc/status", - "protobuf/field_mask", - ] - pruneopts = "UT" - revision = "e92b116572682a5b432ddd840aeaba2a559eeff1" - -[[projects]] - digest = "1:de21a2d5b9c8697d83f5ab48f3e8fe3616c33ac4b2d057083662dede0e81488e" - name = "google.golang.org/grpc" - packages = [ - ".", - "attributes", - "backoff", - "balancer", - "balancer/base", - "balancer/roundrobin", - "binarylog/grpc_binarylog_v1", - "codes", - "connectivity", - "credentials", - "credentials/internal", - "encoding", - "encoding/proto", - "grpclog", - "internal", - "internal/backoff", - "internal/balancerload", - "internal/binarylog", - "internal/buffer", - "internal/channelz", - "internal/envconfig", - "internal/grpcrand", - "internal/grpcsync", - "internal/resolver/dns", - "internal/resolver/passthrough", - "internal/syscall", - "internal/transport", - "keepalive", - "metadata", - "naming", - "peer", - "resolver", - "serviceconfig", - "stats", - "status", - "tap", - ] - pruneopts = "UT" - revision = "f495f5b15ae7ccda3b38c53a1bfcde4c1a58a2bc" - version = "v1.27.1" - -[[projects]] - digest = "1:342378ac4dcb378a5448dd723f0784ae519383532f5e70ade24132c4c8693202" - name = "gopkg.in/yaml.v2" - packages = ["."] - pruneopts = "UT" - revision = "5420a8b6744d3b0345ab293f6fcba19c978f1183" - version = "v2.2.1" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - input-imports = [ - "github.com/gogo/protobuf/proto", - "github.com/gogo/protobuf/protoc-gen-gogo/descriptor", - "github.com/gogo/protobuf/protoc-gen-gogo/generator", - "github.com/gogo/protobuf/protoc-gen-gogo/plugin", - "github.com/gogo/protobuf/vanity/command", - "github.com/golang/protobuf/jsonpb", - "github.com/golang/protobuf/proto", - "github.com/golang/protobuf/ptypes", - "github.com/golang/protobuf/ptypes/empty", - "github.com/golang/protobuf/ptypes/timestamp", - "github.com/golang/protobuf/ptypes/wrappers", - "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger", - "github.com/infobloxopen/atlas-app-toolkit/auth", - "github.com/infobloxopen/atlas-app-toolkit/gateway", - "github.com/infobloxopen/atlas-app-toolkit/gorm", - "github.com/infobloxopen/atlas-app-toolkit/gorm/resource", - "github.com/infobloxopen/atlas-app-toolkit/query", - "github.com/infobloxopen/atlas-app-toolkit/rpc/resource", - "github.com/jinzhu/gorm", - "github.com/jinzhu/gorm/dialects/postgres", - "github.com/jinzhu/inflection", - "github.com/lib/pq", - "github.com/satori/go.uuid", - "go.opencensus.io/trace", - "golang.org/x/net/context", - "google.golang.org/genproto/protobuf/field_mask", - "google.golang.org/grpc", - ] - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml deleted file mode 100644 index 81d706c6..00000000 --- a/Gopkg.toml +++ /dev/null @@ -1,37 +0,0 @@ -required = ["github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger"] - -[[constraint]] - name = "github.com/infobloxopen/atlas-app-toolkit" - branch = "master" - -[[constraint]] - name = "github.com/gogo/protobuf" - version = "1.0.0" - -[[constraint]] - name = "github.com/grpc-ecosystem/grpc-gateway" - version = "1.4.1" - -[[constraint]] - name = "github.com/jinzhu/gorm" - version = "1.9.1" - -[[constraint]] - branch = "master" - name = "github.com/jinzhu/inflection" - -[[constraint]] - branch = "master" - name = "golang.org/x/net" - -[[constraint]] - branch = "master" - name = "google.golang.org/genproto" - -[[constraint]] - name = "google.golang.org/grpc" - version = "1.10.0" - -[prune] - go-tests = true - unused-packages = true diff --git a/Makefile b/Makefile index 5ccf3735..c6563db8 100644 --- a/Makefile +++ b/Makefile @@ -1,101 +1,54 @@ +include Makefile.buf + +GENTOOL_IMAGE := infoblox/atlas-gentool:dev-gengorm + GOPATH ?= $(HOME)/go SRCPATH := $(patsubst %/,%,$(GOPATH))/src PROJECT_ROOT := github.com/infobloxopen/protoc-gen-gorm -DOCKERFILE_PATH := $(CURDIR)/docker -IMAGE_REGISTRY ?= infoblox -IMAGE_VERSION ?= dev-gengorm - -# configuration for the protobuf gentool -SRCROOT_ON_HOST := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST)))) -SRCROOT_IN_CONTAINER := /go/src/$(PROJECT_ROOT) -DOCKERPATH := /go/src -DOCKER_RUNNER := docker run --rm -DOCKER_RUNNER += -v $(SRCROOT_ON_HOST):$(SRCROOT_IN_CONTAINER) -DOCKER_GENERATOR := infoblox/atlas-gentool:dev-gengorm -GENERATOR := $(DOCKER_RUNNER) $(DOCKER_GENERATOR) +lint: $(BUF) + buf lint -GENGORM_IMAGE := $(IMAGE_REGISTRY)/atlas-gentool -GENGORM_DOCKERFILE := $(DOCKERFILE_PATH)/Dockerfile +build: $(BUF) + buf build -.PHONY: default -default: vendor install - -.PHONY: vendor -vendor: - @dep ensure -vendor-only - -.PHONY: vendor-update -vendor-update: - @dep ensure +test: lint build + go test -v ./... -.PHONY: options -options: - protoc -I. -I$(SRCPATH) -I./vendor \ - --gogo_out="Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:$(SRCPATH)" \ - options/gorm.proto +generate: options/gorm.pb.go example/user/*.pb.go example/postgres_arrays/*.pb.go example/feature_demo/*.pb.go -.PHONY: types -types: - protoc --go_out=$(SRCPATH) types/types.proto +options/gorm.pb.go: proto/options/gorm.proto + buf generate --template proto/options/buf.gen.yaml --path proto/options -.PHONY: install -install: - go install +# TODO: gorm files are not being built by buf generate yet, use docker for now -.PHONY: example -example: default - protoc -I. -I$(SRCPATH) -I./vendor -I./vendor/github.com/grpc-ecosystem/grpc-gateway \ - --go_out="plugins=grpc:$(SRCPATH)" --gorm_out="engine=postgres,enums=string,gateway:$(SRCPATH)" \ - example/feature_demo/demo_multi_file.proto \ - example/feature_demo/demo_types.proto \ - example/feature_demo/demo_service.proto \ - example/feature_demo/demo_multi_file_service.proto +example/feature_demo/*.pb.go: example/feature_demo/*.proto + buf generate --template example/feature_demo/buf.gen.yaml --path example/feature_demo - protoc -I. -I$(SRCPATH) -I./vendor -I./vendor -I./vendor/github.com/grpc-ecosystem/grpc-gateway \ - --go_out="plugins=grpc:$(SRCPATH)" --gorm_out="$(SRCPATH)" \ - example/user/user.proto +example/user/*.pb.go: example/user/*.proto + buf generate --template example/user/buf.gen.yaml --path example/user -.PHONY: run-tests -run-tests: - go test -v ./... - go build ./example/user - go build ./example/feature_demo +example/postgres_arrays/*.pb.go: example/postgres_arrays/*.proto + buf generate --template example/postgres_arrays/buf.gen.yaml --path example/postgres_arrays -.PHONY: test -test: example run-tests -.PHONY: gentool -gentool: vendor - @docker build -f $(GENGORM_DOCKERFILE) -t $(GENGORM_IMAGE):$(IMAGE_VERSION) . - @docker tag $(GENGORM_IMAGE):$(IMAGE_VERSION) $(GENGORM_IMAGE):latest - @docker image prune -f --filter label=stage=server-intermediate +gentool: + docker build -f docker/Dockerfile -t $(GENTOOL_IMAGE) . + docker image prune -f --filter label=stage=server-intermediate -.PHONY: gentool-example -gentool-example: gentool - @$(GENERATOR) \ +generate-gentool: SRCROOT_ON_HOST := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST)))) +generate-gentool: SRCROOT_IN_CONTAINER := /go/src/$(PROJECT_ROOT) +generate-gentool: DOCKER_RUNNER := docker run --rm +generate-gentool: DOCKER_RUNNER += -v $(SRCROOT_ON_HOST):$(SRCROOT_IN_CONTAINER) +generate-gentool: DOCKER_GENERATOR := infoblox/atlas-gentool:dev-gengorm +generate-gentool: GENERATOR := $(DOCKER_RUNNER) $(DOCKER_GENERATOR) +generate-gentool: #gentool + $(DOCKER_RUNNER) \ + $(GENTOOL_IMAGE) \ --go_out="plugins=grpc:$(DOCKERPATH)" \ --gorm_out="engine=postgres,enums=string,gateway:$(DOCKERPATH)" \ - example/feature_demo/demo_multi_file.proto \ - example/feature_demo/demo_types.proto \ - example/feature_demo/demo_service.proto \ - example/feature_demo/demo_multi_file_service.proto - - @$(GENERATOR) \ - --go_out="plugins=grpc:$(DOCKERPATH)" \ - --gorm_out="$(DOCKERPATH)" \ - example/user/user.proto - -.PHONY: gentool-test -gentool-test: gentool-example run-tests - -.PHONY: gentool-types -gentool-types: - @$(GENERATOR) --go_out=$(DOCKERPATH) types/types.proto - -.PHONY: gentool-options -gentool-options: - @$(GENERATOR) \ - --gogo_out="Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:$(DOCKERPATH)" \ - options/gorm.proto + feature_demo/demo_multi_file.proto \ + feature_demo/demo_types.proto \ + feature_demo/demo_service.proto \ + feature_demo/demo_multi_file_service.proto diff --git a/Makefile.buf b/Makefile.buf new file mode 100644 index 00000000..dd695aab --- /dev/null +++ b/Makefile.buf @@ -0,0 +1,120 @@ +# https://raw.githubusercontent.com/bufbuild/buf-example/master/Makefile +SHELL := /usr/bin/env bash -o pipefail + +# This controls the location of the cache. +PROJECT := buf-example +# This controls the remote HTTPS git location to compare against for breaking changes in CI. +# +# Most CI providers only clone the branch under test and to a certain depth, so when +# running buf breaking in CI, it is generally preferable to compare against +# the remote repository directly. +# +# Basic authentication is available, see https://buf.build/docs/inputs#https for more details. +HTTPS_GIT := https://github.com/bufbuild/buf-example.git +# This controls the remote SSH git location to compare against for breaking changes in CI. +# +# CI providers will typically have an SSH key installed as part of your setup for both +# public and private repositories. Buf knows how to look for an SSH key at ~/.ssh/id_rsa +# and a known hosts file at ~/.ssh/known_hosts or /etc/ssh/known_hosts without any further +# configuration. We demo this with CircleCI. +# +# See https://buf.build/docs/inputs#ssh for more details. +SSH_GIT := ssh://git@github.com/bufbuild/buf-example.git +# This controls the version of buf to install and use. +BUF_VERSION := 0.43.2 +# If true, Buf is installed from source instead of from releases +BUF_INSTALL_FROM_SOURCE := false + +### Everything below this line is meant to be static, i.e. only adjust the above variables. ### + +UNAME_OS := $(shell uname -s) +UNAME_ARCH := $(shell uname -m) +# Buf will be cached to ~/.cache/buf-example. +CACHE_BASE := $(HOME)/.cache/$(PROJECT) +# This allows switching between i.e a Docker container and your local setup without overwriting. +CACHE := $(CACHE_BASE)/$(UNAME_OS)/$(UNAME_ARCH) +# The location where buf will be installed. +CACHE_BIN := $(CACHE)/bin +# Marker files are put into this directory to denote the current version of binaries that are installed. +CACHE_VERSIONS := $(CACHE)/versions + +# Update the $PATH so we can use buf directly +export PATH := $(abspath $(CACHE_BIN)):$(PATH) +# Update GOBIN to point to CACHE_BIN for source installations +export GOBIN := $(abspath $(CACHE_BIN)) +# This is needed to allow versions to be added to Golang modules with go get +export GO111MODULE := on + +# BUF points to the marker file for the installed version. +# +# If BUF_VERSION is changed, the binary will be re-downloaded. +BUF := $(CACHE_VERSIONS)/buf/$(BUF_VERSION) +$(BUF): + @rm -f $(CACHE_BIN)/buf + @mkdir -p $(CACHE_BIN) +ifeq ($(BUF_INSTALL_FROM_SOURCE),true) + $(eval BUF_TMP := $(shell mktemp -d)) + cd $(BUF_TMP); go get github.com/bufbuild/buf/cmd/buf@$(BUF_VERSION) + @rm -rf $(BUF_TMP) +else + curl -sSL \ + "https://github.com/bufbuild/buf/releases/download/v$(BUF_VERSION)/buf-$(UNAME_OS)-$(UNAME_ARCH)" \ + -o "$(CACHE_BIN)/buf" + chmod +x "$(CACHE_BIN)/buf" +endif + @rm -rf $(dir $(BUF)) + @mkdir -p $(dir $(BUF)) + @touch $(BUF) + +.DEFAULT_GOAL := local + +# deps allows us to install deps without running any checks. + +.PHONY: deps +deps: $(BUF) + +# local is what we run when testing locally. +# This does breaking change detection against our local git repository. + +.PHONY: local +local: $(BUF) + buf lint + buf breaking --against '.git#branch=master' + +# https is what we run when testing in most CI providers. +# This does breaking change detection against our remote HTTPS git repository. + +.PHONY: https +https: $(BUF) + buf lint + buf breaking --against "$(HTTPS_GIT)#branch=master" + +# ssh is what we run when testing in CI providers that provide ssh public key authentication. +# This does breaking change detection against our remote HTTPS ssh repository. +# This is especially useful for private repositories. + +.PHONY: ssh +ssh: $(BUF) + buf lint + buf breaking --against "$(SSH_GIT)#branch=master" + +# clean deletes any files not checked in and the cache for all platforms. + +.PHONY: clean +clean: + git clean -xdf + rm -rf $(CACHE_BASE) + +# For updating this repository + +.PHONY: updateversion +updateversion: +ifndef VERSION + $(error "VERSION must be set") +else +ifeq ($(UNAME_OS),Darwin) + sed -i '' "s/BUF_VERSION := [0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/BUF_VERSION := $(VERSION)/g" Makefile +else + sed -i "s/BUF_VERSION := [0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/BUF_VERSION := $(VERSION)/g" Makefile +endif +endif diff --git a/buf.yaml b/buf.yaml new file mode 100644 index 00000000..c8ed8492 --- /dev/null +++ b/buf.yaml @@ -0,0 +1,34 @@ +# https://docs.buf.build/lint-usage/ +version: v1beta1 +name: infoblox.com/infobloxopen/protoc-gen-gorm +build: + roots: + - proto + - third_party/proto + - example/ +lint: + use: + - DEFAULT + ignore: + - feature_demo + - github.com/infobloxopen + - github.com/grpc-ecosystem + - protoc-gen-openapiv2 + - github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options/openapiv2.proto + - google + - github.com/gogo + ignore_only: + PACKAGE_DIRECTORY_MATCH: + - options + - postgres_arrays + - types + PACKAGE_VERSION_SUFFIX: + - options + - postgres_arrays + - types + - user + - google/api/annotations.proto + - google/api/http.proto +breaking: + use: + - FILE diff --git a/docker/Dockerfile b/docker/Dockerfile index 832bacd4..b0ed45c3 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.10.0 AS builder +FROM golang:1.16.5 AS builder LABEL stage=server-intermediate @@ -9,7 +9,25 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o /out/usr/bin/protoc-gen-gorm main.go FROM infoblox/atlas-gentool:v19.1 AS runner COPY --from=builder /out/usr/bin/protoc-gen-gorm /usr/bin/protoc-gen-gorm -COPY --from=builder /go/src/github.com/infobloxopen/protoc-gen-gorm/options/*.proto /go/src/github.com/infobloxopen/protoc-gen-gorm/options -COPY --from=builder /go/src/github.com/infobloxopen/protoc-gen-gorm/types/*.proto /go/src/github.com/infobloxopen/protoc-gen-gorm/types +COPY --from=builder /go/src/github.com/infobloxopen/protoc-gen-gorm/proto /go/src/github.com/infobloxopen/protoc-gen-gorm/proto +COPY --from=builder /go/src/github.com/infobloxopen/protoc-gen-gorm/third_party /go/src/github.com/infobloxopen/protoc-gen-gorm/third_party WORKDIR /go/src +ENTRYPOINT ["protoc", \ + # required import paths for protoc-gen-swagger plugin + "-Igithub.com/grpc-ecosystem/grpc-gateway", "-Igithub.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options", \ + # required import paths for go-proto-validators plugin + "-Igithub.com/mwitkow/go-proto-validators", \ + # googleapis proto files + "-Igithub.com/googleapis/googleapis", \ + # required import paths for protoc-gen-gorm plugin + "-Igithub.com/infobloxopen/protoc-gen-gorm/example", \ + "-Igithub.com/infobloxopen/protoc-gen-gorm/proto", \ + "-Igithub.com/infobloxopen/protoc-gen-gorm/third_party/proto", \ + # required import paths for protoc-gen-atlas-query-validate plugin + "-Igithub.com/infobloxopen/protoc-gen-atlas-query-validate", \ + # required import paths for protoc-gen-preprocess plugin + "-Igithub.com/infobloxopen/protoc-gen-preprocess", \ + # required import paths for protoc-gen-atlas-validate plugin + "-Igithub.com/infobloxopen/protoc-gen-atlas-validate" \ +] diff --git a/example/feature_demo/buf.gen.yaml b/example/feature_demo/buf.gen.yaml new file mode 100644 index 00000000..a9fffcf5 --- /dev/null +++ b/example/feature_demo/buf.gen.yaml @@ -0,0 +1,15 @@ +version: v1beta1 +plugins: + - name: go + out: example + opt: + - paths=source_relative + - Mgoogle/protobuf/timestamp.proto=github.com/golang/protobuf/ptypes/timestamp + - name: go-grpc + out: example + opt: paths=source_relative + - name: gorm + out: example + opt: + - engine=postgres,enums=string,gateway + - Mgoogle/protobuf/timestamp.proto=github.com/golang/protobuf/ptypes/timestamp diff --git a/example/feature_demo/demo_multi_file.pb.go b/example/feature_demo/demo_multi_file.pb.go index 489ecfde..942c5120 100644 --- a/example/feature_demo/demo_multi_file.pb.go +++ b/example/feature_demo/demo_multi_file.pb.go @@ -1,142 +1,235 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: example/feature_demo/demo_multi_file.proto - -/* -Package example is a generated protocol buffer package. - -It is generated from these files: - example/feature_demo/demo_multi_file.proto - example/feature_demo/demo_types.proto - example/feature_demo/demo_service.proto - example/feature_demo/demo_multi_file_service.proto - -It has these top-level messages: - ExternalChild - BlogPost - TestTypes - TypeWithID - MultiaccountTypeWithID - MultiaccountTypeWithoutID - APIOnlyType - PrimaryUUIDType - PrimaryStringType - TestTag - TestAssocHandlerDefault - TestAssocHandlerReplace - TestAssocHandlerClear - TestAssocHandlerAppend - TestTagAssociation - PrimaryIncluded - IntPoint - CreateIntPointRequest - CreateIntPointResponse - ReadIntPointRequest - ReadIntPointResponse - UpdateIntPointRequest - UpdateIntPointResponse - UpdateSetIntPointRequest - UpdateSetIntPointResponse - DeleteIntPointRequest - DeleteIntPointsRequest - DeleteIntPointResponse - ListIntPointResponse - ListSomethingResponse - Something - ListIntPointRequest - Circle - ListCircleRequest - ListCircleResponse - ReadAccountRequest - ReadBlogPostsResponse -*/ +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.17.1 +// source: feature_demo/demo_multi_file.proto + package example -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/infobloxopen/protoc-gen-gorm/options" +import ( + proto "github.com/golang/protobuf/proto" + _ "github.com/infobloxopen/protoc-gen-gorm/options" + 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) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +type ExternalChild struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} -type ExternalChild struct { - Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` +func (x *ExternalChild) Reset() { + *x = ExternalChild{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_multi_file_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ExternalChild) Reset() { *m = ExternalChild{} } -func (m *ExternalChild) String() string { return proto.CompactTextString(m) } -func (*ExternalChild) ProtoMessage() {} -func (*ExternalChild) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (x *ExternalChild) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExternalChild) ProtoMessage() {} -func (m *ExternalChild) GetId() string { - if m != nil { - return m.Id +func (x *ExternalChild) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_multi_file_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 ExternalChild.ProtoReflect.Descriptor instead. +func (*ExternalChild) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_multi_file_proto_rawDescGZIP(), []int{0} +} + +func (x *ExternalChild) GetId() string { + if x != nil { + return x.Id } return "" } type BlogPost struct { - Id uint64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` - Title string `protobuf:"bytes,2,opt,name=title" json:"title,omitempty"` - Author string `protobuf:"bytes,3,opt,name=author" json:"author,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + Author string `protobuf:"bytes,3,opt,name=author,proto3" json:"author,omitempty"` } -func (m *BlogPost) Reset() { *m = BlogPost{} } -func (m *BlogPost) String() string { return proto.CompactTextString(m) } -func (*BlogPost) ProtoMessage() {} -func (*BlogPost) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +func (x *BlogPost) Reset() { + *x = BlogPost{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_multi_file_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlogPost) String() string { + return protoimpl.X.MessageStringOf(x) +} -func (m *BlogPost) GetId() uint64 { - if m != nil { - return m.Id +func (*BlogPost) ProtoMessage() {} + +func (x *BlogPost) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_multi_file_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 BlogPost.ProtoReflect.Descriptor instead. +func (*BlogPost) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_multi_file_proto_rawDescGZIP(), []int{1} +} + +func (x *BlogPost) GetId() uint64 { + if x != nil { + return x.Id } return 0 } -func (m *BlogPost) GetTitle() string { - if m != nil { - return m.Title +func (x *BlogPost) GetTitle() string { + if x != nil { + return x.Title } return "" } -func (m *BlogPost) GetAuthor() string { - if m != nil { - return m.Author +func (x *BlogPost) GetAuthor() string { + if x != nil { + return x.Author } return "" } -func init() { - proto.RegisterType((*ExternalChild)(nil), "example.ExternalChild") - proto.RegisterType((*BlogPost)(nil), "example.BlogPost") -} - -func init() { proto.RegisterFile("example/feature_demo/demo_multi_file.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 227 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0x3d, 0x4b, 0xc4, 0x40, - 0x10, 0x86, 0x49, 0xd4, 0x78, 0x2e, 0x68, 0x11, 0x44, 0xa2, 0x95, 0x5c, 0xa3, 0x08, 0x77, 0x5b, - 0xd8, 0x9d, 0xdd, 0xf9, 0x51, 0x1f, 0x96, 0x36, 0x21, 0xb9, 0x4c, 0x92, 0x81, 0xd9, 0x9d, 0x65, - 0x6f, 0x16, 0xf2, 0xd7, 0xf4, 0xd7, 0x49, 0x36, 0x11, 0x2c, 0x2c, 0x6c, 0x06, 0x9e, 0x97, 0x67, - 0x5e, 0x86, 0x51, 0x0f, 0x30, 0x54, 0xc6, 0x11, 0xe8, 0x16, 0x2a, 0x09, 0x1e, 0xca, 0x06, 0x0c, - 0xeb, 0x71, 0x94, 0x26, 0x90, 0x60, 0xd9, 0x22, 0xc1, 0xda, 0x79, 0x16, 0xce, 0x4f, 0x67, 0xf7, - 0x66, 0xd3, 0xa1, 0xf4, 0xa1, 0x5e, 0xef, 0xd9, 0x68, 0xb4, 0x2d, 0xd7, 0xc4, 0x03, 0x3b, 0xb0, - 0x3a, 0x7a, 0xfb, 0x55, 0x07, 0x76, 0xd5, 0xb1, 0x37, 0x9a, 0x9d, 0x20, 0xdb, 0x83, 0x1e, 0x61, - 0x2a, 0x59, 0xde, 0xa9, 0xf3, 0xd7, 0x41, 0xc0, 0xdb, 0x8a, 0x9e, 0x7b, 0xa4, 0x26, 0xbf, 0x50, - 0x29, 0x36, 0x45, 0x72, 0x9b, 0xdc, 0x9f, 0xbd, 0xa7, 0xd8, 0x6c, 0xb2, 0xaf, 0xcf, 0xeb, 0x74, - 0x91, 0x2c, 0x77, 0x6a, 0xb1, 0x25, 0xee, 0x76, 0x7c, 0x90, 0x5f, 0xce, 0xf1, 0xe8, 0xe4, 0x97, - 0xea, 0x44, 0x50, 0x08, 0x8a, 0x34, 0xae, 0x4d, 0x90, 0x5f, 0xa9, 0xac, 0x0a, 0xd2, 0xb3, 0x2f, - 0x8e, 0x62, 0x3c, 0xd3, 0x4f, 0xe3, 0xf6, 0xed, 0xe3, 0xe5, 0xbf, 0x87, 0xff, 0xf5, 0x95, 0xa7, - 0x39, 0xac, 0xb3, 0x68, 0x3f, 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0x2e, 0xfc, 0x16, 0x3a, 0x3c, - 0x01, 0x00, 0x00, +var File_feature_demo_demo_multi_file_proto protoreflect.FileDescriptor + +var file_feature_demo_demo_multi_file_proto_rawDesc = []byte{ + 0x0a, 0x22, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x65, 0x6d, 0x6f, 0x2f, 0x64, + 0x65, 0x6d, 0x6f, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x1a, 0x12, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x67, 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x27, 0x0a, 0x0d, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x3a, 0x06, 0xba, 0xb9, 0x19, 0x02, 0x08, 0x01, 0x22, 0x50, 0x0a, 0x08, 0x42, 0x6c, + 0x6f, 0x67, 0x50, 0x6f, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x3a, 0x06, 0xba, 0xb9, 0x19, 0x02, 0x08, 0x01, 0x42, 0x46, 0x5a, 0x44, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x62, + 0x6c, 0x6f, 0x78, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, + 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x72, 0x6d, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, + 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x65, 0x6d, 0x6f, 0x3b, 0x65, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_feature_demo_demo_multi_file_proto_rawDescOnce sync.Once + file_feature_demo_demo_multi_file_proto_rawDescData = file_feature_demo_demo_multi_file_proto_rawDesc +) + +func file_feature_demo_demo_multi_file_proto_rawDescGZIP() []byte { + file_feature_demo_demo_multi_file_proto_rawDescOnce.Do(func() { + file_feature_demo_demo_multi_file_proto_rawDescData = protoimpl.X.CompressGZIP(file_feature_demo_demo_multi_file_proto_rawDescData) + }) + return file_feature_demo_demo_multi_file_proto_rawDescData +} + +var file_feature_demo_demo_multi_file_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_feature_demo_demo_multi_file_proto_goTypes = []interface{}{ + (*ExternalChild)(nil), // 0: example.ExternalChild + (*BlogPost)(nil), // 1: example.BlogPost +} +var file_feature_demo_demo_multi_file_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_feature_demo_demo_multi_file_proto_init() } +func file_feature_demo_demo_multi_file_proto_init() { + if File_feature_demo_demo_multi_file_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_feature_demo_demo_multi_file_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExternalChild); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_multi_file_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlogPost); 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{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_feature_demo_demo_multi_file_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_feature_demo_demo_multi_file_proto_goTypes, + DependencyIndexes: file_feature_demo_demo_multi_file_proto_depIdxs, + MessageInfos: file_feature_demo_demo_multi_file_proto_msgTypes, + }.Build() + File_feature_demo_demo_multi_file_proto = out.File + file_feature_demo_demo_multi_file_proto_rawDesc = nil + file_feature_demo_demo_multi_file_proto_goTypes = nil + file_feature_demo_demo_multi_file_proto_depIdxs = nil } diff --git a/example/feature_demo/demo_multi_file.proto b/example/feature_demo/demo_multi_file.proto index 2cff806e..4553f88a 100644 --- a/example/feature_demo/demo_multi_file.proto +++ b/example/feature_demo/demo_multi_file.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package example; -import "github.com/infobloxopen/protoc-gen-gorm/options/gorm.proto"; +import "options/gorm.proto"; option go_package = "github.com/infobloxopen/protoc-gen-gorm/example/feature_demo;example"; diff --git a/example/feature_demo/demo_multi_file_service.pb.go b/example/feature_demo/demo_multi_file_service.pb.go index 17d25f88..699880ac 100644 --- a/example/feature_demo/demo_multi_file_service.pb.go +++ b/example/feature_demo/demo_multi_file_service.pb.go @@ -1,165 +1,250 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: example/feature_demo/demo_multi_file_service.proto +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.17.1 +// source: feature_demo/demo_multi_file_service.proto package example -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/infobloxopen/protoc-gen-gorm/options" -import infoblox_api "github.com/infobloxopen/atlas-app-toolkit/query" - import ( - context "golang.org/x/net/context" - grpc "google.golang.org/grpc" + proto "github.com/golang/protobuf/proto" + query "github.com/infobloxopen/atlas-app-toolkit/query" + _ "github.com/infobloxopen/protoc-gen-gorm/options" + 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) ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 type ReadAccountRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // For a read request, the id field is the only to be specified - Id uint64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` - Fields *infoblox_api.FieldSelection `protobuf:"bytes,2,opt,name=fields" json:"fields,omitempty"` + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Fields *query.FieldSelection `protobuf:"bytes,2,opt,name=fields,proto3" json:"fields,omitempty"` } -func (m *ReadAccountRequest) Reset() { *m = ReadAccountRequest{} } -func (m *ReadAccountRequest) String() string { return proto.CompactTextString(m) } -func (*ReadAccountRequest) ProtoMessage() {} -func (*ReadAccountRequest) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} } - -func (m *ReadAccountRequest) GetId() uint64 { - if m != nil { - return m.Id +func (x *ReadAccountRequest) Reset() { + *x = ReadAccountRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_multi_file_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -func (m *ReadAccountRequest) GetFields() *infoblox_api.FieldSelection { - if m != nil { - return m.Fields +func (x *ReadAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadAccountRequest) ProtoMessage() {} + +func (x *ReadAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_multi_file_service_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 nil + return mi.MessageOf(x) } -type ReadBlogPostsResponse struct { - Posts []*BlogPost `protobuf:"bytes,1,rep,name=posts" json:"posts,omitempty"` +// Deprecated: Use ReadAccountRequest.ProtoReflect.Descriptor instead. +func (*ReadAccountRequest) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_multi_file_service_proto_rawDescGZIP(), []int{0} } -func (m *ReadBlogPostsResponse) Reset() { *m = ReadBlogPostsResponse{} } -func (m *ReadBlogPostsResponse) String() string { return proto.CompactTextString(m) } -func (*ReadBlogPostsResponse) ProtoMessage() {} -func (*ReadBlogPostsResponse) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{1} } +func (x *ReadAccountRequest) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} -func (m *ReadBlogPostsResponse) GetPosts() []*BlogPost { - if m != nil { - return m.Posts +func (x *ReadAccountRequest) GetFields() *query.FieldSelection { + if x != nil { + return x.Fields } return nil } -func init() { - proto.RegisterType((*ReadAccountRequest)(nil), "example.ReadAccountRequest") - proto.RegisterType((*ReadBlogPostsResponse)(nil), "example.ReadBlogPostsResponse") +type ReadBlogPostsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Posts []*BlogPost `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` } -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn +func (x *ReadBlogPostsResponse) Reset() { + *x = ReadBlogPostsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_multi_file_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} -// 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.SupportPackageIsVersion4 +func (x *ReadBlogPostsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} -// Client API for BlogPostService service +func (*ReadBlogPostsResponse) ProtoMessage() {} -type BlogPostServiceClient interface { - Read(ctx context.Context, in *ReadAccountRequest, opts ...grpc.CallOption) (*ReadBlogPostsResponse, error) +func (x *ReadBlogPostsResponse) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_multi_file_service_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) } -type blogPostServiceClient struct { - cc *grpc.ClientConn +// Deprecated: Use ReadBlogPostsResponse.ProtoReflect.Descriptor instead. +func (*ReadBlogPostsResponse) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_multi_file_service_proto_rawDescGZIP(), []int{1} } -func NewBlogPostServiceClient(cc *grpc.ClientConn) BlogPostServiceClient { - return &blogPostServiceClient{cc} +func (x *ReadBlogPostsResponse) GetPosts() []*BlogPost { + if x != nil { + return x.Posts + } + return nil } -func (c *blogPostServiceClient) Read(ctx context.Context, in *ReadAccountRequest, opts ...grpc.CallOption) (*ReadBlogPostsResponse, error) { - out := new(ReadBlogPostsResponse) - err := grpc.Invoke(ctx, "/example.BlogPostService/Read", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil +var File_feature_demo_demo_multi_file_service_proto protoreflect.FileDescriptor + +var file_feature_demo_demo_multi_file_service_proto_rawDesc = []byte{ + 0x0a, 0x2a, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x65, 0x6d, 0x6f, 0x2f, 0x64, + 0x65, 0x6d, 0x6f, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x65, 0x78, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x1a, 0x12, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x67, + 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x61, 0x74, 0x6c, 0x61, 0x73, + 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x65, + 0x6d, 0x6f, 0x2f, 0x64, 0x65, 0x6d, 0x6f, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x66, 0x69, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5c, 0x0a, 0x12, 0x52, 0x65, 0x61, 0x64, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x36, + 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x61, 0x74, 0x6c, 0x61, 0x73, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x22, 0x40, 0x0a, 0x15, 0x52, 0x65, 0x61, 0x64, 0x42, 0x6c, + 0x6f, 0x67, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x27, 0x0a, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x42, 0x6c, 0x6f, 0x67, 0x50, 0x6f, 0x73, + 0x74, 0x52, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x32, 0x5e, 0x0a, 0x0f, 0x42, 0x6c, 0x6f, 0x67, + 0x50, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x04, 0x52, + 0x65, 0x61, 0x64, 0x12, 0x1b, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x52, 0x65, + 0x61, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1e, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x42, + 0x6c, 0x6f, 0x67, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x1a, 0x06, 0xba, 0xb9, 0x19, 0x02, 0x08, 0x01, 0x42, 0x46, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x6f, + 0x70, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x67, + 0x6f, 0x72, 0x6d, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x5f, 0x64, 0x65, 0x6d, 0x6f, 0x3b, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } -// Server API for BlogPostService service +var ( + file_feature_demo_demo_multi_file_service_proto_rawDescOnce sync.Once + file_feature_demo_demo_multi_file_service_proto_rawDescData = file_feature_demo_demo_multi_file_service_proto_rawDesc +) -type BlogPostServiceServer interface { - Read(context.Context, *ReadAccountRequest) (*ReadBlogPostsResponse, error) +func file_feature_demo_demo_multi_file_service_proto_rawDescGZIP() []byte { + file_feature_demo_demo_multi_file_service_proto_rawDescOnce.Do(func() { + file_feature_demo_demo_multi_file_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_feature_demo_demo_multi_file_service_proto_rawDescData) + }) + return file_feature_demo_demo_multi_file_service_proto_rawDescData } -func RegisterBlogPostServiceServer(s *grpc.Server, srv BlogPostServiceServer) { - s.RegisterService(&_BlogPostService_serviceDesc, srv) +var file_feature_demo_demo_multi_file_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_feature_demo_demo_multi_file_service_proto_goTypes = []interface{}{ + (*ReadAccountRequest)(nil), // 0: example.ReadAccountRequest + (*ReadBlogPostsResponse)(nil), // 1: example.ReadBlogPostsResponse + (*query.FieldSelection)(nil), // 2: atlas.query.v1.FieldSelection + (*BlogPost)(nil), // 3: example.BlogPost +} +var file_feature_demo_demo_multi_file_service_proto_depIdxs = []int32{ + 2, // 0: example.ReadAccountRequest.fields:type_name -> atlas.query.v1.FieldSelection + 3, // 1: example.ReadBlogPostsResponse.posts:type_name -> example.BlogPost + 0, // 2: example.BlogPostService.Read:input_type -> example.ReadAccountRequest + 1, // 3: example.BlogPostService.Read:output_type -> example.ReadBlogPostsResponse + 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 _BlogPostService_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReadAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BlogPostServiceServer).Read(ctx, in) +func init() { file_feature_demo_demo_multi_file_service_proto_init() } +func file_feature_demo_demo_multi_file_service_proto_init() { + if File_feature_demo_demo_multi_file_service_proto != nil { + return } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.BlogPostService/Read", + file_feature_demo_demo_multi_file_proto_init() + if !protoimpl.UnsafeEnabled { + file_feature_demo_demo_multi_file_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadAccountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_multi_file_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadBlogPostsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BlogPostServiceServer).Read(ctx, req.(*ReadAccountRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _BlogPostService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "example.BlogPostService", - HandlerType: (*BlogPostServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Read", - Handler: _BlogPostService_Read_Handler, + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_feature_demo_demo_multi_file_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "example/feature_demo/demo_multi_file_service.proto", -} - -func init() { proto.RegisterFile("example/feature_demo/demo_multi_file_service.proto", fileDescriptor3) } - -var fileDescriptor3 = []byte{ - // 332 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xcf, 0x4b, 0xc3, 0x30, - 0x14, 0xc7, 0x69, 0x9d, 0x53, 0x32, 0x50, 0x2c, 0x08, 0xb3, 0x8a, 0x8c, 0x5d, 0x1c, 0x42, 0x1b, - 0xa8, 0x9e, 0xf4, 0xa2, 0x53, 0x76, 0xf0, 0x24, 0xdd, 0x6d, 0x07, 0x4b, 0xd6, 0xbe, 0xd6, 0x60, - 0xda, 0x97, 0x25, 0xa9, 0xcc, 0x3f, 0x4d, 0xff, 0x3a, 0xc9, 0xda, 0x09, 0x32, 0x85, 0x5d, 0x02, - 0x79, 0xdf, 0x1f, 0x7c, 0xf2, 0x42, 0x22, 0x58, 0xb2, 0x52, 0x0a, 0xa0, 0x39, 0x30, 0x53, 0x2b, - 0x48, 0x32, 0x28, 0x91, 0xda, 0x23, 0x29, 0x6b, 0x61, 0x78, 0x92, 0x73, 0x01, 0x89, 0x06, 0xf5, - 0xce, 0x53, 0x08, 0xa5, 0x42, 0x83, 0xde, 0x5e, 0x9b, 0xf1, 0x6f, 0x0a, 0x6e, 0x5e, 0xeb, 0x79, - 0x98, 0x62, 0x49, 0x79, 0x95, 0xe3, 0x5c, 0xe0, 0x12, 0x25, 0x54, 0x74, 0xe5, 0x4b, 0x83, 0x02, - 0xaa, 0xa0, 0x40, 0x55, 0x52, 0x94, 0x86, 0x63, 0xa5, 0xa9, 0xbd, 0x34, 0x25, 0xfe, 0xd3, 0x7f, - 0x59, 0x66, 0x04, 0xd3, 0x01, 0x93, 0x32, 0x30, 0x88, 0xe2, 0x8d, 0x1b, 0xba, 0xa8, 0x41, 0x7d, - 0xd0, 0x14, 0x85, 0x80, 0xd4, 0xf6, 0x24, 0x28, 0x41, 0x31, 0x83, 0x4a, 0xb7, 0x5d, 0x97, 0xdb, - 0x3c, 0xa2, 0xf1, 0x0e, 0x67, 0xc4, 0x8b, 0x81, 0x65, 0xf7, 0x69, 0x8a, 0x75, 0x65, 0x62, 0x58, - 0xd4, 0xa0, 0x8d, 0x77, 0x40, 0x5c, 0x9e, 0xf5, 0x9d, 0x81, 0x33, 0xea, 0xc4, 0x2e, 0xcf, 0xbc, - 0x6b, 0xd2, 0xcd, 0x39, 0x88, 0x4c, 0xf7, 0xdd, 0x81, 0x33, 0xea, 0x45, 0x67, 0xe1, 0x9a, 0x31, - 0x64, 0x92, 0x87, 0x13, 0xab, 0x4d, 0xa1, 0xe5, 0x89, 0x5b, 0xef, 0xf0, 0x8e, 0x1c, 0xdb, 0xee, - 0xb1, 0xc0, 0xe2, 0x19, 0xb5, 0xd1, 0x31, 0x68, 0x89, 0x95, 0x06, 0xef, 0x82, 0xec, 0x4a, 0x3b, - 0xe8, 0x3b, 0x83, 0x9d, 0x51, 0x2f, 0x3a, 0x0a, 0x5b, 0xe0, 0x70, 0x6d, 0x8d, 0x1b, 0x3d, 0x7a, - 0x21, 0x87, 0xeb, 0xd1, 0xb4, 0xd9, 0xb9, 0xf7, 0x40, 0x3a, 0xb6, 0xd4, 0x3b, 0xfd, 0x09, 0x6d, - 0xf2, 0xfb, 0xe7, 0xbf, 0xc4, 0x0d, 0x00, 0xbf, 0xfb, 0xf5, 0x79, 0xe2, 0xee, 0x3b, 0xe3, 0xc9, - 0xec, 0x71, 0xdb, 0x3f, 0xfb, 0x6b, 0xa7, 0xb7, 0xed, 0x70, 0xde, 0x5d, 0xb9, 0xaf, 0xbe, 0x03, - 0x00, 0x00, 0xff, 0xff, 0xb9, 0x74, 0x51, 0x1f, 0x3f, 0x02, 0x00, 0x00, + GoTypes: file_feature_demo_demo_multi_file_service_proto_goTypes, + DependencyIndexes: file_feature_demo_demo_multi_file_service_proto_depIdxs, + MessageInfos: file_feature_demo_demo_multi_file_service_proto_msgTypes, + }.Build() + File_feature_demo_demo_multi_file_service_proto = out.File + file_feature_demo_demo_multi_file_service_proto_rawDesc = nil + file_feature_demo_demo_multi_file_service_proto_goTypes = nil + file_feature_demo_demo_multi_file_service_proto_depIdxs = nil } diff --git a/example/feature_demo/demo_multi_file_service.proto b/example/feature_demo/demo_multi_file_service.proto index a028ddc9..88b82432 100644 --- a/example/feature_demo/demo_multi_file_service.proto +++ b/example/feature_demo/demo_multi_file_service.proto @@ -1,16 +1,16 @@ syntax = "proto3"; package example; -import "github.com/infobloxopen/protoc-gen-gorm/options/gorm.proto"; -import "github.com/infobloxopen/atlas-app-toolkit/query/collection_operators.proto"; -import "example/feature_demo/demo_multi_file.proto"; +import "options/gorm.proto"; +import "atlas/query/v1/collection_operators.proto"; +import "feature_demo/demo_multi_file.proto"; option go_package = "github.com/infobloxopen/protoc-gen-gorm/example/feature_demo;example"; message ReadAccountRequest { // For a read request, the id field is the only to be specified uint64 id = 1; - infoblox.api.FieldSelection fields = 2; + atlas.query.v1.FieldSelection fields = 2; } message ReadBlogPostsResponse { diff --git a/example/feature_demo/demo_multi_file_service_grpc.pb.go b/example/feature_demo/demo_multi_file_service_grpc.pb.go new file mode 100644 index 00000000..f58b76ca --- /dev/null +++ b/example/feature_demo/demo_multi_file_service_grpc.pb.go @@ -0,0 +1,90 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package example + +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. +const _ = grpc.SupportPackageIsVersion6 + +// BlogPostServiceClient is the client API for BlogPostService 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 BlogPostServiceClient interface { + Read(ctx context.Context, in *ReadAccountRequest, opts ...grpc.CallOption) (*ReadBlogPostsResponse, error) +} + +type blogPostServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewBlogPostServiceClient(cc grpc.ClientConnInterface) BlogPostServiceClient { + return &blogPostServiceClient{cc} +} + +func (c *blogPostServiceClient) Read(ctx context.Context, in *ReadAccountRequest, opts ...grpc.CallOption) (*ReadBlogPostsResponse, error) { + out := new(ReadBlogPostsResponse) + err := c.cc.Invoke(ctx, "/example.BlogPostService/Read", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// BlogPostServiceServer is the server API for BlogPostService service. +// All implementations must embed UnimplementedBlogPostServiceServer +// for forward compatibility +type BlogPostServiceServer interface { + Read(context.Context, *ReadAccountRequest) (*ReadBlogPostsResponse, error) + mustEmbedUnimplementedBlogPostServiceServer() +} + +// UnimplementedBlogPostServiceServer must be embedded to have forward compatible implementations. +type UnimplementedBlogPostServiceServer struct { +} + +func (*UnimplementedBlogPostServiceServer) Read(context.Context, *ReadAccountRequest) (*ReadBlogPostsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Read not implemented") +} +func (*UnimplementedBlogPostServiceServer) mustEmbedUnimplementedBlogPostServiceServer() {} + +func RegisterBlogPostServiceServer(s *grpc.Server, srv BlogPostServiceServer) { + s.RegisterService(&_BlogPostService_serviceDesc, srv) +} + +func _BlogPostService_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReadAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BlogPostServiceServer).Read(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.BlogPostService/Read", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BlogPostServiceServer).Read(ctx, req.(*ReadAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _BlogPostService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "example.BlogPostService", + HandlerType: (*BlogPostServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Read", + Handler: _BlogPostService_Read_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "feature_demo/demo_multi_file_service.proto", +} diff --git a/example/feature_demo/demo_service.pb.go b/example/feature_demo/demo_service.pb.go index 760f8ecc..5f8843f0 100644 --- a/example/feature_demo/demo_service.pb.go +++ b/example/feature_demo/demo_service.pb.go @@ -1,1650 +1,1652 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: example/feature_demo/demo_service.proto +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.17.1 +// source: feature_demo/demo_service.proto package example -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import google_protobuf2 "github.com/golang/protobuf/ptypes/empty" -import _ "github.com/infobloxopen/protoc-gen-gorm/options" -import google_protobuf4 "google.golang.org/genproto/protobuf/field_mask" -import infoblox_api "github.com/infobloxopen/atlas-app-toolkit/query" - import ( - context "golang.org/x/net/context" - grpc "google.golang.org/grpc" + proto "github.com/golang/protobuf/proto" + query "github.com/infobloxopen/atlas-app-toolkit/query" + _ "github.com/infobloxopen/protoc-gen-gorm/options" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + 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) ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 // IntPoint is a basic message type representing a single cartesian point // that we want to store in a database type IntPoint struct { - Id uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` - X int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` - Y int32 `protobuf:"varint,3,opt,name=y" json:"y,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + X int32 `protobuf:"varint,2,opt,name=x,proto3" json:"x,omitempty"` + Y int32 `protobuf:"varint,3,opt,name=y,proto3" json:"y,omitempty"` +} + +func (x *IntPoint) Reset() { + *x = IntPoint{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IntPoint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IntPoint) ProtoMessage() {} + +func (x *IntPoint) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_service_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) } -func (m *IntPoint) Reset() { *m = IntPoint{} } -func (m *IntPoint) String() string { return proto.CompactTextString(m) } -func (*IntPoint) ProtoMessage() {} -func (*IntPoint) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} } +// Deprecated: Use IntPoint.ProtoReflect.Descriptor instead. +func (*IntPoint) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_service_proto_rawDescGZIP(), []int{0} +} -func (m *IntPoint) GetId() uint32 { - if m != nil { - return m.Id +func (x *IntPoint) GetId() uint32 { + if x != nil { + return x.Id } return 0 } -func (m *IntPoint) GetX() int32 { - if m != nil { - return m.X +func (x *IntPoint) GetX() int32 { + if x != nil { + return x.X } return 0 } -func (m *IntPoint) GetY() int32 { - if m != nil { - return m.Y +func (x *IntPoint) GetY() int32 { + if x != nil { + return x.Y } return 0 } type CreateIntPointRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Convention dictates that this field be of the given type, and be // named 'payload' in order to autogenerate the handler - Payload *IntPoint `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"` + Payload *IntPoint `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` } -func (m *CreateIntPointRequest) Reset() { *m = CreateIntPointRequest{} } -func (m *CreateIntPointRequest) String() string { return proto.CompactTextString(m) } -func (*CreateIntPointRequest) ProtoMessage() {} -func (*CreateIntPointRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} } - -func (m *CreateIntPointRequest) GetPayload() *IntPoint { - if m != nil { - return m.Payload +func (x *CreateIntPointRequest) Reset() { + *x = CreateIntPointRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -type CreateIntPointResponse struct { - // Convention also requires that the return type be the same and named 'result' - Result *IntPoint `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` +func (x *CreateIntPointRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CreateIntPointResponse) Reset() { *m = CreateIntPointResponse{} } -func (m *CreateIntPointResponse) String() string { return proto.CompactTextString(m) } -func (*CreateIntPointResponse) ProtoMessage() {} -func (*CreateIntPointResponse) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{2} } +func (*CreateIntPointRequest) ProtoMessage() {} -func (m *CreateIntPointResponse) GetResult() *IntPoint { - if m != nil { - return m.Result +func (x *CreateIntPointRequest) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_service_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 nil + return mi.MessageOf(x) } -type ReadIntPointRequest struct { - // For a read request, the id field is the only to be specified - Id uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` - Fields *infoblox_api.FieldSelection `protobuf:"bytes,2,opt,name=fields" json:"fields,omitempty"` -} - -func (m *ReadIntPointRequest) Reset() { *m = ReadIntPointRequest{} } -func (m *ReadIntPointRequest) String() string { return proto.CompactTextString(m) } -func (*ReadIntPointRequest) ProtoMessage() {} -func (*ReadIntPointRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{3} } - -func (m *ReadIntPointRequest) GetId() uint32 { - if m != nil { - return m.Id - } - return 0 +// Deprecated: Use CreateIntPointRequest.ProtoReflect.Descriptor instead. +func (*CreateIntPointRequest) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_service_proto_rawDescGZIP(), []int{1} } -func (m *ReadIntPointRequest) GetFields() *infoblox_api.FieldSelection { - if m != nil { - return m.Fields +func (x *CreateIntPointRequest) GetPayload() *IntPoint { + if x != nil { + return x.Payload } return nil } -type ReadIntPointResponse struct { - // Again the type with 'result' name - Result *IntPoint `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` -} +type CreateIntPointResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *ReadIntPointResponse) Reset() { *m = ReadIntPointResponse{} } -func (m *ReadIntPointResponse) String() string { return proto.CompactTextString(m) } -func (*ReadIntPointResponse) ProtoMessage() {} -func (*ReadIntPointResponse) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{4} } + // Convention also requires that the return type be the same and named 'result' + Result *IntPoint `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` +} -func (m *ReadIntPointResponse) GetResult() *IntPoint { - if m != nil { - return m.Result +func (x *CreateIntPointResponse) Reset() { + *x = CreateIntPointResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -type UpdateIntPointRequest struct { - Payload *IntPoint `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"` - GerogeriGegege *google_protobuf4.FieldMask `protobuf:"bytes,2,opt,name=gerogeri_gegege,json=gerogeriGegege" json:"gerogeri_gegege,omitempty"` +func (x *CreateIntPointResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *UpdateIntPointRequest) Reset() { *m = UpdateIntPointRequest{} } -func (m *UpdateIntPointRequest) String() string { return proto.CompactTextString(m) } -func (*UpdateIntPointRequest) ProtoMessage() {} -func (*UpdateIntPointRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{5} } +func (*CreateIntPointResponse) ProtoMessage() {} -func (m *UpdateIntPointRequest) GetPayload() *IntPoint { - if m != nil { - return m.Payload +func (x *CreateIntPointResponse) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_service_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 nil + return mi.MessageOf(x) } -func (m *UpdateIntPointRequest) GetGerogeriGegege() *google_protobuf4.FieldMask { - if m != nil { - return m.GerogeriGegege - } - return nil +// Deprecated: Use CreateIntPointResponse.ProtoReflect.Descriptor instead. +func (*CreateIntPointResponse) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_service_proto_rawDescGZIP(), []int{2} } -type UpdateIntPointResponse struct { - Result *IntPoint `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` -} - -func (m *UpdateIntPointResponse) Reset() { *m = UpdateIntPointResponse{} } -func (m *UpdateIntPointResponse) String() string { return proto.CompactTextString(m) } -func (*UpdateIntPointResponse) ProtoMessage() {} -func (*UpdateIntPointResponse) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{6} } - -func (m *UpdateIntPointResponse) GetResult() *IntPoint { - if m != nil { - return m.Result +func (x *CreateIntPointResponse) GetResult() *IntPoint { + if x != nil { + return x.Result } return nil } -type UpdateSetIntPointRequest struct { - Objects []*IntPoint `protobuf:"bytes,1,rep,name=objects" json:"objects,omitempty"` - Masks []*google_protobuf4.FieldMask `protobuf:"bytes,2,rep,name=masks" json:"masks,omitempty"` -} - -func (m *UpdateSetIntPointRequest) Reset() { *m = UpdateSetIntPointRequest{} } -func (m *UpdateSetIntPointRequest) String() string { return proto.CompactTextString(m) } -func (*UpdateSetIntPointRequest) ProtoMessage() {} -func (*UpdateSetIntPointRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{7} } +type ReadIntPointRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *UpdateSetIntPointRequest) GetObjects() []*IntPoint { - if m != nil { - return m.Objects - } - return nil + // For a read request, the id field is the only to be specified + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Fields *query.FieldSelection `protobuf:"bytes,2,opt,name=fields,proto3" json:"fields,omitempty"` } -func (m *UpdateSetIntPointRequest) GetMasks() []*google_protobuf4.FieldMask { - if m != nil { - return m.Masks +func (x *ReadIntPointRequest) Reset() { + *x = ReadIntPointRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -type UpdateSetIntPointResponse struct { - Results []*IntPoint `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"` +func (x *ReadIntPointRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *UpdateSetIntPointResponse) Reset() { *m = UpdateSetIntPointResponse{} } -func (m *UpdateSetIntPointResponse) String() string { return proto.CompactTextString(m) } -func (*UpdateSetIntPointResponse) ProtoMessage() {} -func (*UpdateSetIntPointResponse) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{8} } +func (*ReadIntPointRequest) ProtoMessage() {} -func (m *UpdateSetIntPointResponse) GetResults() []*IntPoint { - if m != nil { - return m.Results +func (x *ReadIntPointRequest) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_service_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 nil + return mi.MessageOf(x) } -type DeleteIntPointRequest struct { - // Only the id is needed for a delete request - Id uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` +// Deprecated: Use ReadIntPointRequest.ProtoReflect.Descriptor instead. +func (*ReadIntPointRequest) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_service_proto_rawDescGZIP(), []int{3} } -func (m *DeleteIntPointRequest) Reset() { *m = DeleteIntPointRequest{} } -func (m *DeleteIntPointRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteIntPointRequest) ProtoMessage() {} -func (*DeleteIntPointRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{9} } - -func (m *DeleteIntPointRequest) GetId() uint32 { - if m != nil { - return m.Id +func (x *ReadIntPointRequest) GetId() uint32 { + if x != nil { + return x.Id } return 0 } -type DeleteIntPointsRequest struct { - // Only the id is needed for a delete request - Ids []uint32 `protobuf:"varint,1,rep,packed,name=ids" json:"ids,omitempty"` -} - -func (m *DeleteIntPointsRequest) Reset() { *m = DeleteIntPointsRequest{} } -func (m *DeleteIntPointsRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteIntPointsRequest) ProtoMessage() {} -func (*DeleteIntPointsRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{10} } - -func (m *DeleteIntPointsRequest) GetIds() []uint32 { - if m != nil { - return m.Ids +func (x *ReadIntPointRequest) GetFields() *query.FieldSelection { + if x != nil { + return x.Fields } return nil } -// By convention, on DELETE no response data is given, so either a -// google.protobuf.empty, or an empty struct is sufficient -type DeleteIntPointResponse struct { -} - -func (m *DeleteIntPointResponse) Reset() { *m = DeleteIntPointResponse{} } -func (m *DeleteIntPointResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteIntPointResponse) ProtoMessage() {} -func (*DeleteIntPointResponse) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{11} } - -type ListIntPointResponse struct { - // Note repeated field and plural name 'results' - Results []*IntPoint `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"` - PageInfo *infoblox_api.PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo" json:"page_info,omitempty"` -} - -func (m *ListIntPointResponse) Reset() { *m = ListIntPointResponse{} } -func (m *ListIntPointResponse) String() string { return proto.CompactTextString(m) } -func (*ListIntPointResponse) ProtoMessage() {} -func (*ListIntPointResponse) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{12} } +type ReadIntPointResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *ListIntPointResponse) GetResults() []*IntPoint { - if m != nil { - return m.Results - } - return nil + // Again the type with 'result' name + Result *IntPoint `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` } -func (m *ListIntPointResponse) GetPageInfo() *infoblox_api.PageInfo { - if m != nil { - return m.PageInfo +func (x *ReadIntPointResponse) Reset() { + *x = ReadIntPointResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -type ListSomethingResponse struct { - // Note repeated field and plural name 'results' - Results []*Something `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"` - PageInfo *infoblox_api.PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo" json:"page_info,omitempty"` +func (x *ReadIntPointResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ListSomethingResponse) Reset() { *m = ListSomethingResponse{} } -func (m *ListSomethingResponse) String() string { return proto.CompactTextString(m) } -func (*ListSomethingResponse) ProtoMessage() {} -func (*ListSomethingResponse) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{13} } +func (*ReadIntPointResponse) ProtoMessage() {} -func (m *ListSomethingResponse) GetResults() []*Something { - if m != nil { - return m.Results +func (x *ReadIntPointResponse) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_service_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 nil + return mi.MessageOf(x) +} + +// Deprecated: Use ReadIntPointResponse.ProtoReflect.Descriptor instead. +func (*ReadIntPointResponse) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_service_proto_rawDescGZIP(), []int{4} } -func (m *ListSomethingResponse) GetPageInfo() *infoblox_api.PageInfo { - if m != nil { - return m.PageInfo +func (x *ReadIntPointResponse) GetResult() *IntPoint { + if x != nil { + return x.Result } return nil } -// A dummy type to demo an rpc that can't be autogenerated -type Something struct { - Field string `protobuf:"bytes,1,opt,name=field" json:"field,omitempty"` -} +type UpdateIntPointRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *Something) Reset() { *m = Something{} } -func (m *Something) String() string { return proto.CompactTextString(m) } -func (*Something) ProtoMessage() {} -func (*Something) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{14} } + Payload *IntPoint `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + GerogeriGegege *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=gerogeri_gegege,json=gerogeriGegege,proto3" json:"gerogeri_gegege,omitempty"` +} -func (m *Something) GetField() string { - if m != nil { - return m.Field +func (x *UpdateIntPointRequest) Reset() { + *x = UpdateIntPointRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -type ListIntPointRequest struct { - Filter *infoblox_api.Filtering `protobuf:"bytes,1,opt,name=filter" json:"filter,omitempty"` - OrderBy *infoblox_api.Sorting `protobuf:"bytes,2,opt,name=order_by,json=orderBy" json:"order_by,omitempty"` - Fields *infoblox_api.FieldSelection `protobuf:"bytes,3,opt,name=fields" json:"fields,omitempty"` - Paging *infoblox_api.Pagination `protobuf:"bytes,4,opt,name=paging" json:"paging,omitempty"` +func (x *UpdateIntPointRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ListIntPointRequest) Reset() { *m = ListIntPointRequest{} } -func (m *ListIntPointRequest) String() string { return proto.CompactTextString(m) } -func (*ListIntPointRequest) ProtoMessage() {} -func (*ListIntPointRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{15} } +func (*UpdateIntPointRequest) ProtoMessage() {} -func (m *ListIntPointRequest) GetFilter() *infoblox_api.Filtering { - if m != nil { - return m.Filter +func (x *UpdateIntPointRequest) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_service_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 nil + return mi.MessageOf(x) } -func (m *ListIntPointRequest) GetOrderBy() *infoblox_api.Sorting { - if m != nil { - return m.OrderBy - } - return nil +// Deprecated: Use UpdateIntPointRequest.ProtoReflect.Descriptor instead. +func (*UpdateIntPointRequest) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_service_proto_rawDescGZIP(), []int{5} } -func (m *ListIntPointRequest) GetFields() *infoblox_api.FieldSelection { - if m != nil { - return m.Fields +func (x *UpdateIntPointRequest) GetPayload() *IntPoint { + if x != nil { + return x.Payload } return nil } -func (m *ListIntPointRequest) GetPaging() *infoblox_api.Pagination { - if m != nil { - return m.Paging +func (x *UpdateIntPointRequest) GetGerogeriGegege() *fieldmaskpb.FieldMask { + if x != nil { + return x.GerogeriGegege } return nil } -type Circle struct { - R uint32 `protobuf:"varint,1,opt,name=r" json:"r,omitempty"` -} +type UpdateIntPointResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *Circle) Reset() { *m = Circle{} } -func (m *Circle) String() string { return proto.CompactTextString(m) } -func (*Circle) ProtoMessage() {} -func (*Circle) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{16} } + Result *IntPoint `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` +} -func (m *Circle) GetR() uint32 { - if m != nil { - return m.R +func (x *UpdateIntPointResponse) Reset() { + *x = UpdateIntPointResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -type ListCircleRequest struct { +func (x *UpdateIntPointResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ListCircleRequest) Reset() { *m = ListCircleRequest{} } -func (m *ListCircleRequest) String() string { return proto.CompactTextString(m) } -func (*ListCircleRequest) ProtoMessage() {} -func (*ListCircleRequest) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{17} } +func (*UpdateIntPointResponse) ProtoMessage() {} -type ListCircleResponse struct { - Results []*Circle `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"` +func (x *UpdateIntPointResponse) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_service_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) } -func (m *ListCircleResponse) Reset() { *m = ListCircleResponse{} } -func (m *ListCircleResponse) String() string { return proto.CompactTextString(m) } -func (*ListCircleResponse) ProtoMessage() {} -func (*ListCircleResponse) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{18} } +// Deprecated: Use UpdateIntPointResponse.ProtoReflect.Descriptor instead. +func (*UpdateIntPointResponse) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_service_proto_rawDescGZIP(), []int{6} +} -func (m *ListCircleResponse) GetResults() []*Circle { - if m != nil { - return m.Results +func (x *UpdateIntPointResponse) GetResult() *IntPoint { + if x != nil { + return x.Result } return nil } -func init() { - proto.RegisterType((*IntPoint)(nil), "example.IntPoint") - proto.RegisterType((*CreateIntPointRequest)(nil), "example.CreateIntPointRequest") - proto.RegisterType((*CreateIntPointResponse)(nil), "example.CreateIntPointResponse") - proto.RegisterType((*ReadIntPointRequest)(nil), "example.ReadIntPointRequest") - proto.RegisterType((*ReadIntPointResponse)(nil), "example.ReadIntPointResponse") - proto.RegisterType((*UpdateIntPointRequest)(nil), "example.UpdateIntPointRequest") - proto.RegisterType((*UpdateIntPointResponse)(nil), "example.UpdateIntPointResponse") - proto.RegisterType((*UpdateSetIntPointRequest)(nil), "example.UpdateSetIntPointRequest") - proto.RegisterType((*UpdateSetIntPointResponse)(nil), "example.UpdateSetIntPointResponse") - proto.RegisterType((*DeleteIntPointRequest)(nil), "example.DeleteIntPointRequest") - proto.RegisterType((*DeleteIntPointsRequest)(nil), "example.DeleteIntPointsRequest") - proto.RegisterType((*DeleteIntPointResponse)(nil), "example.DeleteIntPointResponse") - proto.RegisterType((*ListIntPointResponse)(nil), "example.ListIntPointResponse") - proto.RegisterType((*ListSomethingResponse)(nil), "example.ListSomethingResponse") - proto.RegisterType((*Something)(nil), "example.Something") - proto.RegisterType((*ListIntPointRequest)(nil), "example.ListIntPointRequest") - proto.RegisterType((*Circle)(nil), "example.Circle") - proto.RegisterType((*ListCircleRequest)(nil), "example.ListCircleRequest") - proto.RegisterType((*ListCircleResponse)(nil), "example.ListCircleResponse") -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// 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.SupportPackageIsVersion4 - -// Client API for IntPointService service +type UpdateSetIntPointRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -type IntPointServiceClient interface { - // The convention requires the rpc names have Create/Read/Update/List/Delete - // as a prefix. The type is inferred from the response (except for delete), - // so multiple objects can have CURDL handlers in the same service, provided - // they are given unique suffixes - Create(ctx context.Context, in *CreateIntPointRequest, opts ...grpc.CallOption) (*CreateIntPointResponse, error) - Read(ctx context.Context, in *ReadIntPointRequest, opts ...grpc.CallOption) (*ReadIntPointResponse, error) - Update(ctx context.Context, in *UpdateIntPointRequest, opts ...grpc.CallOption) (*UpdateIntPointResponse, error) - UpdateSet(ctx context.Context, in *UpdateSetIntPointRequest, opts ...grpc.CallOption) (*UpdateSetIntPointResponse, error) - List(ctx context.Context, in *ListIntPointRequest, opts ...grpc.CallOption) (*ListIntPointResponse, error) - ListSomething(ctx context.Context, in *google_protobuf2.Empty, opts ...grpc.CallOption) (*ListSomethingResponse, error) - Delete(ctx context.Context, in *DeleteIntPointRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) - // CustomMethod can't be autogenerated as it matches no conventions, it will - // become a stub - CustomMethod(ctx context.Context, in *google_protobuf2.Empty, opts ...grpc.CallOption) (*google_protobuf2.Empty, error) - // CreateSomething also doesn't match conventions and will become a stub - CreateSomething(ctx context.Context, in *Something, opts ...grpc.CallOption) (*Something, error) + Objects []*IntPoint `protobuf:"bytes,1,rep,name=objects,proto3" json:"objects,omitempty"` + Masks []*fieldmaskpb.FieldMask `protobuf:"bytes,2,rep,name=masks,proto3" json:"masks,omitempty"` } -type intPointServiceClient struct { - cc *grpc.ClientConn +func (x *UpdateSetIntPointRequest) Reset() { + *x = UpdateSetIntPointRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func NewIntPointServiceClient(cc *grpc.ClientConn) IntPointServiceClient { - return &intPointServiceClient{cc} +func (x *UpdateSetIntPointRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (c *intPointServiceClient) Create(ctx context.Context, in *CreateIntPointRequest, opts ...grpc.CallOption) (*CreateIntPointResponse, error) { - out := new(CreateIntPointResponse) - err := grpc.Invoke(ctx, "/example.IntPointService/Create", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} +func (*UpdateSetIntPointRequest) ProtoMessage() {} -func (c *intPointServiceClient) Read(ctx context.Context, in *ReadIntPointRequest, opts ...grpc.CallOption) (*ReadIntPointResponse, error) { - out := new(ReadIntPointResponse) - err := grpc.Invoke(ctx, "/example.IntPointService/Read", in, out, c.cc, opts...) - if err != nil { - return nil, err +func (x *UpdateSetIntPointRequest) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_service_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 out, nil + return mi.MessageOf(x) } -func (c *intPointServiceClient) Update(ctx context.Context, in *UpdateIntPointRequest, opts ...grpc.CallOption) (*UpdateIntPointResponse, error) { - out := new(UpdateIntPointResponse) - err := grpc.Invoke(ctx, "/example.IntPointService/Update", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil +// Deprecated: Use UpdateSetIntPointRequest.ProtoReflect.Descriptor instead. +func (*UpdateSetIntPointRequest) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_service_proto_rawDescGZIP(), []int{7} } -func (c *intPointServiceClient) UpdateSet(ctx context.Context, in *UpdateSetIntPointRequest, opts ...grpc.CallOption) (*UpdateSetIntPointResponse, error) { - out := new(UpdateSetIntPointResponse) - err := grpc.Invoke(ctx, "/example.IntPointService/UpdateSet", in, out, c.cc, opts...) - if err != nil { - return nil, err +func (x *UpdateSetIntPointRequest) GetObjects() []*IntPoint { + if x != nil { + return x.Objects } - return out, nil + return nil } -func (c *intPointServiceClient) List(ctx context.Context, in *ListIntPointRequest, opts ...grpc.CallOption) (*ListIntPointResponse, error) { - out := new(ListIntPointResponse) - err := grpc.Invoke(ctx, "/example.IntPointService/List", in, out, c.cc, opts...) - if err != nil { - return nil, err +func (x *UpdateSetIntPointRequest) GetMasks() []*fieldmaskpb.FieldMask { + if x != nil { + return x.Masks } - return out, nil + return nil } -func (c *intPointServiceClient) ListSomething(ctx context.Context, in *google_protobuf2.Empty, opts ...grpc.CallOption) (*ListSomethingResponse, error) { - out := new(ListSomethingResponse) - err := grpc.Invoke(ctx, "/example.IntPointService/ListSomething", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} +type UpdateSetIntPointResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (c *intPointServiceClient) Delete(ctx context.Context, in *DeleteIntPointRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) { - out := new(DeleteIntPointResponse) - err := grpc.Invoke(ctx, "/example.IntPointService/Delete", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil + Results []*IntPoint `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` } -func (c *intPointServiceClient) CustomMethod(ctx context.Context, in *google_protobuf2.Empty, opts ...grpc.CallOption) (*google_protobuf2.Empty, error) { - out := new(google_protobuf2.Empty) - err := grpc.Invoke(ctx, "/example.IntPointService/CustomMethod", in, out, c.cc, opts...) - if err != nil { - return nil, err +func (x *UpdateSetIntPointResponse) Reset() { + *x = UpdateSetIntPointResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return out, nil } -func (c *intPointServiceClient) CreateSomething(ctx context.Context, in *Something, opts ...grpc.CallOption) (*Something, error) { - out := new(Something) - err := grpc.Invoke(ctx, "/example.IntPointService/CreateSomething", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil +func (x *UpdateSetIntPointResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -// Server API for IntPointService service +func (*UpdateSetIntPointResponse) ProtoMessage() {} -type IntPointServiceServer interface { - // The convention requires the rpc names have Create/Read/Update/List/Delete - // as a prefix. The type is inferred from the response (except for delete), - // so multiple objects can have CURDL handlers in the same service, provided - // they are given unique suffixes - Create(context.Context, *CreateIntPointRequest) (*CreateIntPointResponse, error) - Read(context.Context, *ReadIntPointRequest) (*ReadIntPointResponse, error) - Update(context.Context, *UpdateIntPointRequest) (*UpdateIntPointResponse, error) - UpdateSet(context.Context, *UpdateSetIntPointRequest) (*UpdateSetIntPointResponse, error) - List(context.Context, *ListIntPointRequest) (*ListIntPointResponse, error) - ListSomething(context.Context, *google_protobuf2.Empty) (*ListSomethingResponse, error) - Delete(context.Context, *DeleteIntPointRequest) (*DeleteIntPointResponse, error) - // CustomMethod can't be autogenerated as it matches no conventions, it will - // become a stub - CustomMethod(context.Context, *google_protobuf2.Empty) (*google_protobuf2.Empty, error) - // CreateSomething also doesn't match conventions and will become a stub - CreateSomething(context.Context, *Something) (*Something, error) +func (x *UpdateSetIntPointResponse) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_service_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) } -func RegisterIntPointServiceServer(s *grpc.Server, srv IntPointServiceServer) { - s.RegisterService(&_IntPointService_serviceDesc, srv) +// Deprecated: Use UpdateSetIntPointResponse.ProtoReflect.Descriptor instead. +func (*UpdateSetIntPointResponse) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_service_proto_rawDescGZIP(), []int{8} } -func _IntPointService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateIntPointRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IntPointServiceServer).Create(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.IntPointService/Create", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IntPointServiceServer).Create(ctx, req.(*CreateIntPointRequest)) +func (x *UpdateSetIntPointResponse) GetResults() []*IntPoint { + if x != nil { + return x.Results } - return interceptor(ctx, in, info, handler) + return nil } -func _IntPointService_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReadIntPointRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IntPointServiceServer).Read(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.IntPointService/Read", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IntPointServiceServer).Read(ctx, req.(*ReadIntPointRequest)) - } - return interceptor(ctx, in, info, handler) -} +type DeleteIntPointRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func _IntPointService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateIntPointRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IntPointServiceServer).Update(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.IntPointService/Update", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IntPointServiceServer).Update(ctx, req.(*UpdateIntPointRequest)) - } - return interceptor(ctx, in, info, handler) + // Only the id is needed for a delete request + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` } -func _IntPointService_UpdateSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateSetIntPointRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IntPointServiceServer).UpdateSet(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.IntPointService/UpdateSet", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IntPointServiceServer).UpdateSet(ctx, req.(*UpdateSetIntPointRequest)) +func (x *DeleteIntPointRequest) Reset() { + *x = DeleteIntPointRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return interceptor(ctx, in, info, handler) } -func _IntPointService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListIntPointRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IntPointServiceServer).List(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.IntPointService/List", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IntPointServiceServer).List(ctx, req.(*ListIntPointRequest)) - } - return interceptor(ctx, in, info, handler) +func (x *DeleteIntPointRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func _IntPointService_ListSomething_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(google_protobuf2.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IntPointServiceServer).ListSomething(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.IntPointService/ListSomething", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IntPointServiceServer).ListSomething(ctx, req.(*google_protobuf2.Empty)) - } - return interceptor(ctx, in, info, handler) -} +func (*DeleteIntPointRequest) ProtoMessage() {} -func _IntPointService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteIntPointRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IntPointServiceServer).Delete(ctx, in) +func (x *DeleteIntPointRequest) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_service_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.IntPointService/Delete", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IntPointServiceServer).Delete(ctx, req.(*DeleteIntPointRequest)) - } - return interceptor(ctx, in, info, handler) + return mi.MessageOf(x) } -func _IntPointService_CustomMethod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(google_protobuf2.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IntPointServiceServer).CustomMethod(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.IntPointService/CustomMethod", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IntPointServiceServer).CustomMethod(ctx, req.(*google_protobuf2.Empty)) - } - return interceptor(ctx, in, info, handler) +// Deprecated: Use DeleteIntPointRequest.ProtoReflect.Descriptor instead. +func (*DeleteIntPointRequest) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_service_proto_rawDescGZIP(), []int{9} } -func _IntPointService_CreateSomething_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Something) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IntPointServiceServer).CreateSomething(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.IntPointService/CreateSomething", +func (x *DeleteIntPointRequest) GetId() uint32 { + if x != nil { + return x.Id } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IntPointServiceServer).CreateSomething(ctx, req.(*Something)) - } - return interceptor(ctx, in, info, handler) -} - -var _IntPointService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "example.IntPointService", - HandlerType: (*IntPointServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Create", - Handler: _IntPointService_Create_Handler, - }, - { - MethodName: "Read", - Handler: _IntPointService_Read_Handler, - }, - { - MethodName: "Update", - Handler: _IntPointService_Update_Handler, - }, - { - MethodName: "UpdateSet", - Handler: _IntPointService_UpdateSet_Handler, - }, - { - MethodName: "List", - Handler: _IntPointService_List_Handler, - }, - { - MethodName: "ListSomething", - Handler: _IntPointService_ListSomething_Handler, - }, - { - MethodName: "Delete", - Handler: _IntPointService_Delete_Handler, - }, - { - MethodName: "CustomMethod", - Handler: _IntPointService_CustomMethod_Handler, - }, - { - MethodName: "CreateSomething", - Handler: _IntPointService_CreateSomething_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "example/feature_demo/demo_service.proto", + return 0 } -// Client API for IntPointTxn service +type DeleteIntPointsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -type IntPointTxnClient interface { - // The convention requires the rpc names have Create/Read/Update/List/Delete - // as a prefix. The type is inferred from the response (except for delete), - // so multiple objects can have CURDL handlers in the same service, provided - // they are given unique suffixes - Create(ctx context.Context, in *CreateIntPointRequest, opts ...grpc.CallOption) (*CreateIntPointResponse, error) - Read(ctx context.Context, in *ReadIntPointRequest, opts ...grpc.CallOption) (*ReadIntPointResponse, error) - Update(ctx context.Context, in *UpdateIntPointRequest, opts ...grpc.CallOption) (*UpdateIntPointResponse, error) - List(ctx context.Context, in *ListIntPointRequest, opts ...grpc.CallOption) (*ListIntPointResponse, error) - Delete(ctx context.Context, in *DeleteIntPointRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) - DeleteSet(ctx context.Context, in *DeleteIntPointsRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) - // CustomMethod can't be autogenerated as it matches no conventions, it will - // become a stub - CustomMethod(ctx context.Context, in *google_protobuf2.Empty, opts ...grpc.CallOption) (*google_protobuf2.Empty, error) - // CreateSomething also doesn't match conventions and will become a stub - CreateSomething(ctx context.Context, in *Something, opts ...grpc.CallOption) (*Something, error) + // Only the id is needed for a delete request + Ids []uint32 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` } -type intPointTxnClient struct { - cc *grpc.ClientConn +func (x *DeleteIntPointsRequest) Reset() { + *x = DeleteIntPointsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func NewIntPointTxnClient(cc *grpc.ClientConn) IntPointTxnClient { - return &intPointTxnClient{cc} +func (x *DeleteIntPointsRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (c *intPointTxnClient) Create(ctx context.Context, in *CreateIntPointRequest, opts ...grpc.CallOption) (*CreateIntPointResponse, error) { - out := new(CreateIntPointResponse) - err := grpc.Invoke(ctx, "/example.IntPointTxn/Create", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} +func (*DeleteIntPointsRequest) ProtoMessage() {} -func (c *intPointTxnClient) Read(ctx context.Context, in *ReadIntPointRequest, opts ...grpc.CallOption) (*ReadIntPointResponse, error) { - out := new(ReadIntPointResponse) - err := grpc.Invoke(ctx, "/example.IntPointTxn/Read", in, out, c.cc, opts...) - if err != nil { - return nil, err +func (x *DeleteIntPointsRequest) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_service_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 out, nil + return mi.MessageOf(x) } -func (c *intPointTxnClient) Update(ctx context.Context, in *UpdateIntPointRequest, opts ...grpc.CallOption) (*UpdateIntPointResponse, error) { - out := new(UpdateIntPointResponse) - err := grpc.Invoke(ctx, "/example.IntPointTxn/Update", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil +// Deprecated: Use DeleteIntPointsRequest.ProtoReflect.Descriptor instead. +func (*DeleteIntPointsRequest) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_service_proto_rawDescGZIP(), []int{10} } -func (c *intPointTxnClient) List(ctx context.Context, in *ListIntPointRequest, opts ...grpc.CallOption) (*ListIntPointResponse, error) { - out := new(ListIntPointResponse) - err := grpc.Invoke(ctx, "/example.IntPointTxn/List", in, out, c.cc, opts...) - if err != nil { - return nil, err +func (x *DeleteIntPointsRequest) GetIds() []uint32 { + if x != nil { + return x.Ids } - return out, nil + return nil } -func (c *intPointTxnClient) Delete(ctx context.Context, in *DeleteIntPointRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) { - out := new(DeleteIntPointResponse) - err := grpc.Invoke(ctx, "/example.IntPointTxn/Delete", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil +// By convention, on DELETE no response data is given, so either a +// google.protobuf.empty, or an empty struct is sufficient +type DeleteIntPointResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (c *intPointTxnClient) DeleteSet(ctx context.Context, in *DeleteIntPointsRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) { - out := new(DeleteIntPointResponse) - err := grpc.Invoke(ctx, "/example.IntPointTxn/DeleteSet", in, out, c.cc, opts...) - if err != nil { - return nil, err +func (x *DeleteIntPointResponse) Reset() { + *x = DeleteIntPointResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return out, nil } -func (c *intPointTxnClient) CustomMethod(ctx context.Context, in *google_protobuf2.Empty, opts ...grpc.CallOption) (*google_protobuf2.Empty, error) { - out := new(google_protobuf2.Empty) - err := grpc.Invoke(ctx, "/example.IntPointTxn/CustomMethod", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil +func (x *DeleteIntPointResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (c *intPointTxnClient) CreateSomething(ctx context.Context, in *Something, opts ...grpc.CallOption) (*Something, error) { - out := new(Something) - err := grpc.Invoke(ctx, "/example.IntPointTxn/CreateSomething", in, out, c.cc, opts...) - if err != nil { - return nil, err +func (*DeleteIntPointResponse) ProtoMessage() {} + +func (x *DeleteIntPointResponse) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_service_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 out, nil + return mi.MessageOf(x) } -// Server API for IntPointTxn service - -type IntPointTxnServer interface { - // The convention requires the rpc names have Create/Read/Update/List/Delete - // as a prefix. The type is inferred from the response (except for delete), - // so multiple objects can have CURDL handlers in the same service, provided - // they are given unique suffixes - Create(context.Context, *CreateIntPointRequest) (*CreateIntPointResponse, error) - Read(context.Context, *ReadIntPointRequest) (*ReadIntPointResponse, error) - Update(context.Context, *UpdateIntPointRequest) (*UpdateIntPointResponse, error) - List(context.Context, *ListIntPointRequest) (*ListIntPointResponse, error) - Delete(context.Context, *DeleteIntPointRequest) (*DeleteIntPointResponse, error) - DeleteSet(context.Context, *DeleteIntPointsRequest) (*DeleteIntPointResponse, error) - // CustomMethod can't be autogenerated as it matches no conventions, it will - // become a stub - CustomMethod(context.Context, *google_protobuf2.Empty) (*google_protobuf2.Empty, error) - // CreateSomething also doesn't match conventions and will become a stub - CreateSomething(context.Context, *Something) (*Something, error) +// Deprecated: Use DeleteIntPointResponse.ProtoReflect.Descriptor instead. +func (*DeleteIntPointResponse) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_service_proto_rawDescGZIP(), []int{11} } -func RegisterIntPointTxnServer(s *grpc.Server, srv IntPointTxnServer) { - s.RegisterService(&_IntPointTxn_serviceDesc, srv) +type ListIntPointResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Note repeated field and plural name 'results' + Results []*IntPoint `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` + PageInfo *query.PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo,proto3" json:"page_info,omitempty"` } -func _IntPointTxn_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateIntPointRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IntPointTxnServer).Create(ctx, in) +func (x *ListIntPointResponse) Reset() { + *x = ListIntPointResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.IntPointTxn/Create", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IntPointTxnServer).Create(ctx, req.(*CreateIntPointRequest)) - } - return interceptor(ctx, in, info, handler) } -func _IntPointTxn_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReadIntPointRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IntPointTxnServer).Read(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.IntPointTxn/Read", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IntPointTxnServer).Read(ctx, req.(*ReadIntPointRequest)) - } - return interceptor(ctx, in, info, handler) +func (x *ListIntPointResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func _IntPointTxn_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateIntPointRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IntPointTxnServer).Update(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.IntPointTxn/Update", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IntPointTxnServer).Update(ctx, req.(*UpdateIntPointRequest)) +func (*ListIntPointResponse) ProtoMessage() {} + +func (x *ListIntPointResponse) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_service_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return interceptor(ctx, in, info, handler) + return mi.MessageOf(x) } -func _IntPointTxn_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListIntPointRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IntPointTxnServer).List(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.IntPointTxn/List", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IntPointTxnServer).List(ctx, req.(*ListIntPointRequest)) - } - return interceptor(ctx, in, info, handler) +// Deprecated: Use ListIntPointResponse.ProtoReflect.Descriptor instead. +func (*ListIntPointResponse) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_service_proto_rawDescGZIP(), []int{12} } -func _IntPointTxn_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteIntPointRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IntPointTxnServer).Delete(ctx, in) +func (x *ListIntPointResponse) GetResults() []*IntPoint { + if x != nil { + return x.Results } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.IntPointTxn/Delete", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IntPointTxnServer).Delete(ctx, req.(*DeleteIntPointRequest)) - } - return interceptor(ctx, in, info, handler) + return nil } -func _IntPointTxn_DeleteSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteIntPointsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IntPointTxnServer).DeleteSet(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.IntPointTxn/DeleteSet", +func (x *ListIntPointResponse) GetPageInfo() *query.PageInfo { + if x != nil { + return x.PageInfo } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IntPointTxnServer).DeleteSet(ctx, req.(*DeleteIntPointsRequest)) - } - return interceptor(ctx, in, info, handler) + return nil } -func _IntPointTxn_CustomMethod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(google_protobuf2.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IntPointTxnServer).CustomMethod(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.IntPointTxn/CustomMethod", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IntPointTxnServer).CustomMethod(ctx, req.(*google_protobuf2.Empty)) - } - return interceptor(ctx, in, info, handler) +type ListSomethingResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Note repeated field and plural name 'results' + Results []*Something `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` + PageInfo *query.PageInfo `protobuf:"bytes,2,opt,name=page_info,json=pageInfo,proto3" json:"page_info,omitempty"` } -func _IntPointTxn_CreateSomething_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Something) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IntPointTxnServer).CreateSomething(ctx, in) +func (x *ListSomethingResponse) Reset() { + *x = ListSomethingResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.IntPointTxn/CreateSomething", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IntPointTxnServer).CreateSomething(ctx, req.(*Something)) - } - return interceptor(ctx, in, info, handler) } -var _IntPointTxn_serviceDesc = grpc.ServiceDesc{ - ServiceName: "example.IntPointTxn", - HandlerType: (*IntPointTxnServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Create", - Handler: _IntPointTxn_Create_Handler, - }, - { - MethodName: "Read", - Handler: _IntPointTxn_Read_Handler, - }, - { - MethodName: "Update", - Handler: _IntPointTxn_Update_Handler, - }, - { - MethodName: "List", - Handler: _IntPointTxn_List_Handler, - }, - { - MethodName: "Delete", - Handler: _IntPointTxn_Delete_Handler, - }, - { - MethodName: "DeleteSet", - Handler: _IntPointTxn_DeleteSet_Handler, - }, - { - MethodName: "CustomMethod", - Handler: _IntPointTxn_CustomMethod_Handler, - }, - { - MethodName: "CreateSomething", - Handler: _IntPointTxn_CreateSomething_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "example/feature_demo/demo_service.proto", +func (x *ListSomethingResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -// Client API for CircleService service +func (*ListSomethingResponse) ProtoMessage() {} -type CircleServiceClient interface { - List(ctx context.Context, in *ListCircleRequest, opts ...grpc.CallOption) (*ListCircleResponse, error) +func (x *ListSomethingResponse) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_service_proto_msgTypes[13] + 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) } -type circleServiceClient struct { - cc *grpc.ClientConn +// Deprecated: Use ListSomethingResponse.ProtoReflect.Descriptor instead. +func (*ListSomethingResponse) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_service_proto_rawDescGZIP(), []int{13} } -func NewCircleServiceClient(cc *grpc.ClientConn) CircleServiceClient { - return &circleServiceClient{cc} +func (x *ListSomethingResponse) GetResults() []*Something { + if x != nil { + return x.Results + } + return nil } -func (c *circleServiceClient) List(ctx context.Context, in *ListCircleRequest, opts ...grpc.CallOption) (*ListCircleResponse, error) { - out := new(ListCircleResponse) - err := grpc.Invoke(ctx, "/example.CircleService/List", in, out, c.cc, opts...) - if err != nil { - return nil, err +func (x *ListSomethingResponse) GetPageInfo() *query.PageInfo { + if x != nil { + return x.PageInfo } - return out, nil + return nil } -// Server API for CircleService service - -type CircleServiceServer interface { - List(context.Context, *ListCircleRequest) (*ListCircleResponse, error) -} +// A dummy type to demo an rpc that can't be autogenerated +type Something struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func RegisterCircleServiceServer(s *grpc.Server, srv CircleServiceServer) { - s.RegisterService(&_CircleService_serviceDesc, srv) + Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` } -func _CircleService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListCircleRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CircleServiceServer).List(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.CircleService/List", +func (x *Something) Reset() { + *x = Something{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CircleServiceServer).List(ctx, req.(*ListCircleRequest)) - } - return interceptor(ctx, in, info, handler) } -var _CircleService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "example.CircleService", - HandlerType: (*CircleServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "List", - Handler: _CircleService_List_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "example/feature_demo/demo_service.proto", +func (x *Something) String() string { + return protoimpl.X.MessageStringOf(x) } -// Client API for MultipleMethodsAutoGen service +func (*Something) ProtoMessage() {} -type MultipleMethodsAutoGenClient interface { - CreateA(ctx context.Context, in *CreateIntPointRequest, opts ...grpc.CallOption) (*CreateIntPointResponse, error) - CreateB(ctx context.Context, in *CreateIntPointRequest, opts ...grpc.CallOption) (*CreateIntPointResponse, error) - ReadA(ctx context.Context, in *ReadIntPointRequest, opts ...grpc.CallOption) (*ReadIntPointResponse, error) - ReadB(ctx context.Context, in *ReadIntPointRequest, opts ...grpc.CallOption) (*ReadIntPointResponse, error) - UpdateA(ctx context.Context, in *UpdateIntPointRequest, opts ...grpc.CallOption) (*UpdateIntPointResponse, error) - UpdateB(ctx context.Context, in *UpdateIntPointRequest, opts ...grpc.CallOption) (*UpdateIntPointResponse, error) - ListA(ctx context.Context, in *ListIntPointRequest, opts ...grpc.CallOption) (*ListIntPointResponse, error) - ListB(ctx context.Context, in *ListIntPointRequest, opts ...grpc.CallOption) (*ListIntPointResponse, error) - DeleteA(ctx context.Context, in *DeleteIntPointRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) - DeleteB(ctx context.Context, in *DeleteIntPointRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) - DeleteSetA(ctx context.Context, in *DeleteIntPointsRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) - DeleteSetB(ctx context.Context, in *DeleteIntPointsRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) +func (x *Something) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_service_proto_msgTypes[14] + 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) } -type multipleMethodsAutoGenClient struct { - cc *grpc.ClientConn +// Deprecated: Use Something.ProtoReflect.Descriptor instead. +func (*Something) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_service_proto_rawDescGZIP(), []int{14} } -func NewMultipleMethodsAutoGenClient(cc *grpc.ClientConn) MultipleMethodsAutoGenClient { - return &multipleMethodsAutoGenClient{cc} +func (x *Something) GetField() string { + if x != nil { + return x.Field + } + return "" } -func (c *multipleMethodsAutoGenClient) CreateA(ctx context.Context, in *CreateIntPointRequest, opts ...grpc.CallOption) (*CreateIntPointResponse, error) { - out := new(CreateIntPointResponse) - err := grpc.Invoke(ctx, "/example.MultipleMethodsAutoGen/CreateA", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil +type ListIntPointRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Filter *query.Filtering `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` + OrderBy *query.Sorting `protobuf:"bytes,2,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` + Fields *query.FieldSelection `protobuf:"bytes,3,opt,name=fields,proto3" json:"fields,omitempty"` + Paging *query.Pagination `protobuf:"bytes,4,opt,name=paging,proto3" json:"paging,omitempty"` } -func (c *multipleMethodsAutoGenClient) CreateB(ctx context.Context, in *CreateIntPointRequest, opts ...grpc.CallOption) (*CreateIntPointResponse, error) { - out := new(CreateIntPointResponse) - err := grpc.Invoke(ctx, "/example.MultipleMethodsAutoGen/CreateB", in, out, c.cc, opts...) - if err != nil { - return nil, err +func (x *ListIntPointRequest) Reset() { + *x = ListIntPointRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_service_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return out, nil } -func (c *multipleMethodsAutoGenClient) ReadA(ctx context.Context, in *ReadIntPointRequest, opts ...grpc.CallOption) (*ReadIntPointResponse, error) { - out := new(ReadIntPointResponse) - err := grpc.Invoke(ctx, "/example.MultipleMethodsAutoGen/ReadA", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil +func (x *ListIntPointRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (c *multipleMethodsAutoGenClient) ReadB(ctx context.Context, in *ReadIntPointRequest, opts ...grpc.CallOption) (*ReadIntPointResponse, error) { - out := new(ReadIntPointResponse) - err := grpc.Invoke(ctx, "/example.MultipleMethodsAutoGen/ReadB", in, out, c.cc, opts...) - if err != nil { - return nil, err +func (*ListIntPointRequest) ProtoMessage() {} + +func (x *ListIntPointRequest) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_service_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return out, nil + return mi.MessageOf(x) } -func (c *multipleMethodsAutoGenClient) UpdateA(ctx context.Context, in *UpdateIntPointRequest, opts ...grpc.CallOption) (*UpdateIntPointResponse, error) { - out := new(UpdateIntPointResponse) - err := grpc.Invoke(ctx, "/example.MultipleMethodsAutoGen/UpdateA", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil +// Deprecated: Use ListIntPointRequest.ProtoReflect.Descriptor instead. +func (*ListIntPointRequest) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_service_proto_rawDescGZIP(), []int{15} } -func (c *multipleMethodsAutoGenClient) UpdateB(ctx context.Context, in *UpdateIntPointRequest, opts ...grpc.CallOption) (*UpdateIntPointResponse, error) { - out := new(UpdateIntPointResponse) - err := grpc.Invoke(ctx, "/example.MultipleMethodsAutoGen/UpdateB", in, out, c.cc, opts...) - if err != nil { - return nil, err +func (x *ListIntPointRequest) GetFilter() *query.Filtering { + if x != nil { + return x.Filter } - return out, nil + return nil } -func (c *multipleMethodsAutoGenClient) ListA(ctx context.Context, in *ListIntPointRequest, opts ...grpc.CallOption) (*ListIntPointResponse, error) { - out := new(ListIntPointResponse) - err := grpc.Invoke(ctx, "/example.MultipleMethodsAutoGen/ListA", in, out, c.cc, opts...) - if err != nil { - return nil, err +func (x *ListIntPointRequest) GetOrderBy() *query.Sorting { + if x != nil { + return x.OrderBy } - return out, nil + return nil } -func (c *multipleMethodsAutoGenClient) ListB(ctx context.Context, in *ListIntPointRequest, opts ...grpc.CallOption) (*ListIntPointResponse, error) { - out := new(ListIntPointResponse) - err := grpc.Invoke(ctx, "/example.MultipleMethodsAutoGen/ListB", in, out, c.cc, opts...) - if err != nil { - return nil, err +func (x *ListIntPointRequest) GetFields() *query.FieldSelection { + if x != nil { + return x.Fields } - return out, nil + return nil } -func (c *multipleMethodsAutoGenClient) DeleteA(ctx context.Context, in *DeleteIntPointRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) { - out := new(DeleteIntPointResponse) - err := grpc.Invoke(ctx, "/example.MultipleMethodsAutoGen/DeleteA", in, out, c.cc, opts...) - if err != nil { - return nil, err +func (x *ListIntPointRequest) GetPaging() *query.Pagination { + if x != nil { + return x.Paging } - return out, nil + return nil } -func (c *multipleMethodsAutoGenClient) DeleteB(ctx context.Context, in *DeleteIntPointRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) { - out := new(DeleteIntPointResponse) - err := grpc.Invoke(ctx, "/example.MultipleMethodsAutoGen/DeleteB", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil +type Circle struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + R uint32 `protobuf:"varint,1,opt,name=r,proto3" json:"r,omitempty"` } -func (c *multipleMethodsAutoGenClient) DeleteSetA(ctx context.Context, in *DeleteIntPointsRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) { - out := new(DeleteIntPointResponse) - err := grpc.Invoke(ctx, "/example.MultipleMethodsAutoGen/DeleteSetA", in, out, c.cc, opts...) - if err != nil { - return nil, err +func (x *Circle) Reset() { + *x = Circle{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_service_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return out, nil } -func (c *multipleMethodsAutoGenClient) DeleteSetB(ctx context.Context, in *DeleteIntPointsRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) { - out := new(DeleteIntPointResponse) - err := grpc.Invoke(ctx, "/example.MultipleMethodsAutoGen/DeleteSetB", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil +func (x *Circle) String() string { + return protoimpl.X.MessageStringOf(x) } -// Server API for MultipleMethodsAutoGen service +func (*Circle) ProtoMessage() {} -type MultipleMethodsAutoGenServer interface { - CreateA(context.Context, *CreateIntPointRequest) (*CreateIntPointResponse, error) - CreateB(context.Context, *CreateIntPointRequest) (*CreateIntPointResponse, error) - ReadA(context.Context, *ReadIntPointRequest) (*ReadIntPointResponse, error) - ReadB(context.Context, *ReadIntPointRequest) (*ReadIntPointResponse, error) - UpdateA(context.Context, *UpdateIntPointRequest) (*UpdateIntPointResponse, error) - UpdateB(context.Context, *UpdateIntPointRequest) (*UpdateIntPointResponse, error) - ListA(context.Context, *ListIntPointRequest) (*ListIntPointResponse, error) - ListB(context.Context, *ListIntPointRequest) (*ListIntPointResponse, error) - DeleteA(context.Context, *DeleteIntPointRequest) (*DeleteIntPointResponse, error) - DeleteB(context.Context, *DeleteIntPointRequest) (*DeleteIntPointResponse, error) - DeleteSetA(context.Context, *DeleteIntPointsRequest) (*DeleteIntPointResponse, error) - DeleteSetB(context.Context, *DeleteIntPointsRequest) (*DeleteIntPointResponse, error) +func (x *Circle) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_service_proto_msgTypes[16] + 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) } -func RegisterMultipleMethodsAutoGenServer(s *grpc.Server, srv MultipleMethodsAutoGenServer) { - s.RegisterService(&_MultipleMethodsAutoGen_serviceDesc, srv) +// Deprecated: Use Circle.ProtoReflect.Descriptor instead. +func (*Circle) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_service_proto_rawDescGZIP(), []int{16} } -func _MultipleMethodsAutoGen_CreateA_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateIntPointRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MultipleMethodsAutoGenServer).CreateA(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.MultipleMethodsAutoGen/CreateA", +func (x *Circle) GetR() uint32 { + if x != nil { + return x.R } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MultipleMethodsAutoGenServer).CreateA(ctx, req.(*CreateIntPointRequest)) - } - return interceptor(ctx, in, info, handler) + return 0 } -func _MultipleMethodsAutoGen_CreateB_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateIntPointRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MultipleMethodsAutoGenServer).CreateB(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.MultipleMethodsAutoGen/CreateB", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MultipleMethodsAutoGenServer).CreateB(ctx, req.(*CreateIntPointRequest)) - } - return interceptor(ctx, in, info, handler) +type ListCircleRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func _MultipleMethodsAutoGen_ReadA_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReadIntPointRequest) - if err := dec(in); err != nil { - return nil, err +func (x *ListCircleRequest) Reset() { + *x = ListCircleRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_service_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - if interceptor == nil { - return srv.(MultipleMethodsAutoGenServer).ReadA(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.MultipleMethodsAutoGen/ReadA", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MultipleMethodsAutoGenServer).ReadA(ctx, req.(*ReadIntPointRequest)) - } - return interceptor(ctx, in, info, handler) } -func _MultipleMethodsAutoGen_ReadB_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReadIntPointRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MultipleMethodsAutoGenServer).ReadB(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.MultipleMethodsAutoGen/ReadB", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MultipleMethodsAutoGenServer).ReadB(ctx, req.(*ReadIntPointRequest)) - } - return interceptor(ctx, in, info, handler) +func (x *ListCircleRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func _MultipleMethodsAutoGen_UpdateA_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateIntPointRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MultipleMethodsAutoGenServer).UpdateA(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.MultipleMethodsAutoGen/UpdateA", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MultipleMethodsAutoGenServer).UpdateA(ctx, req.(*UpdateIntPointRequest)) +func (*ListCircleRequest) ProtoMessage() {} + +func (x *ListCircleRequest) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_service_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return interceptor(ctx, in, info, handler) + return mi.MessageOf(x) } -func _MultipleMethodsAutoGen_UpdateB_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateIntPointRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MultipleMethodsAutoGenServer).UpdateB(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.MultipleMethodsAutoGen/UpdateB", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MultipleMethodsAutoGenServer).UpdateB(ctx, req.(*UpdateIntPointRequest)) - } - return interceptor(ctx, in, info, handler) +// Deprecated: Use ListCircleRequest.ProtoReflect.Descriptor instead. +func (*ListCircleRequest) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_service_proto_rawDescGZIP(), []int{17} } -func _MultipleMethodsAutoGen_ListA_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListIntPointRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MultipleMethodsAutoGenServer).ListA(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.MultipleMethodsAutoGen/ListA", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MultipleMethodsAutoGenServer).ListA(ctx, req.(*ListIntPointRequest)) - } - return interceptor(ctx, in, info, handler) +type ListCircleResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Results []*Circle `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` } -func _MultipleMethodsAutoGen_ListB_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListIntPointRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MultipleMethodsAutoGenServer).ListB(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.MultipleMethodsAutoGen/ListB", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MultipleMethodsAutoGenServer).ListB(ctx, req.(*ListIntPointRequest)) +func (x *ListCircleResponse) Reset() { + *x = ListCircleResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_service_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return interceptor(ctx, in, info, handler) } -func _MultipleMethodsAutoGen_DeleteA_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteIntPointRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MultipleMethodsAutoGenServer).DeleteA(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.MultipleMethodsAutoGen/DeleteA", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MultipleMethodsAutoGenServer).DeleteA(ctx, req.(*DeleteIntPointRequest)) - } - return interceptor(ctx, in, info, handler) +func (x *ListCircleResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func _MultipleMethodsAutoGen_DeleteB_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteIntPointRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MultipleMethodsAutoGenServer).DeleteB(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.MultipleMethodsAutoGen/DeleteB", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MultipleMethodsAutoGenServer).DeleteB(ctx, req.(*DeleteIntPointRequest)) +func (*ListCircleResponse) ProtoMessage() {} + +func (x *ListCircleResponse) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_service_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return interceptor(ctx, in, info, handler) + return mi.MessageOf(x) } -func _MultipleMethodsAutoGen_DeleteSetA_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteIntPointsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MultipleMethodsAutoGenServer).DeleteSetA(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.MultipleMethodsAutoGen/DeleteSetA", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MultipleMethodsAutoGenServer).DeleteSetA(ctx, req.(*DeleteIntPointsRequest)) - } - return interceptor(ctx, in, info, handler) +// Deprecated: Use ListCircleResponse.ProtoReflect.Descriptor instead. +func (*ListCircleResponse) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_service_proto_rawDescGZIP(), []int{18} } -func _MultipleMethodsAutoGen_DeleteSetB_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteIntPointsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MultipleMethodsAutoGenServer).DeleteSetB(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/example.MultipleMethodsAutoGen/DeleteSetB", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MultipleMethodsAutoGenServer).DeleteSetB(ctx, req.(*DeleteIntPointsRequest)) +func (x *ListCircleResponse) GetResults() []*Circle { + if x != nil { + return x.Results } - return interceptor(ctx, in, info, handler) + return nil } -var _MultipleMethodsAutoGen_serviceDesc = grpc.ServiceDesc{ - ServiceName: "example.MultipleMethodsAutoGen", - HandlerType: (*MultipleMethodsAutoGenServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateA", - Handler: _MultipleMethodsAutoGen_CreateA_Handler, - }, - { - MethodName: "CreateB", - Handler: _MultipleMethodsAutoGen_CreateB_Handler, - }, - { - MethodName: "ReadA", - Handler: _MultipleMethodsAutoGen_ReadA_Handler, - }, - { - MethodName: "ReadB", - Handler: _MultipleMethodsAutoGen_ReadB_Handler, - }, - { - MethodName: "UpdateA", - Handler: _MultipleMethodsAutoGen_UpdateA_Handler, - }, - { - MethodName: "UpdateB", - Handler: _MultipleMethodsAutoGen_UpdateB_Handler, - }, - { - MethodName: "ListA", - Handler: _MultipleMethodsAutoGen_ListA_Handler, - }, - { - MethodName: "ListB", - Handler: _MultipleMethodsAutoGen_ListB_Handler, - }, - { - MethodName: "DeleteA", - Handler: _MultipleMethodsAutoGen_DeleteA_Handler, - }, - { - MethodName: "DeleteB", - Handler: _MultipleMethodsAutoGen_DeleteB_Handler, - }, - { - MethodName: "DeleteSetA", - Handler: _MultipleMethodsAutoGen_DeleteSetA_Handler, - }, - { - MethodName: "DeleteSetB", - Handler: _MultipleMethodsAutoGen_DeleteSetB_Handler, +var File_feature_demo_demo_service_proto protoreflect.FileDescriptor + +var file_feature_demo_demo_service_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x65, 0x6d, 0x6f, 0x2f, 0x64, + 0x65, 0x6d, 0x6f, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 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, 0x12, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x67, 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x61, + 0x74, 0x6c, 0x61, 0x73, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, + 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3e, 0x0a, 0x08, 0x49, 0x6e, 0x74, 0x50, + 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, 0x79, + 0x3a, 0x06, 0xba, 0xb9, 0x19, 0x02, 0x08, 0x01, 0x22, 0x44, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x2b, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x49, 0x6e, 0x74, + 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x43, + 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x2e, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x22, 0x5d, 0x0a, 0x13, 0x52, 0x65, 0x61, 0x64, 0x49, 0x6e, 0x74, 0x50, 0x6f, + 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x36, 0x0a, 0x06, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x74, 0x6c, + 0x61, 0x73, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x73, 0x22, 0x41, 0x0a, 0x14, 0x52, 0x65, 0x61, 0x64, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x65, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x89, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x2b, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x49, 0x6e, 0x74, 0x50, 0x6f, + 0x69, 0x6e, 0x74, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x43, 0x0a, 0x0f, + 0x67, 0x65, 0x72, 0x6f, 0x67, 0x65, 0x72, 0x69, 0x5f, 0x67, 0x65, 0x67, 0x65, 0x67, 0x65, 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, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, + 0x6b, 0x52, 0x0e, 0x67, 0x65, 0x72, 0x6f, 0x67, 0x65, 0x72, 0x69, 0x47, 0x65, 0x67, 0x65, 0x67, + 0x65, 0x22, 0x43, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x50, 0x6f, + 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x65, 0x78, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x79, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x53, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x49, 0x6e, + 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, + 0x30, 0x0a, 0x05, 0x6d, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x6d, 0x61, 0x73, 0x6b, + 0x73, 0x22, 0x48, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x49, 0x6e, + 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, + 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x11, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, + 0x6e, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x27, 0x0a, 0x15, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x02, 0x69, 0x64, 0x22, 0x2a, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, + 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, + 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x03, 0x69, 0x64, 0x73, + 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7a, 0x0a, 0x14, 0x4c, 0x69, + 0x73, 0x74, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x49, 0x6e, + 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, + 0x35, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x74, 0x6c, 0x61, 0x73, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, + 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x7c, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6f, + 0x6d, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x2c, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x74, + 0x68, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x35, 0x0a, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x18, 0x2e, 0x61, 0x74, 0x6c, 0x61, 0x73, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x29, 0x0a, 0x09, 0x53, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x69, 0x6e, + 0x67, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x06, 0xba, 0xb9, 0x19, 0x02, 0x08, 0x01, 0x22, + 0xe8, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x74, 0x6c, 0x61, 0x73, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x69, + 0x6e, 0x67, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x08, 0x6f, 0x72, + 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, + 0x74, 0x6c, 0x61, 0x73, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, + 0x72, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x12, 0x36, + 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x61, 0x74, 0x6c, 0x61, 0x73, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x32, 0x0a, 0x06, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x74, 0x6c, 0x61, 0x73, 0x2e, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x06, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x67, 0x22, 0x1e, 0x0a, 0x06, 0x43, 0x69, + 0x72, 0x63, 0x6c, 0x65, 0x12, 0x0c, 0x0a, 0x01, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x01, 0x72, 0x3a, 0x06, 0xba, 0xb9, 0x19, 0x02, 0x08, 0x01, 0x22, 0x13, 0x0a, 0x11, 0x4c, 0x69, + 0x73, 0x74, 0x43, 0x69, 0x72, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, + 0x3f, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x69, 0x72, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x2e, 0x43, 0x69, 0x72, 0x63, 0x6c, 0x65, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, + 0x32, 0xbc, 0x05, 0x0a, 0x0f, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x1e, + 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, + 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, + 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, + 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x45, 0x0a, 0x04, 0x52, 0x65, 0x61, 0x64, 0x12, 0x1c, 0x2e, 0x65, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x12, 0x1e, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x65, 0x74, 0x12, 0x21, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x04, 0x4c, + 0x69, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1d, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6f, 0x6d, 0x65, 0x74, 0x68, + 0x69, 0x6e, 0x67, 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, 0x1e, 0x2e, 0x65, 0x78, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x6f, 0x6d, 0x65, 0x74, 0x68, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x59, 0x0a, + 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1e, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0e, 0xba, 0xb9, 0x19, 0x0a, 0x0a, 0x08, + 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x0c, 0x43, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 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, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x0f, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x53, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x2e, + 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x69, 0x6e, + 0x67, 0x1a, 0x12, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, + 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0x00, 0x1a, 0x06, 0xba, 0xb9, 0x19, 0x02, 0x08, 0x01, 0x32, + 0xfc, 0x04, 0x0a, 0x0b, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x54, 0x78, 0x6e, 0x12, + 0x4b, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x2e, 0x65, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, + 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x04, + 0x52, 0x65, 0x61, 0x64, 0x12, 0x1c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x52, + 0x65, 0x61, 0x64, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x52, 0x65, 0x61, + 0x64, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x2e, + 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, + 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, + 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, + 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x45, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x12, 0x1e, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x0f, 0xba, 0xb9, 0x19, 0x0b, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x12, 0x5e, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x74, + 0x12, 0x1f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x0f, 0xba, 0xb9, 0x19, 0x0b, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x0c, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 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, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, + 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x1a, 0x12, 0x2e, 0x65, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x53, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, + 0x22, 0x00, 0x1a, 0x0a, 0xba, 0xb9, 0x19, 0x06, 0x08, 0x01, 0x10, 0x01, 0x18, 0x01, 0x32, 0x5a, + 0x0a, 0x0d, 0x43, 0x69, 0x72, 0x63, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x41, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1a, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x69, 0x72, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x43, 0x69, 0x72, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x1a, 0x06, 0xba, 0xb9, 0x19, 0x02, 0x08, 0x01, 0x32, 0xf4, 0x07, 0x0a, 0x16, 0x4d, + 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x41, 0x75, + 0x74, 0x6f, 0x47, 0x65, 0x6e, 0x12, 0x4c, 0x0a, 0x07, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, + 0x12, 0x1e, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x07, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x12, 0x1e, + 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, + 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, + 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, + 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x46, 0x0a, 0x05, 0x52, 0x65, 0x61, 0x64, 0x41, 0x12, 0x1c, 0x2e, 0x65, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x05, 0x52, 0x65, 0x61, + 0x64, 0x42, 0x12, 0x1c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x52, 0x65, 0x61, + 0x64, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1d, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x49, + 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x4c, 0x0a, 0x07, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x12, 0x1e, 0x2e, 0x65, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, + 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, + 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x4c, 0x0a, 0x07, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x12, 0x1e, 0x2e, 0x65, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x50, 0x6f, + 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x50, 0x6f, + 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, + 0x05, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x12, 0x1c, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x05, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x12, 0x1c, + 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x74, + 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x65, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x74, 0x50, 0x6f, + 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, + 0x07, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x12, 0x1e, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, + 0x6c, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0f, 0xba, 0xb9, 0x19, 0x0b, 0x0a, + 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x5b, 0x0a, 0x07, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x42, 0x12, 0x1e, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0f, 0xba, 0xb9, 0x19, 0x0b, 0x0a, 0x09, 0x69, 0x6e, + 0x74, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x5f, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x53, 0x65, 0x74, 0x41, 0x12, 0x1f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0f, 0xba, 0xb9, 0x19, 0x0b, 0x0a, 0x09, 0x69, + 0x6e, 0x74, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x5f, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x53, 0x65, 0x74, 0x42, 0x12, 0x1f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0f, 0xba, 0xb9, 0x19, 0x0b, 0x0a, 0x09, + 0x69, 0x6e, 0x74, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x1a, 0x06, 0xba, 0xb9, 0x19, 0x02, 0x08, + 0x01, 0x42, 0x46, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x69, 0x6e, 0x66, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x72, 0x6d, 0x2f, 0x65, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x65, 0x6d, + 0x6f, 0x3b, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_feature_demo_demo_service_proto_rawDescOnce sync.Once + file_feature_demo_demo_service_proto_rawDescData = file_feature_demo_demo_service_proto_rawDesc +) + +func file_feature_demo_demo_service_proto_rawDescGZIP() []byte { + file_feature_demo_demo_service_proto_rawDescOnce.Do(func() { + file_feature_demo_demo_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_feature_demo_demo_service_proto_rawDescData) + }) + return file_feature_demo_demo_service_proto_rawDescData +} + +var file_feature_demo_demo_service_proto_msgTypes = make([]protoimpl.MessageInfo, 19) +var file_feature_demo_demo_service_proto_goTypes = []interface{}{ + (*IntPoint)(nil), // 0: example.IntPoint + (*CreateIntPointRequest)(nil), // 1: example.CreateIntPointRequest + (*CreateIntPointResponse)(nil), // 2: example.CreateIntPointResponse + (*ReadIntPointRequest)(nil), // 3: example.ReadIntPointRequest + (*ReadIntPointResponse)(nil), // 4: example.ReadIntPointResponse + (*UpdateIntPointRequest)(nil), // 5: example.UpdateIntPointRequest + (*UpdateIntPointResponse)(nil), // 6: example.UpdateIntPointResponse + (*UpdateSetIntPointRequest)(nil), // 7: example.UpdateSetIntPointRequest + (*UpdateSetIntPointResponse)(nil), // 8: example.UpdateSetIntPointResponse + (*DeleteIntPointRequest)(nil), // 9: example.DeleteIntPointRequest + (*DeleteIntPointsRequest)(nil), // 10: example.DeleteIntPointsRequest + (*DeleteIntPointResponse)(nil), // 11: example.DeleteIntPointResponse + (*ListIntPointResponse)(nil), // 12: example.ListIntPointResponse + (*ListSomethingResponse)(nil), // 13: example.ListSomethingResponse + (*Something)(nil), // 14: example.Something + (*ListIntPointRequest)(nil), // 15: example.ListIntPointRequest + (*Circle)(nil), // 16: example.Circle + (*ListCircleRequest)(nil), // 17: example.ListCircleRequest + (*ListCircleResponse)(nil), // 18: example.ListCircleResponse + (*query.FieldSelection)(nil), // 19: atlas.query.v1.FieldSelection + (*fieldmaskpb.FieldMask)(nil), // 20: google.protobuf.FieldMask + (*query.PageInfo)(nil), // 21: atlas.query.v1.PageInfo + (*query.Filtering)(nil), // 22: atlas.query.v1.Filtering + (*query.Sorting)(nil), // 23: atlas.query.v1.Sorting + (*query.Pagination)(nil), // 24: atlas.query.v1.Pagination + (*emptypb.Empty)(nil), // 25: google.protobuf.Empty +} +var file_feature_demo_demo_service_proto_depIdxs = []int32{ + 0, // 0: example.CreateIntPointRequest.payload:type_name -> example.IntPoint + 0, // 1: example.CreateIntPointResponse.result:type_name -> example.IntPoint + 19, // 2: example.ReadIntPointRequest.fields:type_name -> atlas.query.v1.FieldSelection + 0, // 3: example.ReadIntPointResponse.result:type_name -> example.IntPoint + 0, // 4: example.UpdateIntPointRequest.payload:type_name -> example.IntPoint + 20, // 5: example.UpdateIntPointRequest.gerogeri_gegege:type_name -> google.protobuf.FieldMask + 0, // 6: example.UpdateIntPointResponse.result:type_name -> example.IntPoint + 0, // 7: example.UpdateSetIntPointRequest.objects:type_name -> example.IntPoint + 20, // 8: example.UpdateSetIntPointRequest.masks:type_name -> google.protobuf.FieldMask + 0, // 9: example.UpdateSetIntPointResponse.results:type_name -> example.IntPoint + 0, // 10: example.ListIntPointResponse.results:type_name -> example.IntPoint + 21, // 11: example.ListIntPointResponse.page_info:type_name -> atlas.query.v1.PageInfo + 14, // 12: example.ListSomethingResponse.results:type_name -> example.Something + 21, // 13: example.ListSomethingResponse.page_info:type_name -> atlas.query.v1.PageInfo + 22, // 14: example.ListIntPointRequest.filter:type_name -> atlas.query.v1.Filtering + 23, // 15: example.ListIntPointRequest.order_by:type_name -> atlas.query.v1.Sorting + 19, // 16: example.ListIntPointRequest.fields:type_name -> atlas.query.v1.FieldSelection + 24, // 17: example.ListIntPointRequest.paging:type_name -> atlas.query.v1.Pagination + 16, // 18: example.ListCircleResponse.results:type_name -> example.Circle + 1, // 19: example.IntPointService.Create:input_type -> example.CreateIntPointRequest + 3, // 20: example.IntPointService.Read:input_type -> example.ReadIntPointRequest + 5, // 21: example.IntPointService.Update:input_type -> example.UpdateIntPointRequest + 7, // 22: example.IntPointService.UpdateSet:input_type -> example.UpdateSetIntPointRequest + 15, // 23: example.IntPointService.List:input_type -> example.ListIntPointRequest + 25, // 24: example.IntPointService.ListSomething:input_type -> google.protobuf.Empty + 9, // 25: example.IntPointService.Delete:input_type -> example.DeleteIntPointRequest + 25, // 26: example.IntPointService.CustomMethod:input_type -> google.protobuf.Empty + 14, // 27: example.IntPointService.CreateSomething:input_type -> example.Something + 1, // 28: example.IntPointTxn.Create:input_type -> example.CreateIntPointRequest + 3, // 29: example.IntPointTxn.Read:input_type -> example.ReadIntPointRequest + 5, // 30: example.IntPointTxn.Update:input_type -> example.UpdateIntPointRequest + 15, // 31: example.IntPointTxn.List:input_type -> example.ListIntPointRequest + 9, // 32: example.IntPointTxn.Delete:input_type -> example.DeleteIntPointRequest + 10, // 33: example.IntPointTxn.DeleteSet:input_type -> example.DeleteIntPointsRequest + 25, // 34: example.IntPointTxn.CustomMethod:input_type -> google.protobuf.Empty + 14, // 35: example.IntPointTxn.CreateSomething:input_type -> example.Something + 17, // 36: example.CircleService.List:input_type -> example.ListCircleRequest + 1, // 37: example.MultipleMethodsAutoGen.CreateA:input_type -> example.CreateIntPointRequest + 1, // 38: example.MultipleMethodsAutoGen.CreateB:input_type -> example.CreateIntPointRequest + 3, // 39: example.MultipleMethodsAutoGen.ReadA:input_type -> example.ReadIntPointRequest + 3, // 40: example.MultipleMethodsAutoGen.ReadB:input_type -> example.ReadIntPointRequest + 5, // 41: example.MultipleMethodsAutoGen.UpdateA:input_type -> example.UpdateIntPointRequest + 5, // 42: example.MultipleMethodsAutoGen.UpdateB:input_type -> example.UpdateIntPointRequest + 15, // 43: example.MultipleMethodsAutoGen.ListA:input_type -> example.ListIntPointRequest + 15, // 44: example.MultipleMethodsAutoGen.ListB:input_type -> example.ListIntPointRequest + 9, // 45: example.MultipleMethodsAutoGen.DeleteA:input_type -> example.DeleteIntPointRequest + 9, // 46: example.MultipleMethodsAutoGen.DeleteB:input_type -> example.DeleteIntPointRequest + 10, // 47: example.MultipleMethodsAutoGen.DeleteSetA:input_type -> example.DeleteIntPointsRequest + 10, // 48: example.MultipleMethodsAutoGen.DeleteSetB:input_type -> example.DeleteIntPointsRequest + 2, // 49: example.IntPointService.Create:output_type -> example.CreateIntPointResponse + 4, // 50: example.IntPointService.Read:output_type -> example.ReadIntPointResponse + 6, // 51: example.IntPointService.Update:output_type -> example.UpdateIntPointResponse + 8, // 52: example.IntPointService.UpdateSet:output_type -> example.UpdateSetIntPointResponse + 12, // 53: example.IntPointService.List:output_type -> example.ListIntPointResponse + 13, // 54: example.IntPointService.ListSomething:output_type -> example.ListSomethingResponse + 11, // 55: example.IntPointService.Delete:output_type -> example.DeleteIntPointResponse + 25, // 56: example.IntPointService.CustomMethod:output_type -> google.protobuf.Empty + 14, // 57: example.IntPointService.CreateSomething:output_type -> example.Something + 2, // 58: example.IntPointTxn.Create:output_type -> example.CreateIntPointResponse + 4, // 59: example.IntPointTxn.Read:output_type -> example.ReadIntPointResponse + 6, // 60: example.IntPointTxn.Update:output_type -> example.UpdateIntPointResponse + 12, // 61: example.IntPointTxn.List:output_type -> example.ListIntPointResponse + 11, // 62: example.IntPointTxn.Delete:output_type -> example.DeleteIntPointResponse + 11, // 63: example.IntPointTxn.DeleteSet:output_type -> example.DeleteIntPointResponse + 25, // 64: example.IntPointTxn.CustomMethod:output_type -> google.protobuf.Empty + 14, // 65: example.IntPointTxn.CreateSomething:output_type -> example.Something + 18, // 66: example.CircleService.List:output_type -> example.ListCircleResponse + 2, // 67: example.MultipleMethodsAutoGen.CreateA:output_type -> example.CreateIntPointResponse + 2, // 68: example.MultipleMethodsAutoGen.CreateB:output_type -> example.CreateIntPointResponse + 4, // 69: example.MultipleMethodsAutoGen.ReadA:output_type -> example.ReadIntPointResponse + 4, // 70: example.MultipleMethodsAutoGen.ReadB:output_type -> example.ReadIntPointResponse + 6, // 71: example.MultipleMethodsAutoGen.UpdateA:output_type -> example.UpdateIntPointResponse + 6, // 72: example.MultipleMethodsAutoGen.UpdateB:output_type -> example.UpdateIntPointResponse + 12, // 73: example.MultipleMethodsAutoGen.ListA:output_type -> example.ListIntPointResponse + 12, // 74: example.MultipleMethodsAutoGen.ListB:output_type -> example.ListIntPointResponse + 11, // 75: example.MultipleMethodsAutoGen.DeleteA:output_type -> example.DeleteIntPointResponse + 11, // 76: example.MultipleMethodsAutoGen.DeleteB:output_type -> example.DeleteIntPointResponse + 11, // 77: example.MultipleMethodsAutoGen.DeleteSetA:output_type -> example.DeleteIntPointResponse + 11, // 78: example.MultipleMethodsAutoGen.DeleteSetB:output_type -> example.DeleteIntPointResponse + 49, // [49:79] is the sub-list for method output_type + 19, // [19:49] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name +} + +func init() { file_feature_demo_demo_service_proto_init() } +func file_feature_demo_demo_service_proto_init() { + if File_feature_demo_demo_service_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_feature_demo_demo_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IntPoint); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateIntPointRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateIntPointResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadIntPointRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReadIntPointResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateIntPointRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateIntPointResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateSetIntPointRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateSetIntPointResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteIntPointRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteIntPointsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteIntPointResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListIntPointResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListSomethingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Something); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListIntPointRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Circle); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListCircleRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListCircleResponse); 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{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_feature_demo_demo_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 19, + NumExtensions: 0, + NumServices: 4, }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "example/feature_demo/demo_service.proto", -} - -func init() { proto.RegisterFile("example/feature_demo/demo_service.proto", fileDescriptor2) } - -var fileDescriptor2 = []byte{ - // 1080 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0x5d, 0x6f, 0xda, 0x56, - 0x18, 0xc6, 0x49, 0x30, 0xe1, 0x4d, 0x93, 0xb4, 0x27, 0x1f, 0x03, 0xb7, 0xcb, 0x32, 0xdf, 0xb4, - 0x5d, 0x17, 0x1c, 0xd1, 0x5d, 0xb5, 0xd2, 0x36, 0x20, 0x4d, 0x97, 0x35, 0x91, 0x2a, 0xe8, 0x2e, - 0x96, 0x4a, 0x43, 0x06, 0x5e, 0x1c, 0x2f, 0xc6, 0xc7, 0xb5, 0x0f, 0x13, 0xec, 0x1f, 0xec, 0x27, - 0x25, 0xda, 0x8f, 0xd9, 0x8f, 0xd8, 0xe5, 0x2e, 0xa6, 0xe3, 0x73, 0xec, 0x18, 0x63, 0xba, 0x76, - 0x10, 0x4d, 0x9a, 0x22, 0x45, 0xf8, 0x9c, 0xe7, 0x3c, 0xef, 0xc7, 0x79, 0xde, 0x07, 0x64, 0x78, - 0x88, 0x23, 0x73, 0xe0, 0x39, 0x68, 0xf4, 0xd1, 0x64, 0x43, 0x1f, 0xdb, 0x3d, 0x1c, 0x50, 0x83, - 0xff, 0x6b, 0x07, 0xe8, 0xff, 0x62, 0x77, 0xb1, 0xe2, 0xf9, 0x94, 0x51, 0x52, 0x90, 0x40, 0xed, - 0xbe, 0x45, 0xa9, 0xe5, 0xa0, 0x11, 0x2e, 0x77, 0x86, 0x7d, 0x03, 0x07, 0x1e, 0x1b, 0x0b, 0x94, - 0xf6, 0xcc, 0xb2, 0xd9, 0xc5, 0xb0, 0x53, 0xe9, 0xd2, 0x81, 0x61, 0xbb, 0x7d, 0xda, 0x71, 0xe8, - 0x88, 0x7a, 0xe8, 0x0a, 0x74, 0xf7, 0xc0, 0x42, 0xf7, 0xc0, 0xa2, 0xfe, 0xc0, 0xa0, 0x1e, 0xb3, - 0xa9, 0x1b, 0x18, 0xfc, 0x41, 0x9e, 0xdd, 0x4f, 0x13, 0xf7, 0x6d, 0x74, 0x7a, 0xed, 0x81, 0x19, - 0x5c, 0x4a, 0xc4, 0xf7, 0xb3, 0xd8, 0x4d, 0xe6, 0x98, 0xc1, 0x81, 0xe9, 0x79, 0x07, 0x8c, 0x52, - 0xe7, 0xd2, 0x66, 0xc6, 0xbb, 0x21, 0xfa, 0x63, 0xa3, 0x4b, 0x1d, 0x07, 0xbb, 0x3c, 0x52, 0x9b, - 0x7a, 0xe8, 0x9b, 0x8c, 0xfa, 0x81, 0xe0, 0xd2, 0xbf, 0x86, 0xd5, 0x13, 0x97, 0xbd, 0xa6, 0xb6, - 0xcb, 0xc8, 0x06, 0x2c, 0xd9, 0xbd, 0x92, 0xb2, 0xaf, 0x3c, 0x5a, 0x6f, 0x2e, 0xd9, 0x3d, 0x72, - 0x07, 0x94, 0x51, 0x69, 0x69, 0x5f, 0x79, 0x94, 0x6f, 0x2a, 0x23, 0xfe, 0x34, 0x2e, 0x2d, 0x8b, - 0xa7, 0xf1, 0x33, 0xf5, 0xfa, 0xaa, 0xbc, 0xb4, 0xaa, 0xe8, 0x47, 0xb0, 0xd3, 0xf0, 0xd1, 0x64, - 0x18, 0xb1, 0x34, 0xf1, 0xdd, 0x10, 0x03, 0x46, 0x9e, 0x40, 0xc1, 0x33, 0xc7, 0x0e, 0x35, 0x05, - 0xe3, 0x5a, 0xf5, 0x5e, 0x45, 0xb6, 0xae, 0x12, 0x43, 0x23, 0x84, 0xde, 0x80, 0xdd, 0x34, 0x4b, - 0xe0, 0x51, 0x37, 0x40, 0xf2, 0x18, 0x54, 0x1f, 0x83, 0xa1, 0xc3, 0x66, 0xb3, 0x48, 0x80, 0xfe, - 0x16, 0xb6, 0x9a, 0x68, 0xf6, 0xd2, 0x89, 0xa4, 0xab, 0xfa, 0x0a, 0xd4, 0xb0, 0xa3, 0x41, 0x58, - 0xda, 0x5a, 0xf5, 0x41, 0x25, 0xea, 0x61, 0xc5, 0xf4, 0xec, 0xca, 0x31, 0xdf, 0x6b, 0xa1, 0xec, - 0x57, 0x53, 0x62, 0xf5, 0x1a, 0x6c, 0x4f, 0x92, 0x7f, 0x7c, 0x7e, 0xbf, 0x29, 0xb0, 0xf3, 0x83, - 0xd7, 0x9b, 0xb3, 0x57, 0xa4, 0x01, 0x9b, 0x16, 0xfa, 0xd4, 0x42, 0xdf, 0x6e, 0x5b, 0xc8, 0xff, - 0x64, 0x21, 0x5a, 0x45, 0x28, 0xa7, 0x12, 0x29, 0x47, 0xd4, 0x72, 0x66, 0x06, 0x97, 0xcd, 0x8d, - 0xe8, 0xc8, 0xcb, 0xf0, 0x04, 0x6f, 0x78, 0x3a, 0x95, 0x8f, 0x2f, 0x68, 0x0c, 0x25, 0x41, 0xd2, - 0x42, 0x96, 0x51, 0x12, 0xed, 0xfc, 0x8c, 0x5d, 0x16, 0x94, 0x94, 0xfd, 0xe5, 0x19, 0x25, 0x49, - 0x04, 0x39, 0x84, 0x3c, 0x97, 0x37, 0xbf, 0x91, 0xe5, 0x7f, 0x28, 0x44, 0x00, 0xf5, 0xef, 0xa0, - 0x9c, 0x11, 0x5a, 0x96, 0xf0, 0x04, 0x0a, 0x22, 0xc3, 0xf7, 0xc5, 0x96, 0x08, 0xfd, 0x21, 0xec, - 0x1c, 0xa1, 0x83, 0xd3, 0x97, 0x92, 0xd2, 0x8d, 0xfe, 0x05, 0xec, 0x4e, 0x02, 0x83, 0x08, 0x79, - 0x17, 0x96, 0xed, 0x9e, 0x88, 0xb5, 0xde, 0xe4, 0x1f, 0xf5, 0x52, 0x1a, 0x1b, 0xe5, 0xa6, 0x8f, - 0x60, 0xfb, 0xd4, 0x0e, 0xe6, 0xcb, 0x99, 0x3c, 0x85, 0xa2, 0x67, 0x5a, 0xd8, 0xe6, 0xc2, 0x95, - 0x97, 0xbf, 0x3b, 0xa9, 0xe2, 0xd7, 0xa6, 0x85, 0x27, 0x6e, 0x9f, 0x36, 0x57, 0x3d, 0xf9, 0x49, - 0xff, 0x15, 0x76, 0x78, 0xe4, 0x16, 0x1d, 0x20, 0xbb, 0xb0, 0x5d, 0x2b, 0x0e, 0xfd, 0x65, 0x3a, - 0x34, 0x89, 0x43, 0xdf, 0x80, 0xe7, 0x8b, 0xfd, 0x18, 0x8a, 0x31, 0x15, 0xd9, 0x86, 0x7c, 0x38, - 0x54, 0x61, 0x6f, 0x8b, 0x4d, 0xf1, 0x10, 0x1b, 0xca, 0x1f, 0x0a, 0x6c, 0x4d, 0x76, 0x48, 0x34, - 0xd9, 0xe0, 0x63, 0xeb, 0x30, 0xf4, 0xa5, 0x2e, 0x3f, 0x49, 0x8f, 0x2d, 0xdf, 0xe3, 0x99, 0x4a, - 0x18, 0x39, 0x84, 0x55, 0xea, 0xf7, 0xd0, 0x6f, 0x77, 0xc6, 0x32, 0xcf, 0x9d, 0xc9, 0x23, 0x2d, - 0xea, 0xb3, 0xb0, 0xb4, 0x10, 0x56, 0x1f, 0x27, 0x9c, 0x61, 0xf9, 0xc3, 0x9d, 0x81, 0x1c, 0x82, - 0xea, 0x99, 0x96, 0xed, 0x5a, 0xa5, 0x95, 0xf0, 0x54, 0x69, 0xaa, 0x1b, 0xb6, 0x6b, 0x8a, 0x13, - 0x02, 0xa7, 0xef, 0x81, 0xda, 0xb0, 0xfd, 0xae, 0x83, 0xdc, 0x53, 0x7d, 0x29, 0x31, 0xc5, 0x8f, - 0x5b, 0xb0, 0x05, 0xf7, 0x78, 0x07, 0x04, 0x46, 0xd6, 0xaf, 0x7f, 0x03, 0x24, 0xb9, 0x18, 0x4f, - 0x6b, 0xea, 0xee, 0x36, 0xe3, 0xbb, 0x93, 0xc8, 0x68, 0xbf, 0xfa, 0x7b, 0x1e, 0x36, 0xa3, 0xa6, - 0xb6, 0xc4, 0x77, 0x1a, 0x79, 0x05, 0xaa, 0xf0, 0x5d, 0xb2, 0x77, 0x73, 0x2e, 0xcb, 0xce, 0xb5, - 0xcf, 0x66, 0xee, 0x4b, 0x61, 0xe7, 0xc8, 0x0b, 0x58, 0xe1, 0x16, 0x49, 0x1e, 0xc4, 0xd0, 0x0c, - 0x3b, 0xd6, 0x3e, 0x9d, 0xb1, 0x1b, 0xd3, 0xbc, 0x02, 0x55, 0x8c, 0x76, 0x22, 0xa7, 0x4c, 0xdb, - 0x4c, 0xe4, 0x94, 0xed, 0x65, 0x7a, 0x8e, 0xbc, 0x81, 0x62, 0xec, 0x13, 0xe4, 0xf3, 0x14, 0x7e, - 0xda, 0xb6, 0x34, 0xfd, 0x7d, 0x90, 0x64, 0xa5, 0xfc, 0x2e, 0x12, 0x95, 0x66, 0x28, 0x36, 0x51, - 0x69, 0xd6, 0xc4, 0xeb, 0x39, 0x72, 0x02, 0xeb, 0x13, 0x13, 0x49, 0x76, 0xa7, 0x8c, 0xef, 0x05, - 0xff, 0x51, 0xa1, 0xed, 0x4d, 0x30, 0x4d, 0x4d, 0xb0, 0x9e, 0x23, 0x3f, 0x82, 0x2a, 0x0c, 0x27, - 0xd1, 0xb4, 0x4c, 0x5b, 0x4b, 0x34, 0x6d, 0x86, 0x43, 0x6d, 0x5c, 0x5f, 0x95, 0x21, 0xf1, 0xab, - 0xe0, 0x5b, 0xb8, 0xd3, 0x18, 0x06, 0x8c, 0x0e, 0xce, 0x90, 0x5d, 0xd0, 0xde, 0xcc, 0x24, 0x67, - 0xac, 0xeb, 0x39, 0xf2, 0x1c, 0x36, 0x85, 0x68, 0x6e, 0x2a, 0xcd, 0xb0, 0x18, 0x2d, 0x63, 0x4d, - 0xcf, 0x69, 0x72, 0x28, 0xaa, 0x7f, 0xad, 0xc0, 0x5a, 0x94, 0xd3, 0x9b, 0x91, 0xfb, 0xff, 0x97, - 0xee, 0x82, 0x44, 0x76, 0xbe, 0x38, 0x65, 0x6c, 0x5e, 0x5f, 0x95, 0xd7, 0xa0, 0x68, 0xbb, 0xac, - 0xed, 0x85, 0xd2, 0xf8, 0x09, 0x8a, 0x02, 0xca, 0xa7, 0x6b, 0xd6, 0xf1, 0xe0, 0xdf, 0xf3, 0xff, - 0xc7, 0xd2, 0x83, 0xeb, 0xab, 0xb2, 0xba, 0xaa, 0xdc, 0x55, 0x4a, 0x4a, 0xf5, 0x1c, 0xd6, 0x85, - 0xa1, 0x46, 0xd6, 0x59, 0x93, 0xd7, 0xa3, 0x4d, 0x5c, 0xc0, 0x84, 0x67, 0x6b, 0xf7, 0x33, 0xf7, - 0xa2, 0xab, 0x89, 0xa5, 0xfd, 0x67, 0x01, 0x76, 0xcf, 0x86, 0x0e, 0xb3, 0x3d, 0x07, 0x45, 0xa5, - 0x41, 0x6d, 0xc8, 0xe8, 0x4b, 0x74, 0xc9, 0x29, 0x14, 0x44, 0xfe, 0xb5, 0x45, 0xc8, 0x3c, 0x66, - 0xab, 0x2f, 0x82, 0xed, 0x18, 0xf2, 0x7c, 0x0e, 0x6a, 0xf3, 0x4e, 0x8d, 0xe4, 0xa9, 0xcf, 0xcb, - 0x73, 0x0a, 0x05, 0x31, 0x4c, 0xb5, 0x45, 0x8c, 0x5f, 0xcc, 0x56, 0x5f, 0x04, 0xdb, 0x31, 0xe4, - 0xb9, 0x04, 0x6a, 0xf3, 0x4e, 0xb3, 0xe4, 0xa9, 0xcf, 0xcb, 0xf3, 0x16, 0x0a, 0x62, 0x08, 0x6b, - 0xb7, 0x60, 0x0b, 0x31, 0x79, 0xfd, 0x16, 0xc8, 0xdb, 0x00, 0xb1, 0xe7, 0xd4, 0x6e, 0xc3, 0x74, - 0x92, 0x01, 0xea, 0xb7, 0x10, 0x20, 0x1a, 0xfb, 0xfa, 0xf1, 0xf9, 0xd1, 0x87, 0xbe, 0x26, 0xc8, - 0x7a, 0x3b, 0xf1, 0x5c, 0x2e, 0x76, 0xd4, 0x10, 0xfd, 0xf4, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xbb, 0x04, 0x99, 0xc3, 0xc4, 0x10, 0x00, 0x00, + GoTypes: file_feature_demo_demo_service_proto_goTypes, + DependencyIndexes: file_feature_demo_demo_service_proto_depIdxs, + MessageInfos: file_feature_demo_demo_service_proto_msgTypes, + }.Build() + File_feature_demo_demo_service_proto = out.File + file_feature_demo_demo_service_proto_rawDesc = nil + file_feature_demo_demo_service_proto_goTypes = nil + file_feature_demo_demo_service_proto_depIdxs = nil } diff --git a/example/feature_demo/demo_service.proto b/example/feature_demo/demo_service.proto index 20e0ae5e..c8200521 100644 --- a/example/feature_demo/demo_service.proto +++ b/example/feature_demo/demo_service.proto @@ -2,9 +2,9 @@ syntax = "proto3"; package example; import "google/protobuf/empty.proto"; -import "github.com/infobloxopen/protoc-gen-gorm/options/gorm.proto"; +import "options/gorm.proto"; import "google/protobuf/field_mask.proto"; -import "github.com/infobloxopen/atlas-app-toolkit/query/collection_operators.proto"; +import "atlas/query/v1/collection_operators.proto"; option go_package = "github.com/infobloxopen/protoc-gen-gorm/example/feature_demo;example"; @@ -35,7 +35,7 @@ message CreateIntPointResponse { message ReadIntPointRequest { // For a read request, the id field is the only to be specified uint32 id = 1; - infoblox.api.FieldSelection fields = 2; + atlas.query.v1.FieldSelection fields = 2; } message ReadIntPointResponse { @@ -79,13 +79,13 @@ message DeleteIntPointResponse { message ListIntPointResponse { // Note repeated field and plural name 'results' repeated IntPoint results = 1; - infoblox.api.PageInfo page_info = 2; + atlas.query.v1.PageInfo page_info = 2; } message ListSomethingResponse { // Note repeated field and plural name 'results' repeated Something results = 1; - infoblox.api.PageInfo page_info = 2; + atlas.query.v1.PageInfo page_info = 2; } @@ -96,10 +96,10 @@ message Something { } message ListIntPointRequest { - infoblox.api.Filtering filter = 1; - infoblox.api.Sorting order_by = 2; - infoblox.api.FieldSelection fields = 3; - infoblox.api.Pagination paging = 4; + atlas.query.v1.Filtering filter = 1; + atlas.query.v1.Sorting order_by = 2; + atlas.query.v1.FieldSelection fields = 3; + atlas.query.v1.Pagination paging = 4; } service IntPointService { diff --git a/example/feature_demo/demo_service_grpc.pb.go b/example/feature_demo/demo_service_grpc.pb.go new file mode 100644 index 00000000..a416cd12 --- /dev/null +++ b/example/feature_demo/demo_service_grpc.pb.go @@ -0,0 +1,1284 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package example + +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. +const _ = grpc.SupportPackageIsVersion6 + +// IntPointServiceClient is the client API for IntPointService 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 IntPointServiceClient interface { + // The convention requires the rpc names have Create/Read/Update/List/Delete + // as a prefix. The type is inferred from the response (except for delete), + // so multiple objects can have CURDL handlers in the same service, provided + // they are given unique suffixes + Create(ctx context.Context, in *CreateIntPointRequest, opts ...grpc.CallOption) (*CreateIntPointResponse, error) + Read(ctx context.Context, in *ReadIntPointRequest, opts ...grpc.CallOption) (*ReadIntPointResponse, error) + Update(ctx context.Context, in *UpdateIntPointRequest, opts ...grpc.CallOption) (*UpdateIntPointResponse, error) + UpdateSet(ctx context.Context, in *UpdateSetIntPointRequest, opts ...grpc.CallOption) (*UpdateSetIntPointResponse, error) + List(ctx context.Context, in *ListIntPointRequest, opts ...grpc.CallOption) (*ListIntPointResponse, error) + ListSomething(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListSomethingResponse, error) + Delete(ctx context.Context, in *DeleteIntPointRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) + // CustomMethod can't be autogenerated as it matches no conventions, it will + // become a stub + CustomMethod(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) + // CreateSomething also doesn't match conventions and will become a stub + CreateSomething(ctx context.Context, in *Something, opts ...grpc.CallOption) (*Something, error) +} + +type intPointServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewIntPointServiceClient(cc grpc.ClientConnInterface) IntPointServiceClient { + return &intPointServiceClient{cc} +} + +func (c *intPointServiceClient) Create(ctx context.Context, in *CreateIntPointRequest, opts ...grpc.CallOption) (*CreateIntPointResponse, error) { + out := new(CreateIntPointResponse) + err := c.cc.Invoke(ctx, "/example.IntPointService/Create", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *intPointServiceClient) Read(ctx context.Context, in *ReadIntPointRequest, opts ...grpc.CallOption) (*ReadIntPointResponse, error) { + out := new(ReadIntPointResponse) + err := c.cc.Invoke(ctx, "/example.IntPointService/Read", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *intPointServiceClient) Update(ctx context.Context, in *UpdateIntPointRequest, opts ...grpc.CallOption) (*UpdateIntPointResponse, error) { + out := new(UpdateIntPointResponse) + err := c.cc.Invoke(ctx, "/example.IntPointService/Update", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *intPointServiceClient) UpdateSet(ctx context.Context, in *UpdateSetIntPointRequest, opts ...grpc.CallOption) (*UpdateSetIntPointResponse, error) { + out := new(UpdateSetIntPointResponse) + err := c.cc.Invoke(ctx, "/example.IntPointService/UpdateSet", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *intPointServiceClient) List(ctx context.Context, in *ListIntPointRequest, opts ...grpc.CallOption) (*ListIntPointResponse, error) { + out := new(ListIntPointResponse) + err := c.cc.Invoke(ctx, "/example.IntPointService/List", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *intPointServiceClient) ListSomething(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListSomethingResponse, error) { + out := new(ListSomethingResponse) + err := c.cc.Invoke(ctx, "/example.IntPointService/ListSomething", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *intPointServiceClient) Delete(ctx context.Context, in *DeleteIntPointRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) { + out := new(DeleteIntPointResponse) + err := c.cc.Invoke(ctx, "/example.IntPointService/Delete", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *intPointServiceClient) CustomMethod(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/example.IntPointService/CustomMethod", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *intPointServiceClient) CreateSomething(ctx context.Context, in *Something, opts ...grpc.CallOption) (*Something, error) { + out := new(Something) + err := c.cc.Invoke(ctx, "/example.IntPointService/CreateSomething", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// IntPointServiceServer is the server API for IntPointService service. +// All implementations must embed UnimplementedIntPointServiceServer +// for forward compatibility +type IntPointServiceServer interface { + // The convention requires the rpc names have Create/Read/Update/List/Delete + // as a prefix. The type is inferred from the response (except for delete), + // so multiple objects can have CURDL handlers in the same service, provided + // they are given unique suffixes + Create(context.Context, *CreateIntPointRequest) (*CreateIntPointResponse, error) + Read(context.Context, *ReadIntPointRequest) (*ReadIntPointResponse, error) + Update(context.Context, *UpdateIntPointRequest) (*UpdateIntPointResponse, error) + UpdateSet(context.Context, *UpdateSetIntPointRequest) (*UpdateSetIntPointResponse, error) + List(context.Context, *ListIntPointRequest) (*ListIntPointResponse, error) + ListSomething(context.Context, *emptypb.Empty) (*ListSomethingResponse, error) + Delete(context.Context, *DeleteIntPointRequest) (*DeleteIntPointResponse, error) + // CustomMethod can't be autogenerated as it matches no conventions, it will + // become a stub + CustomMethod(context.Context, *emptypb.Empty) (*emptypb.Empty, error) + // CreateSomething also doesn't match conventions and will become a stub + CreateSomething(context.Context, *Something) (*Something, error) + mustEmbedUnimplementedIntPointServiceServer() +} + +// UnimplementedIntPointServiceServer must be embedded to have forward compatible implementations. +type UnimplementedIntPointServiceServer struct { +} + +func (*UnimplementedIntPointServiceServer) Create(context.Context, *CreateIntPointRequest) (*CreateIntPointResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (*UnimplementedIntPointServiceServer) Read(context.Context, *ReadIntPointRequest) (*ReadIntPointResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Read not implemented") +} +func (*UnimplementedIntPointServiceServer) Update(context.Context, *UpdateIntPointRequest) (*UpdateIntPointResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (*UnimplementedIntPointServiceServer) UpdateSet(context.Context, *UpdateSetIntPointRequest) (*UpdateSetIntPointResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateSet not implemented") +} +func (*UnimplementedIntPointServiceServer) List(context.Context, *ListIntPointRequest) (*ListIntPointResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (*UnimplementedIntPointServiceServer) ListSomething(context.Context, *emptypb.Empty) (*ListSomethingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListSomething not implemented") +} +func (*UnimplementedIntPointServiceServer) Delete(context.Context, *DeleteIntPointRequest) (*DeleteIntPointResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (*UnimplementedIntPointServiceServer) CustomMethod(context.Context, *emptypb.Empty) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method CustomMethod not implemented") +} +func (*UnimplementedIntPointServiceServer) CreateSomething(context.Context, *Something) (*Something, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateSomething not implemented") +} +func (*UnimplementedIntPointServiceServer) mustEmbedUnimplementedIntPointServiceServer() {} + +func RegisterIntPointServiceServer(s *grpc.Server, srv IntPointServiceServer) { + s.RegisterService(&_IntPointService_serviceDesc, srv) +} + +func _IntPointService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateIntPointRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IntPointServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.IntPointService/Create", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IntPointServiceServer).Create(ctx, req.(*CreateIntPointRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _IntPointService_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReadIntPointRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IntPointServiceServer).Read(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.IntPointService/Read", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IntPointServiceServer).Read(ctx, req.(*ReadIntPointRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _IntPointService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateIntPointRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IntPointServiceServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.IntPointService/Update", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IntPointServiceServer).Update(ctx, req.(*UpdateIntPointRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _IntPointService_UpdateSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateSetIntPointRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IntPointServiceServer).UpdateSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.IntPointService/UpdateSet", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IntPointServiceServer).UpdateSet(ctx, req.(*UpdateSetIntPointRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _IntPointService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListIntPointRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IntPointServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.IntPointService/List", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IntPointServiceServer).List(ctx, req.(*ListIntPointRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _IntPointService_ListSomething_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.(IntPointServiceServer).ListSomething(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.IntPointService/ListSomething", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IntPointServiceServer).ListSomething(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _IntPointService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteIntPointRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IntPointServiceServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.IntPointService/Delete", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IntPointServiceServer).Delete(ctx, req.(*DeleteIntPointRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _IntPointService_CustomMethod_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.(IntPointServiceServer).CustomMethod(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.IntPointService/CustomMethod", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IntPointServiceServer).CustomMethod(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _IntPointService_CreateSomething_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Something) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IntPointServiceServer).CreateSomething(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.IntPointService/CreateSomething", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IntPointServiceServer).CreateSomething(ctx, req.(*Something)) + } + return interceptor(ctx, in, info, handler) +} + +var _IntPointService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "example.IntPointService", + HandlerType: (*IntPointServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Create", + Handler: _IntPointService_Create_Handler, + }, + { + MethodName: "Read", + Handler: _IntPointService_Read_Handler, + }, + { + MethodName: "Update", + Handler: _IntPointService_Update_Handler, + }, + { + MethodName: "UpdateSet", + Handler: _IntPointService_UpdateSet_Handler, + }, + { + MethodName: "List", + Handler: _IntPointService_List_Handler, + }, + { + MethodName: "ListSomething", + Handler: _IntPointService_ListSomething_Handler, + }, + { + MethodName: "Delete", + Handler: _IntPointService_Delete_Handler, + }, + { + MethodName: "CustomMethod", + Handler: _IntPointService_CustomMethod_Handler, + }, + { + MethodName: "CreateSomething", + Handler: _IntPointService_CreateSomething_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "feature_demo/demo_service.proto", +} + +// IntPointTxnClient is the client API for IntPointTxn 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 IntPointTxnClient interface { + // The convention requires the rpc names have Create/Read/Update/List/Delete + // as a prefix. The type is inferred from the response (except for delete), + // so multiple objects can have CURDL handlers in the same service, provided + // they are given unique suffixes + Create(ctx context.Context, in *CreateIntPointRequest, opts ...grpc.CallOption) (*CreateIntPointResponse, error) + Read(ctx context.Context, in *ReadIntPointRequest, opts ...grpc.CallOption) (*ReadIntPointResponse, error) + Update(ctx context.Context, in *UpdateIntPointRequest, opts ...grpc.CallOption) (*UpdateIntPointResponse, error) + List(ctx context.Context, in *ListIntPointRequest, opts ...grpc.CallOption) (*ListIntPointResponse, error) + Delete(ctx context.Context, in *DeleteIntPointRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) + DeleteSet(ctx context.Context, in *DeleteIntPointsRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) + // CustomMethod can't be autogenerated as it matches no conventions, it will + // become a stub + CustomMethod(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) + // CreateSomething also doesn't match conventions and will become a stub + CreateSomething(ctx context.Context, in *Something, opts ...grpc.CallOption) (*Something, error) +} + +type intPointTxnClient struct { + cc grpc.ClientConnInterface +} + +func NewIntPointTxnClient(cc grpc.ClientConnInterface) IntPointTxnClient { + return &intPointTxnClient{cc} +} + +func (c *intPointTxnClient) Create(ctx context.Context, in *CreateIntPointRequest, opts ...grpc.CallOption) (*CreateIntPointResponse, error) { + out := new(CreateIntPointResponse) + err := c.cc.Invoke(ctx, "/example.IntPointTxn/Create", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *intPointTxnClient) Read(ctx context.Context, in *ReadIntPointRequest, opts ...grpc.CallOption) (*ReadIntPointResponse, error) { + out := new(ReadIntPointResponse) + err := c.cc.Invoke(ctx, "/example.IntPointTxn/Read", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *intPointTxnClient) Update(ctx context.Context, in *UpdateIntPointRequest, opts ...grpc.CallOption) (*UpdateIntPointResponse, error) { + out := new(UpdateIntPointResponse) + err := c.cc.Invoke(ctx, "/example.IntPointTxn/Update", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *intPointTxnClient) List(ctx context.Context, in *ListIntPointRequest, opts ...grpc.CallOption) (*ListIntPointResponse, error) { + out := new(ListIntPointResponse) + err := c.cc.Invoke(ctx, "/example.IntPointTxn/List", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *intPointTxnClient) Delete(ctx context.Context, in *DeleteIntPointRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) { + out := new(DeleteIntPointResponse) + err := c.cc.Invoke(ctx, "/example.IntPointTxn/Delete", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *intPointTxnClient) DeleteSet(ctx context.Context, in *DeleteIntPointsRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) { + out := new(DeleteIntPointResponse) + err := c.cc.Invoke(ctx, "/example.IntPointTxn/DeleteSet", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *intPointTxnClient) CustomMethod(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, "/example.IntPointTxn/CustomMethod", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *intPointTxnClient) CreateSomething(ctx context.Context, in *Something, opts ...grpc.CallOption) (*Something, error) { + out := new(Something) + err := c.cc.Invoke(ctx, "/example.IntPointTxn/CreateSomething", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// IntPointTxnServer is the server API for IntPointTxn service. +// All implementations must embed UnimplementedIntPointTxnServer +// for forward compatibility +type IntPointTxnServer interface { + // The convention requires the rpc names have Create/Read/Update/List/Delete + // as a prefix. The type is inferred from the response (except for delete), + // so multiple objects can have CURDL handlers in the same service, provided + // they are given unique suffixes + Create(context.Context, *CreateIntPointRequest) (*CreateIntPointResponse, error) + Read(context.Context, *ReadIntPointRequest) (*ReadIntPointResponse, error) + Update(context.Context, *UpdateIntPointRequest) (*UpdateIntPointResponse, error) + List(context.Context, *ListIntPointRequest) (*ListIntPointResponse, error) + Delete(context.Context, *DeleteIntPointRequest) (*DeleteIntPointResponse, error) + DeleteSet(context.Context, *DeleteIntPointsRequest) (*DeleteIntPointResponse, error) + // CustomMethod can't be autogenerated as it matches no conventions, it will + // become a stub + CustomMethod(context.Context, *emptypb.Empty) (*emptypb.Empty, error) + // CreateSomething also doesn't match conventions and will become a stub + CreateSomething(context.Context, *Something) (*Something, error) + mustEmbedUnimplementedIntPointTxnServer() +} + +// UnimplementedIntPointTxnServer must be embedded to have forward compatible implementations. +type UnimplementedIntPointTxnServer struct { +} + +func (*UnimplementedIntPointTxnServer) Create(context.Context, *CreateIntPointRequest) (*CreateIntPointResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (*UnimplementedIntPointTxnServer) Read(context.Context, *ReadIntPointRequest) (*ReadIntPointResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Read not implemented") +} +func (*UnimplementedIntPointTxnServer) Update(context.Context, *UpdateIntPointRequest) (*UpdateIntPointResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") +} +func (*UnimplementedIntPointTxnServer) List(context.Context, *ListIntPointRequest) (*ListIntPointResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (*UnimplementedIntPointTxnServer) Delete(context.Context, *DeleteIntPointRequest) (*DeleteIntPointResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") +} +func (*UnimplementedIntPointTxnServer) DeleteSet(context.Context, *DeleteIntPointsRequest) (*DeleteIntPointResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteSet not implemented") +} +func (*UnimplementedIntPointTxnServer) CustomMethod(context.Context, *emptypb.Empty) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method CustomMethod not implemented") +} +func (*UnimplementedIntPointTxnServer) CreateSomething(context.Context, *Something) (*Something, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateSomething not implemented") +} +func (*UnimplementedIntPointTxnServer) mustEmbedUnimplementedIntPointTxnServer() {} + +func RegisterIntPointTxnServer(s *grpc.Server, srv IntPointTxnServer) { + s.RegisterService(&_IntPointTxn_serviceDesc, srv) +} + +func _IntPointTxn_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateIntPointRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IntPointTxnServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.IntPointTxn/Create", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IntPointTxnServer).Create(ctx, req.(*CreateIntPointRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _IntPointTxn_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReadIntPointRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IntPointTxnServer).Read(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.IntPointTxn/Read", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IntPointTxnServer).Read(ctx, req.(*ReadIntPointRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _IntPointTxn_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateIntPointRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IntPointTxnServer).Update(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.IntPointTxn/Update", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IntPointTxnServer).Update(ctx, req.(*UpdateIntPointRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _IntPointTxn_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListIntPointRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IntPointTxnServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.IntPointTxn/List", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IntPointTxnServer).List(ctx, req.(*ListIntPointRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _IntPointTxn_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteIntPointRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IntPointTxnServer).Delete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.IntPointTxn/Delete", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IntPointTxnServer).Delete(ctx, req.(*DeleteIntPointRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _IntPointTxn_DeleteSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteIntPointsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IntPointTxnServer).DeleteSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.IntPointTxn/DeleteSet", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IntPointTxnServer).DeleteSet(ctx, req.(*DeleteIntPointsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _IntPointTxn_CustomMethod_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.(IntPointTxnServer).CustomMethod(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.IntPointTxn/CustomMethod", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IntPointTxnServer).CustomMethod(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _IntPointTxn_CreateSomething_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Something) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(IntPointTxnServer).CreateSomething(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.IntPointTxn/CreateSomething", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(IntPointTxnServer).CreateSomething(ctx, req.(*Something)) + } + return interceptor(ctx, in, info, handler) +} + +var _IntPointTxn_serviceDesc = grpc.ServiceDesc{ + ServiceName: "example.IntPointTxn", + HandlerType: (*IntPointTxnServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Create", + Handler: _IntPointTxn_Create_Handler, + }, + { + MethodName: "Read", + Handler: _IntPointTxn_Read_Handler, + }, + { + MethodName: "Update", + Handler: _IntPointTxn_Update_Handler, + }, + { + MethodName: "List", + Handler: _IntPointTxn_List_Handler, + }, + { + MethodName: "Delete", + Handler: _IntPointTxn_Delete_Handler, + }, + { + MethodName: "DeleteSet", + Handler: _IntPointTxn_DeleteSet_Handler, + }, + { + MethodName: "CustomMethod", + Handler: _IntPointTxn_CustomMethod_Handler, + }, + { + MethodName: "CreateSomething", + Handler: _IntPointTxn_CreateSomething_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "feature_demo/demo_service.proto", +} + +// CircleServiceClient is the client API for CircleService 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 CircleServiceClient interface { + List(ctx context.Context, in *ListCircleRequest, opts ...grpc.CallOption) (*ListCircleResponse, error) +} + +type circleServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewCircleServiceClient(cc grpc.ClientConnInterface) CircleServiceClient { + return &circleServiceClient{cc} +} + +func (c *circleServiceClient) List(ctx context.Context, in *ListCircleRequest, opts ...grpc.CallOption) (*ListCircleResponse, error) { + out := new(ListCircleResponse) + err := c.cc.Invoke(ctx, "/example.CircleService/List", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// CircleServiceServer is the server API for CircleService service. +// All implementations must embed UnimplementedCircleServiceServer +// for forward compatibility +type CircleServiceServer interface { + List(context.Context, *ListCircleRequest) (*ListCircleResponse, error) + mustEmbedUnimplementedCircleServiceServer() +} + +// UnimplementedCircleServiceServer must be embedded to have forward compatible implementations. +type UnimplementedCircleServiceServer struct { +} + +func (*UnimplementedCircleServiceServer) List(context.Context, *ListCircleRequest) (*ListCircleResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (*UnimplementedCircleServiceServer) mustEmbedUnimplementedCircleServiceServer() {} + +func RegisterCircleServiceServer(s *grpc.Server, srv CircleServiceServer) { + s.RegisterService(&_CircleService_serviceDesc, srv) +} + +func _CircleService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListCircleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CircleServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.CircleService/List", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CircleServiceServer).List(ctx, req.(*ListCircleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _CircleService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "example.CircleService", + HandlerType: (*CircleServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "List", + Handler: _CircleService_List_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "feature_demo/demo_service.proto", +} + +// MultipleMethodsAutoGenClient is the client API for MultipleMethodsAutoGen 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 MultipleMethodsAutoGenClient interface { + CreateA(ctx context.Context, in *CreateIntPointRequest, opts ...grpc.CallOption) (*CreateIntPointResponse, error) + CreateB(ctx context.Context, in *CreateIntPointRequest, opts ...grpc.CallOption) (*CreateIntPointResponse, error) + ReadA(ctx context.Context, in *ReadIntPointRequest, opts ...grpc.CallOption) (*ReadIntPointResponse, error) + ReadB(ctx context.Context, in *ReadIntPointRequest, opts ...grpc.CallOption) (*ReadIntPointResponse, error) + UpdateA(ctx context.Context, in *UpdateIntPointRequest, opts ...grpc.CallOption) (*UpdateIntPointResponse, error) + UpdateB(ctx context.Context, in *UpdateIntPointRequest, opts ...grpc.CallOption) (*UpdateIntPointResponse, error) + ListA(ctx context.Context, in *ListIntPointRequest, opts ...grpc.CallOption) (*ListIntPointResponse, error) + ListB(ctx context.Context, in *ListIntPointRequest, opts ...grpc.CallOption) (*ListIntPointResponse, error) + DeleteA(ctx context.Context, in *DeleteIntPointRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) + DeleteB(ctx context.Context, in *DeleteIntPointRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) + DeleteSetA(ctx context.Context, in *DeleteIntPointsRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) + DeleteSetB(ctx context.Context, in *DeleteIntPointsRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) +} + +type multipleMethodsAutoGenClient struct { + cc grpc.ClientConnInterface +} + +func NewMultipleMethodsAutoGenClient(cc grpc.ClientConnInterface) MultipleMethodsAutoGenClient { + return &multipleMethodsAutoGenClient{cc} +} + +func (c *multipleMethodsAutoGenClient) CreateA(ctx context.Context, in *CreateIntPointRequest, opts ...grpc.CallOption) (*CreateIntPointResponse, error) { + out := new(CreateIntPointResponse) + err := c.cc.Invoke(ctx, "/example.MultipleMethodsAutoGen/CreateA", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *multipleMethodsAutoGenClient) CreateB(ctx context.Context, in *CreateIntPointRequest, opts ...grpc.CallOption) (*CreateIntPointResponse, error) { + out := new(CreateIntPointResponse) + err := c.cc.Invoke(ctx, "/example.MultipleMethodsAutoGen/CreateB", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *multipleMethodsAutoGenClient) ReadA(ctx context.Context, in *ReadIntPointRequest, opts ...grpc.CallOption) (*ReadIntPointResponse, error) { + out := new(ReadIntPointResponse) + err := c.cc.Invoke(ctx, "/example.MultipleMethodsAutoGen/ReadA", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *multipleMethodsAutoGenClient) ReadB(ctx context.Context, in *ReadIntPointRequest, opts ...grpc.CallOption) (*ReadIntPointResponse, error) { + out := new(ReadIntPointResponse) + err := c.cc.Invoke(ctx, "/example.MultipleMethodsAutoGen/ReadB", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *multipleMethodsAutoGenClient) UpdateA(ctx context.Context, in *UpdateIntPointRequest, opts ...grpc.CallOption) (*UpdateIntPointResponse, error) { + out := new(UpdateIntPointResponse) + err := c.cc.Invoke(ctx, "/example.MultipleMethodsAutoGen/UpdateA", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *multipleMethodsAutoGenClient) UpdateB(ctx context.Context, in *UpdateIntPointRequest, opts ...grpc.CallOption) (*UpdateIntPointResponse, error) { + out := new(UpdateIntPointResponse) + err := c.cc.Invoke(ctx, "/example.MultipleMethodsAutoGen/UpdateB", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *multipleMethodsAutoGenClient) ListA(ctx context.Context, in *ListIntPointRequest, opts ...grpc.CallOption) (*ListIntPointResponse, error) { + out := new(ListIntPointResponse) + err := c.cc.Invoke(ctx, "/example.MultipleMethodsAutoGen/ListA", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *multipleMethodsAutoGenClient) ListB(ctx context.Context, in *ListIntPointRequest, opts ...grpc.CallOption) (*ListIntPointResponse, error) { + out := new(ListIntPointResponse) + err := c.cc.Invoke(ctx, "/example.MultipleMethodsAutoGen/ListB", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *multipleMethodsAutoGenClient) DeleteA(ctx context.Context, in *DeleteIntPointRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) { + out := new(DeleteIntPointResponse) + err := c.cc.Invoke(ctx, "/example.MultipleMethodsAutoGen/DeleteA", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *multipleMethodsAutoGenClient) DeleteB(ctx context.Context, in *DeleteIntPointRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) { + out := new(DeleteIntPointResponse) + err := c.cc.Invoke(ctx, "/example.MultipleMethodsAutoGen/DeleteB", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *multipleMethodsAutoGenClient) DeleteSetA(ctx context.Context, in *DeleteIntPointsRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) { + out := new(DeleteIntPointResponse) + err := c.cc.Invoke(ctx, "/example.MultipleMethodsAutoGen/DeleteSetA", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *multipleMethodsAutoGenClient) DeleteSetB(ctx context.Context, in *DeleteIntPointsRequest, opts ...grpc.CallOption) (*DeleteIntPointResponse, error) { + out := new(DeleteIntPointResponse) + err := c.cc.Invoke(ctx, "/example.MultipleMethodsAutoGen/DeleteSetB", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MultipleMethodsAutoGenServer is the server API for MultipleMethodsAutoGen service. +// All implementations must embed UnimplementedMultipleMethodsAutoGenServer +// for forward compatibility +type MultipleMethodsAutoGenServer interface { + CreateA(context.Context, *CreateIntPointRequest) (*CreateIntPointResponse, error) + CreateB(context.Context, *CreateIntPointRequest) (*CreateIntPointResponse, error) + ReadA(context.Context, *ReadIntPointRequest) (*ReadIntPointResponse, error) + ReadB(context.Context, *ReadIntPointRequest) (*ReadIntPointResponse, error) + UpdateA(context.Context, *UpdateIntPointRequest) (*UpdateIntPointResponse, error) + UpdateB(context.Context, *UpdateIntPointRequest) (*UpdateIntPointResponse, error) + ListA(context.Context, *ListIntPointRequest) (*ListIntPointResponse, error) + ListB(context.Context, *ListIntPointRequest) (*ListIntPointResponse, error) + DeleteA(context.Context, *DeleteIntPointRequest) (*DeleteIntPointResponse, error) + DeleteB(context.Context, *DeleteIntPointRequest) (*DeleteIntPointResponse, error) + DeleteSetA(context.Context, *DeleteIntPointsRequest) (*DeleteIntPointResponse, error) + DeleteSetB(context.Context, *DeleteIntPointsRequest) (*DeleteIntPointResponse, error) + mustEmbedUnimplementedMultipleMethodsAutoGenServer() +} + +// UnimplementedMultipleMethodsAutoGenServer must be embedded to have forward compatible implementations. +type UnimplementedMultipleMethodsAutoGenServer struct { +} + +func (*UnimplementedMultipleMethodsAutoGenServer) CreateA(context.Context, *CreateIntPointRequest) (*CreateIntPointResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateA not implemented") +} +func (*UnimplementedMultipleMethodsAutoGenServer) CreateB(context.Context, *CreateIntPointRequest) (*CreateIntPointResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateB not implemented") +} +func (*UnimplementedMultipleMethodsAutoGenServer) ReadA(context.Context, *ReadIntPointRequest) (*ReadIntPointResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReadA not implemented") +} +func (*UnimplementedMultipleMethodsAutoGenServer) ReadB(context.Context, *ReadIntPointRequest) (*ReadIntPointResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReadB not implemented") +} +func (*UnimplementedMultipleMethodsAutoGenServer) UpdateA(context.Context, *UpdateIntPointRequest) (*UpdateIntPointResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateA not implemented") +} +func (*UnimplementedMultipleMethodsAutoGenServer) UpdateB(context.Context, *UpdateIntPointRequest) (*UpdateIntPointResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateB not implemented") +} +func (*UnimplementedMultipleMethodsAutoGenServer) ListA(context.Context, *ListIntPointRequest) (*ListIntPointResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListA not implemented") +} +func (*UnimplementedMultipleMethodsAutoGenServer) ListB(context.Context, *ListIntPointRequest) (*ListIntPointResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListB not implemented") +} +func (*UnimplementedMultipleMethodsAutoGenServer) DeleteA(context.Context, *DeleteIntPointRequest) (*DeleteIntPointResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteA not implemented") +} +func (*UnimplementedMultipleMethodsAutoGenServer) DeleteB(context.Context, *DeleteIntPointRequest) (*DeleteIntPointResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteB not implemented") +} +func (*UnimplementedMultipleMethodsAutoGenServer) DeleteSetA(context.Context, *DeleteIntPointsRequest) (*DeleteIntPointResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteSetA not implemented") +} +func (*UnimplementedMultipleMethodsAutoGenServer) DeleteSetB(context.Context, *DeleteIntPointsRequest) (*DeleteIntPointResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteSetB not implemented") +} +func (*UnimplementedMultipleMethodsAutoGenServer) mustEmbedUnimplementedMultipleMethodsAutoGenServer() { +} + +func RegisterMultipleMethodsAutoGenServer(s *grpc.Server, srv MultipleMethodsAutoGenServer) { + s.RegisterService(&_MultipleMethodsAutoGen_serviceDesc, srv) +} + +func _MultipleMethodsAutoGen_CreateA_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateIntPointRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MultipleMethodsAutoGenServer).CreateA(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.MultipleMethodsAutoGen/CreateA", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MultipleMethodsAutoGenServer).CreateA(ctx, req.(*CreateIntPointRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MultipleMethodsAutoGen_CreateB_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateIntPointRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MultipleMethodsAutoGenServer).CreateB(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.MultipleMethodsAutoGen/CreateB", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MultipleMethodsAutoGenServer).CreateB(ctx, req.(*CreateIntPointRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MultipleMethodsAutoGen_ReadA_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReadIntPointRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MultipleMethodsAutoGenServer).ReadA(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.MultipleMethodsAutoGen/ReadA", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MultipleMethodsAutoGenServer).ReadA(ctx, req.(*ReadIntPointRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MultipleMethodsAutoGen_ReadB_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReadIntPointRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MultipleMethodsAutoGenServer).ReadB(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.MultipleMethodsAutoGen/ReadB", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MultipleMethodsAutoGenServer).ReadB(ctx, req.(*ReadIntPointRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MultipleMethodsAutoGen_UpdateA_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateIntPointRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MultipleMethodsAutoGenServer).UpdateA(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.MultipleMethodsAutoGen/UpdateA", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MultipleMethodsAutoGenServer).UpdateA(ctx, req.(*UpdateIntPointRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MultipleMethodsAutoGen_UpdateB_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateIntPointRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MultipleMethodsAutoGenServer).UpdateB(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.MultipleMethodsAutoGen/UpdateB", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MultipleMethodsAutoGenServer).UpdateB(ctx, req.(*UpdateIntPointRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MultipleMethodsAutoGen_ListA_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListIntPointRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MultipleMethodsAutoGenServer).ListA(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.MultipleMethodsAutoGen/ListA", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MultipleMethodsAutoGenServer).ListA(ctx, req.(*ListIntPointRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MultipleMethodsAutoGen_ListB_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListIntPointRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MultipleMethodsAutoGenServer).ListB(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.MultipleMethodsAutoGen/ListB", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MultipleMethodsAutoGenServer).ListB(ctx, req.(*ListIntPointRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MultipleMethodsAutoGen_DeleteA_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteIntPointRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MultipleMethodsAutoGenServer).DeleteA(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.MultipleMethodsAutoGen/DeleteA", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MultipleMethodsAutoGenServer).DeleteA(ctx, req.(*DeleteIntPointRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MultipleMethodsAutoGen_DeleteB_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteIntPointRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MultipleMethodsAutoGenServer).DeleteB(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.MultipleMethodsAutoGen/DeleteB", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MultipleMethodsAutoGenServer).DeleteB(ctx, req.(*DeleteIntPointRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MultipleMethodsAutoGen_DeleteSetA_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteIntPointsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MultipleMethodsAutoGenServer).DeleteSetA(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.MultipleMethodsAutoGen/DeleteSetA", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MultipleMethodsAutoGenServer).DeleteSetA(ctx, req.(*DeleteIntPointsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _MultipleMethodsAutoGen_DeleteSetB_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteIntPointsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MultipleMethodsAutoGenServer).DeleteSetB(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/example.MultipleMethodsAutoGen/DeleteSetB", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MultipleMethodsAutoGenServer).DeleteSetB(ctx, req.(*DeleteIntPointsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _MultipleMethodsAutoGen_serviceDesc = grpc.ServiceDesc{ + ServiceName: "example.MultipleMethodsAutoGen", + HandlerType: (*MultipleMethodsAutoGenServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateA", + Handler: _MultipleMethodsAutoGen_CreateA_Handler, + }, + { + MethodName: "CreateB", + Handler: _MultipleMethodsAutoGen_CreateB_Handler, + }, + { + MethodName: "ReadA", + Handler: _MultipleMethodsAutoGen_ReadA_Handler, + }, + { + MethodName: "ReadB", + Handler: _MultipleMethodsAutoGen_ReadB_Handler, + }, + { + MethodName: "UpdateA", + Handler: _MultipleMethodsAutoGen_UpdateA_Handler, + }, + { + MethodName: "UpdateB", + Handler: _MultipleMethodsAutoGen_UpdateB_Handler, + }, + { + MethodName: "ListA", + Handler: _MultipleMethodsAutoGen_ListA_Handler, + }, + { + MethodName: "ListB", + Handler: _MultipleMethodsAutoGen_ListB_Handler, + }, + { + MethodName: "DeleteA", + Handler: _MultipleMethodsAutoGen_DeleteA_Handler, + }, + { + MethodName: "DeleteB", + Handler: _MultipleMethodsAutoGen_DeleteB_Handler, + }, + { + MethodName: "DeleteSetA", + Handler: _MultipleMethodsAutoGen_DeleteSetA_Handler, + }, + { + MethodName: "DeleteSetB", + Handler: _MultipleMethodsAutoGen_DeleteSetB_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "feature_demo/demo_service.proto", +} diff --git a/example/feature_demo/demo_types.pb.go b/example/feature_demo/demo_types.pb.go index e3534a33..c03a9ac9 100644 --- a/example/feature_demo/demo_types.pb.go +++ b/example/feature_demo/demo_types.pb.go @@ -1,22 +1,35 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: example/feature_demo/demo_types.proto +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.17.1 +// source: feature_demo/demo_types.proto package example -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/infobloxopen/protoc-gen-gorm/options" -import gorm_types "github.com/infobloxopen/protoc-gen-gorm/types" -import google_protobuf1 "github.com/golang/protobuf/ptypes/wrappers" -import google_protobuf2 "github.com/golang/protobuf/ptypes/empty" -import google_protobuf3 "github.com/golang/protobuf/ptypes/timestamp" -import user "github.com/infobloxopen/protoc-gen-gorm/example/user" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +import ( + proto "github.com/golang/protobuf/proto" + timestamp "github.com/golang/protobuf/ptypes/timestamp" + user "github.com/infobloxopen/protoc-gen-gorm/example/user" + _ "github.com/infobloxopen/protoc-gen-gorm/options" + types "github.com/infobloxopen/protoc-gen-gorm/types" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" +) + +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) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 // enums are mapped to the their underlying numeric value in the db. // This is practical from an API perspective, but tougher for debugging. @@ -29,642 +42,1469 @@ const ( TestTypes_BAD TestTypesStatus = 2 ) -var TestTypesStatus_name = map[int32]string{ - 0: "UNKNOWN", - 1: "GOOD", - 2: "BAD", -} -var TestTypesStatus_value = map[string]int32{ - "UNKNOWN": 0, - "GOOD": 1, - "BAD": 2, +// Enum value maps for TestTypesStatus. +var ( + TestTypesStatus_name = map[int32]string{ + 0: "UNKNOWN", + 1: "GOOD", + 2: "BAD", + } + TestTypesStatus_value = map[string]int32{ + "UNKNOWN": 0, + "GOOD": 1, + "BAD": 2, + } +) + +func (x TestTypesStatus) Enum() *TestTypesStatus { + p := new(TestTypesStatus) + *p = x + return p } func (x TestTypesStatus) String() string { - return proto.EnumName(TestTypesStatus_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TestTypesStatus) Descriptor() protoreflect.EnumDescriptor { + return file_feature_demo_demo_types_proto_enumTypes[0].Descriptor() +} + +func (TestTypesStatus) Type() protoreflect.EnumType { + return &file_feature_demo_demo_types_proto_enumTypes[0] +} + +func (x TestTypesStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TestTypesStatus.Descriptor instead. +func (TestTypesStatus) EnumDescriptor() ([]byte, []int) { + return file_feature_demo_demo_types_proto_rawDescGZIP(), []int{0, 0} } -func (TestTypesStatus) EnumDescriptor() ([]byte, []int) { return fileDescriptor1, []int{0, 0} } // test_types is a message that includes a representative sample of the // available types type TestTypes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // the (gorm.field).drop option allows for setting a field to be API only - ApiOnlyString string `protobuf:"bytes,1,opt,name=api_only_string,json=apiOnlyString" json:"api_only_string,omitempty"` + ApiOnlyString string `protobuf:"bytes,1,opt,name=api_only_string,json=apiOnlyString,proto3" json:"api_only_string,omitempty"` // repeated raw types are currently unsupported, so this field will be dropped // at the ORM level - Numbers []int32 `protobuf:"varint,2,rep,packed,name=numbers" json:"numbers,omitempty"` + Numbers []int32 `protobuf:"varint,2,rep,packed,name=numbers,proto3" json:"numbers,omitempty"` // a StringValue represents a Nullable string - OptionalString *google_protobuf1.StringValue `protobuf:"bytes,3,opt,name=optional_string,json=optionalString" json:"optional_string,omitempty"` - BecomesInt TestTypesStatus `protobuf:"varint,4,opt,name=becomes_int,json=becomesInt,enum=example.TestTypesStatus" json:"becomes_int,omitempty"` + OptionalString *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=optional_string,json=optionalString,proto3" json:"optional_string,omitempty"` + BecomesInt TestTypesStatus `protobuf:"varint,4,opt,name=becomes_int,json=becomesInt,proto3,enum=example.TestTypesStatus" json:"becomes_int,omitempty"` // The Empty type serves no purpose outside of rpc calls and is dropped // automatically from objects - Nothingness *google_protobuf2.Empty `protobuf:"bytes,5,opt,name=nothingness" json:"nothingness,omitempty"` + Nothingness *emptypb.Empty `protobuf:"bytes,5,opt,name=nothingness,proto3" json:"nothingness,omitempty"` // The UUID custom type should act like a StringValue at the API level, but is // automatically converted to and from a uuid.UUID (github.com/satori/go.uuid) - Uuid *gorm_types.UUID `protobuf:"bytes,6,opt,name=uuid" json:"uuid,omitempty"` + Uuid *types.UUID `protobuf:"bytes,6,opt,name=uuid,proto3" json:"uuid,omitempty"` // Timestamps convert to golang's time.Time type, and created_at and // updated_at values are automatically filled by GORM - CreatedAt *google_protobuf3.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt" json:"created_at,omitempty"` + CreatedAt *timestamp.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // This represents a foreign key to the 'type_with_id' type for associations // This could be hidden from the API (or soon autogenerated). - TypeWithIdId uint32 `protobuf:"varint,8,opt,name=type_with_id_id,json=typeWithIdId" json:"type_with_id_id,omitempty"` + TypeWithIdId uint32 `protobuf:"varint,8,opt,name=type_with_id_id,json=typeWithIdId,proto3" json:"type_with_id_id,omitempty"` // This is an arbitrary JSON string that is marshalled and unmarshalled // specially in grpc-gateway as a JSON object - JsonField *gorm_types.JSONValue `protobuf:"bytes,9,opt,name=json_field,json=jsonField" json:"json_field,omitempty"` + JsonField *types.JSONValue `protobuf:"bytes,9,opt,name=json_field,json=jsonField,proto3" json:"json_field,omitempty"` // The UUIDValue custom type should act like a StringValue at the API level, but is // automatically converted to and from a *uuid.UUID (github.com/satori/go.uuid) - NullableUuid *gorm_types.UUIDValue `protobuf:"bytes,10,opt,name=nullable_uuid,json=nullableUuid" json:"nullable_uuid,omitempty"` + NullableUuid *types.UUIDValue `protobuf:"bytes,10,opt,name=nullable_uuid,json=nullableUuid,proto3" json:"nullable_uuid,omitempty"` // The TimeOnly should act as uint32 value at business layer, but is automatically // converted to/from string at API and ORM level - TimeOnly *gorm_types.TimeOnly `protobuf:"bytes,11,opt,name=time_only,json=timeOnly" json:"time_only,omitempty"` + TimeOnly *types.TimeOnly `protobuf:"bytes,11,opt,name=time_only,json=timeOnly,proto3" json:"time_only,omitempty"` +} + +func (x *TestTypes) Reset() { + *x = TestTypes{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TestTypes) Reset() { *m = TestTypes{} } -func (m *TestTypes) String() string { return proto.CompactTextString(m) } -func (*TestTypes) ProtoMessage() {} -func (*TestTypes) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } +func (x *TestTypes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestTypes) ProtoMessage() {} -func (m *TestTypes) GetApiOnlyString() string { - if m != nil { - return m.ApiOnlyString +func (x *TestTypes) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_types_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 TestTypes.ProtoReflect.Descriptor instead. +func (*TestTypes) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_types_proto_rawDescGZIP(), []int{0} +} + +func (x *TestTypes) GetApiOnlyString() string { + if x != nil { + return x.ApiOnlyString } return "" } -func (m *TestTypes) GetNumbers() []int32 { - if m != nil { - return m.Numbers +func (x *TestTypes) GetNumbers() []int32 { + if x != nil { + return x.Numbers } return nil } -func (m *TestTypes) GetOptionalString() *google_protobuf1.StringValue { - if m != nil { - return m.OptionalString +func (x *TestTypes) GetOptionalString() *wrapperspb.StringValue { + if x != nil { + return x.OptionalString } return nil } -func (m *TestTypes) GetBecomesInt() TestTypesStatus { - if m != nil { - return m.BecomesInt +func (x *TestTypes) GetBecomesInt() TestTypesStatus { + if x != nil { + return x.BecomesInt } return TestTypes_UNKNOWN } -func (m *TestTypes) GetNothingness() *google_protobuf2.Empty { - if m != nil { - return m.Nothingness +func (x *TestTypes) GetNothingness() *emptypb.Empty { + if x != nil { + return x.Nothingness } return nil } -func (m *TestTypes) GetUuid() *gorm_types.UUID { - if m != nil { - return m.Uuid +func (x *TestTypes) GetUuid() *types.UUID { + if x != nil { + return x.Uuid } return nil } -func (m *TestTypes) GetCreatedAt() *google_protobuf3.Timestamp { - if m != nil { - return m.CreatedAt +func (x *TestTypes) GetCreatedAt() *timestamp.Timestamp { + if x != nil { + return x.CreatedAt } return nil } -func (m *TestTypes) GetTypeWithIdId() uint32 { - if m != nil { - return m.TypeWithIdId +func (x *TestTypes) GetTypeWithIdId() uint32 { + if x != nil { + return x.TypeWithIdId } return 0 } -func (m *TestTypes) GetJsonField() *gorm_types.JSONValue { - if m != nil { - return m.JsonField +func (x *TestTypes) GetJsonField() *types.JSONValue { + if x != nil { + return x.JsonField } return nil } -func (m *TestTypes) GetNullableUuid() *gorm_types.UUIDValue { - if m != nil { - return m.NullableUuid +func (x *TestTypes) GetNullableUuid() *types.UUIDValue { + if x != nil { + return x.NullableUuid } return nil } -func (m *TestTypes) GetTimeOnly() *gorm_types.TimeOnly { - if m != nil { - return m.TimeOnly +func (x *TestTypes) GetTimeOnly() *types.TimeOnly { + if x != nil { + return x.TimeOnly } return nil } // TypeWithID demonstrates some basic assocation behavior type TypeWithID struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // any field named 'id' is assumed by gorm to be the primary key for the // object. - Id uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` + Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // The field option also allows arbitrary tag setting, such as informing // gorm of a primary key, different column names or different types in the db - Ip string `protobuf:"bytes,2,opt,name=ip" json:"ip,omitempty"` + Ip string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"` // A default has-many relationship, will error on generation if no FK field, // convention {typename}_id, is present. These FK fields will be automatically // populated on create and update. - Things []*TestTypes `protobuf:"bytes,3,rep,name=things" json:"things,omitempty"` + Things []*TestTypes `protobuf:"bytes,3,rep,name=things,proto3" json:"things,omitempty"` // A default has-one relationship, will error as above - ANestedObject *TestTypes `protobuf:"bytes,4,opt,name=a_nested_object,json=aNestedObject" json:"a_nested_object,omitempty"` + ANestedObject *TestTypes `protobuf:"bytes,4,opt,name=a_nested_object,json=aNestedObject,proto3" json:"a_nested_object,omitempty"` // An in-package and cross-package imported type (in-package can use any // association type, cross-package is limited to belongs_to and many_to_many) - Point *IntPoint `protobuf:"bytes,5,opt,name=point" json:"point,omitempty"` - User *user.User `protobuf:"bytes,6,opt,name=user" json:"user,omitempty"` - Address *gorm_types.InetValue `protobuf:"bytes,7,opt,name=address" json:"address,omitempty"` - MultiaccountTypeIds []uint32 `protobuf:"varint,8,rep,packed,name=multiaccount_type_ids,json=multiaccountTypeIds" json:"multiaccount_type_ids,omitempty"` - SyntheticField *APIOnlyType `protobuf:"bytes,9,opt,name=synthetic_field,json=syntheticField" json:"synthetic_field,omitempty"` - TagTest float32 `protobuf:"fixed32,10,opt,name=tag_test,json=tagTest" json:"tag_test,omitempty"` - TagSizeTest string `protobuf:"bytes,11,opt,name=tag_size_test,json=tagSizeTest" json:"tag_size_test,omitempty"` - FloatField *google_protobuf1.FloatValue `protobuf:"bytes,12,opt,name=float_field,json=floatField" json:"float_field,omitempty"` - DoubleField *google_protobuf1.DoubleValue `protobuf:"bytes,13,opt,name=double_field,json=doubleField" json:"double_field,omitempty"` + Point *IntPoint `protobuf:"bytes,5,opt,name=point,proto3" json:"point,omitempty"` + User *user.User `protobuf:"bytes,6,opt,name=user,proto3" json:"user,omitempty"` + Address *types.InetValue `protobuf:"bytes,7,opt,name=address,proto3" json:"address,omitempty"` + MultiaccountTypeIds []uint32 `protobuf:"varint,8,rep,packed,name=multiaccount_type_ids,json=multiaccountTypeIds,proto3" json:"multiaccount_type_ids,omitempty"` + SyntheticField *APIOnlyType `protobuf:"bytes,9,opt,name=synthetic_field,json=syntheticField,proto3" json:"synthetic_field,omitempty"` + TagTest float32 `protobuf:"fixed32,10,opt,name=tag_test,json=tagTest,proto3" json:"tag_test,omitempty"` + TagSizeTest string `protobuf:"bytes,11,opt,name=tag_size_test,json=tagSizeTest,proto3" json:"tag_size_test,omitempty"` + FloatField *wrapperspb.FloatValue `protobuf:"bytes,12,opt,name=float_field,json=floatField,proto3" json:"float_field,omitempty"` + DoubleField *wrapperspb.DoubleValue `protobuf:"bytes,13,opt,name=double_field,json=doubleField,proto3" json:"double_field,omitempty"` // Limited support for DB type 'time', implemented via strings (string -> DB && DB -> string) - TimeOnly *gorm_types.TimeOnly `protobuf:"bytes,14,opt,name=time_only,json=timeOnly" json:"time_only,omitempty"` - DeletedAt *google_protobuf3.Timestamp `protobuf:"bytes,15,opt,name=deleted_at,json=deletedAt" json:"deleted_at,omitempty"` + TimeOnly *types.TimeOnly `protobuf:"bytes,14,opt,name=time_only,json=timeOnly,proto3" json:"time_only,omitempty"` + DeletedAt *timestamp.Timestamp `protobuf:"bytes,15,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"` +} + +func (x *TypeWithID) Reset() { + *x = TypeWithID{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TypeWithID) Reset() { *m = TypeWithID{} } -func (m *TypeWithID) String() string { return proto.CompactTextString(m) } -func (*TypeWithID) ProtoMessage() {} -func (*TypeWithID) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} } +func (x *TypeWithID) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TypeWithID) ProtoMessage() {} -func (m *TypeWithID) GetId() uint32 { - if m != nil { - return m.Id +func (x *TypeWithID) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_types_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 TypeWithID.ProtoReflect.Descriptor instead. +func (*TypeWithID) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_types_proto_rawDescGZIP(), []int{1} +} + +func (x *TypeWithID) GetId() uint32 { + if x != nil { + return x.Id } return 0 } -func (m *TypeWithID) GetIp() string { - if m != nil { - return m.Ip +func (x *TypeWithID) GetIp() string { + if x != nil { + return x.Ip } return "" } -func (m *TypeWithID) GetThings() []*TestTypes { - if m != nil { - return m.Things +func (x *TypeWithID) GetThings() []*TestTypes { + if x != nil { + return x.Things } return nil } -func (m *TypeWithID) GetANestedObject() *TestTypes { - if m != nil { - return m.ANestedObject +func (x *TypeWithID) GetANestedObject() *TestTypes { + if x != nil { + return x.ANestedObject } return nil } -func (m *TypeWithID) GetPoint() *IntPoint { - if m != nil { - return m.Point +func (x *TypeWithID) GetPoint() *IntPoint { + if x != nil { + return x.Point } return nil } -func (m *TypeWithID) GetUser() *user.User { - if m != nil { - return m.User +func (x *TypeWithID) GetUser() *user.User { + if x != nil { + return x.User } return nil } -func (m *TypeWithID) GetAddress() *gorm_types.InetValue { - if m != nil { - return m.Address +func (x *TypeWithID) GetAddress() *types.InetValue { + if x != nil { + return x.Address } return nil } -func (m *TypeWithID) GetMultiaccountTypeIds() []uint32 { - if m != nil { - return m.MultiaccountTypeIds +func (x *TypeWithID) GetMultiaccountTypeIds() []uint32 { + if x != nil { + return x.MultiaccountTypeIds } return nil } -func (m *TypeWithID) GetSyntheticField() *APIOnlyType { - if m != nil { - return m.SyntheticField +func (x *TypeWithID) GetSyntheticField() *APIOnlyType { + if x != nil { + return x.SyntheticField } return nil } -func (m *TypeWithID) GetTagTest() float32 { - if m != nil { - return m.TagTest +func (x *TypeWithID) GetTagTest() float32 { + if x != nil { + return x.TagTest } return 0 } -func (m *TypeWithID) GetTagSizeTest() string { - if m != nil { - return m.TagSizeTest +func (x *TypeWithID) GetTagSizeTest() string { + if x != nil { + return x.TagSizeTest } return "" } -func (m *TypeWithID) GetFloatField() *google_protobuf1.FloatValue { - if m != nil { - return m.FloatField +func (x *TypeWithID) GetFloatField() *wrapperspb.FloatValue { + if x != nil { + return x.FloatField } return nil } -func (m *TypeWithID) GetDoubleField() *google_protobuf1.DoubleValue { - if m != nil { - return m.DoubleField +func (x *TypeWithID) GetDoubleField() *wrapperspb.DoubleValue { + if x != nil { + return x.DoubleField } return nil } -func (m *TypeWithID) GetTimeOnly() *gorm_types.TimeOnly { - if m != nil { - return m.TimeOnly +func (x *TypeWithID) GetTimeOnly() *types.TimeOnly { + if x != nil { + return x.TimeOnly } return nil } -func (m *TypeWithID) GetDeletedAt() *google_protobuf3.Timestamp { - if m != nil { - return m.DeletedAt +func (x *TypeWithID) GetDeletedAt() *timestamp.Timestamp { + if x != nil { + return x.DeletedAt } return nil } // MultiaccountTypeWithID demonstrates the generated multi-account support type MultiaccountTypeWithID struct { - Id uint64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` - SomeField string `protobuf:"bytes,2,opt,name=some_field,json=someField" json:"some_field,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + SomeField string `protobuf:"bytes,2,opt,name=some_field,json=someField,proto3" json:"some_field,omitempty"` +} + +func (x *MultiaccountTypeWithID) Reset() { + *x = MultiaccountTypeWithID{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *MultiaccountTypeWithID) Reset() { *m = MultiaccountTypeWithID{} } -func (m *MultiaccountTypeWithID) String() string { return proto.CompactTextString(m) } -func (*MultiaccountTypeWithID) ProtoMessage() {} -func (*MultiaccountTypeWithID) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} } +func (x *MultiaccountTypeWithID) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MultiaccountTypeWithID) ProtoMessage() {} -func (m *MultiaccountTypeWithID) GetId() uint64 { - if m != nil { - return m.Id +func (x *MultiaccountTypeWithID) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_types_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 MultiaccountTypeWithID.ProtoReflect.Descriptor instead. +func (*MultiaccountTypeWithID) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_types_proto_rawDescGZIP(), []int{2} +} + +func (x *MultiaccountTypeWithID) GetId() uint64 { + if x != nil { + return x.Id } return 0 } -func (m *MultiaccountTypeWithID) GetSomeField() string { - if m != nil { - return m.SomeField +func (x *MultiaccountTypeWithID) GetSomeField() string { + if x != nil { + return x.SomeField } return "" } type MultiaccountTypeWithoutID struct { - SomeField string `protobuf:"bytes,1,opt,name=some_field,json=someField" json:"some_field,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SomeField string `protobuf:"bytes,1,opt,name=some_field,json=someField,proto3" json:"some_field,omitempty"` +} + +func (x *MultiaccountTypeWithoutID) Reset() { + *x = MultiaccountTypeWithoutID{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_types_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *MultiaccountTypeWithoutID) Reset() { *m = MultiaccountTypeWithoutID{} } -func (m *MultiaccountTypeWithoutID) String() string { return proto.CompactTextString(m) } -func (*MultiaccountTypeWithoutID) ProtoMessage() {} -func (*MultiaccountTypeWithoutID) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} } +func (x *MultiaccountTypeWithoutID) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MultiaccountTypeWithoutID) ProtoMessage() {} -func (m *MultiaccountTypeWithoutID) GetSomeField() string { - if m != nil { - return m.SomeField +func (x *MultiaccountTypeWithoutID) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_types_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 MultiaccountTypeWithoutID.ProtoReflect.Descriptor instead. +func (*MultiaccountTypeWithoutID) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_types_proto_rawDescGZIP(), []int{3} +} + +func (x *MultiaccountTypeWithoutID) GetSomeField() string { + if x != nil { + return x.SomeField } return "" } type APIOnlyType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // here the ormable flag is not used, so nothing will be generated for this // object at the ORM level, and when this type is used as a field or // repeated field in another message that field will be dropped in the Orm // model, and would have to be set by hook - Contents string `protobuf:"bytes,1,opt,name=contents" json:"contents,omitempty"` + Contents string `protobuf:"bytes,1,opt,name=contents,proto3" json:"contents,omitempty"` +} + +func (x *APIOnlyType) Reset() { + *x = APIOnlyType{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_types_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *APIOnlyType) Reset() { *m = APIOnlyType{} } -func (m *APIOnlyType) String() string { return proto.CompactTextString(m) } -func (*APIOnlyType) ProtoMessage() {} -func (*APIOnlyType) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{4} } +func (x *APIOnlyType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*APIOnlyType) ProtoMessage() {} -func (m *APIOnlyType) GetContents() string { - if m != nil { - return m.Contents +func (x *APIOnlyType) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_types_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 APIOnlyType.ProtoReflect.Descriptor instead. +func (*APIOnlyType) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_types_proto_rawDescGZIP(), []int{4} +} + +func (x *APIOnlyType) GetContents() string { + if x != nil { + return x.Contents } return "" } type PrimaryUUIDType struct { - Id *gorm_types.UUIDValue `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` - Child *ExternalChild `protobuf:"bytes,2,opt,name=child" json:"child,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *types.UUIDValue `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Child *ExternalChild `protobuf:"bytes,2,opt,name=child,proto3" json:"child,omitempty"` +} + +func (x *PrimaryUUIDType) Reset() { + *x = PrimaryUUIDType{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_types_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *PrimaryUUIDType) Reset() { *m = PrimaryUUIDType{} } -func (m *PrimaryUUIDType) String() string { return proto.CompactTextString(m) } -func (*PrimaryUUIDType) ProtoMessage() {} -func (*PrimaryUUIDType) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{5} } +func (x *PrimaryUUIDType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrimaryUUIDType) ProtoMessage() {} -func (m *PrimaryUUIDType) GetId() *gorm_types.UUIDValue { - if m != nil { - return m.Id +func (x *PrimaryUUIDType) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_types_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 PrimaryUUIDType.ProtoReflect.Descriptor instead. +func (*PrimaryUUIDType) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_types_proto_rawDescGZIP(), []int{5} +} + +func (x *PrimaryUUIDType) GetId() *types.UUIDValue { + if x != nil { + return x.Id } return nil } -func (m *PrimaryUUIDType) GetChild() *ExternalChild { - if m != nil { - return m.Child +func (x *PrimaryUUIDType) GetChild() *ExternalChild { + if x != nil { + return x.Child } return nil } type PrimaryStringType struct { - Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` - Child *ExternalChild `protobuf:"bytes,2,opt,name=child" json:"child,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Child *ExternalChild `protobuf:"bytes,2,opt,name=child,proto3" json:"child,omitempty"` +} + +func (x *PrimaryStringType) Reset() { + *x = PrimaryStringType{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_types_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *PrimaryStringType) Reset() { *m = PrimaryStringType{} } -func (m *PrimaryStringType) String() string { return proto.CompactTextString(m) } -func (*PrimaryStringType) ProtoMessage() {} -func (*PrimaryStringType) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{6} } +func (x *PrimaryStringType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrimaryStringType) ProtoMessage() {} -func (m *PrimaryStringType) GetId() string { - if m != nil { - return m.Id +func (x *PrimaryStringType) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_types_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 PrimaryStringType.ProtoReflect.Descriptor instead. +func (*PrimaryStringType) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_types_proto_rawDescGZIP(), []int{6} +} + +func (x *PrimaryStringType) GetId() string { + if x != nil { + return x.Id } return "" } -func (m *PrimaryStringType) GetChild() *ExternalChild { - if m != nil { - return m.Child +func (x *PrimaryStringType) GetChild() *ExternalChild { + if x != nil { + return x.Child } return nil } type TestTag struct { - Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` - TestTagAssoc *TestTagAssociation `protobuf:"bytes,2,opt,name=testTagAssoc" json:"testTagAssoc,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + TestTagAssoc *TestTagAssociation `protobuf:"bytes,2,opt,name=testTagAssoc,proto3" json:"testTagAssoc,omitempty"` +} + +func (x *TestTag) Reset() { + *x = TestTag{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_types_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TestTag) Reset() { *m = TestTag{} } -func (m *TestTag) String() string { return proto.CompactTextString(m) } -func (*TestTag) ProtoMessage() {} -func (*TestTag) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{7} } +func (x *TestTag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestTag) ProtoMessage() {} -func (m *TestTag) GetId() string { - if m != nil { - return m.Id +func (x *TestTag) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_types_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 TestTag.ProtoReflect.Descriptor instead. +func (*TestTag) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_types_proto_rawDescGZIP(), []int{7} +} + +func (x *TestTag) GetId() string { + if x != nil { + return x.Id } return "" } -func (m *TestTag) GetTestTagAssoc() *TestTagAssociation { - if m != nil { - return m.TestTagAssoc +func (x *TestTag) GetTestTagAssoc() *TestTagAssociation { + if x != nil { + return x.TestTagAssoc } return nil } // replace by default type TestAssocHandlerDefault struct { - Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` - TestTagAssoc []*TestTagAssociation `protobuf:"bytes,2,rep,name=testTagAssoc" json:"testTagAssoc,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + TestTagAssoc []*TestTagAssociation `protobuf:"bytes,2,rep,name=testTagAssoc,proto3" json:"testTagAssoc,omitempty"` +} + +func (x *TestAssocHandlerDefault) Reset() { + *x = TestAssocHandlerDefault{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_types_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TestAssocHandlerDefault) Reset() { *m = TestAssocHandlerDefault{} } -func (m *TestAssocHandlerDefault) String() string { return proto.CompactTextString(m) } -func (*TestAssocHandlerDefault) ProtoMessage() {} -func (*TestAssocHandlerDefault) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{8} } +func (x *TestAssocHandlerDefault) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestAssocHandlerDefault) ProtoMessage() {} -func (m *TestAssocHandlerDefault) GetId() string { - if m != nil { - return m.Id +func (x *TestAssocHandlerDefault) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_types_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 TestAssocHandlerDefault.ProtoReflect.Descriptor instead. +func (*TestAssocHandlerDefault) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_types_proto_rawDescGZIP(), []int{8} +} + +func (x *TestAssocHandlerDefault) GetId() string { + if x != nil { + return x.Id } return "" } -func (m *TestAssocHandlerDefault) GetTestTagAssoc() []*TestTagAssociation { - if m != nil { - return m.TestTagAssoc +func (x *TestAssocHandlerDefault) GetTestTagAssoc() []*TestTagAssociation { + if x != nil { + return x.TestTagAssoc } return nil } type TestAssocHandlerReplace struct { - Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` - TestTagAssoc []*TestTagAssociation `protobuf:"bytes,2,rep,name=testTagAssoc" json:"testTagAssoc,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + TestTagAssoc []*TestTagAssociation `protobuf:"bytes,2,rep,name=testTagAssoc,proto3" json:"testTagAssoc,omitempty"` +} + +func (x *TestAssocHandlerReplace) Reset() { + *x = TestAssocHandlerReplace{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_types_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TestAssocHandlerReplace) Reset() { *m = TestAssocHandlerReplace{} } -func (m *TestAssocHandlerReplace) String() string { return proto.CompactTextString(m) } -func (*TestAssocHandlerReplace) ProtoMessage() {} -func (*TestAssocHandlerReplace) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{9} } +func (x *TestAssocHandlerReplace) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestAssocHandlerReplace) ProtoMessage() {} -func (m *TestAssocHandlerReplace) GetId() string { - if m != nil { - return m.Id +func (x *TestAssocHandlerReplace) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_types_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 TestAssocHandlerReplace.ProtoReflect.Descriptor instead. +func (*TestAssocHandlerReplace) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_types_proto_rawDescGZIP(), []int{9} +} + +func (x *TestAssocHandlerReplace) GetId() string { + if x != nil { + return x.Id } return "" } -func (m *TestAssocHandlerReplace) GetTestTagAssoc() []*TestTagAssociation { - if m != nil { - return m.TestTagAssoc +func (x *TestAssocHandlerReplace) GetTestTagAssoc() []*TestTagAssociation { + if x != nil { + return x.TestTagAssoc } return nil } type TestAssocHandlerClear struct { - Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` - TestTagAssoc []*TestTagAssociation `protobuf:"bytes,2,rep,name=testTagAssoc" json:"testTagAssoc,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + TestTagAssoc []*TestTagAssociation `protobuf:"bytes,2,rep,name=testTagAssoc,proto3" json:"testTagAssoc,omitempty"` +} + +func (x *TestAssocHandlerClear) Reset() { + *x = TestAssocHandlerClear{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_types_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TestAssocHandlerClear) Reset() { *m = TestAssocHandlerClear{} } -func (m *TestAssocHandlerClear) String() string { return proto.CompactTextString(m) } -func (*TestAssocHandlerClear) ProtoMessage() {} -func (*TestAssocHandlerClear) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{10} } +func (x *TestAssocHandlerClear) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestAssocHandlerClear) ProtoMessage() {} -func (m *TestAssocHandlerClear) GetId() string { - if m != nil { - return m.Id +func (x *TestAssocHandlerClear) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_types_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 TestAssocHandlerClear.ProtoReflect.Descriptor instead. +func (*TestAssocHandlerClear) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_types_proto_rawDescGZIP(), []int{10} +} + +func (x *TestAssocHandlerClear) GetId() string { + if x != nil { + return x.Id } return "" } -func (m *TestAssocHandlerClear) GetTestTagAssoc() []*TestTagAssociation { - if m != nil { - return m.TestTagAssoc +func (x *TestAssocHandlerClear) GetTestTagAssoc() []*TestTagAssociation { + if x != nil { + return x.TestTagAssoc } return nil } type TestAssocHandlerAppend struct { - Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` - TestTagAssoc []*TestTagAssociation `protobuf:"bytes,2,rep,name=testTagAssoc" json:"testTagAssoc,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + TestTagAssoc []*TestTagAssociation `protobuf:"bytes,2,rep,name=testTagAssoc,proto3" json:"testTagAssoc,omitempty"` +} + +func (x *TestAssocHandlerAppend) Reset() { + *x = TestAssocHandlerAppend{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_types_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TestAssocHandlerAppend) Reset() { *m = TestAssocHandlerAppend{} } -func (m *TestAssocHandlerAppend) String() string { return proto.CompactTextString(m) } -func (*TestAssocHandlerAppend) ProtoMessage() {} -func (*TestAssocHandlerAppend) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{11} } +func (x *TestAssocHandlerAppend) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestAssocHandlerAppend) ProtoMessage() {} -func (m *TestAssocHandlerAppend) GetId() string { - if m != nil { - return m.Id +func (x *TestAssocHandlerAppend) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_types_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 TestAssocHandlerAppend.ProtoReflect.Descriptor instead. +func (*TestAssocHandlerAppend) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_types_proto_rawDescGZIP(), []int{11} +} + +func (x *TestAssocHandlerAppend) GetId() string { + if x != nil { + return x.Id } return "" } -func (m *TestAssocHandlerAppend) GetTestTagAssoc() []*TestTagAssociation { - if m != nil { - return m.TestTagAssoc +func (x *TestAssocHandlerAppend) GetTestTagAssoc() []*TestTagAssociation { + if x != nil { + return x.TestTagAssoc } return nil } type TestTagAssociation struct { - SomeField string `protobuf:"bytes,1,opt,name=some_field,json=someField" json:"some_field,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SomeField string `protobuf:"bytes,1,opt,name=some_field,json=someField,proto3" json:"some_field,omitempty"` +} + +func (x *TestTagAssociation) Reset() { + *x = TestTagAssociation{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_types_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TestTagAssociation) Reset() { *m = TestTagAssociation{} } -func (m *TestTagAssociation) String() string { return proto.CompactTextString(m) } -func (*TestTagAssociation) ProtoMessage() {} -func (*TestTagAssociation) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{12} } +func (x *TestTagAssociation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestTagAssociation) ProtoMessage() {} -func (m *TestTagAssociation) GetSomeField() string { - if m != nil { - return m.SomeField +func (x *TestTagAssociation) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_types_proto_msgTypes[12] + 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 TestTagAssociation.ProtoReflect.Descriptor instead. +func (*TestTagAssociation) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_types_proto_rawDescGZIP(), []int{12} +} + +func (x *TestTagAssociation) GetSomeField() string { + if x != nil { + return x.SomeField } return "" } type PrimaryIncluded struct { - Child *ExternalChild `protobuf:"bytes,1,opt,name=child" json:"child,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Child *ExternalChild `protobuf:"bytes,1,opt,name=child,proto3" json:"child,omitempty"` +} + +func (x *PrimaryIncluded) Reset() { + *x = PrimaryIncluded{} + if protoimpl.UnsafeEnabled { + mi := &file_feature_demo_demo_types_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *PrimaryIncluded) Reset() { *m = PrimaryIncluded{} } -func (m *PrimaryIncluded) String() string { return proto.CompactTextString(m) } -func (*PrimaryIncluded) ProtoMessage() {} -func (*PrimaryIncluded) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{13} } +func (x *PrimaryIncluded) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrimaryIncluded) ProtoMessage() {} -func (m *PrimaryIncluded) GetChild() *ExternalChild { - if m != nil { - return m.Child +func (x *PrimaryIncluded) ProtoReflect() protoreflect.Message { + mi := &file_feature_demo_demo_types_proto_msgTypes[13] + 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 PrimaryIncluded.ProtoReflect.Descriptor instead. +func (*PrimaryIncluded) Descriptor() ([]byte, []int) { + return file_feature_demo_demo_types_proto_rawDescGZIP(), []int{13} +} + +func (x *PrimaryIncluded) GetChild() *ExternalChild { + if x != nil { + return x.Child } return nil } -func init() { - proto.RegisterType((*TestTypes)(nil), "example.TestTypes") - proto.RegisterType((*TypeWithID)(nil), "example.TypeWithID") - proto.RegisterType((*MultiaccountTypeWithID)(nil), "example.MultiaccountTypeWithID") - proto.RegisterType((*MultiaccountTypeWithoutID)(nil), "example.MultiaccountTypeWithoutID") - proto.RegisterType((*APIOnlyType)(nil), "example.APIOnlyType") - proto.RegisterType((*PrimaryUUIDType)(nil), "example.PrimaryUUIDType") - proto.RegisterType((*PrimaryStringType)(nil), "example.PrimaryStringType") - proto.RegisterType((*TestTag)(nil), "example.TestTag") - proto.RegisterType((*TestAssocHandlerDefault)(nil), "example.TestAssocHandlerDefault") - proto.RegisterType((*TestAssocHandlerReplace)(nil), "example.TestAssocHandlerReplace") - proto.RegisterType((*TestAssocHandlerClear)(nil), "example.TestAssocHandlerClear") - proto.RegisterType((*TestAssocHandlerAppend)(nil), "example.TestAssocHandlerAppend") - proto.RegisterType((*TestTagAssociation)(nil), "example.TestTagAssociation") - proto.RegisterType((*PrimaryIncluded)(nil), "example.PrimaryIncluded") - proto.RegisterEnum("example.TestTypesStatus", TestTypesStatus_name, TestTypesStatus_value) -} - -func init() { proto.RegisterFile("example/feature_demo/demo_types.proto", fileDescriptor1) } - -var fileDescriptor1 = []byte{ - // 1303 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x6d, 0x73, 0xda, 0xc6, - 0x16, 0xb6, 0x78, 0xe7, 0xc8, 0x18, 0x67, 0x6f, 0x5e, 0x04, 0xb9, 0xf7, 0x86, 0x61, 0x9a, 0x86, - 0x7a, 0x1a, 0x98, 0x3a, 0xfd, 0x90, 0x90, 0x76, 0x32, 0x38, 0x24, 0x0d, 0xc9, 0xd4, 0x76, 0x65, - 0xbb, 0xe9, 0xcb, 0x74, 0xd4, 0x45, 0x5a, 0xf0, 0x66, 0xc4, 0xae, 0xaa, 0x5d, 0x35, 0x21, 0xd3, - 0x76, 0xfa, 0xb7, 0xe0, 0x17, 0xf4, 0x6b, 0xff, 0x51, 0x67, 0x57, 0x12, 0xc1, 0x26, 0x4c, 0x9c, - 0x69, 0xbe, 0x60, 0x4b, 0xfb, 0x3c, 0xe7, 0xd9, 0x73, 0xce, 0x73, 0x0e, 0xc0, 0x4d, 0xf2, 0x0a, - 0x4f, 0x02, 0x9f, 0x74, 0x46, 0x04, 0xcb, 0x28, 0x24, 0x8e, 0x47, 0x26, 0xbc, 0xa3, 0x3e, 0x1c, - 0x39, 0x0d, 0x88, 0x68, 0x07, 0x21, 0x97, 0x1c, 0x15, 0x13, 0x58, 0xbd, 0x3b, 0xa6, 0xf2, 0x34, - 0x1a, 0xb6, 0x5d, 0x3e, 0xe9, 0x50, 0x36, 0xe2, 0x43, 0x9f, 0xbf, 0xe2, 0x01, 0x61, 0x1d, 0x8d, - 0x73, 0x6f, 0x8f, 0x09, 0xbb, 0x3d, 0xe6, 0xe1, 0xa4, 0xc3, 0x03, 0x49, 0x39, 0x13, 0x1d, 0xf5, - 0x10, 0x07, 0xa9, 0xdf, 0xbb, 0x28, 0x57, 0x2b, 0x77, 0x96, 0xf4, 0xeb, 0xff, 0x1f, 0x73, 0x3e, - 0xf6, 0x49, 0x8c, 0x1c, 0x46, 0xa3, 0xce, 0xcb, 0x10, 0x07, 0x01, 0x09, 0xd3, 0xf3, 0xeb, 0xe7, - 0xcf, 0xc9, 0x24, 0x90, 0xd3, 0xe4, 0xf0, 0xc6, 0xf9, 0x43, 0x49, 0x27, 0x44, 0x48, 0x3c, 0x09, - 0x12, 0xc0, 0xad, 0xf5, 0x45, 0x10, 0x24, 0xfc, 0x95, 0xba, 0x24, 0x01, 0x3e, 0xb8, 0x68, 0x06, - 0x69, 0xc0, 0x48, 0x90, 0x50, 0x7f, 0x24, 0x01, 0x76, 0xd6, 0x2b, 0x4d, 0x22, 0x5f, 0x52, 0x67, - 0x44, 0xfd, 0x44, 0xac, 0xf9, 0x77, 0x1e, 0xca, 0xc7, 0x44, 0xc8, 0x63, 0x55, 0x07, 0xd4, 0x86, - 0x2a, 0x0e, 0xa8, 0xc3, 0x99, 0x3f, 0x75, 0x84, 0x0c, 0x29, 0x1b, 0x5b, 0x46, 0xc3, 0x68, 0x95, - 0xf7, 0x0a, 0xf3, 0x59, 0x2d, 0xb3, 0x6d, 0xd8, 0x15, 0x1c, 0xd0, 0x03, 0xe6, 0x4f, 0x8f, 0xf4, - 0x21, 0xb2, 0xa0, 0xc8, 0xa2, 0xc9, 0x90, 0x84, 0xc2, 0xca, 0x34, 0xb2, 0xad, 0xbc, 0x9d, 0x3e, - 0xa2, 0x47, 0x50, 0x8d, 0x9b, 0x83, 0xfd, 0x34, 0x52, 0xb6, 0x61, 0xb4, 0xcc, 0xdd, 0xff, 0xb6, - 0xe3, 0x42, 0xb5, 0xd3, 0x42, 0xb5, 0xe3, 0x58, 0xdf, 0x62, 0x3f, 0x22, 0xf6, 0x56, 0x4a, 0x4a, - 0x04, 0xba, 0x60, 0x0e, 0x89, 0xcb, 0x27, 0x44, 0x38, 0x94, 0x49, 0x2b, 0xd7, 0x30, 0x5a, 0x5b, - 0xbb, 0xb5, 0x76, 0x92, 0x60, 0x7b, 0x71, 0xf3, 0xb6, 0x90, 0x58, 0x46, 0xc2, 0x86, 0x04, 0x3d, - 0x60, 0x12, 0xdd, 0x05, 0x93, 0x71, 0x79, 0x4a, 0xd9, 0x98, 0x11, 0x21, 0xac, 0xbc, 0x96, 0xbf, - 0xba, 0x22, 0xff, 0x48, 0x35, 0xd1, 0x5e, 0x86, 0xa2, 0x8f, 0x20, 0x17, 0x45, 0xd4, 0xb3, 0x0a, - 0x9a, 0xb2, 0xdd, 0xd6, 0xf6, 0x8a, 0x9d, 0x72, 0x72, 0x32, 0xe8, 0xdb, 0xfa, 0x14, 0xdd, 0x03, - 0x70, 0x43, 0x82, 0x25, 0xf1, 0x1c, 0x2c, 0xad, 0xa2, 0xc6, 0xd6, 0x57, 0xc2, 0x1f, 0xa7, 0x36, - 0xb0, 0xcb, 0x09, 0xba, 0x27, 0xd1, 0x4d, 0xa8, 0xaa, 0x70, 0xce, 0x4b, 0x2a, 0x4f, 0x1d, 0xea, - 0x39, 0xd4, 0xb3, 0x4a, 0x0d, 0xa3, 0x55, 0xb1, 0x37, 0xd5, 0xeb, 0xe7, 0x54, 0x9e, 0x0e, 0xbc, - 0x81, 0x87, 0x3e, 0x07, 0x78, 0x21, 0x38, 0x73, 0x46, 0x94, 0xf8, 0x9e, 0x55, 0xd6, 0x0a, 0x57, - 0x96, 0x6f, 0xf3, 0xf4, 0xe8, 0x60, 0x3f, 0x2e, 0x5c, 0x59, 0x01, 0x1f, 0x2b, 0x1c, 0xea, 0x42, - 0x85, 0x45, 0xbe, 0x8f, 0x87, 0x3e, 0x71, 0x74, 0x1a, 0xb0, 0x4a, 0x54, 0x69, 0xc4, 0xc4, 0xcd, - 0x14, 0x7b, 0xa2, 0x72, 0xfa, 0x0c, 0xca, 0xca, 0xb7, 0xda, 0x01, 0x96, 0xa9, 0x79, 0x97, 0x97, - 0x79, 0x2a, 0x1b, 0xd5, 0x7f, 0xbb, 0x24, 0x93, 0xff, 0x9a, 0x2d, 0x28, 0xc4, 0xc5, 0x47, 0x26, - 0x14, 0x4f, 0xf6, 0x9f, 0xed, 0x1f, 0x3c, 0xdf, 0xdf, 0xde, 0x40, 0x25, 0xc8, 0x7d, 0x75, 0x70, - 0xd0, 0xdf, 0x36, 0x50, 0x11, 0xb2, 0x7b, 0xbd, 0xfe, 0x76, 0xa6, 0x3b, 0x9a, 0xcf, 0x6a, 0xc3, - 0x92, 0x81, 0x6e, 0x81, 0x19, 0xb7, 0xb7, 0x17, 0x86, 0x78, 0x8a, 0xf2, 0x58, 0xfd, 0x69, 0x5e, - 0x5a, 0xb2, 0xbd, 0x4f, 0x87, 0x9d, 0xe0, 0x17, 0xd4, 0x3a, 0x0b, 0x2c, 0x68, 0xe0, 0xee, 0x5b, - 0x90, 0x75, 0x53, 0x4c, 0x78, 0x38, 0xc6, 0x62, 0xc8, 0x43, 0xaf, 0xf9, 0x57, 0x01, 0xe0, 0x38, - 0xad, 0x63, 0x1f, 0x6d, 0x41, 0x86, 0x7a, 0xda, 0xc7, 0x15, 0x3b, 0x43, 0x3d, 0x74, 0x03, 0x32, - 0x34, 0xb0, 0x32, 0xda, 0xd7, 0xd5, 0xf9, 0xac, 0x66, 0x42, 0x19, 0x8a, 0x34, 0x70, 0xb0, 0xe7, - 0x85, 0x76, 0x86, 0x06, 0x68, 0x07, 0x0a, 0xda, 0x0b, 0xc2, 0xca, 0x36, 0xb2, 0x2d, 0x73, 0x17, - 0xad, 0xfa, 0xcd, 0x4e, 0x10, 0xa8, 0x0b, 0x55, 0xec, 0x30, 0x22, 0x94, 0x0b, 0xf8, 0xf0, 0x05, - 0x71, 0x63, 0x93, 0xbe, 0x9d, 0x54, 0xc1, 0xfb, 0x1a, 0x79, 0xa0, 0x81, 0xa8, 0x03, 0xf9, 0x80, - 0x2b, 0x5b, 0xc7, 0xd6, 0xbc, 0xb4, 0x60, 0x0c, 0x98, 0x3c, 0x54, 0x07, 0xf1, 0xd8, 0x35, 0x37, - 0xec, 0x18, 0x87, 0x3e, 0x86, 0x9c, 0x1a, 0xf3, 0xc4, 0x97, 0xd0, 0xd6, 0x33, 0x7f, 0x22, 0x48, - 0xb8, 0x00, 0xea, 0x73, 0xd4, 0x81, 0xa2, 0x4a, 0x46, 0xb9, 0xbe, 0xb8, 0xda, 0xfb, 0x01, 0x23, - 0x32, 0xee, 0x7d, 0x8a, 0x42, 0x5d, 0xb8, 0xa2, 0x37, 0x03, 0x76, 0x5d, 0x1e, 0x31, 0xa9, 0xb7, - 0xb2, 0x43, 0x3d, 0x61, 0x95, 0x1a, 0xd9, 0x56, 0x65, 0x31, 0xfd, 0xff, 0x59, 0x06, 0xa9, 0x94, - 0x06, 0x9e, 0x40, 0x5f, 0x42, 0x55, 0x4c, 0x99, 0x3c, 0x25, 0x92, 0xba, 0x67, 0x9c, 0x7a, 0x79, - 0x91, 0x4f, 0xef, 0x70, 0xa0, 0xac, 0xa2, 0x18, 0xf6, 0xd6, 0x02, 0x1c, 0xbb, 0x75, 0x07, 0x4a, - 0x12, 0x8f, 0x1d, 0x49, 0x84, 0xd4, 0x46, 0xcd, 0xa4, 0x3d, 0x41, 0xf9, 0x91, 0xcf, 0xb1, 0x6c, - 0x14, 0xec, 0xa2, 0xc4, 0x63, 0x55, 0x44, 0x74, 0x1b, 0x2a, 0x0a, 0x2b, 0xe8, 0x6b, 0x12, 0x13, - 0x4c, 0xdd, 0xc4, 0xf2, 0x7c, 0x56, 0xcb, 0x43, 0xd6, 0xfa, 0x33, 0x67, 0x9b, 0x12, 0x8f, 0x8f, - 0xe8, 0x6b, 0xa2, 0xe1, 0x5f, 0x80, 0xa9, 0x43, 0x24, 0xb7, 0xda, 0xd4, 0xb7, 0xba, 0xbe, 0x32, - 0xa1, 0x8f, 0x15, 0x26, 0x2e, 0x08, 0x68, 0x7c, 0x7c, 0xb1, 0x07, 0xb0, 0xe9, 0xf1, 0x48, 0x0d, - 0x51, 0x4c, 0xaf, 0xac, 0x59, 0x5f, 0x7d, 0x0d, 0x8a, 0xf9, 0x66, 0xcc, 0x88, 0x03, 0x9c, 0x99, - 0xa5, 0xad, 0x8b, 0xcc, 0x92, 0x5a, 0x29, 0x1e, 0xf1, 0x49, 0xb2, 0x52, 0xaa, 0xef, 0x5e, 0x29, - 0x09, 0xba, 0x27, 0xbb, 0xc7, 0xf3, 0x59, 0xed, 0xb0, 0x64, 0xa0, 0x6b, 0x90, 0xa7, 0x4c, 0xde, - 0xd9, 0x45, 0x20, 0x88, 0x1b, 0x12, 0xa9, 0xf6, 0x66, 0x3d, 0x13, 0x18, 0xe8, 0x0e, 0x6c, 0xfe, - 0xf8, 0xd3, 0xce, 0x53, 0x4e, 0xd9, 0xb1, 0x1a, 0x77, 0x14, 0x37, 0xd3, 0x59, 0x6e, 0xb9, 0xa8, - 0x6f, 0xbd, 0xde, 0x7c, 0x33, 0x39, 0x83, 0x7e, 0xf3, 0x1b, 0xb8, 0xfa, 0xf5, 0xb9, 0x9e, 0xaf, - 0x4c, 0x55, 0x4e, 0x4f, 0xd5, 0xff, 0x00, 0x04, 0x9f, 0xa4, 0xc5, 0xd2, 0xd3, 0x65, 0x97, 0xd5, - 0x1b, 0x5d, 0x8c, 0x6e, 0x69, 0x3e, 0xab, 0xe5, 0x4a, 0x46, 0xc3, 0x68, 0xf6, 0xa1, 0xf6, 0xb6, - 0x90, 0x3c, 0x92, 0x83, 0xfe, 0xb9, 0x28, 0xc6, 0xfa, 0x28, 0x9f, 0x80, 0xb9, 0xe4, 0x2a, 0x54, - 0x87, 0x92, 0xcb, 0x99, 0x24, 0x4c, 0x8a, 0x84, 0xb5, 0x78, 0x6e, 0x32, 0xa8, 0x1e, 0x86, 0x74, - 0x82, 0xc3, 0xa9, 0xda, 0x7a, 0x1a, 0x7e, 0x73, 0x71, 0xf9, 0xb5, 0x7b, 0x51, 0xe5, 0xf4, 0x29, - 0xe4, 0xdd, 0x53, 0x9a, 0xa4, 0xa3, 0xbe, 0x3b, 0x52, 0x43, 0x3f, 0x7a, 0x25, 0x49, 0xc8, 0xb0, - 0xff, 0x50, 0x9d, 0xda, 0x31, 0xa8, 0xab, 0xa7, 0xa4, 0x64, 0x34, 0xbf, 0x87, 0x4b, 0x89, 0x5e, - 0xbc, 0xbc, 0xb4, 0xe2, 0x9b, 0x72, 0x95, 0xff, 0x45, 0x68, 0x1f, 0x8a, 0x7a, 0x9b, 0xe0, 0xf1, - 0x4a, 0xc0, 0x01, 0x6c, 0xca, 0xf8, 0xa8, 0x27, 0x04, 0x77, 0x93, 0xb8, 0xd7, 0xcf, 0x6e, 0xa1, - 0xe4, 0x90, 0x62, 0xf5, 0x25, 0xbb, 0xa7, 0xab, 0x59, 0xcf, 0xdc, 0xdd, 0xb0, 0xcf, 0x50, 0x17, - 0x6a, 0xbf, 0xc1, 0x35, 0xc5, 0xd2, 0x2f, 0x9f, 0x60, 0xe6, 0xf9, 0x24, 0xec, 0x93, 0x11, 0x8e, - 0x7c, 0x79, 0x01, 0xf5, 0xec, 0x85, 0xd4, 0x77, 0x32, 0x4f, 0xd6, 0xa9, 0xff, 0xb1, 0xaa, 0x6e, - 0x93, 0xc0, 0xc7, 0xee, 0x6a, 0x31, 0x9f, 0xbd, 0xbf, 0x3a, 0xcc, 0x67, 0xb5, 0xc2, 0x4e, 0xee, - 0xc9, 0xc6, 0xa1, 0xb1, 0x36, 0xfb, 0x2b, 0xe7, 0xf5, 0x1f, 0xfa, 0x04, 0x87, 0x1f, 0x54, 0xfd, - 0xe7, 0x75, 0xea, 0xbf, 0xc3, 0xd5, 0xf3, 0xea, 0xbd, 0x20, 0x20, 0xcc, 0xfb, 0xa0, 0xf2, 0xdf, - 0xad, 0x93, 0xbf, 0x0f, 0x68, 0x95, 0xf7, 0xae, 0xe9, 0x4c, 0xc9, 0x47, 0x8b, 0x81, 0x1b, 0x30, - 0xd7, 0x8f, 0x3c, 0xb2, 0x64, 0x77, 0xe3, 0x22, 0x76, 0x47, 0xf3, 0x59, 0x6d, 0xab, 0x64, 0x20, - 0x80, 0x9c, 0x1a, 0x48, 0x94, 0xa1, 0xde, 0xde, 0xe3, 0x1f, 0xfa, 0xef, 0xfb, 0xbb, 0x78, 0xf9, - 0xe7, 0xef, 0xfd, 0xe4, 0xe5, 0xb0, 0xa0, 0xd1, 0x77, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0xd8, - 0xfd, 0x13, 0xbb, 0x94, 0x0c, 0x00, 0x00, +var File_feature_demo_demo_types_proto protoreflect.FileDescriptor + +var file_feature_demo_demo_types_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x65, 0x6d, 0x6f, 0x2f, 0x64, + 0x65, 0x6d, 0x6f, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, + 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 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, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x67, 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x66, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x65, 0x6d, 0x6f, 0x2f, 0x64, 0x65, 0x6d, 0x6f, + 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, + 0x75, 0x73, 0x65, 0x72, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x22, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x65, 0x6d, 0x6f, 0x2f, 0x64, 0x65, + 0x6d, 0x6f, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xd1, 0x05, 0x0a, 0x09, 0x54, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x12, 0x2e, 0x0a, 0x0f, 0x61, 0x70, 0x69, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x73, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0xb9, 0x19, 0x02, + 0x10, 0x01, 0x52, 0x0d, 0x61, 0x70, 0x69, 0x4f, 0x6e, 0x6c, 0x79, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x05, 0x52, 0x07, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x45, 0x0a, 0x0f, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x0e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x12, 0x3a, 0x0a, 0x0b, 0x62, 0x65, 0x63, 0x6f, 0x6d, 0x65, 0x73, 0x5f, 0x69, 0x6e, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x0a, 0x62, 0x65, 0x63, 0x6f, 0x6d, 0x65, 0x73, 0x49, 0x6e, 0x74, 0x12, 0x38, + 0x0a, 0x0b, 0x6e, 0x6f, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x6e, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x0b, 0x6e, 0x6f, 0x74, + 0x68, 0x69, 0x6e, 0x67, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x6f, 0x72, 0x6d, 0x2e, 0x74, 0x79, + 0x70, 0x65, 0x73, 0x2e, 0x55, 0x55, 0x49, 0x44, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x39, + 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 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, 0x25, 0x0a, 0x0f, 0x74, 0x79, 0x70, + 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x69, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x49, 0x64, + 0x12, 0x34, 0x0a, 0x0a, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x72, 0x6d, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x6a, 0x73, 0x6f, + 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x3a, 0x0a, 0x0d, 0x6e, 0x75, 0x6c, 0x6c, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x67, 0x6f, 0x72, 0x6d, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x55, 0x55, 0x49, 0x44, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x6e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x55, 0x75, + 0x69, 0x64, 0x12, 0x31, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x72, 0x6d, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x52, 0x08, 0x74, 0x69, 0x6d, + 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0x28, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, + 0x47, 0x4f, 0x4f, 0x44, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x42, 0x41, 0x44, 0x10, 0x02, 0x3a, + 0x66, 0xba, 0xb9, 0x19, 0x62, 0x08, 0x01, 0x12, 0x27, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, 0x05, 0x61, 0x72, 0x72, 0x61, 0x79, 0x22, 0x11, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x62, 0x2f, 0x70, 0x71, + 0x12, 0x28, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, + 0x06, 0x61, 0x72, 0x72, 0x61, 0x79, 0x32, 0x22, 0x11, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x62, 0x2f, 0x70, 0x71, 0x1a, 0x0b, 0x73, 0x6d, 0x6f, 0x72, + 0x67, 0x61, 0x73, 0x62, 0x6f, 0x72, 0x64, 0x22, 0xc8, 0x06, 0x0a, 0x0a, 0x54, 0x79, 0x70, 0x65, + 0x57, 0x69, 0x74, 0x68, 0x49, 0x44, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x0f, 0xba, 0xb9, 0x19, 0x0b, 0x0a, 0x09, 0x0a, 0x07, 0x69, 0x70, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x52, 0x02, 0x69, 0x70, 0x12, 0x2a, 0x0a, 0x06, 0x74, 0x68, 0x69, 0x6e, 0x67, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x06, 0x74, 0x68, 0x69, + 0x6e, 0x67, 0x73, 0x12, 0x3a, 0x0a, 0x0f, 0x61, 0x5f, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, + 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x65, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x52, 0x0d, 0x61, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, + 0x2f, 0x0a, 0x05, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x49, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, + 0x74, 0x42, 0x06, 0xba, 0xb9, 0x19, 0x02, 0x22, 0x00, 0x52, 0x05, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x12, 0x26, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x06, 0xba, 0xb9, 0x19, 0x02, + 0x22, 0x00, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x72, 0x6d, + 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x49, 0x6e, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3a, 0x0a, 0x15, 0x6d, 0x75, 0x6c, + 0x74, 0x69, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, + 0x64, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x06, 0xba, 0xb9, 0x19, 0x02, 0x10, 0x01, + 0x52, 0x13, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x49, 0x64, 0x73, 0x12, 0x3d, 0x0a, 0x0f, 0x73, 0x79, 0x6e, 0x74, 0x68, 0x65, 0x74, + 0x69, 0x63, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x41, 0x50, 0x49, 0x4f, 0x6e, 0x6c, 0x79, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x0e, 0x73, 0x79, 0x6e, 0x74, 0x68, 0x65, 0x74, 0x69, 0x63, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x12, 0x2a, 0x0a, 0x08, 0x74, 0x61, 0x67, 0x5f, 0x74, 0x65, 0x73, 0x74, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x02, 0x42, 0x0f, 0xba, 0xb9, 0x19, 0x0b, 0x0a, 0x09, 0x12, 0x05, + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x06, 0x52, 0x07, 0x74, 0x61, 0x67, 0x54, 0x65, 0x73, 0x74, + 0x12, 0x2d, 0x0a, 0x0d, 0x74, 0x61, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x74, 0x65, 0x73, + 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xba, 0xb9, 0x19, 0x05, 0x0a, 0x03, 0x18, + 0x80, 0x04, 0x52, 0x0b, 0x74, 0x61, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x54, 0x65, 0x73, 0x74, 0x12, + 0x3c, 0x0a, 0x0b, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x0a, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x3f, 0x0a, + 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x0d, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x31, + 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x72, 0x6d, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x4f, 0x6e, 0x6c, 0x79, 0x52, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x4f, 0x6e, 0x6c, + 0x79, 0x12, 0x39, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x0f, 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, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x3a, 0x54, 0xba, 0xb9, + 0x19, 0x50, 0x08, 0x01, 0x12, 0x17, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x0a, 0x73, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x1a, 0x02, 0x70, 0x01, 0x12, 0x33, 0x0a, + 0x0c, 0x5b, 0x5d, 0x2a, 0x4a, 0x6f, 0x69, 0x6e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x13, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x1a, 0x0e, 0x7a, 0x0c, 0x54, 0x79, 0x70, 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x44, + 0x49, 0x44, 0x22, 0x51, 0x0a, 0x16, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x44, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, + 0x73, 0x6f, 0x6d, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x73, 0x6f, 0x6d, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x08, 0xba, 0xb9, 0x19, + 0x04, 0x08, 0x01, 0x20, 0x01, 0x22, 0x44, 0x0a, 0x19, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x57, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, + 0x49, 0x44, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x6f, 0x6d, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x6d, 0x65, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x3a, 0x08, 0xba, 0xb9, 0x19, 0x04, 0x08, 0x01, 0x20, 0x01, 0x22, 0x29, 0x0a, 0x0b, 0x41, + 0x50, 0x49, 0x4f, 0x6e, 0x6c, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x6e, 0x0a, 0x0f, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, + 0x79, 0x55, 0x55, 0x49, 0x44, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x72, 0x6d, 0x2e, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x55, 0x55, 0x49, 0x44, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x2c, 0x0a, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3a, 0x06, + 0xba, 0xb9, 0x19, 0x02, 0x08, 0x01, 0x22, 0x59, 0x0a, 0x11, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, + 0x79, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x05, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x43, 0x68, 0x69, + 0x6c, 0x64, 0x52, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3a, 0x06, 0xba, 0xb9, 0x19, 0x02, 0x08, + 0x01, 0x22, 0x6a, 0x0a, 0x07, 0x54, 0x65, 0x73, 0x74, 0x54, 0x61, 0x67, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x47, 0x0a, 0x0c, + 0x74, 0x65, 0x73, 0x74, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x54, 0x65, 0x73, + 0x74, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x06, 0xba, 0xb9, 0x19, 0x02, 0x1a, 0x00, 0x52, 0x0c, 0x74, 0x65, 0x73, 0x74, 0x54, 0x61, 0x67, + 0x41, 0x73, 0x73, 0x6f, 0x63, 0x3a, 0x06, 0xba, 0xb9, 0x19, 0x02, 0x08, 0x01, 0x22, 0x7a, 0x0a, + 0x17, 0x54, 0x65, 0x73, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, + 0x72, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x47, 0x0a, 0x0c, 0x74, 0x65, 0x73, 0x74, + 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x54, 0x61, 0x67, + 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x06, 0xba, 0xb9, 0x19, + 0x02, 0x2a, 0x00, 0x52, 0x0c, 0x74, 0x65, 0x73, 0x74, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x6f, + 0x63, 0x3a, 0x06, 0xba, 0xb9, 0x19, 0x02, 0x08, 0x01, 0x22, 0x7c, 0x0a, 0x17, 0x54, 0x65, 0x73, + 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x70, + 0x6c, 0x61, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x49, 0x0a, 0x0c, 0x74, 0x65, 0x73, 0x74, 0x54, 0x61, 0x67, 0x41, + 0x73, 0x73, 0x6f, 0x63, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x6f, + 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xba, 0xb9, 0x19, 0x04, 0x2a, 0x02, 0x50, + 0x01, 0x52, 0x0c, 0x74, 0x65, 0x73, 0x74, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x3a, + 0x06, 0xba, 0xb9, 0x19, 0x02, 0x08, 0x01, 0x22, 0x7a, 0x0a, 0x15, 0x54, 0x65, 0x73, 0x74, 0x41, + 0x73, 0x73, 0x6f, 0x63, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x43, 0x6c, 0x65, 0x61, 0x72, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x49, 0x0a, 0x0c, 0x74, 0x65, 0x73, 0x74, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x6f, 0x63, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x2e, 0x54, 0x65, 0x73, 0x74, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xba, 0xb9, 0x19, 0x04, 0x2a, 0x02, 0x60, 0x01, 0x52, 0x0c, 0x74, + 0x65, 0x73, 0x74, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x3a, 0x06, 0xba, 0xb9, 0x19, + 0x02, 0x08, 0x01, 0x22, 0x7b, 0x0a, 0x16, 0x54, 0x65, 0x73, 0x74, 0x41, 0x73, 0x73, 0x6f, 0x63, + 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x49, 0x0a, + 0x0c, 0x74, 0x65, 0x73, 0x74, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x54, 0x65, + 0x73, 0x74, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x08, 0xba, 0xb9, 0x19, 0x04, 0x2a, 0x02, 0x58, 0x01, 0x52, 0x0c, 0x74, 0x65, 0x73, 0x74, + 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x6f, 0x63, 0x3a, 0x06, 0xba, 0xb9, 0x19, 0x02, 0x08, 0x01, + 0x22, 0x3b, 0x0a, 0x12, 0x54, 0x65, 0x73, 0x74, 0x54, 0x61, 0x67, 0x41, 0x73, 0x73, 0x6f, 0x63, + 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x6f, 0x6d, 0x65, 0x5f, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x6d, 0x65, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x06, 0xba, 0xb9, 0x19, 0x02, 0x08, 0x01, 0x22, 0x53, 0x0a, + 0x0f, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, + 0x12, 0x2c, 0x0a, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x52, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x3a, 0x12, + 0xba, 0xb9, 0x19, 0x0e, 0x08, 0x01, 0x12, 0x0a, 0x0a, 0x04, 0x55, 0x55, 0x49, 0x44, 0x12, 0x02, + 0x69, 0x64, 0x42, 0x46, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x72, 0x6d, 0x2f, 0x65, 0x78, + 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x65, + 0x6d, 0x6f, 0x3b, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_feature_demo_demo_types_proto_rawDescOnce sync.Once + file_feature_demo_demo_types_proto_rawDescData = file_feature_demo_demo_types_proto_rawDesc +) + +func file_feature_demo_demo_types_proto_rawDescGZIP() []byte { + file_feature_demo_demo_types_proto_rawDescOnce.Do(func() { + file_feature_demo_demo_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_feature_demo_demo_types_proto_rawDescData) + }) + return file_feature_demo_demo_types_proto_rawDescData +} + +var file_feature_demo_demo_types_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_feature_demo_demo_types_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_feature_demo_demo_types_proto_goTypes = []interface{}{ + (TestTypesStatus)(0), // 0: example.TestTypes.status + (*TestTypes)(nil), // 1: example.TestTypes + (*TypeWithID)(nil), // 2: example.TypeWithID + (*MultiaccountTypeWithID)(nil), // 3: example.MultiaccountTypeWithID + (*MultiaccountTypeWithoutID)(nil), // 4: example.MultiaccountTypeWithoutID + (*APIOnlyType)(nil), // 5: example.APIOnlyType + (*PrimaryUUIDType)(nil), // 6: example.PrimaryUUIDType + (*PrimaryStringType)(nil), // 7: example.PrimaryStringType + (*TestTag)(nil), // 8: example.TestTag + (*TestAssocHandlerDefault)(nil), // 9: example.TestAssocHandlerDefault + (*TestAssocHandlerReplace)(nil), // 10: example.TestAssocHandlerReplace + (*TestAssocHandlerClear)(nil), // 11: example.TestAssocHandlerClear + (*TestAssocHandlerAppend)(nil), // 12: example.TestAssocHandlerAppend + (*TestTagAssociation)(nil), // 13: example.TestTagAssociation + (*PrimaryIncluded)(nil), // 14: example.PrimaryIncluded + (*wrapperspb.StringValue)(nil), // 15: google.protobuf.StringValue + (*emptypb.Empty)(nil), // 16: google.protobuf.Empty + (*types.UUID)(nil), // 17: gorm.types.UUID + (*timestamp.Timestamp)(nil), // 18: google.protobuf.Timestamp + (*types.JSONValue)(nil), // 19: gorm.types.JSONValue + (*types.UUIDValue)(nil), // 20: gorm.types.UUIDValue + (*types.TimeOnly)(nil), // 21: gorm.types.TimeOnly + (*IntPoint)(nil), // 22: example.IntPoint + (*user.User)(nil), // 23: user.User + (*types.InetValue)(nil), // 24: gorm.types.InetValue + (*wrapperspb.FloatValue)(nil), // 25: google.protobuf.FloatValue + (*wrapperspb.DoubleValue)(nil), // 26: google.protobuf.DoubleValue + (*ExternalChild)(nil), // 27: example.ExternalChild +} +var file_feature_demo_demo_types_proto_depIdxs = []int32{ + 15, // 0: example.TestTypes.optional_string:type_name -> google.protobuf.StringValue + 0, // 1: example.TestTypes.becomes_int:type_name -> example.TestTypes.status + 16, // 2: example.TestTypes.nothingness:type_name -> google.protobuf.Empty + 17, // 3: example.TestTypes.uuid:type_name -> gorm.types.UUID + 18, // 4: example.TestTypes.created_at:type_name -> google.protobuf.Timestamp + 19, // 5: example.TestTypes.json_field:type_name -> gorm.types.JSONValue + 20, // 6: example.TestTypes.nullable_uuid:type_name -> gorm.types.UUIDValue + 21, // 7: example.TestTypes.time_only:type_name -> gorm.types.TimeOnly + 1, // 8: example.TypeWithID.things:type_name -> example.TestTypes + 1, // 9: example.TypeWithID.a_nested_object:type_name -> example.TestTypes + 22, // 10: example.TypeWithID.point:type_name -> example.IntPoint + 23, // 11: example.TypeWithID.user:type_name -> user.User + 24, // 12: example.TypeWithID.address:type_name -> gorm.types.InetValue + 5, // 13: example.TypeWithID.synthetic_field:type_name -> example.APIOnlyType + 25, // 14: example.TypeWithID.float_field:type_name -> google.protobuf.FloatValue + 26, // 15: example.TypeWithID.double_field:type_name -> google.protobuf.DoubleValue + 21, // 16: example.TypeWithID.time_only:type_name -> gorm.types.TimeOnly + 18, // 17: example.TypeWithID.deleted_at:type_name -> google.protobuf.Timestamp + 20, // 18: example.PrimaryUUIDType.id:type_name -> gorm.types.UUIDValue + 27, // 19: example.PrimaryUUIDType.child:type_name -> example.ExternalChild + 27, // 20: example.PrimaryStringType.child:type_name -> example.ExternalChild + 13, // 21: example.TestTag.testTagAssoc:type_name -> example.TestTagAssociation + 13, // 22: example.TestAssocHandlerDefault.testTagAssoc:type_name -> example.TestTagAssociation + 13, // 23: example.TestAssocHandlerReplace.testTagAssoc:type_name -> example.TestTagAssociation + 13, // 24: example.TestAssocHandlerClear.testTagAssoc:type_name -> example.TestTagAssociation + 13, // 25: example.TestAssocHandlerAppend.testTagAssoc:type_name -> example.TestTagAssociation + 27, // 26: example.PrimaryIncluded.child:type_name -> example.ExternalChild + 27, // [27:27] is the sub-list for method output_type + 27, // [27:27] is the sub-list for method input_type + 27, // [27:27] is the sub-list for extension type_name + 27, // [27:27] is the sub-list for extension extendee + 0, // [0:27] is the sub-list for field type_name +} + +func init() { file_feature_demo_demo_types_proto_init() } +func file_feature_demo_demo_types_proto_init() { + if File_feature_demo_demo_types_proto != nil { + return + } + file_feature_demo_demo_service_proto_init() + file_feature_demo_demo_multi_file_proto_init() + if !protoimpl.UnsafeEnabled { + file_feature_demo_demo_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TestTypes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TypeWithID); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MultiaccountTypeWithID); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MultiaccountTypeWithoutID); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*APIOnlyType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrimaryUUIDType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_types_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrimaryStringType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_types_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TestTag); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_types_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TestAssocHandlerDefault); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_types_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TestAssocHandlerReplace); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_types_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TestAssocHandlerClear); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_types_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TestAssocHandlerAppend); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_types_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TestTagAssociation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_feature_demo_demo_types_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrimaryIncluded); 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{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_feature_demo_demo_types_proto_rawDesc, + NumEnums: 1, + NumMessages: 14, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_feature_demo_demo_types_proto_goTypes, + DependencyIndexes: file_feature_demo_demo_types_proto_depIdxs, + EnumInfos: file_feature_demo_demo_types_proto_enumTypes, + MessageInfos: file_feature_demo_demo_types_proto_msgTypes, + }.Build() + File_feature_demo_demo_types_proto = out.File + file_feature_demo_demo_types_proto_rawDesc = nil + file_feature_demo_demo_types_proto_goTypes = nil + file_feature_demo_demo_types_proto_depIdxs = nil } diff --git a/example/feature_demo/demo_types.proto b/example/feature_demo/demo_types.proto index 3596bf47..c04c1553 100644 --- a/example/feature_demo/demo_types.proto +++ b/example/feature_demo/demo_types.proto @@ -1,14 +1,17 @@ syntax = "proto3"; package example; -import "github.com/infobloxopen/protoc-gen-gorm/options/gorm.proto"; -import "github.com/infobloxopen/protoc-gen-gorm/types/types.proto"; + import "google/protobuf/wrappers.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; -import "example/feature_demo/demo_service.proto"; -import "github.com/infobloxopen/protoc-gen-gorm/example/user/user.proto"; -import "example/feature_demo/demo_multi_file.proto"; + +import "options/gorm.proto"; +import "types/types.proto"; + +import "feature_demo/demo_service.proto"; +import "user/user.proto"; +import "feature_demo/demo_multi_file.proto"; option go_package = "github.com/infobloxopen/protoc-gen-gorm/example/feature_demo;example"; diff --git a/example/feature_demo/demo_types_test.go b/example/feature_demo/demo_types_test.go index bfe40456..90647e62 100644 --- a/example/feature_demo/demo_types_test.go +++ b/example/feature_demo/demo_types_test.go @@ -2,8 +2,9 @@ package example import ( "context" - "github.com/infobloxopen/protoc-gen-gorm/types" "testing" + + "github.com/infobloxopen/protoc-gen-gorm/types" ) func TestInet(t *testing.T) { @@ -33,7 +34,7 @@ func TestTimeOnlyToORM(t *testing.T) { } }() expectedTime := "01:59:18" - pb := &TypeWithID{TimeOnly: &types.TimeOnly{7158}} + pb := &TypeWithID{TimeOnly: &types.TimeOnly{Value: 7158}} orm, err := pb.ToORM(context.Background()) if err != nil { t.Fatalf("failed to convert pb to orm: %v", err) @@ -92,7 +93,7 @@ func TestTypeWithID_ToORM(t *testing.T) { func TestTypeWithIDORM_ToPB(t *testing.T) { t.Run("JoinTable", func(t *testing.T) { - orm := &TypeWithIDORM{MultiAccountTypes:[]*JoinTable{{MultiAccountTypeWithID:1}, {MultiAccountTypeWithID:3}}} + orm := &TypeWithIDORM{MultiAccountTypes: []*JoinTable{{MultiAccountTypeWithID: 1}, {MultiAccountTypeWithID: 3}}} pb, err := orm.ToPB(context.Background()) if err != nil { t.Fatalf("orm.ToPB=%v; want success", err) diff --git a/example/feature_demo/marshal_test.go b/example/feature_demo/marshal_test.go index 51d016dc..f0fb34e2 100644 --- a/example/feature_demo/marshal_test.go +++ b/example/feature_demo/marshal_test.go @@ -1,7 +1,6 @@ package example import ( - "reflect" "strings" "testing" "time" @@ -10,7 +9,9 @@ import ( "github.com/golang/protobuf/ptypes" "github.com/golang/protobuf/ptypes/timestamp" "github.com/golang/protobuf/ptypes/wrappers" + "github.com/google/go-cmp/cmp" "github.com/infobloxopen/protoc-gen-gorm/types" + "google.golang.org/protobuf/testing/protocmp" ) func TestSuccessfulUnmarshalTypes(t *testing.T) { @@ -50,7 +51,7 @@ func TestSuccessfulUnmarshalTypes(t *testing.T) { if err != nil { t.Error(err.Error()) } - if !reflect.DeepEqual(*tt, expected) { + if !cmp.Equal(*tt, expected, protocmp.Transform()) { t.Errorf("Expected unmarshaled output '%+v' did not match actual output '%+v'", expected, *tt) } @@ -61,22 +62,22 @@ func TestBrokenUnmarshalTypes(t *testing.T) { unmarshaler := &jsonpb.Unmarshaler{} for in, expected := range map[string]string{ // A subset of possible broken inputs - `{"}`: "unexpected EOF", - `{"becomes_int":"NOT_AN_ENUM_VALUE"}`: "unknown value \"NOT_AN_ENUM_VALUE\" for enum example.TestTypesStatus", - `{"numbers":[1,2,3,4,]}`: "invalid character ']' looking for beginning of value", - `{"json_field":{"top":{"something":1},2]}}`: "invalid character '2' looking for beginning of object key string", - `{"uuid":""}`: "invalid uuid '' does not match accepted format", + `{"}`: "unexpected EOF", + `{"becomes_int":"NOT_AN_ENUM_VALUE"}`: `unknown value "\"NOT_AN_ENUM_VALUE\"" for enum example.TestTypes.status`, + `{"numbers":[1,2,3,4,]}`: "invalid character ']' looking for beginning of value", + `{"json_field":{"top":{"something":1},2]}}`: "invalid character '2' looking for beginning of object key string", + `{"uuid":""}`: "invalid uuid '' does not match accepted format", `{"uuid":" 6ba7b810-9dad-11d1-80b4-00c04fd430c8"}`: "invalid uuid ' 6ba7b810-9dad-11d1-80b4-00c04fd430c8' does not match accepted format", - `{"time_only":"24:00:00"}`: "Hours value outside expected range: 24", + `{"time_only":"24:00:00"}`: "Hours value outside expected range: 24", } { t.Run(in, func(t *testing.T) { err := unmarshaler.Unmarshal(strings.NewReader(in), &TestTypes{}) - if err == nil || err.Error() != expected { - if err == nil { - t.Errorf("Expected error %q, but got no error", expected) - } else { - t.Errorf("Expected error %q, but got %q", expected, err.Error()) - } + if err == nil { + t.Errorf("No error, expected: %q", expected) + return + } + if err.Error() != expected { + t.Errorf("\ngot: %s\nwanted: %s", err, expected) } }) } @@ -95,7 +96,7 @@ func TestMarshalTypes(t *testing.T) { `{"api_only_string":"","numbers":[],"optional_string":null,"becomes_int":"UNKNOWN","nothingness":null,"uuid":null,"created_at":"2009-11-17T20:34:58.651387237Z","type_with_id_id":0,"json_field":null,"nullable_uuid":null,"time_only":null}`: {CreatedAt: MustTimestampProto(time.Date(2009, 11, 17, 20, 34, 58, 651387237, time.UTC))}, `{"api_only_string":"","numbers":[],"optional_string":null,"becomes_int":"UNKNOWN","nothingness":null,"uuid":null,"created_at":null,"type_with_id_id":2,"json_field":null,"nullable_uuid":null,"time_only":null}`: {TypeWithIdId: 2}, `{"api_only_string":"","numbers":[],"optional_string":null,"becomes_int":"UNKNOWN","nothingness":null,"uuid":null,"created_at":null,"type_with_id_id":0,"json_field":{"text":[]},"nullable_uuid":null,"time_only":null}`: {JsonField: &types.JSONValue{Value: `{"text":[]}`}}, - `{"api_only_string":"","numbers":[],"optional_string":null,"becomes_int":"UNKNOWN","nothingness":null,"uuid":null,"created_at":null,"type_with_id_id":0,"json_field":null,"nullable_uuid":null,"time_only":"01:59:18"}`: {TimeOnly: &types.TimeOnly{7158}}, + `{"api_only_string":"","numbers":[],"optional_string":null,"becomes_int":"UNKNOWN","nothingness":null,"uuid":null,"created_at":null,"type_with_id_id":0,"json_field":null,"nullable_uuid":null,"time_only":"01:59:18"}`: {TimeOnly: &types.TimeOnly{Value: 7158}}, } { out, err := marshaler.MarshalToString(&in) if err != nil { @@ -112,16 +113,16 @@ func TestMarshalTypesOmitEmpty(t *testing.T) { // Will marshal with snake_case names, but not default values marshaller := &jsonpb.Marshaler{OrigName: true} for expected, in := range map[string]TestTypes{ - `{}`: {}, - `{"api_only_string":"Something"}`: {ApiOnlyString: "Something"}, - `{"numbers":[0,1,2,3]}`: {Numbers: []int32{0, 1, 2, 3}}, - `{"optional_string":"Not nothing"}`: {OptionalString: &wrappers.StringValue{Value: "Not nothing"}}, - `{"becomes_int":"GOOD"}`: {BecomesInt: 1}, + `{}`: {}, + `{"api_only_string":"Something"}`: {ApiOnlyString: "Something"}, + `{"numbers":[0,1,2,3]}`: {Numbers: []int32{0, 1, 2, 3}}, + `{"optional_string":"Not nothing"}`: {OptionalString: &wrappers.StringValue{Value: "Not nothing"}}, + `{"becomes_int":"GOOD"}`: {BecomesInt: 1}, `{"uuid":"6ba7b810-9dad-11d1-80b4-00c04fd430c8"}`: {Uuid: &types.UUID{Value: "6ba7b810-9dad-11d1-80b4-00c04fd430c8"}}, `{"created_at":"2009-11-17T20:34:58.651387237Z"}`: {CreatedAt: MustTimestampProto(time.Date(2009, 11, 17, 20, 34, 58, 651387237, time.UTC))}, `{"type_with_id_id":2}`: {TypeWithIdId: 2}, `{"json_field":{"text":[]}}`: {JsonField: &types.JSONValue{Value: `{"text":[]}`}}, - `{"time_only":"00:00:00"}`: {TimeOnly: &types.TimeOnly{0}}, + `{"time_only":"00:00:00"}`: {TimeOnly: &types.TimeOnly{Value: 0}}, } { out, err := marshaller.MarshalToString(&in) if err != nil { diff --git a/example/postgres_arrays/buf.gen.yaml b/example/postgres_arrays/buf.gen.yaml new file mode 100644 index 00000000..78e4be96 --- /dev/null +++ b/example/postgres_arrays/buf.gen.yaml @@ -0,0 +1,8 @@ +version: v1beta1 +plugins: + - name: go + out: example + opt: paths=source_relative + - name: gorm + out: example + opt: engine=postgres,paths=source_relative,enums=string,gateway diff --git a/example/postgres_arrays/postgres_arrays.pb.go b/example/postgres_arrays/postgres_arrays.pb.go index d65875ce..b7c0177a 100644 --- a/example/postgres_arrays/postgres_arrays.pb.go +++ b/example/postgres_arrays/postgres_arrays.pb.go @@ -1,128 +1,208 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: postgres_arrays.proto +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.17.1 +// source: postgres_arrays/postgres_arrays.proto + +package postgres_arrays + +import ( + proto "github.com/golang/protobuf/proto" + _ "github.com/infobloxopen/protoc-gen-gorm/options" + 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) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 -package postgres_arrays // import "github.com/infobloxopen/protoc-gen-gorm/example/postgres_arrays" +type Example struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + ArrayOfBools []bool `protobuf:"varint,20,rep,packed,name=array_of_bools,json=arrayOfBools,proto3" json:"array_of_bools,omitempty"` + ArrayOfFloat64 []float64 `protobuf:"fixed64,30,rep,packed,name=array_of_float64,json=arrayOfFloat64,proto3" json:"array_of_float64,omitempty"` + ArrayOfInt64 []int64 `protobuf:"varint,40,rep,packed,name=array_of_int64,json=arrayOfInt64,proto3" json:"array_of_int64,omitempty"` + ArrayOfString []string `protobuf:"bytes,50,rep,name=array_of_string,json=arrayOfString,proto3" json:"array_of_string,omitempty"` +} + +func (x *Example) Reset() { + *x = Example{} + if protoimpl.UnsafeEnabled { + mi := &file_postgres_arrays_postgres_arrays_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/infobloxopen/protoc-gen-gorm/options" +func (x *Example) String() string { + return protoimpl.X.MessageStringOf(x) +} -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +func (*Example) ProtoMessage() {} -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package +func (x *Example) ProtoReflect() protoreflect.Message { + mi := &file_postgres_arrays_postgres_arrays_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) +} -type Example struct { - Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"` - ArrayOfBools []bool `protobuf:"varint,20,rep,packed,name=array_of_bools,json=arrayOfBools" json:"array_of_bools,omitempty"` - ArrayOfFloat64 []float64 `protobuf:"fixed64,30,rep,packed,name=array_of_float64,json=arrayOfFloat64" json:"array_of_float64,omitempty"` - ArrayOfInt64 []int64 `protobuf:"varint,40,rep,packed,name=array_of_int64,json=arrayOfInt64" json:"array_of_int64,omitempty"` - ArrayOfString []string `protobuf:"bytes,50,rep,name=array_of_string,json=arrayOfString" json:"array_of_string,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Example) Reset() { *m = Example{} } -func (m *Example) String() string { return proto.CompactTextString(m) } -func (*Example) ProtoMessage() {} +// Deprecated: Use Example.ProtoReflect.Descriptor instead. func (*Example) Descriptor() ([]byte, []int) { - return fileDescriptor_postgres_arrays_b477d8058a1bc73b, []int{0} -} -func (m *Example) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Example.Unmarshal(m, b) -} -func (m *Example) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Example.Marshal(b, m, deterministic) -} -func (dst *Example) XXX_Merge(src proto.Message) { - xxx_messageInfo_Example.Merge(dst, src) -} -func (m *Example) XXX_Size() int { - return xxx_messageInfo_Example.Size(m) -} -func (m *Example) XXX_DiscardUnknown() { - xxx_messageInfo_Example.DiscardUnknown(m) + return file_postgres_arrays_postgres_arrays_proto_rawDescGZIP(), []int{0} } -var xxx_messageInfo_Example proto.InternalMessageInfo - -func (m *Example) GetId() string { - if m != nil { - return m.Id +func (x *Example) GetId() string { + if x != nil { + return x.Id } return "" } -func (m *Example) GetDescription() string { - if m != nil { - return m.Description +func (x *Example) GetDescription() string { + if x != nil { + return x.Description } return "" } -func (m *Example) GetArrayOfBools() []bool { - if m != nil { - return m.ArrayOfBools +func (x *Example) GetArrayOfBools() []bool { + if x != nil { + return x.ArrayOfBools } return nil } -func (m *Example) GetArrayOfFloat64() []float64 { - if m != nil { - return m.ArrayOfFloat64 +func (x *Example) GetArrayOfFloat64() []float64 { + if x != nil { + return x.ArrayOfFloat64 } return nil } -func (m *Example) GetArrayOfInt64() []int64 { - if m != nil { - return m.ArrayOfInt64 +func (x *Example) GetArrayOfInt64() []int64 { + if x != nil { + return x.ArrayOfInt64 } return nil } -func (m *Example) GetArrayOfString() []string { - if m != nil { - return m.ArrayOfString +func (x *Example) GetArrayOfString() []string { + if x != nil { + return x.ArrayOfString } return nil } -func init() { - proto.RegisterType((*Example)(nil), "postgres.arrays.Example") -} - -func init() { - proto.RegisterFile("postgres_arrays.proto", fileDescriptor_postgres_arrays_b477d8058a1bc73b) -} - -var fileDescriptor_postgres_arrays_b477d8058a1bc73b = []byte{ - // 288 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x4f, 0x4b, 0xfb, 0x30, - 0x18, 0x80, 0x49, 0xfb, 0x63, 0xbf, 0x2d, 0xea, 0x26, 0x41, 0xa1, 0xf3, 0x30, 0x82, 0x88, 0xe4, - 0xb2, 0x16, 0x54, 0x3c, 0xcc, 0x5b, 0x41, 0xc1, 0xd3, 0xb0, 0xde, 0xbc, 0x94, 0xfe, 0x49, 0x6b, - 0xa0, 0xcd, 0x5b, 0x92, 0x14, 0xe6, 0x47, 0xdb, 0xbe, 0x95, 0xdf, 0x40, 0x9a, 0xce, 0xa2, 0x3b, - 0x79, 0x7c, 0x1f, 0x9e, 0x3c, 0x84, 0xf7, 0xc5, 0xe7, 0x0d, 0x68, 0x53, 0x2a, 0xae, 0xe3, 0x44, - 0xa9, 0xe4, 0x43, 0xfb, 0x8d, 0x02, 0x03, 0x64, 0xf6, 0x8d, 0xfd, 0x1e, 0x5f, 0xac, 0x4a, 0x61, - 0xde, 0xdb, 0xd4, 0xcf, 0xa0, 0x0e, 0x84, 0x2c, 0x20, 0xad, 0x60, 0x03, 0x0d, 0x97, 0x81, 0xf5, - 0xb3, 0x65, 0xc9, 0xe5, 0xb2, 0x04, 0x55, 0x07, 0xd0, 0x18, 0x01, 0x52, 0x07, 0xdd, 0xd0, 0xc7, - 0x2e, 0x3f, 0x11, 0xfe, 0xff, 0xb8, 0x49, 0xea, 0xa6, 0xe2, 0x64, 0x81, 0x1d, 0x91, 0x7b, 0x88, - 0x22, 0x36, 0x09, 0xa7, 0xbb, 0xed, 0x1c, 0xe3, 0x31, 0xf9, 0xd7, 0xb6, 0x22, 0x67, 0x28, 0x72, - 0x44, 0x4e, 0x28, 0x3e, 0xca, 0xb9, 0xce, 0x94, 0xb0, 0x19, 0xcf, 0xe9, 0xc4, 0xe8, 0x27, 0x22, - 0x57, 0x78, 0x6a, 0xff, 0x14, 0x43, 0x11, 0xa7, 0x00, 0x95, 0xf6, 0xce, 0xa8, 0xcb, 0xc6, 0xd1, - 0xb1, 0xa5, 0xeb, 0x22, 0xec, 0x18, 0x61, 0xf8, 0x74, 0xb0, 0x8a, 0x0a, 0x12, 0x73, 0x7f, 0xe7, - 0x2d, 0xa8, 0xcb, 0x50, 0x34, 0xdd, 0x7b, 0x4f, 0x3d, 0xfd, 0xd5, 0x13, 0xb2, 0xf3, 0x18, 0x75, - 0x99, 0x3b, 0xf4, 0x9e, 0x3b, 0x46, 0xae, 0xf1, 0x6c, 0xb0, 0xb4, 0x51, 0x42, 0x96, 0xde, 0x0d, - 0x75, 0xd9, 0x24, 0x3a, 0xd9, 0x6b, 0xaf, 0x16, 0xae, 0x46, 0xbb, 0xed, 0xdc, 0x19, 0xa3, 0xf0, - 0xe5, 0x6d, 0xfd, 0xd7, 0x8d, 0xf1, 0x7e, 0x35, 0xc1, 0xc1, 0x25, 0x1e, 0x0e, 0xe6, 0x74, 0x64, - 0x1f, 0xde, 0x7e, 0x05, 0x00, 0x00, 0xff, 0xff, 0xed, 0x71, 0x7d, 0x45, 0xb3, 0x01, 0x00, 0x00, +var File_postgres_arrays_postgres_arrays_proto protoreflect.FileDescriptor + +var file_postgres_arrays_postgres_arrays_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x72, 0x72, 0x61, 0x79, + 0x73, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x72, 0x72, 0x61, 0x79, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, + 0x73, 0x2e, 0x61, 0x72, 0x72, 0x61, 0x79, 0x73, 0x1a, 0x12, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2f, 0x67, 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf1, 0x01, 0x0a, + 0x07, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xba, 0xb9, 0x19, 0x0a, 0x0a, 0x08, 0x12, 0x04, 0x75, 0x75, + 0x69, 0x64, 0x28, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0e, 0x61, 0x72, + 0x72, 0x61, 0x79, 0x5f, 0x6f, 0x66, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x14, 0x20, 0x03, + 0x28, 0x08, 0x52, 0x0c, 0x61, 0x72, 0x72, 0x61, 0x79, 0x4f, 0x66, 0x42, 0x6f, 0x6f, 0x6c, 0x73, + 0x12, 0x28, 0x0a, 0x10, 0x61, 0x72, 0x72, 0x61, 0x79, 0x5f, 0x6f, 0x66, 0x5f, 0x66, 0x6c, 0x6f, + 0x61, 0x74, 0x36, 0x34, 0x18, 0x1e, 0x20, 0x03, 0x28, 0x01, 0x52, 0x0e, 0x61, 0x72, 0x72, 0x61, + 0x79, 0x4f, 0x66, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x36, 0x34, 0x12, 0x24, 0x0a, 0x0e, 0x61, 0x72, + 0x72, 0x61, 0x79, 0x5f, 0x6f, 0x66, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x28, 0x20, 0x03, + 0x28, 0x03, 0x52, 0x0c, 0x61, 0x72, 0x72, 0x61, 0x79, 0x4f, 0x66, 0x49, 0x6e, 0x74, 0x36, 0x34, + 0x12, 0x26, 0x0a, 0x0f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x5f, 0x6f, 0x66, 0x5f, 0x73, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x18, 0x32, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x72, 0x72, 0x61, 0x79, + 0x4f, 0x66, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3a, 0x06, 0xba, 0xb9, 0x19, 0x02, 0x08, 0x01, + 0x42, 0x51, 0x5a, 0x4f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, + 0x6e, 0x66, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x72, 0x6d, 0x2f, 0x65, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x72, 0x72, + 0x61, 0x79, 0x73, 0x3b, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x72, 0x72, + 0x61, 0x79, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_postgres_arrays_postgres_arrays_proto_rawDescOnce sync.Once + file_postgres_arrays_postgres_arrays_proto_rawDescData = file_postgres_arrays_postgres_arrays_proto_rawDesc +) + +func file_postgres_arrays_postgres_arrays_proto_rawDescGZIP() []byte { + file_postgres_arrays_postgres_arrays_proto_rawDescOnce.Do(func() { + file_postgres_arrays_postgres_arrays_proto_rawDescData = protoimpl.X.CompressGZIP(file_postgres_arrays_postgres_arrays_proto_rawDescData) + }) + return file_postgres_arrays_postgres_arrays_proto_rawDescData +} + +var file_postgres_arrays_postgres_arrays_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_postgres_arrays_postgres_arrays_proto_goTypes = []interface{}{ + (*Example)(nil), // 0: postgres.arrays.Example +} +var file_postgres_arrays_postgres_arrays_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_postgres_arrays_postgres_arrays_proto_init() } +func file_postgres_arrays_postgres_arrays_proto_init() { + if File_postgres_arrays_postgres_arrays_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_postgres_arrays_postgres_arrays_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Example); 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{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_postgres_arrays_postgres_arrays_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_postgres_arrays_postgres_arrays_proto_goTypes, + DependencyIndexes: file_postgres_arrays_postgres_arrays_proto_depIdxs, + MessageInfos: file_postgres_arrays_postgres_arrays_proto_msgTypes, + }.Build() + File_postgres_arrays_postgres_arrays_proto = out.File + file_postgres_arrays_postgres_arrays_proto_rawDesc = nil + file_postgres_arrays_postgres_arrays_proto_goTypes = nil + file_postgres_arrays_postgres_arrays_proto_depIdxs = nil } diff --git a/example/postgres_arrays/postgres_arrays.pb.gorm.go b/example/postgres_arrays/postgres_arrays.pb.gorm.go index ff96d113..c815a0ef 100644 --- a/example/postgres_arrays/postgres_arrays.pb.gorm.go +++ b/example/postgres_arrays/postgres_arrays.pb.gorm.go @@ -1,27 +1,22 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: postgres_arrays.proto +// source: postgres_arrays/postgres_arrays.proto -/* -Package postgres_arrays is a generated protocol buffer package. - -It is generated from these files: - postgres_arrays.proto - -It has these top-level messages: - Example -*/ package postgres_arrays -import context "context" -import errors "errors" +import ( + context "context" + fmt "fmt" + + _ "github.com/infobloxopen/protoc-gen-gorm/options" + math "math" -import field_mask1 "google.golang.org/genproto/protobuf/field_mask" -import gorm1 "github.com/jinzhu/gorm" -import gorm2 "github.com/infobloxopen/atlas-app-toolkit/gorm" -import pq1 "github.com/lib/pq" - -import fmt "fmt" -import math "math" + gateway1 "github.com/infobloxopen/atlas-app-toolkit/gateway" + gorm2 "github.com/infobloxopen/atlas-app-toolkit/gorm" + errors1 "github.com/infobloxopen/protoc-gen-gorm/errors" + gorm1 "github.com/jinzhu/gorm" + pq1 "github.com/lib/pq" + field_mask1 "google.golang.org/genproto/protobuf/field_mask" +) // Reference imports to suppress errors if they are not otherwise used. var _ = fmt.Errorf @@ -135,22 +130,22 @@ type ExampleWithAfterToPB interface { // DefaultCreateExample executes a basic gorm create call func DefaultCreateExample(ctx context.Context, in *Example, db *gorm1.DB) (*Example, error) { if in == nil { - return nil, errors.New("Nil argument to DefaultCreateExample") + return nil, errors1.NilArgumentError } ormObj, err := in.ToORM(ctx) if err != nil { return nil, err } - if hook, ok := interface{}(&ormObj).(ExampleORMWithBeforeCreate); ok { - if db, err = hook.BeforeCreate(ctx, db); err != nil { + if hook, ok := interface{}(&ormObj).(ExampleORMWithBeforeCreate_); ok { + if db, err = hook.BeforeCreate_(ctx, db); err != nil { return nil, err } } if err = db.Create(&ormObj).Error; err != nil { return nil, err } - if hook, ok := interface{}(&ormObj).(ExampleORMWithAfterCreate); ok { - if err = hook.AfterCreate(ctx, db); err != nil { + if hook, ok := interface{}(&ormObj).(ExampleORMWithAfterCreate_); ok { + if err = hook.AfterCreate_(ctx, db); err != nil { return nil, err } } @@ -158,24 +153,24 @@ func DefaultCreateExample(ctx context.Context, in *Example, db *gorm1.DB) (*Exam return &pbResponse, err } -type ExampleORMWithBeforeCreate interface { - BeforeCreate(context.Context, *gorm1.DB) (*gorm1.DB, error) +type ExampleORMWithBeforeCreate_ interface { + BeforeCreate_(context.Context, *gorm1.DB) (*gorm1.DB, error) } -type ExampleORMWithAfterCreate interface { - AfterCreate(context.Context, *gorm1.DB) error +type ExampleORMWithAfterCreate_ interface { + AfterCreate_(context.Context, *gorm1.DB) error } // DefaultReadExample executes a basic gorm read call func DefaultReadExample(ctx context.Context, in *Example, db *gorm1.DB) (*Example, error) { if in == nil { - return nil, errors.New("Nil argument to DefaultReadExample") + return nil, errors1.NilArgumentError } ormObj, err := in.ToORM(ctx) if err != nil { return nil, err } if ormObj.Id == "" { - return nil, errors.New("DefaultReadExample requires a non-zero primary key") + return nil, errors1.EmptyIdError } if hook, ok := interface{}(&ormObj).(ExampleORMWithBeforeReadApplyQuery); ok { if db, err = hook.BeforeReadApplyQuery(ctx, db); err != nil { @@ -215,17 +210,17 @@ type ExampleORMWithAfterReadFind interface { func DefaultDeleteExample(ctx context.Context, in *Example, db *gorm1.DB) error { if in == nil { - return errors.New("Nil argument to DefaultDeleteExample") + return errors1.NilArgumentError } ormObj, err := in.ToORM(ctx) if err != nil { return err } if ormObj.Id == "" { - return errors.New("A non-zero ID value is required for a delete call") + return errors1.EmptyIdError } - if hook, ok := interface{}(&ormObj).(ExampleORMWithBeforeDelete); ok { - if db, err = hook.BeforeDelete(ctx, db); err != nil { + if hook, ok := interface{}(&ormObj).(ExampleORMWithBeforeDelete_); ok { + if db, err = hook.BeforeDelete_(ctx, db); err != nil { return err } } @@ -233,22 +228,22 @@ func DefaultDeleteExample(ctx context.Context, in *Example, db *gorm1.DB) error if err != nil { return err } - if hook, ok := interface{}(&ormObj).(ExampleORMWithAfterDelete); ok { - err = hook.AfterDelete(ctx, db) + if hook, ok := interface{}(&ormObj).(ExampleORMWithAfterDelete_); ok { + err = hook.AfterDelete_(ctx, db) } return err } -type ExampleORMWithBeforeDelete interface { - BeforeDelete(context.Context, *gorm1.DB) (*gorm1.DB, error) +type ExampleORMWithBeforeDelete_ interface { + BeforeDelete_(context.Context, *gorm1.DB) (*gorm1.DB, error) } -type ExampleORMWithAfterDelete interface { - AfterDelete(context.Context, *gorm1.DB) error +type ExampleORMWithAfterDelete_ interface { + AfterDelete_(context.Context, *gorm1.DB) error } func DefaultDeleteExampleSet(ctx context.Context, in []*Example, db *gorm1.DB) error { if in == nil { - return errors.New("Nil argument to DefaultDeleteExampleSet") + return errors1.NilArgumentError } var err error keys := []string{} @@ -258,7 +253,7 @@ func DefaultDeleteExampleSet(ctx context.Context, in []*Example, db *gorm1.DB) e return err } if ormObj.Id == "" { - return errors.New("A non-zero ID value is required for a delete call") + return errors1.EmptyIdError } keys = append(keys, ormObj.Id) } @@ -284,7 +279,7 @@ type ExampleORMWithAfterDeleteSet interface { AfterDeleteSet(context.Context, []*Example, *gorm1.DB) error } -// DefaultStrictUpdateExample clears first level 1:many children and then executes a gorm update call +// DefaultStrictUpdateExample clears / replaces / appends first level 1:many children and then executes a gorm update call func DefaultStrictUpdateExample(ctx context.Context, in *Example, db *gorm1.DB) (*Example, error) { if in == nil { return nil, fmt.Errorf("Nil argument to DefaultStrictUpdateExample") @@ -293,6 +288,9 @@ func DefaultStrictUpdateExample(ctx context.Context, in *Example, db *gorm1.DB) if err != nil { return nil, err } + var count int64 + lockedRow := &ExampleORM{} + count = db.Model(&ormObj).Set("gorm:query_option", "FOR UPDATE").Where("id=?", ormObj.Id).First(lockedRow).RowsAffected if hook, ok := interface{}(&ormObj).(ExampleORMWithBeforeStrictUpdateCleanup); ok { if db, err = hook.BeforeStrictUpdateCleanup(ctx, db); err != nil { return nil, err @@ -315,6 +313,9 @@ func DefaultStrictUpdateExample(ctx context.Context, in *Example, db *gorm1.DB) if err != nil { return nil, err } + if count == 0 { + err = gateway1.SetCreated(ctx, "") + } return &pbResponse, err } @@ -331,7 +332,7 @@ type ExampleORMWithAfterStrictUpdateSave interface { // DefaultPatchExample executes a basic gorm update call with patch behavior func DefaultPatchExample(ctx context.Context, in *Example, updateMask *field_mask1.FieldMask, db *gorm1.DB) (*Example, error) { if in == nil { - return nil, errors.New("Nil argument to DefaultPatchExample") + return nil, errors1.NilArgumentError } var pbObj Example var err error @@ -383,12 +384,31 @@ type ExampleWithAfterPatchSave interface { AfterPatchSave(context.Context, *Example, *field_mask1.FieldMask, *gorm1.DB) error } +// DefaultPatchSetExample executes a bulk gorm update call with patch behavior +func DefaultPatchSetExample(ctx context.Context, objects []*Example, updateMasks []*field_mask1.FieldMask, db *gorm1.DB) ([]*Example, error) { + if len(objects) != len(updateMasks) { + return nil, fmt.Errorf(errors1.BadRepeatedFieldMaskTpl, len(updateMasks), len(objects)) + } + + results := make([]*Example, 0, len(objects)) + for i, patcher := range objects { + pbResponse, err := DefaultPatchExample(ctx, patcher, updateMasks[i], db) + if err != nil { + return nil, err + } + + results = append(results, pbResponse) + } + + return results, nil +} + // DefaultApplyFieldMaskExample patches an pbObject with patcher according to a field mask. func DefaultApplyFieldMaskExample(ctx context.Context, patchee *Example, patcher *Example, updateMask *field_mask1.FieldMask, prefix string, db *gorm1.DB) (*Example, error) { if patcher == nil { return nil, nil } else if patchee == nil { - return nil, errors.New("Patchee inputs to DefaultApplyFieldMaskExample must be non-nil") + return nil, errors1.NilArgumentError } var err error for _, f := range updateMask.Paths { diff --git a/example/postgres_arrays/postgres_arrays.proto b/example/postgres_arrays/postgres_arrays.proto index 990ff90b..52b4d7eb 100644 --- a/example/postgres_arrays/postgres_arrays.proto +++ b/example/postgres_arrays/postgres_arrays.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package postgres.arrays; -import "github.com/infobloxopen/protoc-gen-gorm/options/gorm.proto"; +import "options/gorm.proto"; option go_package = "github.com/infobloxopen/protoc-gen-gorm/example/postgres_arrays;postgres_arrays"; diff --git a/example/user/buf.gen.yaml b/example/user/buf.gen.yaml new file mode 100644 index 00000000..745d2165 --- /dev/null +++ b/example/user/buf.gen.yaml @@ -0,0 +1,13 @@ +version: v1beta1 +plugins: + - name: gogo + out: example + opt: + - paths=source_relative + - Mgoogle/protobuf/timestamp.proto=github.com/golang/protobuf/ptypes/timestamp + - name: gorm + out: example + opt: + - paths=source_relative + - enums=string,gateway + - Mgoogle/protobuf/timestamp.proto=github.com/golang/protobuf/ptypes/timestamp diff --git a/example/user/user.pb.go b/example/user/user.pb.go index 1a945564..a026faf9 100644 --- a/example/user/user.pb.go +++ b/example/user/user.pb.go @@ -1,28 +1,16 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: example/user/user.proto - -/* -Package user is a generated protocol buffer package. - -It is generated from these files: - example/user/user.proto - -It has these top-level messages: - User - Email - Address - Language - CreditCard - Task -*/ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: user/user.proto + package user -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/infobloxopen/protoc-gen-gorm/options" -import google_protobuf1 "github.com/golang/protobuf/ptypes/timestamp" -import atlas_rpc "github.com/infobloxopen/atlas-app-toolkit/rpc/resource" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + timestamp "github.com/golang/protobuf/ptypes/timestamp" + resource "github.com/infobloxopen/atlas-app-toolkit/atlas/resource" + _ "github.com/infobloxopen/protoc-gen-gorm/options" + math "math" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -33,53 +21,75 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type User struct { - Id *atlas_rpc.Identifier `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` - CreatedAt *google_protobuf1.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt" json:"created_at,omitempty"` - UpdatedAt *google_protobuf1.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt" json:"updated_at,omitempty"` - Birthday *google_protobuf1.Timestamp `protobuf:"bytes,4,opt,name=birthday" json:"birthday,omitempty"` - Age uint32 `protobuf:"varint,5,opt,name=age" json:"age,omitempty"` - Num uint32 `protobuf:"varint,6,opt,name=num" json:"num,omitempty"` - CreditCard *CreditCard `protobuf:"bytes,7,opt,name=credit_card,json=creditCard" json:"credit_card,omitempty"` - Emails []*Email `protobuf:"bytes,8,rep,name=emails" json:"emails,omitempty"` - Tasks []*Task `protobuf:"bytes,9,rep,name=tasks" json:"tasks,omitempty"` - BillingAddress *Address `protobuf:"bytes,10,opt,name=billing_address,json=billingAddress" json:"billing_address,omitempty"` - ShippingAddress *Address `protobuf:"bytes,11,opt,name=shipping_address,json=shippingAddress" json:"shipping_address,omitempty"` - Languages []*Language `protobuf:"bytes,12,rep,name=languages" json:"languages,omitempty"` - Friends []*User `protobuf:"bytes,13,rep,name=friends" json:"friends,omitempty"` - ShippingAddressId *atlas_rpc.Identifier `protobuf:"bytes,14,opt,name=shipping_address_id,json=shippingAddressId" json:"shipping_address_id,omitempty"` - ExternalUuid *atlas_rpc.Identifier `protobuf:"bytes,15,opt,name=external_uuid,json=externalUuid" json:"external_uuid,omitempty"` -} - -func (m *User) Reset() { *m = User{} } -func (m *User) String() string { return proto.CompactTextString(m) } -func (*User) ProtoMessage() {} -func (*User) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } - -func (m *User) GetId() *atlas_rpc.Identifier { + Id *resource.Identifier `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + CreatedAt *timestamp.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamp.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + Birthday *timestamp.Timestamp `protobuf:"bytes,4,opt,name=birthday,proto3" json:"birthday,omitempty"` + Age uint32 `protobuf:"varint,5,opt,name=age,proto3" json:"age,omitempty"` + Num uint32 `protobuf:"varint,6,opt,name=num,proto3" json:"num,omitempty"` + CreditCard *CreditCard `protobuf:"bytes,7,opt,name=credit_card,json=creditCard,proto3" json:"credit_card,omitempty"` + Emails []*Email `protobuf:"bytes,8,rep,name=emails,proto3" json:"emails,omitempty"` + Tasks []*Task `protobuf:"bytes,9,rep,name=tasks,proto3" json:"tasks,omitempty"` + BillingAddress *Address `protobuf:"bytes,10,opt,name=billing_address,json=billingAddress,proto3" json:"billing_address,omitempty"` + ShippingAddress *Address `protobuf:"bytes,11,opt,name=shipping_address,json=shippingAddress,proto3" json:"shipping_address,omitempty"` + Languages []*Language `protobuf:"bytes,12,rep,name=languages,proto3" json:"languages,omitempty"` + Friends []*User `protobuf:"bytes,13,rep,name=friends,proto3" json:"friends,omitempty"` + ShippingAddressId *resource.Identifier `protobuf:"bytes,14,opt,name=shipping_address_id,json=shippingAddressId,proto3" json:"shipping_address_id,omitempty"` + ExternalUuid *resource.Identifier `protobuf:"bytes,15,opt,name=external_uuid,json=externalUuid,proto3" json:"external_uuid,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *User) Reset() { *m = User{} } +func (m *User) String() string { return proto.CompactTextString(m) } +func (*User) ProtoMessage() {} +func (*User) Descriptor() ([]byte, []int) { + return fileDescriptor_ed89022014131a74, []int{0} +} +func (m *User) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_User.Unmarshal(m, b) +} +func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_User.Marshal(b, m, deterministic) +} +func (m *User) XXX_Merge(src proto.Message) { + xxx_messageInfo_User.Merge(m, src) +} +func (m *User) XXX_Size() int { + return xxx_messageInfo_User.Size(m) +} +func (m *User) XXX_DiscardUnknown() { + xxx_messageInfo_User.DiscardUnknown(m) +} + +var xxx_messageInfo_User proto.InternalMessageInfo + +func (m *User) GetId() *resource.Identifier { if m != nil { return m.Id } return nil } -func (m *User) GetCreatedAt() *google_protobuf1.Timestamp { +func (m *User) GetCreatedAt() *timestamp.Timestamp { if m != nil { return m.CreatedAt } return nil } -func (m *User) GetUpdatedAt() *google_protobuf1.Timestamp { +func (m *User) GetUpdatedAt() *timestamp.Timestamp { if m != nil { return m.UpdatedAt } return nil } -func (m *User) GetBirthday() *google_protobuf1.Timestamp { +func (m *User) GetBirthday() *timestamp.Timestamp { if m != nil { return m.Birthday } @@ -149,14 +159,14 @@ func (m *User) GetFriends() []*User { return nil } -func (m *User) GetShippingAddressId() *atlas_rpc.Identifier { +func (m *User) GetShippingAddressId() *resource.Identifier { if m != nil { return m.ShippingAddressId } return nil } -func (m *User) GetExternalUuid() *atlas_rpc.Identifier { +func (m *User) GetExternalUuid() *resource.Identifier { if m != nil { return m.ExternalUuid } @@ -164,19 +174,41 @@ func (m *User) GetExternalUuid() *atlas_rpc.Identifier { } type Email struct { - Id *atlas_rpc.Identifier `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` - Email string `protobuf:"bytes,2,opt,name=email" json:"email,omitempty"` - Subscribed bool `protobuf:"varint,3,opt,name=subscribed" json:"subscribed,omitempty"` - UserId *atlas_rpc.Identifier `protobuf:"bytes,4,opt,name=user_id,json=userId" json:"user_id,omitempty"` - ExternalNotNull *atlas_rpc.Identifier `protobuf:"bytes,5,opt,name=external_not_null,json=externalNotNull" json:"external_not_null,omitempty"` + Id *resource.Identifier `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` + Subscribed bool `protobuf:"varint,3,opt,name=subscribed,proto3" json:"subscribed,omitempty"` + UserId *resource.Identifier `protobuf:"bytes,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + ExternalNotNull *resource.Identifier `protobuf:"bytes,5,opt,name=external_not_null,json=externalNotNull,proto3" json:"external_not_null,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Email) Reset() { *m = Email{} } -func (m *Email) String() string { return proto.CompactTextString(m) } -func (*Email) ProtoMessage() {} -func (*Email) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +func (m *Email) Reset() { *m = Email{} } +func (m *Email) String() string { return proto.CompactTextString(m) } +func (*Email) ProtoMessage() {} +func (*Email) Descriptor() ([]byte, []int) { + return fileDescriptor_ed89022014131a74, []int{1} +} +func (m *Email) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Email.Unmarshal(m, b) +} +func (m *Email) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Email.Marshal(b, m, deterministic) +} +func (m *Email) XXX_Merge(src proto.Message) { + xxx_messageInfo_Email.Merge(m, src) +} +func (m *Email) XXX_Size() int { + return xxx_messageInfo_Email.Size(m) +} +func (m *Email) XXX_DiscardUnknown() { + xxx_messageInfo_Email.DiscardUnknown(m) +} + +var xxx_messageInfo_Email proto.InternalMessageInfo -func (m *Email) GetId() *atlas_rpc.Identifier { +func (m *Email) GetId() *resource.Identifier { if m != nil { return m.Id } @@ -197,14 +229,14 @@ func (m *Email) GetSubscribed() bool { return false } -func (m *Email) GetUserId() *atlas_rpc.Identifier { +func (m *Email) GetUserId() *resource.Identifier { if m != nil { return m.UserId } return nil } -func (m *Email) GetExternalNotNull() *atlas_rpc.Identifier { +func (m *Email) GetExternalNotNull() *resource.Identifier { if m != nil { return m.ExternalNotNull } @@ -212,20 +244,42 @@ func (m *Email) GetExternalNotNull() *atlas_rpc.Identifier { } type Address struct { - Id *atlas_rpc.Identifier `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` - Address_1 string `protobuf:"bytes,2,opt,name=address_1,json=address1" json:"address_1,omitempty"` - Address_2 string `protobuf:"bytes,3,opt,name=address_2,json=address2" json:"address_2,omitempty"` - Post string `protobuf:"bytes,4,opt,name=post" json:"post,omitempty"` - External *atlas_rpc.Identifier `protobuf:"bytes,5,opt,name=external" json:"external,omitempty"` - ImplicitFk *atlas_rpc.Identifier `protobuf:"bytes,6,opt,name=implicit_fk,json=implicitFk" json:"implicit_fk,omitempty"` + Id *resource.Identifier `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Address_1 string `protobuf:"bytes,2,opt,name=address_1,json=address1,proto3" json:"address_1,omitempty"` + Address_2 string `protobuf:"bytes,3,opt,name=address_2,json=address2,proto3" json:"address_2,omitempty"` + Post string `protobuf:"bytes,4,opt,name=post,proto3" json:"post,omitempty"` + External *resource.Identifier `protobuf:"bytes,5,opt,name=external,proto3" json:"external,omitempty"` + ImplicitFk *resource.Identifier `protobuf:"bytes,6,opt,name=implicit_fk,json=implicitFk,proto3" json:"implicit_fk,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Address) Reset() { *m = Address{} } +func (m *Address) String() string { return proto.CompactTextString(m) } +func (*Address) ProtoMessage() {} +func (*Address) Descriptor() ([]byte, []int) { + return fileDescriptor_ed89022014131a74, []int{2} +} +func (m *Address) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Address.Unmarshal(m, b) +} +func (m *Address) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Address.Marshal(b, m, deterministic) +} +func (m *Address) XXX_Merge(src proto.Message) { + xxx_messageInfo_Address.Merge(m, src) +} +func (m *Address) XXX_Size() int { + return xxx_messageInfo_Address.Size(m) +} +func (m *Address) XXX_DiscardUnknown() { + xxx_messageInfo_Address.DiscardUnknown(m) } -func (m *Address) Reset() { *m = Address{} } -func (m *Address) String() string { return proto.CompactTextString(m) } -func (*Address) ProtoMessage() {} -func (*Address) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } +var xxx_messageInfo_Address proto.InternalMessageInfo -func (m *Address) GetId() *atlas_rpc.Identifier { +func (m *Address) GetId() *resource.Identifier { if m != nil { return m.Id } @@ -253,14 +307,14 @@ func (m *Address) GetPost() string { return "" } -func (m *Address) GetExternal() *atlas_rpc.Identifier { +func (m *Address) GetExternal() *resource.Identifier { if m != nil { return m.External } return nil } -func (m *Address) GetImplicitFk() *atlas_rpc.Identifier { +func (m *Address) GetImplicitFk() *resource.Identifier { if m != nil { return m.ImplicitFk } @@ -268,18 +322,40 @@ func (m *Address) GetImplicitFk() *atlas_rpc.Identifier { } type Language struct { - Id *atlas_rpc.Identifier `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` - Code string `protobuf:"bytes,3,opt,name=code" json:"code,omitempty"` - ExternalInt *atlas_rpc.Identifier `protobuf:"bytes,4,opt,name=external_int,json=externalInt" json:"external_int,omitempty"` + Id *resource.Identifier `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` + ExternalInt *resource.Identifier `protobuf:"bytes,4,opt,name=external_int,json=externalInt,proto3" json:"external_int,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Language) Reset() { *m = Language{} } +func (m *Language) String() string { return proto.CompactTextString(m) } +func (*Language) ProtoMessage() {} +func (*Language) Descriptor() ([]byte, []int) { + return fileDescriptor_ed89022014131a74, []int{3} +} +func (m *Language) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Language.Unmarshal(m, b) +} +func (m *Language) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Language.Marshal(b, m, deterministic) +} +func (m *Language) XXX_Merge(src proto.Message) { + xxx_messageInfo_Language.Merge(m, src) +} +func (m *Language) XXX_Size() int { + return xxx_messageInfo_Language.Size(m) +} +func (m *Language) XXX_DiscardUnknown() { + xxx_messageInfo_Language.DiscardUnknown(m) } -func (m *Language) Reset() { *m = Language{} } -func (m *Language) String() string { return proto.CompactTextString(m) } -func (*Language) ProtoMessage() {} -func (*Language) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } +var xxx_messageInfo_Language proto.InternalMessageInfo -func (m *Language) GetId() *atlas_rpc.Identifier { +func (m *Language) GetId() *resource.Identifier { if m != nil { return m.Id } @@ -300,7 +376,7 @@ func (m *Language) GetCode() string { return "" } -func (m *Language) GetExternalInt() *atlas_rpc.Identifier { +func (m *Language) GetExternalInt() *resource.Identifier { if m != nil { return m.ExternalInt } @@ -308,33 +384,55 @@ func (m *Language) GetExternalInt() *atlas_rpc.Identifier { } type CreditCard struct { - Id *atlas_rpc.Identifier `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` - CreatedAt *google_protobuf1.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt" json:"created_at,omitempty"` - UpdatedAt *google_protobuf1.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt" json:"updated_at,omitempty"` - Number string `protobuf:"bytes,4,opt,name=number" json:"number,omitempty"` - UserId *atlas_rpc.Identifier `protobuf:"bytes,5,opt,name=user_id,json=userId" json:"user_id,omitempty"` + Id *resource.Identifier `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + CreatedAt *timestamp.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamp.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + Number string `protobuf:"bytes,4,opt,name=number,proto3" json:"number,omitempty"` + UserId *resource.Identifier `protobuf:"bytes,5,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *CreditCard) Reset() { *m = CreditCard{} } -func (m *CreditCard) String() string { return proto.CompactTextString(m) } -func (*CreditCard) ProtoMessage() {} -func (*CreditCard) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } +func (m *CreditCard) Reset() { *m = CreditCard{} } +func (m *CreditCard) String() string { return proto.CompactTextString(m) } +func (*CreditCard) ProtoMessage() {} +func (*CreditCard) Descriptor() ([]byte, []int) { + return fileDescriptor_ed89022014131a74, []int{4} +} +func (m *CreditCard) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CreditCard.Unmarshal(m, b) +} +func (m *CreditCard) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CreditCard.Marshal(b, m, deterministic) +} +func (m *CreditCard) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreditCard.Merge(m, src) +} +func (m *CreditCard) XXX_Size() int { + return xxx_messageInfo_CreditCard.Size(m) +} +func (m *CreditCard) XXX_DiscardUnknown() { + xxx_messageInfo_CreditCard.DiscardUnknown(m) +} -func (m *CreditCard) GetId() *atlas_rpc.Identifier { +var xxx_messageInfo_CreditCard proto.InternalMessageInfo + +func (m *CreditCard) GetId() *resource.Identifier { if m != nil { return m.Id } return nil } -func (m *CreditCard) GetCreatedAt() *google_protobuf1.Timestamp { +func (m *CreditCard) GetCreatedAt() *timestamp.Timestamp { if m != nil { return m.CreatedAt } return nil } -func (m *CreditCard) GetUpdatedAt() *google_protobuf1.Timestamp { +func (m *CreditCard) GetUpdatedAt() *timestamp.Timestamp { if m != nil { return m.UpdatedAt } @@ -348,7 +446,7 @@ func (m *CreditCard) GetNumber() string { return "" } -func (m *CreditCard) GetUserId() *atlas_rpc.Identifier { +func (m *CreditCard) GetUserId() *resource.Identifier { if m != nil { return m.UserId } @@ -356,15 +454,37 @@ func (m *CreditCard) GetUserId() *atlas_rpc.Identifier { } type Task struct { - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"` - Priority int64 `protobuf:"varint,3,opt,name=priority" json:"priority,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Priority int64 `protobuf:"varint,3,opt,name=priority,proto3" json:"priority,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Task) Reset() { *m = Task{} } +func (m *Task) String() string { return proto.CompactTextString(m) } +func (*Task) ProtoMessage() {} +func (*Task) Descriptor() ([]byte, []int) { + return fileDescriptor_ed89022014131a74, []int{5} +} +func (m *Task) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Task.Unmarshal(m, b) +} +func (m *Task) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Task.Marshal(b, m, deterministic) +} +func (m *Task) XXX_Merge(src proto.Message) { + xxx_messageInfo_Task.Merge(m, src) +} +func (m *Task) XXX_Size() int { + return xxx_messageInfo_Task.Size(m) +} +func (m *Task) XXX_DiscardUnknown() { + xxx_messageInfo_Task.DiscardUnknown(m) } -func (m *Task) Reset() { *m = Task{} } -func (m *Task) String() string { return proto.CompactTextString(m) } -func (*Task) ProtoMessage() {} -func (*Task) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } +var xxx_messageInfo_Task proto.InternalMessageInfo func (m *Task) GetName() string { if m != nil { @@ -396,64 +516,63 @@ func init() { proto.RegisterType((*Task)(nil), "user.Task") } -func init() { proto.RegisterFile("example/user/user.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 889 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0x4d, 0x6f, 0xe3, 0x36, - 0x13, 0x5e, 0xf9, 0x53, 0x1e, 0xc5, 0x1f, 0xe1, 0xee, 0xfb, 0x56, 0x4e, 0x81, 0xd6, 0x48, 0x2f, - 0x41, 0xd1, 0xc8, 0x88, 0xdb, 0x2e, 0xba, 0x59, 0xa0, 0x48, 0xbc, 0x48, 0x51, 0xa3, 0xc5, 0x02, - 0x25, 0x76, 0x2f, 0xbd, 0x18, 0x94, 0x48, 0x2b, 0xac, 0x25, 0x51, 0x20, 0x29, 0x20, 0x7b, 0xec, - 0x1f, 0xe8, 0xef, 0x28, 0xfa, 0x0f, 0xec, 0x5b, 0xff, 0x59, 0x21, 0xea, 0x23, 0xc2, 0x02, 0xeb, - 0x04, 0xdd, 0x43, 0x2f, 0xc2, 0x70, 0xf8, 0xcc, 0x68, 0xe6, 0xe1, 0x33, 0x94, 0xe0, 0x13, 0x76, - 0x47, 0xe2, 0x34, 0x62, 0xf3, 0x4c, 0x31, 0x69, 0x1e, 0x5e, 0x2a, 0x85, 0x16, 0xa8, 0x93, 0xdb, - 0x27, 0x97, 0x21, 0xd7, 0xb7, 0x99, 0xef, 0x05, 0x22, 0x9e, 0xf3, 0x64, 0x23, 0xfc, 0x48, 0xdc, - 0x89, 0x94, 0x25, 0x73, 0x03, 0x0a, 0xce, 0x43, 0x96, 0x9c, 0x87, 0x42, 0xc6, 0x73, 0x91, 0x6a, - 0x2e, 0x12, 0x35, 0xcf, 0x17, 0x45, 0x86, 0x93, 0xcf, 0x43, 0x21, 0xc2, 0x88, 0x15, 0x50, 0x3f, - 0xdb, 0xcc, 0x35, 0x8f, 0x99, 0xd2, 0x24, 0x4e, 0x4b, 0xc0, 0xcd, 0x87, 0x92, 0x13, 0x1d, 0x11, - 0x75, 0x4e, 0xd2, 0xf4, 0x5c, 0x0b, 0x11, 0x6d, 0xb9, 0x9e, 0xcb, 0x34, 0x98, 0x4b, 0xa6, 0x44, - 0x26, 0x03, 0x56, 0x1b, 0x45, 0x9a, 0xd3, 0x3f, 0x7b, 0xd0, 0x79, 0xab, 0x98, 0x44, 0xdf, 0x42, - 0x8b, 0x53, 0xd7, 0x9a, 0x59, 0x67, 0xce, 0xe2, 0x7f, 0x9e, 0x49, 0xe2, 0xc9, 0x34, 0xf0, 0x56, - 0x94, 0x25, 0x9a, 0x6f, 0x38, 0x93, 0xcb, 0xd1, 0x7e, 0x37, 0x05, 0xb0, 0x51, 0x27, 0xcb, 0x38, - 0x3d, 0xb3, 0x70, 0x8b, 0x53, 0xf4, 0x02, 0x20, 0x90, 0x8c, 0x68, 0x46, 0xd7, 0x44, 0xbb, 0x2d, - 0x13, 0x7e, 0xe2, 0x15, 0xc5, 0x7b, 0x55, 0xf1, 0xde, 0x9b, 0xaa, 0x78, 0x3c, 0x28, 0xd1, 0xd7, - 0x3a, 0x0f, 0xcd, 0x52, 0x5a, 0x85, 0xb6, 0x1f, 0x0e, 0x2d, 0xd1, 0xd7, 0x1a, 0x3d, 0x07, 0xdb, - 0xe7, 0x52, 0xdf, 0x52, 0xf2, 0xce, 0xed, 0x3c, 0x18, 0x58, 0x63, 0x91, 0x0b, 0x6d, 0x12, 0x32, - 0xb7, 0x3b, 0xb3, 0xce, 0x86, 0xcb, 0xde, 0x7e, 0x37, 0x6d, 0x4d, 0x2c, 0x9c, 0xbb, 0xd0, 0x04, - 0xda, 0x49, 0x16, 0xbb, 0xbd, 0x7c, 0x07, 0xe7, 0x26, 0xba, 0x00, 0x27, 0x90, 0x8c, 0x72, 0xbd, - 0x0e, 0x88, 0xa4, 0x6e, 0xdf, 0xbc, 0x66, 0xe2, 0x99, 0x53, 0x7e, 0x65, 0x36, 0x5e, 0x11, 0x49, - 0x31, 0x04, 0xb5, 0x8d, 0xbe, 0x80, 0x1e, 0x8b, 0x09, 0x8f, 0x94, 0x6b, 0xcf, 0xda, 0x67, 0xce, - 0xc2, 0x29, 0xd0, 0x37, 0xb9, 0x0f, 0x97, 0x5b, 0xe8, 0x39, 0x74, 0x35, 0x51, 0x5b, 0xe5, 0x0e, - 0x0c, 0x06, 0x0a, 0xcc, 0x1b, 0xa2, 0xb6, 0xcb, 0x67, 0xfb, 0xdd, 0x74, 0xf2, 0xe5, 0x08, 0xb5, - 0xae, 0xac, 0x53, 0x3b, 0x95, 0x5c, 0x48, 0xae, 0xdf, 0xe1, 0x02, 0x8e, 0xbe, 0x87, 0xb1, 0xcf, - 0xa3, 0x88, 0x27, 0xe1, 0x9a, 0x50, 0x2a, 0x99, 0x52, 0x2e, 0x98, 0x9a, 0x86, 0x45, 0x86, 0xeb, - 0xc2, 0x59, 0xb4, 0x75, 0xfa, 0x04, 0x8f, 0x4a, 0x74, 0xe9, 0x47, 0x57, 0x30, 0x51, 0xb7, 0x3c, - 0x4d, 0x9b, 0x09, 0x9c, 0x43, 0x09, 0xc6, 0x15, 0xbc, 0xca, 0xf0, 0x0d, 0x0c, 0x22, 0x92, 0x84, - 0x19, 0x09, 0x99, 0x72, 0x8f, 0x4c, 0xf5, 0xa3, 0x22, 0xf4, 0xe7, 0xd2, 0x5d, 0xc4, 0x2e, 0x9e, - 0xe0, 0x7b, 0x20, 0xfa, 0x0a, 0xfa, 0x1b, 0xc9, 0x59, 0x42, 0x95, 0x3b, 0x6c, 0x76, 0x9c, 0xab, - 0xae, 0xc6, 0x57, 0x10, 0x74, 0x03, 0x4f, 0xdf, 0xaf, 0x72, 0xcd, 0xa9, 0x3b, 0x3a, 0xa0, 0x4b, - 0x7c, 0xfc, 0x5e, 0xa1, 0x2b, 0x8a, 0x7e, 0x84, 0x21, 0xbb, 0xd3, 0x4c, 0x26, 0x24, 0x5a, 0xe7, - 0x6a, 0x75, 0xc7, 0x87, 0x84, 0x7d, 0xb4, 0xdf, 0x4d, 0x6d, 0xe8, 0x15, 0xc2, 0xc6, 0x47, 0x55, - 0xe4, 0xdb, 0x8c, 0xd3, 0x4b, 0x7b, 0xbf, 0x9b, 0x76, 0x6c, 0x6b, 0x66, 0x9d, 0xfe, 0xde, 0x82, - 0xae, 0x39, 0xca, 0x7f, 0x3b, 0x2b, 0xcf, 0xa0, 0x6b, 0x34, 0x60, 0xc6, 0x64, 0x80, 0x8b, 0x05, - 0xfa, 0x0c, 0x40, 0x65, 0xbe, 0x0a, 0x24, 0xf7, 0x19, 0x35, 0x63, 0x60, 0xe3, 0x86, 0x07, 0x79, - 0xd0, 0xcf, 0xf9, 0xca, 0x59, 0xe8, 0x1c, 0x62, 0xa1, 0x97, 0xa3, 0x56, 0x14, 0xfd, 0x02, 0xc7, - 0x75, 0xeb, 0x89, 0xd0, 0xeb, 0x24, 0x8b, 0x22, 0xa3, 0xf8, 0xc7, 0xd5, 0x7a, 0x65, 0xe1, 0x71, - 0x15, 0xff, 0x5a, 0xe8, 0xd7, 0x59, 0x14, 0x35, 0x38, 0xf8, 0xab, 0x05, 0xfd, 0x4a, 0x0e, 0xdf, - 0x3d, 0xcc, 0xc2, 0xf1, 0x7e, 0x37, 0x1d, 0x82, 0x83, 0xfa, 0x3c, 0xd1, 0x2c, 0x64, 0xb2, 0x24, - 0xe2, 0x53, 0x18, 0x54, 0x67, 0x7b, 0x51, 0x92, 0x61, 0x97, 0x8e, 0x8b, 0xe6, 0xe6, 0xc2, 0xd0, - 0x71, 0xbf, 0xb9, 0x40, 0x08, 0x3a, 0xa9, 0x50, 0xda, 0x30, 0x31, 0xc0, 0xc6, 0x46, 0x57, 0x60, - 0x57, 0x05, 0x1f, 0xee, 0x73, 0xb8, 0xdf, 0x4d, 0x07, 0xd0, 0x47, 0xdd, 0xdf, 0x94, 0x48, 0x7c, - 0x5c, 0x47, 0xa1, 0x9f, 0xc0, 0xe1, 0x71, 0x1a, 0xf1, 0x80, 0xeb, 0xf5, 0x66, 0x6b, 0x2e, 0x81, - 0x0f, 0x26, 0x79, 0xba, 0xdf, 0x4d, 0xc7, 0xb9, 0x56, 0x34, 0xbb, 0xd3, 0x97, 0x85, 0x20, 0x30, - 0x54, 0xe1, 0x3f, 0x6c, 0x1b, 0x64, 0xfd, 0x6d, 0x81, 0x5d, 0x4d, 0xc6, 0x47, 0xb0, 0x85, 0xa0, - 0x93, 0x90, 0x98, 0x95, 0x44, 0x19, 0x3b, 0xf7, 0x05, 0x82, 0xb2, 0x92, 0x1f, 0x63, 0xa3, 0x15, - 0xd4, 0xca, 0x5d, 0xf3, 0x44, 0x1f, 0x54, 0xcb, 0x72, 0xbc, 0xdf, 0x4d, 0x1d, 0x18, 0xd4, 0xef, - 0xc2, 0x4e, 0x15, 0xbb, 0x4a, 0x74, 0xa3, 0x87, 0x3f, 0x5a, 0x00, 0xf7, 0xb7, 0xdd, 0x47, 0x74, - 0xf1, 0xdf, 0x7c, 0x28, 0xfe, 0x0f, 0xbd, 0x24, 0x8b, 0x7d, 0x26, 0x4b, 0xc5, 0x94, 0xab, 0xe6, - 0x50, 0x75, 0x1f, 0x31, 0x54, 0x0d, 0x42, 0x7c, 0xe8, 0xe4, 0x77, 0x75, 0x7d, 0x2a, 0x56, 0xe3, - 0x54, 0x66, 0xe0, 0x50, 0x96, 0xcf, 0xad, 0xf9, 0x9e, 0x97, 0x07, 0xd6, 0x74, 0xa1, 0x13, 0xa8, - 0xef, 0x75, 0xd3, 0x48, 0x1b, 0xd7, 0xeb, 0xfb, 0x77, 0x2c, 0x5f, 0xfe, 0xfa, 0xe2, 0xb1, 0xbf, - 0x0e, 0xcd, 0x3f, 0x90, 0x97, 0xf9, 0xc3, 0xef, 0x19, 0xc8, 0xd7, 0xff, 0x04, 0x00, 0x00, 0xff, - 0xff, 0x3a, 0x58, 0x50, 0x56, 0x9d, 0x08, 0x00, 0x00, +func init() { proto.RegisterFile("user/user.proto", fileDescriptor_ed89022014131a74) } + +var fileDescriptor_ed89022014131a74 = []byte{ + // 878 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xdd, 0x8e, 0xdb, 0x44, + 0x14, 0xae, 0xb3, 0xf9, 0x71, 0x8e, 0x37, 0x3f, 0x3b, 0xad, 0x90, 0xb3, 0x08, 0x88, 0x96, 0x9b, + 0x15, 0xa2, 0x89, 0x12, 0xd0, 0x4a, 0x6d, 0x05, 0xda, 0x4d, 0x05, 0x62, 0x25, 0xa8, 0x60, 0x68, + 0x2f, 0xe0, 0x26, 0xb2, 0x3d, 0x13, 0xef, 0xb0, 0xf6, 0x8c, 0x35, 0x33, 0xae, 0xb6, 0x8f, 0xc2, + 0x0d, 0xef, 0x91, 0x5c, 0x21, 0xde, 0x80, 0x37, 0x42, 0x33, 0xfe, 0x89, 0xd5, 0x0b, 0x36, 0x15, + 0x95, 0xb8, 0xb1, 0x8e, 0xcf, 0x7c, 0xe7, 0xf8, 0x9c, 0x6f, 0xbe, 0xe3, 0x19, 0x18, 0xe5, 0x8a, + 0xca, 0xb9, 0x79, 0xcc, 0x32, 0x29, 0xb4, 0x40, 0x6d, 0x63, 0x9f, 0x7e, 0x12, 0x0b, 0x11, 0x27, + 0x74, 0x6e, 0x7d, 0x61, 0xbe, 0x99, 0x6b, 0x96, 0x52, 0xa5, 0x83, 0x34, 0x2b, 0x60, 0xa7, 0xd3, + 0x40, 0x27, 0x81, 0x9a, 0x4b, 0xaa, 0x44, 0x2e, 0x23, 0x3a, 0x7f, 0xbd, 0xa8, 0xed, 0x12, 0x81, + 0x44, 0xa6, 0x99, 0xe0, 0x6a, 0x1e, 0x0b, 0x99, 0x16, 0xbe, 0xb3, 0x3f, 0xbb, 0xd0, 0x7e, 0xa5, + 0xa8, 0x44, 0x5f, 0x41, 0x8b, 0x11, 0xdf, 0x99, 0x3a, 0xe7, 0xde, 0xf2, 0xa3, 0x99, 0xcd, 0x35, + 0xab, 0xe3, 0x5f, 0x2f, 0x66, 0xd7, 0x84, 0x72, 0xcd, 0x36, 0x8c, 0xca, 0xd5, 0x70, 0xb7, 0x9d, + 0x00, 0xb8, 0xa8, 0x9d, 0xe7, 0x8c, 0x9c, 0x3b, 0xb8, 0xc5, 0x08, 0x7a, 0x02, 0x10, 0x49, 0x1a, + 0x68, 0x4a, 0xd6, 0x81, 0xf6, 0x5b, 0x36, 0xcd, 0xe9, 0xac, 0xa8, 0x79, 0x56, 0xd5, 0x3c, 0x7b, + 0x59, 0xd5, 0x8c, 0xfb, 0x25, 0xfa, 0x4a, 0x9b, 0xd0, 0x3c, 0x23, 0x55, 0xe8, 0xd1, 0xfd, 0xa1, + 0x25, 0xfa, 0x4a, 0xa3, 0x0b, 0x70, 0x43, 0x26, 0xf5, 0x0d, 0x09, 0xde, 0xf8, 0xed, 0x7b, 0x03, + 0x6b, 0x2c, 0xf2, 0xe1, 0x28, 0x88, 0xa9, 0xdf, 0x99, 0x3a, 0xe7, 0x83, 0x55, 0x77, 0xb7, 0x9d, + 0xb4, 0xc6, 0x0e, 0x36, 0x2e, 0x34, 0x86, 0x23, 0x9e, 0xa7, 0x7e, 0xd7, 0xac, 0x60, 0x63, 0xa2, + 0x05, 0x78, 0x91, 0xa4, 0x84, 0xe9, 0x75, 0x14, 0x48, 0xe2, 0xf7, 0xec, 0x67, 0xc6, 0x33, 0xbb, + 0x41, 0xcf, 0xed, 0xc2, 0xf3, 0x40, 0x12, 0x0c, 0x51, 0x6d, 0xa3, 0x4f, 0xa1, 0x4b, 0xd3, 0x80, + 0x25, 0xca, 0x77, 0xa7, 0x47, 0xe7, 0xde, 0xd2, 0x2b, 0xd0, 0xdf, 0x18, 0x1f, 0x2e, 0x97, 0xd0, + 0x05, 0x74, 0x74, 0xa0, 0x6e, 0x95, 0xdf, 0xb7, 0x18, 0x28, 0x30, 0x2f, 0x03, 0x75, 0xbb, 0x7a, + 0xb4, 0xdb, 0x4e, 0xc6, 0x9f, 0x0d, 0x51, 0xeb, 0xd2, 0x39, 0x73, 0x33, 0xc9, 0x84, 0x64, 0xfa, + 0x0d, 0x2e, 0xe0, 0xe8, 0x6b, 0x18, 0x85, 0x2c, 0x49, 0x18, 0x8f, 0xd7, 0x01, 0x21, 0x92, 0x2a, + 0xe5, 0x83, 0xad, 0x69, 0x50, 0x64, 0xb8, 0x2a, 0x9c, 0x45, 0x5b, 0x67, 0x0f, 0xf0, 0xb0, 0x44, + 0x97, 0x7e, 0x74, 0x09, 0x63, 0x75, 0xc3, 0xb2, 0xac, 0x99, 0xc0, 0xfb, 0xb7, 0x04, 0xa3, 0x0a, + 0x5e, 0x65, 0xf8, 0x12, 0xfa, 0x49, 0xc0, 0xe3, 0x3c, 0x88, 0xa9, 0xf2, 0x8f, 0x6d, 0xf5, 0xc3, + 0x22, 0xf4, 0xfb, 0xd2, 0x5d, 0xc4, 0x2e, 0x1f, 0xe0, 0x3d, 0x10, 0x7d, 0x0e, 0xbd, 0x8d, 0x64, + 0x94, 0x13, 0xe5, 0x0f, 0x9a, 0x1d, 0x1b, 0xf5, 0xd5, 0xf8, 0x0a, 0x82, 0x7e, 0x80, 0x87, 0x6f, + 0x57, 0xb9, 0x66, 0xc4, 0x1f, 0x1e, 0xa0, 0x4f, 0x7c, 0xf2, 0x56, 0xc1, 0xd7, 0x04, 0xfd, 0x08, + 0x03, 0x7a, 0xa7, 0xa9, 0xe4, 0x41, 0xb2, 0x36, 0xaa, 0xf5, 0x47, 0x87, 0x08, 0xfd, 0x78, 0xb7, + 0x9d, 0xb8, 0xd0, 0x2d, 0x84, 0x8e, 0x8f, 0xab, 0x0c, 0xaf, 0x72, 0x46, 0x9e, 0xba, 0xbb, 0xed, + 0xa4, 0xed, 0x3a, 0x53, 0xe7, 0xec, 0xf7, 0x16, 0x74, 0xec, 0xd6, 0xfe, 0xd7, 0x19, 0x7a, 0x04, + 0x1d, 0xab, 0x0d, 0x3b, 0x3e, 0x7d, 0x5c, 0xbc, 0xa0, 0x8f, 0x01, 0x54, 0x1e, 0xaa, 0x48, 0xb2, + 0x90, 0x12, 0x3b, 0x1e, 0x2e, 0x6e, 0x78, 0xd0, 0x05, 0xf4, 0x0c, 0x8f, 0x86, 0x9d, 0xf6, 0x21, + 0xec, 0x74, 0x0d, 0xfa, 0x9a, 0xa0, 0x5f, 0xe0, 0xa4, 0xa6, 0x84, 0x0b, 0xbd, 0xe6, 0x79, 0x92, + 0xd8, 0x89, 0x78, 0xb7, 0xda, 0x2f, 0x1d, 0x3c, 0xaa, 0xf2, 0xbc, 0x10, 0xfa, 0x45, 0x9e, 0x24, + 0x0d, 0x6e, 0xfe, 0x6a, 0x41, 0x6f, 0x2f, 0xbc, 0x83, 0xd9, 0x39, 0xd9, 0x6d, 0x27, 0x03, 0xf0, + 0x50, 0x8f, 0x71, 0x4d, 0x63, 0x2a, 0x4b, 0x82, 0x3e, 0x84, 0x7e, 0xa5, 0x85, 0x45, 0x49, 0x92, + 0x5b, 0x3a, 0x16, 0xcd, 0xc5, 0xa5, 0xa5, 0x69, 0xbf, 0xb8, 0x44, 0x08, 0xda, 0x99, 0x50, 0xda, + 0x32, 0xd4, 0xc7, 0xd6, 0x46, 0xdf, 0x81, 0x5b, 0x15, 0x7e, 0x58, 0xdf, 0x83, 0xdd, 0x76, 0xd2, + 0x87, 0x1e, 0xea, 0xfc, 0xa6, 0x04, 0x0f, 0x71, 0x1d, 0x8d, 0x7e, 0x06, 0x8f, 0xa5, 0x59, 0xc2, + 0x22, 0xa6, 0xd7, 0x9b, 0x5b, 0xfb, 0xf3, 0xb8, 0x37, 0xd9, 0xc3, 0xdd, 0x76, 0x32, 0x32, 0xda, + 0xd2, 0xf4, 0x4e, 0x3f, 0x2d, 0x04, 0x84, 0xa1, 0x4a, 0xf3, 0xed, 0x6d, 0x83, 0xc4, 0xbf, 0x1d, + 0x70, 0xab, 0xc9, 0x7a, 0x0f, 0x2c, 0x22, 0x68, 0xf3, 0x20, 0xa5, 0x25, 0x81, 0xd6, 0x36, 0xbe, + 0x48, 0x10, 0x5a, 0xf2, 0x66, 0x6d, 0xf4, 0x13, 0xd4, 0x8a, 0x5f, 0x33, 0xae, 0x0f, 0x52, 0xd7, + 0x6a, 0xb4, 0xdb, 0x4e, 0x3c, 0xe8, 0xd7, 0xdf, 0xc4, 0x5e, 0x95, 0xe3, 0x9a, 0xeb, 0x46, 0x4f, + 0x7f, 0xb4, 0x00, 0xf6, 0x7f, 0xcf, 0xf7, 0xd0, 0xd5, 0xff, 0x73, 0x00, 0x7d, 0x00, 0x5d, 0x9e, + 0xa7, 0x21, 0x95, 0xa5, 0xb2, 0xca, 0xb7, 0xe6, 0x50, 0x76, 0xde, 0x61, 0x28, 0x1b, 0x04, 0x85, + 0xd0, 0x36, 0x67, 0x41, 0xbd, 0x5b, 0x4e, 0x63, 0xb7, 0xa6, 0xe0, 0x11, 0x6a, 0xe6, 0xdf, 0x9e, + 0xe7, 0xe5, 0x46, 0x36, 0x5d, 0xe8, 0x14, 0xea, 0x73, 0xc3, 0x36, 0x74, 0x84, 0xeb, 0xf7, 0xfd, + 0x37, 0x56, 0xcf, 0x7e, 0x7d, 0x12, 0x33, 0x7d, 0x93, 0x87, 0xb3, 0x48, 0xa4, 0x73, 0xc6, 0x37, + 0x22, 0x4c, 0xc4, 0x9d, 0xc8, 0x28, 0x2f, 0xae, 0x19, 0xd1, 0xe3, 0x98, 0xf2, 0xc7, 0xe6, 0xb6, + 0x30, 0xa7, 0x77, 0x41, 0x9a, 0x25, 0xd4, 0xde, 0x4b, 0x9e, 0x99, 0x47, 0xd8, 0xb5, 0x90, 0x2f, + 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0xbe, 0xc0, 0xea, 0xd7, 0xb0, 0x08, 0x00, 0x00, } diff --git a/example/user/user.pb.gorm.go b/example/user/user.pb.gorm.go index 5e1ca3cd..8563b365 100644 --- a/example/user/user.pb.gorm.go +++ b/example/user/user.pb.gorm.go @@ -1,38 +1,30 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: example/user/user.proto - -/* -Package user is a generated protocol buffer package. - -It is generated from these files: - example/user/user.proto - -It has these top-level messages: - User - Email - Address - Language - CreditCard - Task -*/ -package user - -import context "context" -import fmt "fmt" -import strings "strings" -import time "time" +// source: user/user.proto -import auth1 "github.com/infobloxopen/atlas-app-toolkit/auth" -import errors1 "github.com/infobloxopen/protoc-gen-gorm/errors" -import field_mask1 "google.golang.org/genproto/protobuf/field_mask" -import gorm1 "github.com/jinzhu/gorm" -import gorm2 "github.com/infobloxopen/atlas-app-toolkit/gorm" -import ptypes1 "github.com/golang/protobuf/ptypes" -import resource1 "github.com/infobloxopen/atlas-app-toolkit/gorm/resource" +package user -import math "math" -import _ "github.com/golang/protobuf/ptypes/timestamp" -import _ "github.com/infobloxopen/atlas-app-toolkit/rpc/resource" +import ( + context "context" + fmt "fmt" + + math "math" + strings "strings" + time "time" + + _ "github.com/golang/protobuf/ptypes/timestamp" + timestamp "github.com/golang/protobuf/ptypes/timestamp" + _ "github.com/infobloxopen/atlas-app-toolkit/atlas/resource" + _ "github.com/infobloxopen/protoc-gen-gorm/options" + + ptypes1 "github.com/golang/protobuf/ptypes" + auth1 "github.com/infobloxopen/atlas-app-toolkit/auth" + gateway1 "github.com/infobloxopen/atlas-app-toolkit/gateway" + gorm2 "github.com/infobloxopen/atlas-app-toolkit/gorm" + resource1 "github.com/infobloxopen/atlas-app-toolkit/gorm/resource" + errors1 "github.com/infobloxopen/protoc-gen-gorm/errors" + gorm1 "github.com/jinzhu/gorm" + field_mask1 "google.golang.org/genproto/protobuf/field_mask" +) // Reference imports to suppress errors if they are not otherwise used. var _ = fmt.Errorf @@ -47,9 +39,9 @@ type UserORM struct { CreditCard *CreditCardORM `gorm:"foreignkey:UserId;association_foreignkey:Id"` Emails []*EmailORM `gorm:"foreignkey:UserId;association_foreignkey:Id"` ExternalUuid *string `gorm:"type:uuid"` - Friends []*UserORM `gorm:"foreignkey:Id;association_foreignkey:Id;many2many:user_friends;jointable_foreignkey:user_id;association_jointable_foreignkey:friend_id"` + Friends []*UserORM `gorm:"foreignkey:Id;association_foreignkey:Id;many2many:user_friends;jointable_foreignkey:UserId;association_jointable_foreignkey:FriendId"` Id string `gorm:"type:uuid;primary_key"` - Languages []*LanguageORM `gorm:"foreignkey:Id;association_foreignkey:Id;many2many:user_languages;jointable_foreignkey:user_id;association_jointable_foreignkey:language_id"` + Languages []*LanguageORM `gorm:"foreignkey:Id;association_foreignkey:Id;many2many:user_languages;jointable_foreignkey:UserId;association_jointable_foreignkey:LanguageId"` Num uint32 ShippingAddress *AddressORM `gorm:"foreignkey:ShippingAddressId;association_foreignkey:Id"` ShippingAddressId *int64 @@ -1036,8 +1028,9 @@ func DefaultStrictUpdateUser(ctx context.Context, in *User, db *gorm1.DB) (*User return nil, err } db = db.Where(map[string]interface{}{"account_id": accountID}) + var count int64 lockedRow := &UserORM{} - db.Model(&ormObj).Set("gorm:query_option", "FOR UPDATE").Where("id=?", ormObj.Id).First(lockedRow) + count = db.Model(&ormObj).Set("gorm:query_option", "FOR UPDATE").Where("id=?", ormObj.Id).First(lockedRow).RowsAffected if hook, ok := interface{}(&ormObj).(UserORMWithBeforeStrictUpdateCleanup); ok { if db, err = hook.BeforeStrictUpdateCleanup(ctx, db); err != nil { return nil, err @@ -1094,6 +1087,9 @@ func DefaultStrictUpdateUser(ctx context.Context, in *User, db *gorm1.DB) (*User if err != nil { return nil, err } + if count == 0 { + err = gateway1.SetCreated(ctx, "") + } return &pbResponse, err } @@ -1189,6 +1185,9 @@ func DefaultApplyFieldMaskUser(ctx context.Context, patchee *User, patcher *User return nil, errors1.NilArgumentError } var err error + var updatedCreatedAt bool + var updatedUpdatedAt bool + var updatedBirthday bool var updatedCreditCard bool var updatedBillingAddress bool var updatedShippingAddress bool @@ -1197,15 +1196,72 @@ func DefaultApplyFieldMaskUser(ctx context.Context, patchee *User, patcher *User patchee.Id = patcher.Id continue } + if !updatedCreatedAt && strings.HasPrefix(f, prefix+"CreatedAt.") { + if patcher.CreatedAt == nil { + patchee.CreatedAt = nil + continue + } + if patchee.CreatedAt == nil { + patchee.CreatedAt = ×tamp.Timestamp{} + } + childMask := &field_mask1.FieldMask{} + for j := i; j < len(updateMask.Paths); j++ { + if trimPath := strings.TrimPrefix(updateMask.Paths[j], prefix+"CreatedAt."); trimPath != updateMask.Paths[j] { + childMask.Paths = append(childMask.Paths, trimPath) + } + } + if err := gorm2.MergeWithMask(patcher.CreatedAt, patchee.CreatedAt, childMask); err != nil { + return nil, nil + } + } if f == prefix+"CreatedAt" { + updatedCreatedAt = true patchee.CreatedAt = patcher.CreatedAt continue } + if !updatedUpdatedAt && strings.HasPrefix(f, prefix+"UpdatedAt.") { + if patcher.UpdatedAt == nil { + patchee.UpdatedAt = nil + continue + } + if patchee.UpdatedAt == nil { + patchee.UpdatedAt = ×tamp.Timestamp{} + } + childMask := &field_mask1.FieldMask{} + for j := i; j < len(updateMask.Paths); j++ { + if trimPath := strings.TrimPrefix(updateMask.Paths[j], prefix+"UpdatedAt."); trimPath != updateMask.Paths[j] { + childMask.Paths = append(childMask.Paths, trimPath) + } + } + if err := gorm2.MergeWithMask(patcher.UpdatedAt, patchee.UpdatedAt, childMask); err != nil { + return nil, nil + } + } if f == prefix+"UpdatedAt" { + updatedUpdatedAt = true patchee.UpdatedAt = patcher.UpdatedAt continue } + if !updatedBirthday && strings.HasPrefix(f, prefix+"Birthday.") { + if patcher.Birthday == nil { + patchee.Birthday = nil + continue + } + if patchee.Birthday == nil { + patchee.Birthday = ×tamp.Timestamp{} + } + childMask := &field_mask1.FieldMask{} + for j := i; j < len(updateMask.Paths); j++ { + if trimPath := strings.TrimPrefix(updateMask.Paths[j], prefix+"Birthday."); trimPath != updateMask.Paths[j] { + childMask.Paths = append(childMask.Paths, trimPath) + } + } + if err := gorm2.MergeWithMask(patcher.Birthday, patchee.Birthday, childMask); err != nil { + return nil, nil + } + } if f == prefix+"Birthday" { + updatedBirthday = true patchee.Birthday = patcher.Birthday continue } @@ -1534,8 +1590,9 @@ func DefaultStrictUpdateEmail(ctx context.Context, in *Email, db *gorm1.DB) (*Em return nil, err } db = db.Where(map[string]interface{}{"account_id": accountID}) + var count int64 lockedRow := &EmailORM{} - db.Model(&ormObj).Set("gorm:query_option", "FOR UPDATE").Where("id=?", ormObj.Id).First(lockedRow) + count = db.Model(&ormObj).Set("gorm:query_option", "FOR UPDATE").Where("id=?", ormObj.Id).First(lockedRow).RowsAffected if hook, ok := interface{}(&ormObj).(EmailORMWithBeforeStrictUpdateCleanup); ok { if db, err = hook.BeforeStrictUpdateCleanup(ctx, db); err != nil { return nil, err @@ -1558,6 +1615,9 @@ func DefaultStrictUpdateEmail(ctx context.Context, in *Email, db *gorm1.DB) (*Em if err != nil { return nil, err } + if count == 0 { + err = gateway1.SetCreated(ctx, "") + } return &pbResponse, err } @@ -1904,8 +1964,9 @@ func DefaultStrictUpdateAddress(ctx context.Context, in *Address, db *gorm1.DB) return nil, err } db = db.Where(map[string]interface{}{"account_id": accountID}) + var count int64 lockedRow := &AddressORM{} - db.Model(&ormObj).Set("gorm:query_option", "FOR UPDATE").Where("id=?", ormObj.Id).First(lockedRow) + count = db.Model(&ormObj).Set("gorm:query_option", "FOR UPDATE").Where("id=?", ormObj.Id).First(lockedRow).RowsAffected if hook, ok := interface{}(&ormObj).(AddressORMWithBeforeStrictUpdateCleanup); ok { if db, err = hook.BeforeStrictUpdateCleanup(ctx, db); err != nil { return nil, err @@ -1928,6 +1989,9 @@ func DefaultStrictUpdateAddress(ctx context.Context, in *Address, db *gorm1.DB) if err != nil { return nil, err } + if count == 0 { + err = gateway1.SetCreated(ctx, "") + } return &pbResponse, err } @@ -2278,8 +2342,9 @@ func DefaultStrictUpdateLanguage(ctx context.Context, in *Language, db *gorm1.DB return nil, err } db = db.Where(map[string]interface{}{"account_id": accountID}) + var count int64 lockedRow := &LanguageORM{} - db.Model(&ormObj).Set("gorm:query_option", "FOR UPDATE").Where("id=?", ormObj.Id).First(lockedRow) + count = db.Model(&ormObj).Set("gorm:query_option", "FOR UPDATE").Where("id=?", ormObj.Id).First(lockedRow).RowsAffected if hook, ok := interface{}(&ormObj).(LanguageORMWithBeforeStrictUpdateCleanup); ok { if db, err = hook.BeforeStrictUpdateCleanup(ctx, db); err != nil { return nil, err @@ -2302,6 +2367,9 @@ func DefaultStrictUpdateLanguage(ctx context.Context, in *Language, db *gorm1.DB if err != nil { return nil, err } + if count == 0 { + err = gateway1.SetCreated(ctx, "") + } return &pbResponse, err } @@ -2644,8 +2712,9 @@ func DefaultStrictUpdateCreditCard(ctx context.Context, in *CreditCard, db *gorm return nil, err } db = db.Where(map[string]interface{}{"account_id": accountID}) + var count int64 lockedRow := &CreditCardORM{} - db.Model(&ormObj).Set("gorm:query_option", "FOR UPDATE").Where("id=?", ormObj.Id).First(lockedRow) + count = db.Model(&ormObj).Set("gorm:query_option", "FOR UPDATE").Where("id=?", ormObj.Id).First(lockedRow).RowsAffected if hook, ok := interface{}(&ormObj).(CreditCardORMWithBeforeStrictUpdateCleanup); ok { if db, err = hook.BeforeStrictUpdateCleanup(ctx, db); err != nil { return nil, err @@ -2668,6 +2737,9 @@ func DefaultStrictUpdateCreditCard(ctx context.Context, in *CreditCard, db *gorm if err != nil { return nil, err } + if count == 0 { + err = gateway1.SetCreated(ctx, "") + } return &pbResponse, err } @@ -2763,16 +2835,56 @@ func DefaultApplyFieldMaskCreditCard(ctx context.Context, patchee *CreditCard, p return nil, errors1.NilArgumentError } var err error - for _, f := range updateMask.Paths { + var updatedCreatedAt bool + var updatedUpdatedAt bool + for i, f := range updateMask.Paths { if f == prefix+"Id" { patchee.Id = patcher.Id continue } + if !updatedCreatedAt && strings.HasPrefix(f, prefix+"CreatedAt.") { + if patcher.CreatedAt == nil { + patchee.CreatedAt = nil + continue + } + if patchee.CreatedAt == nil { + patchee.CreatedAt = ×tamp.Timestamp{} + } + childMask := &field_mask1.FieldMask{} + for j := i; j < len(updateMask.Paths); j++ { + if trimPath := strings.TrimPrefix(updateMask.Paths[j], prefix+"CreatedAt."); trimPath != updateMask.Paths[j] { + childMask.Paths = append(childMask.Paths, trimPath) + } + } + if err := gorm2.MergeWithMask(patcher.CreatedAt, patchee.CreatedAt, childMask); err != nil { + return nil, nil + } + } if f == prefix+"CreatedAt" { + updatedCreatedAt = true patchee.CreatedAt = patcher.CreatedAt continue } + if !updatedUpdatedAt && strings.HasPrefix(f, prefix+"UpdatedAt.") { + if patcher.UpdatedAt == nil { + patchee.UpdatedAt = nil + continue + } + if patchee.UpdatedAt == nil { + patchee.UpdatedAt = ×tamp.Timestamp{} + } + childMask := &field_mask1.FieldMask{} + for j := i; j < len(updateMask.Paths); j++ { + if trimPath := strings.TrimPrefix(updateMask.Paths[j], prefix+"UpdatedAt."); trimPath != updateMask.Paths[j] { + childMask.Paths = append(childMask.Paths, trimPath) + } + } + if err := gorm2.MergeWithMask(patcher.UpdatedAt, patchee.UpdatedAt, childMask); err != nil { + return nil, nil + } + } if f == prefix+"UpdatedAt" { + updatedUpdatedAt = true patchee.UpdatedAt = patcher.UpdatedAt continue } diff --git a/example/user/user.proto b/example/user/user.proto index 5978005d..8aa1a0a4 100644 --- a/example/user/user.proto +++ b/example/user/user.proto @@ -4,9 +4,9 @@ syntax = "proto3"; package user; -import "github.com/infobloxopen/protoc-gen-gorm/options/gorm.proto"; import "google/protobuf/timestamp.proto"; -import "github.com/infobloxopen/atlas-app-toolkit/rpc/resource/resource.proto"; +import "atlas/resource/v1/resource.proto"; +import "options/gorm.proto"; option go_package = "github.com/infobloxopen/protoc-gen-gorm/example/user;user"; @@ -15,7 +15,7 @@ message User { ormable: true, multi_account: true }; - atlas.rpc.Identifier id = 1 [(gorm.field).tag = {type: "uuid" primary_key: true}]; + atlas.resource.v1.Identifier id = 1 [(gorm.field).tag = {type: "uuid" primary_key: true}]; google.protobuf.Timestamp created_at = 2; google.protobuf.Timestamp updated_at = 3; @@ -29,8 +29,8 @@ message User { Address shipping_address = 11 [(gorm.field).belongs_to = {}]; repeated Language languages = 12 [(gorm.field).many_to_many = {}]; repeated User friends = 13 [(gorm.field).many_to_many = {}]; - atlas.rpc.Identifier shipping_address_id = 14; - atlas.rpc.Identifier external_uuid = 15 [(gorm.field).tag = {type: "uuid"}]; + atlas.resource.v1.Identifier shipping_address_id = 14; + atlas.resource.v1.Identifier external_uuid = 15 [(gorm.field).tag = {type: "uuid"}]; } message Email { @@ -38,11 +38,11 @@ message Email { ormable: true, multi_account: true }; - atlas.rpc.Identifier id = 1 [(gorm.field).tag = {type: "uuid" primary_key: true}]; + atlas.resource.v1.Identifier id = 1 [(gorm.field).tag = {type: "uuid" primary_key: true}]; string email = 2; bool subscribed = 3; - atlas.rpc.Identifier user_id = 4; - atlas.rpc.Identifier external_not_null = 5 [(gorm.field).tag = {type: "uuid" not_null: true}]; + atlas.resource.v1.Identifier user_id = 4; + atlas.resource.v1.Identifier external_not_null = 5 [(gorm.field).tag = {type: "uuid" not_null: true}]; } message Address { @@ -50,12 +50,12 @@ message Address { ormable: true, multi_account: true }; - atlas.rpc.Identifier id = 1 [(gorm.field).tag = {type: "integer" primary_key: true}]; + atlas.resource.v1.Identifier id = 1 [(gorm.field).tag = {type: "integer" primary_key: true}]; string address_1 = 2; string address_2 = 3; string post = 4; - atlas.rpc.Identifier external = 5 [(gorm.field).tag = {type: "jsonb"}]; - atlas.rpc.Identifier implicit_fk = 6 [(gorm.field) = {reference_of: "Email" tag: {type: "text"} }]; + atlas.resource.v1.Identifier external = 5 [(gorm.field).tag = {type: "jsonb"}]; + atlas.resource.v1.Identifier implicit_fk = 6 [(gorm.field) = {reference_of: "Email" tag: {type: "text"} }]; } message Language { @@ -63,10 +63,10 @@ message Language { ormable: true, multi_account: true }; - atlas.rpc.Identifier id = 1 [(gorm.field).tag = {type: "integer" primary_key: true}]; + atlas.resource.v1.Identifier id = 1 [(gorm.field).tag = {type: "integer" primary_key: true}]; string name = 2; string code = 3; - atlas.rpc.Identifier external_int = 4 [(gorm.field).tag = {type: "integer"}]; + atlas.resource.v1.Identifier external_int = 4 [(gorm.field).tag = {type: "integer"}]; } message CreditCard { @@ -74,11 +74,11 @@ message CreditCard { ormable: true, multi_account: true }; - atlas.rpc.Identifier id = 1 [(gorm.field).tag = {type: "integer" primary_key: true}]; + atlas.resource.v1.Identifier id = 1 [(gorm.field).tag = {type: "integer" primary_key: true}]; google.protobuf.Timestamp created_at = 2; google.protobuf.Timestamp updated_at = 3; string number = 4; - atlas.rpc.Identifier user_id = 5; + atlas.resource.v1.Identifier user_id = 5; } message Task { diff --git a/go.mod b/go.mod index e8593e44..ecc64024 100644 --- a/go.mod +++ b/go.mod @@ -1,32 +1,23 @@ module github.com/infobloxopen/protoc-gen-gorm require ( - github.com/dgrijalva/jwt-go v0.0.0-20180719211823-0b96aaa70776 - github.com/ghodss/yaml v1.0.0 - github.com/gogo/protobuf v1.0.0 - github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b - github.com/golang/protobuf v1.3.2 - github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c - github.com/grpc-ecosystem/go-grpc-middleware v0.0.0-20180522105215-e9c5d9645c43 - github.com/grpc-ecosystem/grpc-gateway v1.4.1 - github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 - github.com/infobloxopen/atlas-app-toolkit v0.0.0-20180810144038-3237ef051031 - github.com/infobloxopen/go-trees v0.0.0-20180608122459-a1e500cde93c - github.com/infobloxopen/themis v0.0.0-20180709114455-d62bb103665c - github.com/jinzhu/gorm v1.9.1 - github.com/jinzhu/inflection v0.0.0-20180308033659-04140366298a - github.com/lib/pq v0.0.0-20180523175426-90697d60dd84 - github.com/opentracing/opentracing-go v1.0.2 + github.com/denisenkom/go-mssqldb v0.9.0 // indirect + github.com/gogo/protobuf v1.3.2 + github.com/golang/protobuf v1.5.2 + github.com/google/go-cmp v0.5.5 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.4.0 // indirect + github.com/infobloxopen/atlas-app-toolkit v0.24.1-0.20210416193901-4c7518b07e08 + github.com/jinzhu/gorm v1.9.16 + github.com/jinzhu/inflection v1.0.0 + github.com/jinzhu/now v1.1.1 // indirect + github.com/lib/pq v1.3.1-0.20200116171513-9eb3fc897d6f + github.com/mattn/go-sqlite3 v1.14.6 // indirect github.com/satori/go.uuid v1.2.0 - github.com/sirupsen/logrus v1.0.5 - go.opencensus.io v0.22.3 - golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 - golang.org/x/net v0.0.0-20190620200207-3b0461eec859 - golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd - golang.org/x/text v0.3.2 - google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb - google.golang.org/grpc v1.20.1 - gopkg.in/yaml.v2 v2.2.2 + go.opencensus.io v0.22.6 + google.golang.org/genproto v0.0.0-20210426193834-eac7f76ac494 + google.golang.org/grpc v1.37.0 + google.golang.org/grpc/examples v0.0.0-20210601155443-8bdcb4c9ab8d // indirect + google.golang.org/protobuf v1.26.0 ) -go 1.13 \ No newline at end of file +go 1.16 diff --git a/go.sum b/go.sum new file mode 100644 index 00000000..200693a9 --- /dev/null +++ b/go.sum @@ -0,0 +1,662 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0 h1:Dg9iHVQfrhq82rUNu9ZxUDrJLaxFUe/HlCVaLyRruq8= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +contrib.go.opencensus.io/exporter/ocagent v0.7.0/go.mod h1:IshRmMJBhDfFj5Y67nVhMYTTIze91RUeT73ipWKs/GY= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= +github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/bufbuild/buf v0.37.0/go.mod h1:lQ1m2HkIaGOFba6w/aC3KYBHhKEOESP3gaAEpS3dAFM= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= +github.com/denisenkom/go-mssqldb v0.9.0 h1:RSohk2RsiZqLZ0zCjtfn3S4Gp4exhpBWHyQ7D0yGjAk= +github.com/denisenkom/go-mssqldb v0.9.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgrijalva/jwt-go v3.2.1-0.20200107013213-dc14462fd587+incompatible h1:CiQ/hJK0Lsc/2Gm9uMSIe7cFE+h0sbTwHuTGQkIZpio= +github.com/dgrijalva/jwt-go v3.2.1-0.20200107013213-dc14462fd587+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5 h1:Yzb9+7DPaBjB8zlTR87/ElzFsnQfuHnVUVqpZZIcV5Y= +github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gofrs/flock v0.8.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY= +github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.2 h1:FlFbCRLd5Jr4iYXZufAvgWN6Ao0JrI5chLINnUXDDr0= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.14.6 h1:8ERzHx8aj1Sc47mu9n/AksaKCSWrMchFtkdrS4BIj5o= +github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.3.0/go.mod h1:d2gYTOTUQklu06xp0AJYYmRdTVU1VKrqhkYfYag2L08= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.4.0 h1:R+ZwHcCaBVMLvCQzo/lhJCYkjkL7G506oi2N8SIob/g= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.4.0/go.mod h1:IOyTYjcIO0rkmnGBfJTL0NJ11exy/Tc2QEuv7hCXp24= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/infobloxopen/atlas-app-toolkit v0.24.1-0.20210416193901-4c7518b07e08 h1:aFkVn3hlYTuz6JlVKOnTDTpOdQjIYBMwoAeiT8aXZeQ= +github.com/infobloxopen/atlas-app-toolkit v0.24.1-0.20210416193901-4c7518b07e08/go.mod h1:9BTHnpff654rY1J8KxSUOLJ+ZUDn2Vi3mmk26gQDo1M= +github.com/jhump/protoreflect v1.8.1/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= +github.com/jinzhu/gorm v1.9.16 h1:+IyIjPEABKRpsu/F8OvDPy9fyQlgsg2luMV2ZIH5i5o= +github.com/jinzhu/gorm v1.9.16/go.mod h1:G3LB3wezTOWM2ITLzPxEXgSkOXAntiLHS7UdBefADcs= +github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= +github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= +github.com/jinzhu/now v1.1.1 h1:g39TucaRWyV3dwDO++eEc6qf8TVIQ/Da48WmqjZ3i7E= +github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.3.1-0.20200116171513-9eb3fc897d6f h1:GeKe/1r/0LW8inPmRZi6zVInaZcFXiMzTnPyxITwQ8A= +github.com/lib/pq v1.3.1-0.20200116171513-9eb3fc897d6f/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/magefile/mage v1.10.0 h1:3HiXzCUY12kh9bIuyXShaVe529fJfyqoVM42o/uom2g= +github.com/magefile/mage v1.10.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus= +github.com/mattn/go-sqlite3 v1.14.6 h1:dNPt6NO46WmLVt2DLNpwczCmdV5boIZ6g/tlDrlRUbg= +github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.5.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= +github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.8.0 h1:nfhvjKcUMhBMVqbKHJlk5RPrrfYr/NMo3692g0dwfWU= +github.com/sirupsen/logrus v1.8.0/go.mod h1:4GuYW9TZmE769R5STWrRakJc4UqQ3+QQ95fyz7ENv1A= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v1.0.1-0.20201006035406-b97b5ead31f7/go.mod h1:yk5b0mALVusDL5fMM6Rd1wgnoO5jUPhwsQ6LQAJTidQ= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/twitchtv/twirp v7.1.0+incompatible/go.mod h1:RRJoFSAmTEh2weEqWtpPE3vFK5YBhA6bqp2l1kfCC5A= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.6 h1:BdkrbWrzDlV9dnbzoP7sfN+dHheJ4J9JOaYxcUDL+ok= +go.opencensus.io v0.22.6/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4 h1:b0LrWgu8+q7z4J+0Y3Umo5q1dL7NXBkKBWkaVkAq17E= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210427180440-81ed05c6b58c h1:SgVl/sCtkicsS7psKkje4H9YtjdEl3xsYh7N+5TDHqY= +golang.org/x/oauth2 v0.0.0-20210427180440-81ed05c6b58c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4 h1:EZ2mChiOa8udjfp6rRmswTbtZN/QzUQp4ptM4rnjHvc= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.25.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210207032614-bba0dbe2a9ea/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210224155714-063164c882e6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210426193834-eac7f76ac494 h1:KMgpo2lWy1vfrYjtxPAzR0aNWeAR1UdQykt6sj/hpBY= +google.golang.org/genproto v0.0.0-20210426193834-eac7f76ac494/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.35.0-dev.0.20201218190559-666aea1fb34c/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0 h1:uSZWeQJX5j11bIQ4AJoj+McDBo29cY1MCoC1wO3ts+c= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/grpc/examples v0.0.0-20210309220351-d5b628860d4e/go.mod h1:Ly7ZA/ARzg8fnPU9TyZIxoz33sEUuWX7txiqs8lPTgE= +google.golang.org/grpc/examples v0.0.0-20210601155443-8bdcb4c9ab8d h1:Gamb4cCAvTKjSItfDv7YHt3uuovkR4RpULoWELMxOy8= +google.golang.org/grpc/examples v0.0.0-20210601155443-8bdcb4c9ab8d/go.mod h1:bF8wuZSAZTcbF7ZPKrDI/qY52toTP/yxLpRRY4Eu9Js= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.25.1-0.20201208041424-160c7477e0e8/go.mod h1:hFxJC2f0epmp1elRCiEGJTKAWbwxZ2nvqZdHl3FQXCY= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/main.go b/main.go index 919be7c2..2468b0a7 100644 --- a/main.go +++ b/main.go @@ -1,13 +1,20 @@ package main import ( + "log" + "github.com/gogo/protobuf/vanity/command" "github.com/infobloxopen/protoc-gen-gorm/plugin" ) func main() { - plugin := &plugin.OrmPlugin{} - response := command.GeneratePlugin(command.Read(), plugin, ".pb.gorm.go") - plugin.CleanFiles(response) + op := &plugin.OrmPlugin{} + response := command.GeneratePlugin(command.Read(), op, ".pb.gorm.go") + op.CleanFiles(response) + + if len(response.String()) == 0 { + log.Printf("empty response") + } command.Write(response) + } diff --git a/options/gorm.pb.go b/options/gorm.pb.go index edb20fbb..b2573b2f 100644 --- a/options/gorm.pb.go +++ b/options/gorm.pb.go @@ -1,31 +1,14 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: options/gorm.proto -/* -Package gorm is a generated protocol buffer package. - -It is generated from these files: - options/gorm.proto - -It has these top-level messages: - GormFileOptions - GormMessageOptions - ExtraField - GormFieldOptions - GormTag - HasOneOptions - BelongsToOptions - HasManyOptions - ManyToManyOptions - AutoServerOptions - MethodOptions -*/ package gorm -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import google_protobuf "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + math "math" +) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -36,33 +19,75 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type GormFileOptions struct { - XXX_unrecognized []byte `json:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GormFileOptions) Reset() { *m = GormFileOptions{} } -func (m *GormFileOptions) String() string { return proto.CompactTextString(m) } -func (*GormFileOptions) ProtoMessage() {} -func (*GormFileOptions) Descriptor() ([]byte, []int) { return fileDescriptorGorm, []int{0} } +func (m *GormFileOptions) Reset() { *m = GormFileOptions{} } +func (m *GormFileOptions) String() string { return proto.CompactTextString(m) } +func (*GormFileOptions) ProtoMessage() {} +func (*GormFileOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_69675b971f61ce8f, []int{0} +} +func (m *GormFileOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GormFileOptions.Unmarshal(m, b) +} +func (m *GormFileOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GormFileOptions.Marshal(b, m, deterministic) +} +func (m *GormFileOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_GormFileOptions.Merge(m, src) +} +func (m *GormFileOptions) XXX_Size() int { + return xxx_messageInfo_GormFileOptions.Size(m) +} +func (m *GormFileOptions) XXX_DiscardUnknown() { + xxx_messageInfo_GormFileOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_GormFileOptions proto.InternalMessageInfo type GormMessageOptions struct { - Ormable *bool `protobuf:"varint,1,req,name=ormable" json:"ormable,omitempty"` - Include []*ExtraField `protobuf:"bytes,2,rep,name=include" json:"include,omitempty"` - Table *string `protobuf:"bytes,3,opt,name=table" json:"table,omitempty"` - MultiAccount *bool `protobuf:"varint,4,opt,name=multi_account,json=multiAccount" json:"multi_account,omitempty"` - XXX_unrecognized []byte `json:"-"` + Ormable bool `protobuf:"varint,1,opt,name=ormable,proto3" json:"ormable,omitempty"` + Include []*ExtraField `protobuf:"bytes,2,rep,name=include,proto3" json:"include,omitempty"` + Table string `protobuf:"bytes,3,opt,name=table,proto3" json:"table,omitempty"` + MultiAccount bool `protobuf:"varint,4,opt,name=multi_account,json=multiAccount,proto3" json:"multi_account,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GormMessageOptions) Reset() { *m = GormMessageOptions{} } -func (m *GormMessageOptions) String() string { return proto.CompactTextString(m) } -func (*GormMessageOptions) ProtoMessage() {} -func (*GormMessageOptions) Descriptor() ([]byte, []int) { return fileDescriptorGorm, []int{1} } +func (m *GormMessageOptions) Reset() { *m = GormMessageOptions{} } +func (m *GormMessageOptions) String() string { return proto.CompactTextString(m) } +func (*GormMessageOptions) ProtoMessage() {} +func (*GormMessageOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_69675b971f61ce8f, []int{1} +} +func (m *GormMessageOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GormMessageOptions.Unmarshal(m, b) +} +func (m *GormMessageOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GormMessageOptions.Marshal(b, m, deterministic) +} +func (m *GormMessageOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_GormMessageOptions.Merge(m, src) +} +func (m *GormMessageOptions) XXX_Size() int { + return xxx_messageInfo_GormMessageOptions.Size(m) +} +func (m *GormMessageOptions) XXX_DiscardUnknown() { + xxx_messageInfo_GormMessageOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_GormMessageOptions proto.InternalMessageInfo func (m *GormMessageOptions) GetOrmable() bool { - if m != nil && m.Ormable != nil { - return *m.Ormable + if m != nil { + return m.Ormable } return false } @@ -75,42 +100,63 @@ func (m *GormMessageOptions) GetInclude() []*ExtraField { } func (m *GormMessageOptions) GetTable() string { - if m != nil && m.Table != nil { - return *m.Table + if m != nil { + return m.Table } return "" } func (m *GormMessageOptions) GetMultiAccount() bool { - if m != nil && m.MultiAccount != nil { - return *m.MultiAccount + if m != nil { + return m.MultiAccount } return false } type ExtraField struct { - Type *string `protobuf:"bytes,1,req,name=type" json:"type,omitempty"` - Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"` - Tag *GormTag `protobuf:"bytes,3,opt,name=tag" json:"tag,omitempty"` - Package *string `protobuf:"bytes,4,opt,name=package" json:"package,omitempty"` - XXX_unrecognized []byte `json:"-"` + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Tag *GormTag `protobuf:"bytes,3,opt,name=tag,proto3" json:"tag,omitempty"` + Package string `protobuf:"bytes,4,opt,name=package,proto3" json:"package,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ExtraField) Reset() { *m = ExtraField{} } +func (m *ExtraField) String() string { return proto.CompactTextString(m) } +func (*ExtraField) ProtoMessage() {} +func (*ExtraField) Descriptor() ([]byte, []int) { + return fileDescriptor_69675b971f61ce8f, []int{2} +} +func (m *ExtraField) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ExtraField.Unmarshal(m, b) +} +func (m *ExtraField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ExtraField.Marshal(b, m, deterministic) +} +func (m *ExtraField) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExtraField.Merge(m, src) +} +func (m *ExtraField) XXX_Size() int { + return xxx_messageInfo_ExtraField.Size(m) +} +func (m *ExtraField) XXX_DiscardUnknown() { + xxx_messageInfo_ExtraField.DiscardUnknown(m) } -func (m *ExtraField) Reset() { *m = ExtraField{} } -func (m *ExtraField) String() string { return proto.CompactTextString(m) } -func (*ExtraField) ProtoMessage() {} -func (*ExtraField) Descriptor() ([]byte, []int) { return fileDescriptorGorm, []int{2} } +var xxx_messageInfo_ExtraField proto.InternalMessageInfo func (m *ExtraField) GetType() string { - if m != nil && m.Type != nil { - return *m.Type + if m != nil { + return m.Type } return "" } func (m *ExtraField) GetName() string { - if m != nil && m.Name != nil { - return *m.Name + if m != nil { + return m.Name } return "" } @@ -123,45 +169,66 @@ func (m *ExtraField) GetTag() *GormTag { } func (m *ExtraField) GetPackage() string { - if m != nil && m.Package != nil { - return *m.Package + if m != nil { + return m.Package } return "" } type GormFieldOptions struct { - Tag *GormTag `protobuf:"bytes,1,opt,name=tag" json:"tag,omitempty"` - Drop *bool `protobuf:"varint,2,opt,name=drop" json:"drop,omitempty"` + Tag *GormTag `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"` + Drop bool `protobuf:"varint,2,opt,name=drop,proto3" json:"drop,omitempty"` // Types that are valid to be assigned to Association: // *GormFieldOptions_HasOne // *GormFieldOptions_BelongsTo // *GormFieldOptions_HasMany // *GormFieldOptions_ManyToMany - Association isGormFieldOptions_Association `protobuf_oneof:"association"` - ReferenceOf *string `protobuf:"bytes,7,opt,name=reference_of,json=referenceOf" json:"reference_of,omitempty"` - XXX_unrecognized []byte `json:"-"` + Association isGormFieldOptions_Association `protobuf_oneof:"association"` + ReferenceOf string `protobuf:"bytes,7,opt,name=reference_of,json=referenceOf,proto3" json:"reference_of,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GormFieldOptions) Reset() { *m = GormFieldOptions{} } -func (m *GormFieldOptions) String() string { return proto.CompactTextString(m) } -func (*GormFieldOptions) ProtoMessage() {} -func (*GormFieldOptions) Descriptor() ([]byte, []int) { return fileDescriptorGorm, []int{3} } +func (m *GormFieldOptions) Reset() { *m = GormFieldOptions{} } +func (m *GormFieldOptions) String() string { return proto.CompactTextString(m) } +func (*GormFieldOptions) ProtoMessage() {} +func (*GormFieldOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_69675b971f61ce8f, []int{3} +} +func (m *GormFieldOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GormFieldOptions.Unmarshal(m, b) +} +func (m *GormFieldOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GormFieldOptions.Marshal(b, m, deterministic) +} +func (m *GormFieldOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_GormFieldOptions.Merge(m, src) +} +func (m *GormFieldOptions) XXX_Size() int { + return xxx_messageInfo_GormFieldOptions.Size(m) +} +func (m *GormFieldOptions) XXX_DiscardUnknown() { + xxx_messageInfo_GormFieldOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_GormFieldOptions proto.InternalMessageInfo type isGormFieldOptions_Association interface { isGormFieldOptions_Association() } type GormFieldOptions_HasOne struct { - HasOne *HasOneOptions `protobuf:"bytes,3,opt,name=has_one,json=hasOne,oneof"` + HasOne *HasOneOptions `protobuf:"bytes,3,opt,name=has_one,json=hasOne,proto3,oneof" json:"has_one,omitempty"` } type GormFieldOptions_BelongsTo struct { - BelongsTo *BelongsToOptions `protobuf:"bytes,4,opt,name=belongs_to,json=belongsTo,oneof"` + BelongsTo *BelongsToOptions `protobuf:"bytes,4,opt,name=belongs_to,json=belongsTo,proto3,oneof" json:"belongs_to,omitempty"` } type GormFieldOptions_HasMany struct { - HasMany *HasManyOptions `protobuf:"bytes,5,opt,name=has_many,json=hasMany,oneof"` + HasMany *HasManyOptions `protobuf:"bytes,5,opt,name=has_many,json=hasMany,proto3,oneof" json:"has_many,omitempty"` } type GormFieldOptions_ManyToMany struct { - ManyToMany *ManyToManyOptions `protobuf:"bytes,6,opt,name=many_to_many,json=manyToMany,oneof"` + ManyToMany *ManyToManyOptions `protobuf:"bytes,6,opt,name=many_to_many,json=manyToMany,proto3,oneof" json:"many_to_many,omitempty"` } func (*GormFieldOptions_HasOne) isGormFieldOptions_Association() {} @@ -184,8 +251,8 @@ func (m *GormFieldOptions) GetTag() *GormTag { } func (m *GormFieldOptions) GetDrop() bool { - if m != nil && m.Drop != nil { - return *m.Drop + if m != nil { + return m.Drop } return false } @@ -219,15 +286,15 @@ func (m *GormFieldOptions) GetManyToMany() *ManyToManyOptions { } func (m *GormFieldOptions) GetReferenceOf() string { - if m != nil && m.ReferenceOf != nil { - return *m.ReferenceOf + if m != nil { + return m.ReferenceOf } return "" } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*GormFieldOptions) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _GormFieldOptions_OneofMarshaler, _GormFieldOptions_OneofUnmarshaler, _GormFieldOptions_OneofSizer, []interface{}{ +// XXX_OneofWrappers is for the internal use of the proto package. +func (*GormFieldOptions) XXX_OneofWrappers() []interface{} { + return []interface{}{ (*GormFieldOptions_HasOne)(nil), (*GormFieldOptions_BelongsTo)(nil), (*GormFieldOptions_HasMany)(nil), @@ -235,323 +302,263 @@ func (*GormFieldOptions) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buff } } -func _GormFieldOptions_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*GormFieldOptions) - // association - switch x := m.Association.(type) { - case *GormFieldOptions_HasOne: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.HasOne); err != nil { - return err - } - case *GormFieldOptions_BelongsTo: - _ = b.EncodeVarint(4<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.BelongsTo); err != nil { - return err - } - case *GormFieldOptions_HasMany: - _ = b.EncodeVarint(5<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.HasMany); err != nil { - return err - } - case *GormFieldOptions_ManyToMany: - _ = b.EncodeVarint(6<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.ManyToMany); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("GormFieldOptions.Association has unexpected type %T", x) - } - return nil -} - -func _GormFieldOptions_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*GormFieldOptions) - switch tag { - case 3: // association.has_one - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(HasOneOptions) - err := b.DecodeMessage(msg) - m.Association = &GormFieldOptions_HasOne{msg} - return true, err - case 4: // association.belongs_to - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(BelongsToOptions) - err := b.DecodeMessage(msg) - m.Association = &GormFieldOptions_BelongsTo{msg} - return true, err - case 5: // association.has_many - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(HasManyOptions) - err := b.DecodeMessage(msg) - m.Association = &GormFieldOptions_HasMany{msg} - return true, err - case 6: // association.many_to_many - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(ManyToManyOptions) - err := b.DecodeMessage(msg) - m.Association = &GormFieldOptions_ManyToMany{msg} - return true, err - default: - return false, nil - } -} - -func _GormFieldOptions_OneofSizer(msg proto.Message) (n int) { - m := msg.(*GormFieldOptions) - // association - switch x := m.Association.(type) { - case *GormFieldOptions_HasOne: - s := proto.Size(x.HasOne) - n += proto.SizeVarint(3<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *GormFieldOptions_BelongsTo: - s := proto.Size(x.BelongsTo) - n += proto.SizeVarint(4<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *GormFieldOptions_HasMany: - s := proto.Size(x.HasMany) - n += proto.SizeVarint(5<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *GormFieldOptions_ManyToMany: - s := proto.Size(x.ManyToMany) - n += proto.SizeVarint(6<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - type GormTag struct { - Column *string `protobuf:"bytes,1,opt,name=column" json:"column,omitempty"` - Type *string `protobuf:"bytes,2,opt,name=type" json:"type,omitempty"` - Size_ *int32 `protobuf:"varint,3,opt,name=size" json:"size,omitempty"` - Precision *int32 `protobuf:"varint,4,opt,name=precision" json:"precision,omitempty"` - PrimaryKey *bool `protobuf:"varint,5,opt,name=primary_key,json=primaryKey" json:"primary_key,omitempty"` - Unique *bool `protobuf:"varint,6,opt,name=unique" json:"unique,omitempty"` - Default *string `protobuf:"bytes,7,opt,name=default" json:"default,omitempty"` - NotNull *bool `protobuf:"varint,8,opt,name=not_null,json=notNull" json:"not_null,omitempty"` - AutoIncrement *bool `protobuf:"varint,9,opt,name=auto_increment,json=autoIncrement" json:"auto_increment,omitempty"` - Index *string `protobuf:"bytes,10,opt,name=index" json:"index,omitempty"` - UniqueIndex *string `protobuf:"bytes,11,opt,name=unique_index,json=uniqueIndex" json:"unique_index,omitempty"` - Embedded *bool `protobuf:"varint,12,opt,name=embedded" json:"embedded,omitempty"` - EmbeddedPrefix *string `protobuf:"bytes,13,opt,name=embedded_prefix,json=embeddedPrefix" json:"embedded_prefix,omitempty"` - Ignore *bool `protobuf:"varint,14,opt,name=ignore" json:"ignore,omitempty"` - Foreignkey *string `protobuf:"bytes,15,opt,name=foreignkey" json:"foreignkey,omitempty"` - AssociationForeignkey *string `protobuf:"bytes,16,opt,name=association_foreignkey,json=associationForeignkey" json:"association_foreignkey,omitempty"` - ManyToMany *string `protobuf:"bytes,17,opt,name=many_to_many,json=manyToMany" json:"many_to_many,omitempty"` - JointableForeignkey *string `protobuf:"bytes,18,opt,name=jointable_foreignkey,json=jointableForeignkey" json:"jointable_foreignkey,omitempty"` - AssociationJointableForeignkey *string `protobuf:"bytes,19,opt,name=association_jointable_foreignkey,json=associationJointableForeignkey" json:"association_jointable_foreignkey,omitempty"` - AssociationAutoupdate *bool `protobuf:"varint,20,opt,name=association_autoupdate,json=associationAutoupdate" json:"association_autoupdate,omitempty"` - AssociationAutocreate *bool `protobuf:"varint,21,opt,name=association_autocreate,json=associationAutocreate" json:"association_autocreate,omitempty"` - AssociationSaveReference *bool `protobuf:"varint,22,opt,name=association_save_reference,json=associationSaveReference" json:"association_save_reference,omitempty"` - Preload *bool `protobuf:"varint,23,opt,name=preload" json:"preload,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GormTag) Reset() { *m = GormTag{} } -func (m *GormTag) String() string { return proto.CompactTextString(m) } -func (*GormTag) ProtoMessage() {} -func (*GormTag) Descriptor() ([]byte, []int) { return fileDescriptorGorm, []int{4} } + Column string `protobuf:"bytes,1,opt,name=column,proto3" json:"column,omitempty"` + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + Size_ int32 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` + Precision int32 `protobuf:"varint,4,opt,name=precision,proto3" json:"precision,omitempty"` + PrimaryKey bool `protobuf:"varint,5,opt,name=primary_key,json=primaryKey,proto3" json:"primary_key,omitempty"` + Unique bool `protobuf:"varint,6,opt,name=unique,proto3" json:"unique,omitempty"` + Default string `protobuf:"bytes,7,opt,name=default,proto3" json:"default,omitempty"` + NotNull bool `protobuf:"varint,8,opt,name=not_null,json=notNull,proto3" json:"not_null,omitempty"` + AutoIncrement bool `protobuf:"varint,9,opt,name=auto_increment,json=autoIncrement,proto3" json:"auto_increment,omitempty"` + Index string `protobuf:"bytes,10,opt,name=index,proto3" json:"index,omitempty"` + UniqueIndex string `protobuf:"bytes,11,opt,name=unique_index,json=uniqueIndex,proto3" json:"unique_index,omitempty"` + Embedded bool `protobuf:"varint,12,opt,name=embedded,proto3" json:"embedded,omitempty"` + EmbeddedPrefix string `protobuf:"bytes,13,opt,name=embedded_prefix,json=embeddedPrefix,proto3" json:"embedded_prefix,omitempty"` + Ignore bool `protobuf:"varint,14,opt,name=ignore,proto3" json:"ignore,omitempty"` + Foreignkey string `protobuf:"bytes,15,opt,name=foreignkey,proto3" json:"foreignkey,omitempty"` + AssociationForeignkey string `protobuf:"bytes,16,opt,name=association_foreignkey,json=associationForeignkey,proto3" json:"association_foreignkey,omitempty"` + ManyToMany string `protobuf:"bytes,17,opt,name=many_to_many,json=manyToMany,proto3" json:"many_to_many,omitempty"` + JointableForeignkey string `protobuf:"bytes,18,opt,name=jointable_foreignkey,json=jointableForeignkey,proto3" json:"jointable_foreignkey,omitempty"` + AssociationJointableForeignkey string `protobuf:"bytes,19,opt,name=association_jointable_foreignkey,json=associationJointableForeignkey,proto3" json:"association_jointable_foreignkey,omitempty"` + AssociationAutoupdate bool `protobuf:"varint,20,opt,name=association_autoupdate,json=associationAutoupdate,proto3" json:"association_autoupdate,omitempty"` + AssociationAutocreate bool `protobuf:"varint,21,opt,name=association_autocreate,json=associationAutocreate,proto3" json:"association_autocreate,omitempty"` + AssociationSaveReference bool `protobuf:"varint,22,opt,name=association_save_reference,json=associationSaveReference,proto3" json:"association_save_reference,omitempty"` + Preload bool `protobuf:"varint,23,opt,name=preload,proto3" json:"preload,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GormTag) Reset() { *m = GormTag{} } +func (m *GormTag) String() string { return proto.CompactTextString(m) } +func (*GormTag) ProtoMessage() {} +func (*GormTag) Descriptor() ([]byte, []int) { + return fileDescriptor_69675b971f61ce8f, []int{4} +} +func (m *GormTag) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GormTag.Unmarshal(m, b) +} +func (m *GormTag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GormTag.Marshal(b, m, deterministic) +} +func (m *GormTag) XXX_Merge(src proto.Message) { + xxx_messageInfo_GormTag.Merge(m, src) +} +func (m *GormTag) XXX_Size() int { + return xxx_messageInfo_GormTag.Size(m) +} +func (m *GormTag) XXX_DiscardUnknown() { + xxx_messageInfo_GormTag.DiscardUnknown(m) +} + +var xxx_messageInfo_GormTag proto.InternalMessageInfo func (m *GormTag) GetColumn() string { - if m != nil && m.Column != nil { - return *m.Column + if m != nil { + return m.Column } return "" } func (m *GormTag) GetType() string { - if m != nil && m.Type != nil { - return *m.Type + if m != nil { + return m.Type } return "" } func (m *GormTag) GetSize_() int32 { - if m != nil && m.Size_ != nil { - return *m.Size_ + if m != nil { + return m.Size_ } return 0 } func (m *GormTag) GetPrecision() int32 { - if m != nil && m.Precision != nil { - return *m.Precision + if m != nil { + return m.Precision } return 0 } func (m *GormTag) GetPrimaryKey() bool { - if m != nil && m.PrimaryKey != nil { - return *m.PrimaryKey + if m != nil { + return m.PrimaryKey } return false } func (m *GormTag) GetUnique() bool { - if m != nil && m.Unique != nil { - return *m.Unique + if m != nil { + return m.Unique } return false } func (m *GormTag) GetDefault() string { - if m != nil && m.Default != nil { - return *m.Default + if m != nil { + return m.Default } return "" } func (m *GormTag) GetNotNull() bool { - if m != nil && m.NotNull != nil { - return *m.NotNull + if m != nil { + return m.NotNull } return false } func (m *GormTag) GetAutoIncrement() bool { - if m != nil && m.AutoIncrement != nil { - return *m.AutoIncrement + if m != nil { + return m.AutoIncrement } return false } func (m *GormTag) GetIndex() string { - if m != nil && m.Index != nil { - return *m.Index + if m != nil { + return m.Index } return "" } func (m *GormTag) GetUniqueIndex() string { - if m != nil && m.UniqueIndex != nil { - return *m.UniqueIndex + if m != nil { + return m.UniqueIndex } return "" } func (m *GormTag) GetEmbedded() bool { - if m != nil && m.Embedded != nil { - return *m.Embedded + if m != nil { + return m.Embedded } return false } func (m *GormTag) GetEmbeddedPrefix() string { - if m != nil && m.EmbeddedPrefix != nil { - return *m.EmbeddedPrefix + if m != nil { + return m.EmbeddedPrefix } return "" } func (m *GormTag) GetIgnore() bool { - if m != nil && m.Ignore != nil { - return *m.Ignore + if m != nil { + return m.Ignore } return false } func (m *GormTag) GetForeignkey() string { - if m != nil && m.Foreignkey != nil { - return *m.Foreignkey + if m != nil { + return m.Foreignkey } return "" } func (m *GormTag) GetAssociationForeignkey() string { - if m != nil && m.AssociationForeignkey != nil { - return *m.AssociationForeignkey + if m != nil { + return m.AssociationForeignkey } return "" } func (m *GormTag) GetManyToMany() string { - if m != nil && m.ManyToMany != nil { - return *m.ManyToMany + if m != nil { + return m.ManyToMany } return "" } func (m *GormTag) GetJointableForeignkey() string { - if m != nil && m.JointableForeignkey != nil { - return *m.JointableForeignkey + if m != nil { + return m.JointableForeignkey } return "" } func (m *GormTag) GetAssociationJointableForeignkey() string { - if m != nil && m.AssociationJointableForeignkey != nil { - return *m.AssociationJointableForeignkey + if m != nil { + return m.AssociationJointableForeignkey } return "" } func (m *GormTag) GetAssociationAutoupdate() bool { - if m != nil && m.AssociationAutoupdate != nil { - return *m.AssociationAutoupdate + if m != nil { + return m.AssociationAutoupdate } return false } func (m *GormTag) GetAssociationAutocreate() bool { - if m != nil && m.AssociationAutocreate != nil { - return *m.AssociationAutocreate + if m != nil { + return m.AssociationAutocreate } return false } func (m *GormTag) GetAssociationSaveReference() bool { - if m != nil && m.AssociationSaveReference != nil { - return *m.AssociationSaveReference + if m != nil { + return m.AssociationSaveReference } return false } func (m *GormTag) GetPreload() bool { - if m != nil && m.Preload != nil { - return *m.Preload + if m != nil { + return m.Preload } return false } type HasOneOptions struct { - Foreignkey *string `protobuf:"bytes,1,opt,name=foreignkey" json:"foreignkey,omitempty"` - ForeignkeyTag *GormTag `protobuf:"bytes,2,opt,name=foreignkey_tag,json=foreignkeyTag" json:"foreignkey_tag,omitempty"` - AssociationForeignkey *string `protobuf:"bytes,3,opt,name=association_foreignkey,json=associationForeignkey" json:"association_foreignkey,omitempty"` - AssociationAutoupdate *bool `protobuf:"varint,4,opt,name=association_autoupdate,json=associationAutoupdate" json:"association_autoupdate,omitempty"` - AssociationAutocreate *bool `protobuf:"varint,5,opt,name=association_autocreate,json=associationAutocreate" json:"association_autocreate,omitempty"` - AssociationSaveReference *bool `protobuf:"varint,6,opt,name=association_save_reference,json=associationSaveReference" json:"association_save_reference,omitempty"` - Preload *bool `protobuf:"varint,7,opt,name=preload" json:"preload,omitempty"` - Replace *bool `protobuf:"varint,8,opt,name=replace" json:"replace,omitempty"` - Append *bool `protobuf:"varint,9,opt,name=append" json:"append,omitempty"` - Clear *bool `protobuf:"varint,10,opt,name=clear" json:"clear,omitempty"` + Foreignkey string `protobuf:"bytes,1,opt,name=foreignkey,proto3" json:"foreignkey,omitempty"` + ForeignkeyTag *GormTag `protobuf:"bytes,2,opt,name=foreignkey_tag,json=foreignkeyTag,proto3" json:"foreignkey_tag,omitempty"` + AssociationForeignkey string `protobuf:"bytes,3,opt,name=association_foreignkey,json=associationForeignkey,proto3" json:"association_foreignkey,omitempty"` + AssociationAutoupdate bool `protobuf:"varint,4,opt,name=association_autoupdate,json=associationAutoupdate,proto3" json:"association_autoupdate,omitempty"` + AssociationAutocreate bool `protobuf:"varint,5,opt,name=association_autocreate,json=associationAutocreate,proto3" json:"association_autocreate,omitempty"` + AssociationSaveReference bool `protobuf:"varint,6,opt,name=association_save_reference,json=associationSaveReference,proto3" json:"association_save_reference,omitempty"` + Preload bool `protobuf:"varint,7,opt,name=preload,proto3" json:"preload,omitempty"` + Replace bool `protobuf:"varint,8,opt,name=replace,proto3" json:"replace,omitempty"` + Append bool `protobuf:"varint,9,opt,name=append,proto3" json:"append,omitempty"` + Clear bool `protobuf:"varint,10,opt,name=clear,proto3" json:"clear,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HasOneOptions) Reset() { *m = HasOneOptions{} } +func (m *HasOneOptions) String() string { return proto.CompactTextString(m) } +func (*HasOneOptions) ProtoMessage() {} +func (*HasOneOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_69675b971f61ce8f, []int{5} +} +func (m *HasOneOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_HasOneOptions.Unmarshal(m, b) +} +func (m *HasOneOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_HasOneOptions.Marshal(b, m, deterministic) +} +func (m *HasOneOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_HasOneOptions.Merge(m, src) +} +func (m *HasOneOptions) XXX_Size() int { + return xxx_messageInfo_HasOneOptions.Size(m) +} +func (m *HasOneOptions) XXX_DiscardUnknown() { + xxx_messageInfo_HasOneOptions.DiscardUnknown(m) } -func (m *HasOneOptions) Reset() { *m = HasOneOptions{} } -func (m *HasOneOptions) String() string { return proto.CompactTextString(m) } -func (*HasOneOptions) ProtoMessage() {} -func (*HasOneOptions) Descriptor() ([]byte, []int) { return fileDescriptorGorm, []int{5} } +var xxx_messageInfo_HasOneOptions proto.InternalMessageInfo func (m *HasOneOptions) GetForeignkey() string { - if m != nil && m.Foreignkey != nil { - return *m.Foreignkey + if m != nil { + return m.Foreignkey } return "" } @@ -564,80 +571,101 @@ func (m *HasOneOptions) GetForeignkeyTag() *GormTag { } func (m *HasOneOptions) GetAssociationForeignkey() string { - if m != nil && m.AssociationForeignkey != nil { - return *m.AssociationForeignkey + if m != nil { + return m.AssociationForeignkey } return "" } func (m *HasOneOptions) GetAssociationAutoupdate() bool { - if m != nil && m.AssociationAutoupdate != nil { - return *m.AssociationAutoupdate + if m != nil { + return m.AssociationAutoupdate } return false } func (m *HasOneOptions) GetAssociationAutocreate() bool { - if m != nil && m.AssociationAutocreate != nil { - return *m.AssociationAutocreate + if m != nil { + return m.AssociationAutocreate } return false } func (m *HasOneOptions) GetAssociationSaveReference() bool { - if m != nil && m.AssociationSaveReference != nil { - return *m.AssociationSaveReference + if m != nil { + return m.AssociationSaveReference } return false } func (m *HasOneOptions) GetPreload() bool { - if m != nil && m.Preload != nil { - return *m.Preload + if m != nil { + return m.Preload } return false } func (m *HasOneOptions) GetReplace() bool { - if m != nil && m.Replace != nil { - return *m.Replace + if m != nil { + return m.Replace } return false } func (m *HasOneOptions) GetAppend() bool { - if m != nil && m.Append != nil { - return *m.Append + if m != nil { + return m.Append } return false } func (m *HasOneOptions) GetClear() bool { - if m != nil && m.Clear != nil { - return *m.Clear + if m != nil { + return m.Clear } return false } type BelongsToOptions struct { - Foreignkey *string `protobuf:"bytes,1,opt,name=foreignkey" json:"foreignkey,omitempty"` - ForeignkeyTag *GormTag `protobuf:"bytes,2,opt,name=foreignkey_tag,json=foreignkeyTag" json:"foreignkey_tag,omitempty"` - AssociationForeignkey *string `protobuf:"bytes,3,opt,name=association_foreignkey,json=associationForeignkey" json:"association_foreignkey,omitempty"` - AssociationAutoupdate *bool `protobuf:"varint,4,opt,name=association_autoupdate,json=associationAutoupdate" json:"association_autoupdate,omitempty"` - AssociationAutocreate *bool `protobuf:"varint,5,opt,name=association_autocreate,json=associationAutocreate" json:"association_autocreate,omitempty"` - AssociationSaveReference *bool `protobuf:"varint,6,opt,name=association_save_reference,json=associationSaveReference" json:"association_save_reference,omitempty"` - Preload *bool `protobuf:"varint,7,opt,name=preload" json:"preload,omitempty"` + Foreignkey string `protobuf:"bytes,1,opt,name=foreignkey,proto3" json:"foreignkey,omitempty"` + ForeignkeyTag *GormTag `protobuf:"bytes,2,opt,name=foreignkey_tag,json=foreignkeyTag,proto3" json:"foreignkey_tag,omitempty"` + AssociationForeignkey string `protobuf:"bytes,3,opt,name=association_foreignkey,json=associationForeignkey,proto3" json:"association_foreignkey,omitempty"` + AssociationAutoupdate bool `protobuf:"varint,4,opt,name=association_autoupdate,json=associationAutoupdate,proto3" json:"association_autoupdate,omitempty"` + AssociationAutocreate bool `protobuf:"varint,5,opt,name=association_autocreate,json=associationAutocreate,proto3" json:"association_autocreate,omitempty"` + AssociationSaveReference bool `protobuf:"varint,6,opt,name=association_save_reference,json=associationSaveReference,proto3" json:"association_save_reference,omitempty"` + Preload bool `protobuf:"varint,7,opt,name=preload,proto3" json:"preload,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *BelongsToOptions) Reset() { *m = BelongsToOptions{} } -func (m *BelongsToOptions) String() string { return proto.CompactTextString(m) } -func (*BelongsToOptions) ProtoMessage() {} -func (*BelongsToOptions) Descriptor() ([]byte, []int) { return fileDescriptorGorm, []int{6} } +func (m *BelongsToOptions) Reset() { *m = BelongsToOptions{} } +func (m *BelongsToOptions) String() string { return proto.CompactTextString(m) } +func (*BelongsToOptions) ProtoMessage() {} +func (*BelongsToOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_69675b971f61ce8f, []int{6} +} +func (m *BelongsToOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BelongsToOptions.Unmarshal(m, b) +} +func (m *BelongsToOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BelongsToOptions.Marshal(b, m, deterministic) +} +func (m *BelongsToOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_BelongsToOptions.Merge(m, src) +} +func (m *BelongsToOptions) XXX_Size() int { + return xxx_messageInfo_BelongsToOptions.Size(m) +} +func (m *BelongsToOptions) XXX_DiscardUnknown() { + xxx_messageInfo_BelongsToOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_BelongsToOptions proto.InternalMessageInfo func (m *BelongsToOptions) GetForeignkey() string { - if m != nil && m.Foreignkey != nil { - return *m.Foreignkey + if m != nil { + return m.Foreignkey } return "" } @@ -650,64 +678,85 @@ func (m *BelongsToOptions) GetForeignkeyTag() *GormTag { } func (m *BelongsToOptions) GetAssociationForeignkey() string { - if m != nil && m.AssociationForeignkey != nil { - return *m.AssociationForeignkey + if m != nil { + return m.AssociationForeignkey } return "" } func (m *BelongsToOptions) GetAssociationAutoupdate() bool { - if m != nil && m.AssociationAutoupdate != nil { - return *m.AssociationAutoupdate + if m != nil { + return m.AssociationAutoupdate } return false } func (m *BelongsToOptions) GetAssociationAutocreate() bool { - if m != nil && m.AssociationAutocreate != nil { - return *m.AssociationAutocreate + if m != nil { + return m.AssociationAutocreate } return false } func (m *BelongsToOptions) GetAssociationSaveReference() bool { - if m != nil && m.AssociationSaveReference != nil { - return *m.AssociationSaveReference + if m != nil { + return m.AssociationSaveReference } return false } func (m *BelongsToOptions) GetPreload() bool { - if m != nil && m.Preload != nil { - return *m.Preload + if m != nil { + return m.Preload } return false } type HasManyOptions struct { - Foreignkey *string `protobuf:"bytes,1,opt,name=foreignkey" json:"foreignkey,omitempty"` - ForeignkeyTag *GormTag `protobuf:"bytes,2,opt,name=foreignkey_tag,json=foreignkeyTag" json:"foreignkey_tag,omitempty"` - AssociationForeignkey *string `protobuf:"bytes,3,opt,name=association_foreignkey,json=associationForeignkey" json:"association_foreignkey,omitempty"` - PositionField *string `protobuf:"bytes,4,opt,name=position_field,json=positionField" json:"position_field,omitempty"` - PositionFieldTag *GormTag `protobuf:"bytes,5,opt,name=position_field_tag,json=positionFieldTag" json:"position_field_tag,omitempty"` - AssociationAutoupdate *bool `protobuf:"varint,6,opt,name=association_autoupdate,json=associationAutoupdate" json:"association_autoupdate,omitempty"` - AssociationAutocreate *bool `protobuf:"varint,7,opt,name=association_autocreate,json=associationAutocreate" json:"association_autocreate,omitempty"` - AssociationSaveReference *bool `protobuf:"varint,8,opt,name=association_save_reference,json=associationSaveReference" json:"association_save_reference,omitempty"` - Preload *bool `protobuf:"varint,9,opt,name=preload" json:"preload,omitempty"` - Replace *bool `protobuf:"varint,10,opt,name=replace" json:"replace,omitempty"` - Append *bool `protobuf:"varint,11,opt,name=append" json:"append,omitempty"` - Clear *bool `protobuf:"varint,12,opt,name=clear" json:"clear,omitempty"` + Foreignkey string `protobuf:"bytes,1,opt,name=foreignkey,proto3" json:"foreignkey,omitempty"` + ForeignkeyTag *GormTag `protobuf:"bytes,2,opt,name=foreignkey_tag,json=foreignkeyTag,proto3" json:"foreignkey_tag,omitempty"` + AssociationForeignkey string `protobuf:"bytes,3,opt,name=association_foreignkey,json=associationForeignkey,proto3" json:"association_foreignkey,omitempty"` + PositionField string `protobuf:"bytes,4,opt,name=position_field,json=positionField,proto3" json:"position_field,omitempty"` + PositionFieldTag *GormTag `protobuf:"bytes,5,opt,name=position_field_tag,json=positionFieldTag,proto3" json:"position_field_tag,omitempty"` + AssociationAutoupdate bool `protobuf:"varint,6,opt,name=association_autoupdate,json=associationAutoupdate,proto3" json:"association_autoupdate,omitempty"` + AssociationAutocreate bool `protobuf:"varint,7,opt,name=association_autocreate,json=associationAutocreate,proto3" json:"association_autocreate,omitempty"` + AssociationSaveReference bool `protobuf:"varint,8,opt,name=association_save_reference,json=associationSaveReference,proto3" json:"association_save_reference,omitempty"` + Preload bool `protobuf:"varint,9,opt,name=preload,proto3" json:"preload,omitempty"` + Replace bool `protobuf:"varint,10,opt,name=replace,proto3" json:"replace,omitempty"` + Append bool `protobuf:"varint,11,opt,name=append,proto3" json:"append,omitempty"` + Clear bool `protobuf:"varint,12,opt,name=clear,proto3" json:"clear,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *HasManyOptions) Reset() { *m = HasManyOptions{} } -func (m *HasManyOptions) String() string { return proto.CompactTextString(m) } -func (*HasManyOptions) ProtoMessage() {} -func (*HasManyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGorm, []int{7} } +func (m *HasManyOptions) Reset() { *m = HasManyOptions{} } +func (m *HasManyOptions) String() string { return proto.CompactTextString(m) } +func (*HasManyOptions) ProtoMessage() {} +func (*HasManyOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_69675b971f61ce8f, []int{7} +} +func (m *HasManyOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_HasManyOptions.Unmarshal(m, b) +} +func (m *HasManyOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_HasManyOptions.Marshal(b, m, deterministic) +} +func (m *HasManyOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_HasManyOptions.Merge(m, src) +} +func (m *HasManyOptions) XXX_Size() int { + return xxx_messageInfo_HasManyOptions.Size(m) +} +func (m *HasManyOptions) XXX_DiscardUnknown() { + xxx_messageInfo_HasManyOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_HasManyOptions proto.InternalMessageInfo func (m *HasManyOptions) GetForeignkey() string { - if m != nil && m.Foreignkey != nil { - return *m.Foreignkey + if m != nil { + return m.Foreignkey } return "" } @@ -720,15 +769,15 @@ func (m *HasManyOptions) GetForeignkeyTag() *GormTag { } func (m *HasManyOptions) GetAssociationForeignkey() string { - if m != nil && m.AssociationForeignkey != nil { - return *m.AssociationForeignkey + if m != nil { + return m.AssociationForeignkey } return "" } func (m *HasManyOptions) GetPositionField() string { - if m != nil && m.PositionField != nil { - return *m.PositionField + if m != nil { + return m.PositionField } return "" } @@ -741,220 +790,283 @@ func (m *HasManyOptions) GetPositionFieldTag() *GormTag { } func (m *HasManyOptions) GetAssociationAutoupdate() bool { - if m != nil && m.AssociationAutoupdate != nil { - return *m.AssociationAutoupdate + if m != nil { + return m.AssociationAutoupdate } return false } func (m *HasManyOptions) GetAssociationAutocreate() bool { - if m != nil && m.AssociationAutocreate != nil { - return *m.AssociationAutocreate + if m != nil { + return m.AssociationAutocreate } return false } func (m *HasManyOptions) GetAssociationSaveReference() bool { - if m != nil && m.AssociationSaveReference != nil { - return *m.AssociationSaveReference + if m != nil { + return m.AssociationSaveReference } return false } func (m *HasManyOptions) GetPreload() bool { - if m != nil && m.Preload != nil { - return *m.Preload + if m != nil { + return m.Preload } return false } func (m *HasManyOptions) GetReplace() bool { - if m != nil && m.Replace != nil { - return *m.Replace + if m != nil { + return m.Replace } return false } func (m *HasManyOptions) GetAppend() bool { - if m != nil && m.Append != nil { - return *m.Append + if m != nil { + return m.Append } return false } func (m *HasManyOptions) GetClear() bool { - if m != nil && m.Clear != nil { - return *m.Clear + if m != nil { + return m.Clear } return false } type ManyToManyOptions struct { - Jointable *string `protobuf:"bytes,1,opt,name=jointable" json:"jointable,omitempty"` - Foreignkey *string `protobuf:"bytes,2,opt,name=foreignkey" json:"foreignkey,omitempty"` - JointableForeignkey *string `protobuf:"bytes,3,opt,name=jointable_foreignkey,json=jointableForeignkey" json:"jointable_foreignkey,omitempty"` - AssociationForeignkey *string `protobuf:"bytes,4,opt,name=association_foreignkey,json=associationForeignkey" json:"association_foreignkey,omitempty"` - AssociationJointableForeignkey *string `protobuf:"bytes,5,opt,name=association_jointable_foreignkey,json=associationJointableForeignkey" json:"association_jointable_foreignkey,omitempty"` - AssociationAutoupdate *bool `protobuf:"varint,6,opt,name=association_autoupdate,json=associationAutoupdate" json:"association_autoupdate,omitempty"` - AssociationAutocreate *bool `protobuf:"varint,7,opt,name=association_autocreate,json=associationAutocreate" json:"association_autocreate,omitempty"` - AssociationSaveReference *bool `protobuf:"varint,8,opt,name=association_save_reference,json=associationSaveReference" json:"association_save_reference,omitempty"` - Preload *bool `protobuf:"varint,9,opt,name=preload" json:"preload,omitempty"` - Replace *bool `protobuf:"varint,10,opt,name=replace" json:"replace,omitempty"` - Append *bool `protobuf:"varint,11,opt,name=append" json:"append,omitempty"` - Clear *bool `protobuf:"varint,13,opt,name=clear" json:"clear,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *ManyToManyOptions) Reset() { *m = ManyToManyOptions{} } -func (m *ManyToManyOptions) String() string { return proto.CompactTextString(m) } -func (*ManyToManyOptions) ProtoMessage() {} -func (*ManyToManyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGorm, []int{8} } + Jointable string `protobuf:"bytes,1,opt,name=jointable,proto3" json:"jointable,omitempty"` + Foreignkey string `protobuf:"bytes,2,opt,name=foreignkey,proto3" json:"foreignkey,omitempty"` + JointableForeignkey string `protobuf:"bytes,3,opt,name=jointable_foreignkey,json=jointableForeignkey,proto3" json:"jointable_foreignkey,omitempty"` + AssociationForeignkey string `protobuf:"bytes,4,opt,name=association_foreignkey,json=associationForeignkey,proto3" json:"association_foreignkey,omitempty"` + AssociationJointableForeignkey string `protobuf:"bytes,5,opt,name=association_jointable_foreignkey,json=associationJointableForeignkey,proto3" json:"association_jointable_foreignkey,omitempty"` + AssociationAutoupdate bool `protobuf:"varint,6,opt,name=association_autoupdate,json=associationAutoupdate,proto3" json:"association_autoupdate,omitempty"` + AssociationAutocreate bool `protobuf:"varint,7,opt,name=association_autocreate,json=associationAutocreate,proto3" json:"association_autocreate,omitempty"` + AssociationSaveReference bool `protobuf:"varint,8,opt,name=association_save_reference,json=associationSaveReference,proto3" json:"association_save_reference,omitempty"` + Preload bool `protobuf:"varint,9,opt,name=preload,proto3" json:"preload,omitempty"` + Replace bool `protobuf:"varint,10,opt,name=replace,proto3" json:"replace,omitempty"` + Append bool `protobuf:"varint,11,opt,name=append,proto3" json:"append,omitempty"` + Clear bool `protobuf:"varint,13,opt,name=clear,proto3" json:"clear,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ManyToManyOptions) Reset() { *m = ManyToManyOptions{} } +func (m *ManyToManyOptions) String() string { return proto.CompactTextString(m) } +func (*ManyToManyOptions) ProtoMessage() {} +func (*ManyToManyOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_69675b971f61ce8f, []int{8} +} +func (m *ManyToManyOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ManyToManyOptions.Unmarshal(m, b) +} +func (m *ManyToManyOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ManyToManyOptions.Marshal(b, m, deterministic) +} +func (m *ManyToManyOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_ManyToManyOptions.Merge(m, src) +} +func (m *ManyToManyOptions) XXX_Size() int { + return xxx_messageInfo_ManyToManyOptions.Size(m) +} +func (m *ManyToManyOptions) XXX_DiscardUnknown() { + xxx_messageInfo_ManyToManyOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_ManyToManyOptions proto.InternalMessageInfo func (m *ManyToManyOptions) GetJointable() string { - if m != nil && m.Jointable != nil { - return *m.Jointable + if m != nil { + return m.Jointable } return "" } func (m *ManyToManyOptions) GetForeignkey() string { - if m != nil && m.Foreignkey != nil { - return *m.Foreignkey + if m != nil { + return m.Foreignkey } return "" } func (m *ManyToManyOptions) GetJointableForeignkey() string { - if m != nil && m.JointableForeignkey != nil { - return *m.JointableForeignkey + if m != nil { + return m.JointableForeignkey } return "" } func (m *ManyToManyOptions) GetAssociationForeignkey() string { - if m != nil && m.AssociationForeignkey != nil { - return *m.AssociationForeignkey + if m != nil { + return m.AssociationForeignkey } return "" } func (m *ManyToManyOptions) GetAssociationJointableForeignkey() string { - if m != nil && m.AssociationJointableForeignkey != nil { - return *m.AssociationJointableForeignkey + if m != nil { + return m.AssociationJointableForeignkey } return "" } func (m *ManyToManyOptions) GetAssociationAutoupdate() bool { - if m != nil && m.AssociationAutoupdate != nil { - return *m.AssociationAutoupdate + if m != nil { + return m.AssociationAutoupdate } return false } func (m *ManyToManyOptions) GetAssociationAutocreate() bool { - if m != nil && m.AssociationAutocreate != nil { - return *m.AssociationAutocreate + if m != nil { + return m.AssociationAutocreate } return false } func (m *ManyToManyOptions) GetAssociationSaveReference() bool { - if m != nil && m.AssociationSaveReference != nil { - return *m.AssociationSaveReference + if m != nil { + return m.AssociationSaveReference } return false } func (m *ManyToManyOptions) GetPreload() bool { - if m != nil && m.Preload != nil { - return *m.Preload + if m != nil { + return m.Preload } return false } func (m *ManyToManyOptions) GetReplace() bool { - if m != nil && m.Replace != nil { - return *m.Replace + if m != nil { + return m.Replace } return false } func (m *ManyToManyOptions) GetAppend() bool { - if m != nil && m.Append != nil { - return *m.Append + if m != nil { + return m.Append } return false } func (m *ManyToManyOptions) GetClear() bool { - if m != nil && m.Clear != nil { - return *m.Clear + if m != nil { + return m.Clear } return false } type AutoServerOptions struct { - Autogen *bool `protobuf:"varint,1,opt,name=autogen" json:"autogen,omitempty"` - TxnMiddleware *bool `protobuf:"varint,2,opt,name=txn_middleware,json=txnMiddleware" json:"txn_middleware,omitempty"` - WithTracing *bool `protobuf:"varint,3,opt,name=with_tracing,json=withTracing" json:"with_tracing,omitempty"` - XXX_unrecognized []byte `json:"-"` + Autogen bool `protobuf:"varint,1,opt,name=autogen,proto3" json:"autogen,omitempty"` + TxnMiddleware bool `protobuf:"varint,2,opt,name=txn_middleware,json=txnMiddleware,proto3" json:"txn_middleware,omitempty"` + WithTracing bool `protobuf:"varint,3,opt,name=with_tracing,json=withTracing,proto3" json:"with_tracing,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *AutoServerOptions) Reset() { *m = AutoServerOptions{} } -func (m *AutoServerOptions) String() string { return proto.CompactTextString(m) } -func (*AutoServerOptions) ProtoMessage() {} -func (*AutoServerOptions) Descriptor() ([]byte, []int) { return fileDescriptorGorm, []int{9} } +func (m *AutoServerOptions) Reset() { *m = AutoServerOptions{} } +func (m *AutoServerOptions) String() string { return proto.CompactTextString(m) } +func (*AutoServerOptions) ProtoMessage() {} +func (*AutoServerOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_69675b971f61ce8f, []int{9} +} +func (m *AutoServerOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AutoServerOptions.Unmarshal(m, b) +} +func (m *AutoServerOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AutoServerOptions.Marshal(b, m, deterministic) +} +func (m *AutoServerOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_AutoServerOptions.Merge(m, src) +} +func (m *AutoServerOptions) XXX_Size() int { + return xxx_messageInfo_AutoServerOptions.Size(m) +} +func (m *AutoServerOptions) XXX_DiscardUnknown() { + xxx_messageInfo_AutoServerOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_AutoServerOptions proto.InternalMessageInfo func (m *AutoServerOptions) GetAutogen() bool { - if m != nil && m.Autogen != nil { - return *m.Autogen + if m != nil { + return m.Autogen } return false } func (m *AutoServerOptions) GetTxnMiddleware() bool { - if m != nil && m.TxnMiddleware != nil { - return *m.TxnMiddleware + if m != nil { + return m.TxnMiddleware } return false } func (m *AutoServerOptions) GetWithTracing() bool { - if m != nil && m.WithTracing != nil { - return *m.WithTracing + if m != nil { + return m.WithTracing } return false } type MethodOptions struct { - ObjectType *string `protobuf:"bytes,1,opt,name=object_type,json=objectType" json:"object_type,omitempty"` - XXX_unrecognized []byte `json:"-"` + ObjectType string `protobuf:"bytes,1,opt,name=object_type,json=objectType,proto3" json:"object_type,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *MethodOptions) Reset() { *m = MethodOptions{} } -func (m *MethodOptions) String() string { return proto.CompactTextString(m) } -func (*MethodOptions) ProtoMessage() {} -func (*MethodOptions) Descriptor() ([]byte, []int) { return fileDescriptorGorm, []int{10} } +func (m *MethodOptions) Reset() { *m = MethodOptions{} } +func (m *MethodOptions) String() string { return proto.CompactTextString(m) } +func (*MethodOptions) ProtoMessage() {} +func (*MethodOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_69675b971f61ce8f, []int{10} +} +func (m *MethodOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MethodOptions.Unmarshal(m, b) +} +func (m *MethodOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MethodOptions.Marshal(b, m, deterministic) +} +func (m *MethodOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_MethodOptions.Merge(m, src) +} +func (m *MethodOptions) XXX_Size() int { + return xxx_messageInfo_MethodOptions.Size(m) +} +func (m *MethodOptions) XXX_DiscardUnknown() { + xxx_messageInfo_MethodOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_MethodOptions proto.InternalMessageInfo func (m *MethodOptions) GetObjectType() string { - if m != nil && m.ObjectType != nil { - return *m.ObjectType + if m != nil { + return m.ObjectType } return "" } var E_FileOpts = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*GormFileOptions)(nil), Field: 52119, Name: "gorm.file_opts", - Tag: "bytes,52119,opt,name=file_opts,json=fileOpts", + Tag: "bytes,52119,opt,name=file_opts", Filename: "options/gorm.proto", } var E_Opts = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*GormMessageOptions)(nil), Field: 52119, Name: "gorm.opts", @@ -963,7 +1075,7 @@ var E_Opts = &proto.ExtensionDesc{ } var E_Field = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtendedType: (*descriptor.FieldOptions)(nil), ExtensionType: (*GormFieldOptions)(nil), Field: 52119, Name: "gorm.field", @@ -972,7 +1084,7 @@ var E_Field = &proto.ExtensionDesc{ } var E_Server = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.ServiceOptions)(nil), + ExtendedType: (*descriptor.ServiceOptions)(nil), ExtensionType: (*AutoServerOptions)(nil), Field: 52119, Name: "gorm.server", @@ -981,7 +1093,7 @@ var E_Server = &proto.ExtensionDesc{ } var E_Method = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MethodOptions)(nil), + ExtendedType: (*descriptor.MethodOptions)(nil), ExtensionType: (*MethodOptions)(nil), Field: 52119, Name: "gorm.method", @@ -1008,86 +1120,85 @@ func init() { proto.RegisterExtension(E_Method) } -func init() { proto.RegisterFile("options/gorm.proto", fileDescriptorGorm) } - -var fileDescriptorGorm = []byte{ - // 1233 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0xdd, 0x6e, 0xdc, 0x44, - 0x14, 0x26, 0x9b, 0xfd, 0xf1, 0x9e, 0xcd, 0xa6, 0xc9, 0x34, 0x4d, 0x4d, 0x55, 0xda, 0x65, 0x51, - 0x45, 0x84, 0xd4, 0x0d, 0xad, 0x0a, 0x48, 0x29, 0x37, 0xad, 0x44, 0x69, 0x41, 0x21, 0x68, 0x9a, - 0x2b, 0x6e, 0xac, 0x59, 0xfb, 0xac, 0x33, 0xad, 0x3d, 0x63, 0xc6, 0xe3, 0x36, 0xe1, 0x25, 0xb8, - 0x40, 0xa8, 0xef, 0xc0, 0xc3, 0x70, 0xc1, 0x3b, 0xf0, 0x1e, 0x68, 0x66, 0x6c, 0xaf, 0x37, 0xd9, - 0xad, 0xaa, 0xc0, 0x05, 0x12, 0xdc, 0xf9, 0x7c, 0x73, 0xce, 0xe7, 0x33, 0xe7, 0x67, 0x66, 0x0e, - 0x10, 0x99, 0x69, 0x2e, 0x45, 0xbe, 0x1f, 0x4b, 0x95, 0x4e, 0x32, 0x25, 0xb5, 0x24, 0x6d, 0xf3, - 0x7d, 0x63, 0x14, 0x4b, 0x19, 0x27, 0xb8, 0x6f, 0xb1, 0x69, 0x31, 0xdb, 0x8f, 0x30, 0x0f, 0x15, - 0xcf, 0xb4, 0x54, 0x4e, 0x6f, 0xbc, 0x0d, 0x57, 0xbe, 0x96, 0x2a, 0x7d, 0xc2, 0x13, 0x3c, 0x72, - 0x2c, 0xe3, 0x5f, 0xd7, 0x80, 0x18, 0xec, 0x10, 0xf3, 0x9c, 0xc5, 0x15, 0x4c, 0x7c, 0xe8, 0x49, - 0x95, 0xb2, 0x69, 0x82, 0xfe, 0xda, 0xa8, 0xb5, 0xe7, 0xd1, 0x4a, 0x24, 0x9f, 0x40, 0x8f, 0x8b, - 0x30, 0x29, 0x22, 0xf4, 0x5b, 0xa3, 0xf5, 0xbd, 0xc1, 0xfd, 0xad, 0x89, 0xf5, 0xe4, 0xab, 0x53, - 0xad, 0xd8, 0x13, 0x8e, 0x49, 0x44, 0x2b, 0x05, 0xb2, 0x03, 0x1d, 0x6d, 0x39, 0xd6, 0x47, 0x6b, - 0x7b, 0x7d, 0xea, 0x04, 0xf2, 0x11, 0x0c, 0xd3, 0x22, 0xd1, 0x3c, 0x60, 0x61, 0x28, 0x0b, 0xa1, - 0xfd, 0xf6, 0x68, 0x6d, 0xcf, 0xa3, 0x1b, 0x16, 0x7c, 0xe4, 0xb0, 0xb1, 0x04, 0x98, 0x33, 0x12, - 0x02, 0x6d, 0x7d, 0x96, 0x39, 0x5f, 0xfa, 0xd4, 0x7e, 0x1b, 0x4c, 0xb0, 0xd4, 0x78, 0x61, 0x31, - 0xf3, 0x4d, 0x6e, 0xc3, 0xba, 0x66, 0xb1, 0xfd, 0xdd, 0xe0, 0xfe, 0xd0, 0x39, 0x66, 0x76, 0x77, - 0xcc, 0x62, 0x6a, 0x56, 0xcc, 0xbe, 0x32, 0x16, 0xbe, 0x64, 0x31, 0xda, 0xbf, 0xf6, 0x69, 0x25, - 0x8e, 0xff, 0x68, 0xc1, 0x96, 0x0b, 0x0e, 0x26, 0x51, 0x15, 0x86, 0x92, 0x6f, 0x6d, 0x25, 0x1f, - 0x81, 0x76, 0xa4, 0x64, 0xe6, 0xb7, 0xec, 0x16, 0xec, 0x37, 0x99, 0x40, 0xef, 0x84, 0xe5, 0x81, - 0x14, 0x58, 0x3a, 0x72, 0xd5, 0x19, 0x3e, 0x65, 0xf9, 0x91, 0xa8, 0x22, 0xfc, 0xf4, 0x3d, 0xda, - 0x3d, 0xb1, 0x00, 0xf9, 0x02, 0x60, 0x8a, 0x89, 0x14, 0x71, 0x1e, 0x68, 0x69, 0xdd, 0x1a, 0xdc, - 0xdf, 0x75, 0x26, 0x8f, 0x1d, 0x7e, 0x2c, 0xe7, 0x56, 0xfd, 0x69, 0x85, 0x91, 0x7b, 0xe0, 0x99, - 0x1f, 0xa5, 0x4c, 0x9c, 0xf9, 0x1d, 0x6b, 0xb6, 0x53, 0xff, 0xe9, 0x90, 0x89, 0xb3, 0xb9, 0x91, - 0x71, 0xc8, 0x20, 0xe4, 0x21, 0x6c, 0x18, 0xf5, 0x40, 0x4b, 0x67, 0xd6, 0xb5, 0x66, 0xd7, 0x9d, - 0x99, 0xd1, 0x38, 0x96, 0x8b, 0x96, 0x90, 0xd6, 0x20, 0xf9, 0x10, 0x36, 0x14, 0xce, 0x50, 0xa1, - 0x08, 0x31, 0x90, 0x33, 0xbf, 0x67, 0x23, 0x38, 0xa8, 0xb1, 0xa3, 0xd9, 0xe3, 0x21, 0x0c, 0x58, - 0x9e, 0xcb, 0x90, 0x33, 0x43, 0x30, 0xfe, 0xbd, 0x0b, 0xbd, 0x32, 0x5e, 0x64, 0x17, 0xba, 0xa1, - 0x4c, 0x8a, 0x54, 0xd8, 0x70, 0xf6, 0x69, 0x29, 0xd5, 0xb9, 0x6d, 0x59, 0xb4, 0xce, 0x6d, 0xce, - 0x7f, 0x72, 0xf1, 0xeb, 0x50, 0xfb, 0x4d, 0x6e, 0x42, 0x3f, 0x53, 0x18, 0xf2, 0x9c, 0x4b, 0x61, - 0xa3, 0xd4, 0xa1, 0x73, 0x80, 0xdc, 0x86, 0x41, 0xa6, 0x78, 0xca, 0xd4, 0x59, 0xf0, 0x12, 0x5d, - 0x38, 0x3c, 0x0a, 0x25, 0xf4, 0x2d, 0x9e, 0x99, 0xdf, 0x17, 0x82, 0xff, 0x58, 0xa0, 0xdd, 0xb3, - 0x47, 0x4b, 0xc9, 0x54, 0x44, 0x84, 0x33, 0x56, 0x24, 0xba, 0xdc, 0x4f, 0x25, 0x92, 0xf7, 0xc1, - 0x13, 0x52, 0x07, 0xa2, 0x48, 0x12, 0xdf, 0xb3, 0x36, 0x3d, 0x21, 0xf5, 0x77, 0x45, 0x92, 0x90, - 0x3b, 0xb0, 0xc9, 0x0a, 0x2d, 0x03, 0x2e, 0x42, 0x85, 0x29, 0x0a, 0xed, 0xf7, 0xad, 0xc2, 0xd0, - 0xa0, 0xcf, 0x2a, 0xd0, 0xd4, 0x3f, 0x17, 0x11, 0x9e, 0xfa, 0xe0, 0xea, 0xdf, 0x0a, 0x26, 0x8c, - 0xee, 0xdf, 0x81, 0x5b, 0x1c, 0xb8, 0x30, 0x3a, 0xec, 0x99, 0x55, 0xb9, 0x01, 0x1e, 0xa6, 0x53, - 0x8c, 0x22, 0x8c, 0xfc, 0x0d, 0xcb, 0x5c, 0xcb, 0xe4, 0x63, 0xb8, 0x52, 0x7d, 0x07, 0x99, 0xc2, - 0x19, 0x3f, 0xf5, 0x87, 0x96, 0x61, 0xb3, 0x82, 0xbf, 0xb7, 0xa8, 0xd9, 0x31, 0x8f, 0x85, 0x54, - 0xe8, 0x6f, 0xba, 0x1d, 0x3b, 0x89, 0xdc, 0x02, 0x98, 0x49, 0x85, 0x3c, 0x16, 0x26, 0x52, 0x57, - 0xac, 0x6d, 0x03, 0x21, 0x9f, 0xc1, 0x6e, 0x23, 0x87, 0x41, 0x43, 0x77, 0xcb, 0xea, 0x5e, 0x6b, - 0xac, 0x3e, 0x99, 0x9b, 0x8d, 0xce, 0x95, 0xd6, 0xb6, 0x23, 0x6e, 0xd4, 0xcf, 0x3d, 0xd8, 0x79, - 0x21, 0xb9, 0xb0, 0xa7, 0x40, 0x93, 0x96, 0x58, 0xcd, 0xab, 0xf5, 0x5a, 0x83, 0xf4, 0x29, 0x8c, - 0x9a, 0xbe, 0x2c, 0x35, 0xbf, 0x6a, 0xcd, 0x6f, 0x35, 0xf4, 0xbe, 0x59, 0xc2, 0x74, 0x6e, 0x57, - 0x26, 0x51, 0x45, 0x16, 0x31, 0x8d, 0xfe, 0x8e, 0x8d, 0x4e, 0x73, 0x57, 0x8f, 0xea, 0xc5, 0x65, - 0x66, 0xa1, 0x42, 0x63, 0x76, 0x6d, 0xa9, 0x99, 0x5b, 0x24, 0x5f, 0xc2, 0x8d, 0xa6, 0x59, 0xce, - 0x5e, 0x61, 0x50, 0xf7, 0x89, 0xbf, 0x6b, 0x4d, 0xfd, 0x86, 0xc6, 0x73, 0xf6, 0x0a, 0x69, 0xb5, - 0x6e, 0x4f, 0x29, 0x85, 0x89, 0x64, 0x91, 0x7f, 0xdd, 0x15, 0x5e, 0x29, 0x8e, 0x7f, 0x5b, 0x87, - 0xe1, 0xc2, 0x39, 0x72, 0x2e, 0x9b, 0x6b, 0x17, 0xb2, 0xf9, 0x00, 0x36, 0xe7, 0x52, 0x60, 0x4e, - 0xb3, 0xd6, 0xb2, 0xd3, 0x6c, 0x38, 0x57, 0x32, 0xcd, 0xba, 0xba, 0x06, 0xd6, 0xdf, 0x56, 0x03, - 0xab, 0x83, 0xdc, 0xbe, 0x5c, 0x90, 0x3b, 0x97, 0x0f, 0x72, 0xf7, 0xdd, 0x83, 0xdc, 0x5b, 0x08, - 0xb2, 0x59, 0x51, 0x98, 0x25, 0x2c, 0xc4, 0xaa, 0xef, 0x4b, 0xd1, 0xb4, 0x14, 0xcb, 0x32, 0x14, - 0x51, 0xd9, 0xef, 0xa5, 0x64, 0x1a, 0x3d, 0x4c, 0x90, 0x29, 0xdb, 0xe8, 0x1e, 0x75, 0xc2, 0xf8, - 0xcf, 0x16, 0x6c, 0x9d, 0x3f, 0xc1, 0xff, 0xcf, 0xd7, 0x3f, 0x9e, 0xaf, 0xf1, 0xcf, 0x6d, 0xd8, - 0x5c, 0xbc, 0xf2, 0xfe, 0x5d, 0x51, 0xbe, 0x03, 0x9b, 0x99, 0xcc, 0xb9, 0xb3, 0x31, 0xcf, 0x8b, - 0xf2, 0xed, 0x31, 0xac, 0x50, 0xf7, 0xc8, 0x79, 0x08, 0x64, 0x51, 0xcd, 0xfa, 0xd5, 0x59, 0xe6, - 0xd7, 0xd6, 0x82, 0xe5, 0x12, 0xd7, 0x1a, 0x99, 0xec, 0x5e, 0x2e, 0x93, 0xbd, 0xcb, 0x67, 0xd2, - 0x7b, 0xf7, 0x4c, 0xf6, 0x57, 0x76, 0x1e, 0xac, 0xea, 0xbc, 0xc1, 0xf2, 0xce, 0xdb, 0x68, 0x76, - 0xde, 0x2f, 0x6d, 0xd8, 0xbe, 0xf0, 0x9a, 0x31, 0x2f, 0x88, 0xfa, 0x02, 0x29, 0x6b, 0x62, 0x0e, - 0x9c, 0x2b, 0x99, 0xd6, 0x85, 0x92, 0x59, 0x75, 0x7b, 0xad, 0xaf, 0xbe, 0xbd, 0x56, 0xd7, 0x4b, - 0xfb, 0x6d, 0xf5, 0xf2, 0x2e, 0x97, 0x5e, 0xe7, 0x6f, 0x5e, 0x7a, 0xff, 0x91, 0xaa, 0x18, 0x36, - 0xab, 0xe2, 0x35, 0x6c, 0x1b, 0x6f, 0x9f, 0xa3, 0x7a, 0x85, 0xaa, 0x31, 0xe9, 0x98, 0xfd, 0xc5, - 0xe8, 0xde, 0xa5, 0x1e, 0xad, 0x44, 0xd3, 0xb6, 0xfa, 0x54, 0x04, 0x29, 0x8f, 0xa2, 0x04, 0x5f, - 0x33, 0x85, 0xe5, 0x2b, 0x7f, 0xa8, 0x4f, 0xc5, 0x61, 0x0d, 0x9a, 0xe7, 0xdc, 0x6b, 0xae, 0x4f, - 0x02, 0xad, 0x58, 0xc8, 0x85, 0x1b, 0x3e, 0x3c, 0x3a, 0x30, 0xd8, 0xb1, 0x83, 0xc6, 0x9f, 0xc2, - 0xf0, 0x10, 0xf5, 0x89, 0x6c, 0xcc, 0x15, 0x03, 0x39, 0x7d, 0x81, 0xa1, 0x0e, 0xca, 0xb1, 0xc6, - 0x16, 0x9b, 0x83, 0x8e, 0xcf, 0x32, 0x3c, 0xa0, 0xd0, 0x9f, 0xf1, 0x04, 0x03, 0x99, 0xe9, 0x9c, - 0xdc, 0x9c, 0xb8, 0xc9, 0x6e, 0x52, 0x4d, 0x76, 0x93, 0xc6, 0x04, 0xe7, 0xbf, 0x79, 0xe3, 0xa6, - 0x8c, 0x6b, 0xf3, 0x23, 0xa2, 0xb1, 0x4c, 0xbd, 0x99, 0x13, 0xf2, 0x83, 0x23, 0x68, 0x5b, 0xba, - 0xdb, 0x17, 0xe8, 0x16, 0x87, 0xbf, 0x9a, 0xd1, 0x9f, 0x33, 0x2e, 0x6a, 0x50, 0x4b, 0x74, 0x70, - 0x08, 0x1d, 0x7b, 0x4e, 0x91, 0x0f, 0x96, 0x38, 0x38, 0x9f, 0xa2, 0x6a, 0xbe, 0xdd, 0xa6, 0x87, - 0xf3, 0x75, 0xea, 0x58, 0x0e, 0x28, 0x74, 0x73, 0x9b, 0x9a, 0x25, 0x1e, 0x9a, 0x9c, 0xf1, 0xf0, - 0x82, 0x87, 0xe5, 0xe0, 0x72, 0x21, 0xab, 0xb4, 0x64, 0x3a, 0x38, 0x84, 0x6e, 0x6a, 0x23, 0x4f, - 0x6e, 0x2d, 0xd9, 0x75, 0x23, 0x25, 0x35, 0x65, 0x39, 0xac, 0x2d, 0x2c, 0xd2, 0x92, 0xe4, 0xf1, - 0xe7, 0x3f, 0x3c, 0x88, 0xb9, 0x3e, 0x29, 0xa6, 0x93, 0x50, 0xa6, 0xfb, 0x5c, 0xcc, 0xe4, 0x34, - 0x91, 0xa7, 0x32, 0x43, 0xe1, 0xa6, 0xee, 0xf0, 0x6e, 0x8c, 0xe2, 0xae, 0x21, 0xd8, 0x2f, 0xc7, - 0xf4, 0x87, 0x46, 0xf8, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xcc, 0x34, 0x31, 0x33, 0xb5, 0x0f, 0x00, - 0x00, +func init() { proto.RegisterFile("options/gorm.proto", fileDescriptor_69675b971f61ce8f) } + +var fileDescriptor_69675b971f61ce8f = []byte{ + // 1230 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0xdd, 0x6e, 0x1c, 0xb5, + 0x17, 0xff, 0x27, 0xd9, 0x8f, 0xd9, 0xb3, 0xd9, 0x34, 0x71, 0xd3, 0x74, 0xfe, 0x55, 0x69, 0xc3, + 0xa2, 0x8a, 0x0a, 0xa9, 0x1b, 0x5a, 0x0a, 0x48, 0x29, 0x37, 0xad, 0x44, 0x69, 0x41, 0x4b, 0xd0, + 0x34, 0x57, 0xdc, 0x8c, 0xbc, 0x33, 0x67, 0x27, 0x6e, 0x67, 0xec, 0xc1, 0xe3, 0x69, 0x77, 0x79, + 0x09, 0x2e, 0x10, 0xea, 0x3b, 0xf0, 0x30, 0x5c, 0xf0, 0x0e, 0xbc, 0x07, 0xb2, 0x3d, 0x5f, 0x9b, + 0xdd, 0xad, 0xa2, 0xc0, 0x05, 0x12, 0xdc, 0xf9, 0xfc, 0xce, 0x87, 0x8f, 0xcf, 0x87, 0xed, 0x03, + 0x44, 0xa4, 0x8a, 0x09, 0x9e, 0x1d, 0x45, 0x42, 0x26, 0xa3, 0x54, 0x0a, 0x25, 0x48, 0x4b, 0xaf, + 0x6f, 0x1c, 0x46, 0x42, 0x44, 0x31, 0x1e, 0x19, 0x6c, 0x92, 0x4f, 0x8f, 0x42, 0xcc, 0x02, 0xc9, + 0x52, 0x25, 0xa4, 0x95, 0x1b, 0xee, 0xc1, 0x95, 0xaf, 0x84, 0x4c, 0x9e, 0xb2, 0x18, 0x4f, 0xac, + 0x95, 0xe1, 0x2f, 0x1b, 0x40, 0x34, 0x36, 0xc6, 0x2c, 0xa3, 0x51, 0x09, 0x13, 0x17, 0xba, 0x42, + 0x26, 0x74, 0x12, 0xa3, 0xbb, 0x71, 0xb8, 0x71, 0xd7, 0xf1, 0x4a, 0x92, 0x7c, 0x04, 0x5d, 0xc6, + 0x83, 0x38, 0x0f, 0xd1, 0xdd, 0x3c, 0xdc, 0xba, 0xdb, 0x7f, 0xb0, 0x3b, 0x32, 0x9e, 0x7c, 0x39, + 0x53, 0x92, 0x3e, 0x65, 0x18, 0x87, 0x5e, 0x29, 0x40, 0xf6, 0xa1, 0xad, 0x8c, 0x8d, 0xad, 0xc3, + 0x8d, 0xbb, 0x3d, 0xcf, 0x12, 0xe4, 0x03, 0x18, 0x24, 0x79, 0xac, 0x98, 0x4f, 0x83, 0x40, 0xe4, + 0x5c, 0xb9, 0x2d, 0xb3, 0xc3, 0xb6, 0x01, 0x1f, 0x5b, 0x6c, 0x28, 0x00, 0x6a, 0x8b, 0x84, 0x40, + 0x4b, 0xcd, 0x53, 0xeb, 0x4b, 0xcf, 0x33, 0x6b, 0x8d, 0x71, 0x9a, 0x68, 0x2f, 0x0c, 0xa6, 0xd7, + 0xe4, 0x36, 0x6c, 0x29, 0x1a, 0x99, 0xed, 0xfa, 0x0f, 0x06, 0xd6, 0x31, 0x7d, 0xba, 0x53, 0x1a, + 0x79, 0x9a, 0xa3, 0xcf, 0x95, 0xd2, 0xe0, 0x15, 0x8d, 0xd0, 0xec, 0xda, 0xf3, 0x4a, 0x72, 0xf8, + 0xfb, 0x26, 0xec, 0xda, 0xe0, 0x60, 0x1c, 0x96, 0x61, 0x28, 0xec, 0x6d, 0xac, 0xb5, 0x47, 0xa0, + 0x15, 0x4a, 0x91, 0x1a, 0x27, 0x1c, 0xcf, 0xac, 0xc9, 0x08, 0xba, 0x67, 0x34, 0xf3, 0x05, 0xc7, + 0xc2, 0x91, 0xab, 0x56, 0xf1, 0x19, 0xcd, 0x4e, 0x78, 0x19, 0xe1, 0x67, 0xff, 0xf3, 0x3a, 0x67, + 0x06, 0x20, 0x9f, 0x03, 0x4c, 0x30, 0x16, 0x3c, 0xca, 0x7c, 0x25, 0x8c, 0x5b, 0xfd, 0x07, 0x07, + 0x56, 0xe5, 0x89, 0xc5, 0x4f, 0x45, 0xad, 0xd5, 0x9b, 0x94, 0x18, 0xb9, 0x0f, 0x8e, 0xde, 0x28, + 0xa1, 0x7c, 0xee, 0xb6, 0x8d, 0xda, 0x7e, 0xb5, 0xd3, 0x98, 0xf2, 0x79, 0xad, 0xa4, 0x1d, 0xd2, + 0x08, 0x79, 0x04, 0xdb, 0x5a, 0xdc, 0x57, 0xc2, 0xaa, 0x75, 0x8c, 0xda, 0x75, 0xab, 0xa6, 0x25, + 0x4e, 0xc5, 0xa2, 0x26, 0x24, 0x15, 0x48, 0xde, 0x87, 0x6d, 0x89, 0x53, 0x94, 0xc8, 0x03, 0xf4, + 0xc5, 0xd4, 0xed, 0x9a, 0x08, 0xf6, 0x2b, 0xec, 0x64, 0xfa, 0x64, 0x00, 0x7d, 0x9a, 0x65, 0x22, + 0x60, 0x54, 0x1b, 0x18, 0xfe, 0xd6, 0x81, 0x6e, 0x11, 0x2f, 0x72, 0x00, 0x9d, 0x40, 0xc4, 0x79, + 0xc2, 0x8b, 0x2c, 0x16, 0x54, 0x95, 0xdb, 0xcd, 0xc5, 0xdc, 0x66, 0xec, 0x47, 0x1b, 0xbf, 0xb6, + 0x67, 0xd6, 0xe4, 0x26, 0xf4, 0x52, 0x89, 0x01, 0xcb, 0x98, 0xe0, 0x26, 0x4a, 0x6d, 0xaf, 0x06, + 0xc8, 0x6d, 0xe8, 0xa7, 0x92, 0x25, 0x54, 0xce, 0xfd, 0x57, 0x68, 0xc3, 0xe1, 0x78, 0x50, 0x40, + 0xdf, 0xe0, 0x5c, 0x6f, 0x9f, 0x73, 0xf6, 0x43, 0x8e, 0xe6, 0xcc, 0x8e, 0x57, 0x50, 0xba, 0x22, + 0x42, 0x9c, 0xd2, 0x3c, 0x56, 0xc5, 0x79, 0x4a, 0x92, 0xfc, 0x1f, 0x1c, 0x2e, 0x94, 0xcf, 0xf3, + 0x38, 0x76, 0x1d, 0xdb, 0x04, 0x5c, 0xa8, 0x6f, 0xf3, 0x38, 0x26, 0x77, 0x60, 0x87, 0xe6, 0x4a, + 0xf8, 0x8c, 0x07, 0x12, 0x13, 0xe4, 0xca, 0xed, 0x19, 0x81, 0x81, 0x46, 0x9f, 0x97, 0xa0, 0xae, + 0x7f, 0xc6, 0x43, 0x9c, 0xb9, 0x60, 0xeb, 0xdf, 0x10, 0x3a, 0x8c, 0x76, 0x6f, 0xdf, 0x32, 0xfb, + 0x36, 0x8c, 0x16, 0x7b, 0x6e, 0x44, 0x6e, 0x80, 0x83, 0xc9, 0x04, 0xc3, 0x10, 0x43, 0x77, 0xdb, + 0x58, 0xae, 0x68, 0xf2, 0x21, 0x5c, 0x29, 0xd7, 0x7e, 0x2a, 0x71, 0xca, 0x66, 0xee, 0xc0, 0x58, + 0xd8, 0x29, 0xe1, 0xef, 0x0c, 0xaa, 0x4f, 0xcc, 0x22, 0x2e, 0x24, 0xba, 0x3b, 0xf6, 0xc4, 0x96, + 0x22, 0xb7, 0x00, 0xa6, 0x42, 0x22, 0x8b, 0xb8, 0x8e, 0xd4, 0x15, 0xa3, 0xdb, 0x40, 0xc8, 0xa7, + 0x70, 0xd0, 0xc8, 0xa1, 0xdf, 0x90, 0xdd, 0x35, 0xb2, 0xd7, 0x1a, 0xdc, 0xa7, 0xb5, 0xda, 0xe1, + 0xb9, 0xd2, 0xda, 0xb3, 0x86, 0x1b, 0xf5, 0x73, 0x1f, 0xf6, 0x5f, 0x0a, 0xc6, 0xcd, 0x2d, 0xd0, + 0x34, 0x4b, 0x8c, 0xe4, 0xd5, 0x8a, 0xd7, 0x30, 0xfa, 0x0c, 0x0e, 0x9b, 0xbe, 0xac, 0x54, 0xbf, + 0x6a, 0xd4, 0x6f, 0x35, 0xe4, 0xbe, 0x5e, 0x61, 0xe9, 0xdc, 0xa9, 0x74, 0xa2, 0xf2, 0x34, 0xa4, + 0x0a, 0xdd, 0x7d, 0x13, 0x9d, 0xe6, 0xa9, 0x1e, 0x57, 0xcc, 0x55, 0x6a, 0x81, 0x44, 0xad, 0x76, + 0x6d, 0xa5, 0x9a, 0x65, 0x92, 0x2f, 0xe0, 0x46, 0x53, 0x2d, 0xa3, 0xaf, 0xd1, 0xaf, 0xfa, 0xc4, + 0x3d, 0x30, 0xaa, 0x6e, 0x43, 0xe2, 0x05, 0x7d, 0x8d, 0x5e, 0xc9, 0x37, 0xb7, 0x94, 0xc4, 0x58, + 0xd0, 0xd0, 0xbd, 0x6e, 0x0b, 0xaf, 0x20, 0x87, 0xbf, 0x6e, 0xc1, 0x60, 0xe1, 0x1e, 0x39, 0x97, + 0xcd, 0x8d, 0xa5, 0x6c, 0x3e, 0x84, 0x9d, 0x9a, 0xf2, 0xf5, 0x6d, 0xb6, 0xb9, 0xea, 0x36, 0x1b, + 0xd4, 0x42, 0xba, 0x59, 0xd7, 0xd7, 0xc0, 0xd6, 0xbb, 0x6a, 0x60, 0x7d, 0x90, 0x5b, 0x97, 0x0b, + 0x72, 0xfb, 0xf2, 0x41, 0xee, 0x5c, 0x3c, 0xc8, 0xdd, 0x85, 0x20, 0x6b, 0x8e, 0xc4, 0x34, 0xa6, + 0x01, 0x96, 0x7d, 0x5f, 0x90, 0xba, 0xa5, 0x68, 0x9a, 0x22, 0x0f, 0x8b, 0x7e, 0x2f, 0x28, 0xdd, + 0xe8, 0x41, 0x8c, 0x54, 0x9a, 0x46, 0x77, 0x3c, 0x4b, 0x0c, 0xff, 0xd8, 0x84, 0xdd, 0xf3, 0x37, + 0xf8, 0x7f, 0xf9, 0xfa, 0xdb, 0xf3, 0x35, 0xfc, 0xa9, 0x05, 0x3b, 0x8b, 0x4f, 0xde, 0x3f, 0x2b, + 0xca, 0x77, 0x60, 0x27, 0x15, 0x19, 0xb3, 0x3a, 0xfa, 0x7b, 0x51, 0xfc, 0x3d, 0x06, 0x25, 0x6a, + 0x3f, 0x39, 0x8f, 0x80, 0x2c, 0x8a, 0x19, 0xbf, 0xda, 0xab, 0xfc, 0xda, 0x5d, 0xd0, 0x5c, 0xe1, + 0x5a, 0x23, 0x93, 0x9d, 0xcb, 0x65, 0xb2, 0x7b, 0xf9, 0x4c, 0x3a, 0x17, 0xcf, 0x64, 0x6f, 0x6d, + 0xe7, 0xc1, 0xba, 0xce, 0xeb, 0xaf, 0xee, 0xbc, 0xed, 0x66, 0xe7, 0xfd, 0xdc, 0x82, 0xbd, 0xa5, + 0xdf, 0x8c, 0xfe, 0x41, 0x54, 0x0f, 0x48, 0x51, 0x13, 0x35, 0x70, 0xae, 0x64, 0x36, 0x97, 0x4a, + 0x66, 0xdd, 0xeb, 0xb5, 0xb5, 0xfe, 0xf5, 0x5a, 0x5f, 0x2f, 0xad, 0x77, 0xd5, 0xcb, 0x45, 0x1e, + 0xbd, 0xf6, 0x5f, 0x7c, 0xf4, 0xfe, 0x25, 0x55, 0x31, 0x68, 0x56, 0xc5, 0x1b, 0xd8, 0xd3, 0xde, + 0xbe, 0x40, 0xf9, 0x1a, 0x65, 0x63, 0xd2, 0xd1, 0xe7, 0x8b, 0x90, 0x97, 0x93, 0x4e, 0x41, 0xea, + 0xb6, 0x55, 0x33, 0xee, 0x27, 0x2c, 0x0c, 0x63, 0x7c, 0x43, 0x25, 0x16, 0xbf, 0xfc, 0x81, 0x9a, + 0xf1, 0x71, 0x05, 0xea, 0xef, 0xdc, 0x1b, 0xa6, 0xce, 0x7c, 0x25, 0x69, 0xc0, 0xb8, 0x1d, 0x3e, + 0x1c, 0xaf, 0xaf, 0xb1, 0x53, 0x0b, 0x0d, 0x3f, 0x86, 0xc1, 0x18, 0xd5, 0x99, 0x68, 0xcc, 0x15, + 0x7d, 0x31, 0x79, 0x89, 0x81, 0xf2, 0x1b, 0x63, 0x0d, 0x58, 0xe8, 0x74, 0x9e, 0xe2, 0xb1, 0x07, + 0xbd, 0x29, 0x8b, 0xd1, 0x17, 0xa9, 0xca, 0xc8, 0xcd, 0x91, 0x9d, 0xec, 0x46, 0xe5, 0x64, 0x37, + 0x6a, 0x4c, 0x70, 0xee, 0xdb, 0xb7, 0x76, 0xca, 0xb8, 0x56, 0x5f, 0x11, 0x0d, 0xb6, 0xe7, 0x4c, + 0x2d, 0x91, 0x1d, 0x9f, 0x40, 0xcb, 0x98, 0xbb, 0xbd, 0x64, 0x6e, 0x71, 0xf8, 0xab, 0x2c, 0xba, + 0xb5, 0xc5, 0x45, 0x09, 0xcf, 0x18, 0x3a, 0x1e, 0x43, 0xdb, 0xdc, 0x53, 0xe4, 0xbd, 0x15, 0x0e, + 0xd6, 0x53, 0x54, 0x65, 0xef, 0xa0, 0xe9, 0x61, 0xcd, 0xf7, 0xac, 0x95, 0x63, 0x0f, 0x3a, 0x99, + 0x49, 0xcd, 0x0a, 0x0f, 0x75, 0xce, 0x58, 0xb0, 0xe4, 0x61, 0x31, 0xb8, 0x2c, 0x65, 0xd5, 0x2b, + 0x2c, 0x1d, 0x8f, 0xa1, 0x93, 0x98, 0xc8, 0x93, 0x5b, 0x2b, 0x4e, 0xdd, 0x48, 0x49, 0x65, 0xb2, + 0x18, 0xd6, 0x16, 0x98, 0x5e, 0x61, 0xe4, 0xc9, 0x67, 0xdf, 0x3f, 0x8c, 0x98, 0x3a, 0xcb, 0x27, + 0xa3, 0x40, 0x24, 0x47, 0x8c, 0x4f, 0xc5, 0x24, 0x16, 0x33, 0x91, 0x22, 0xb7, 0x53, 0x77, 0x70, + 0x2f, 0x42, 0x7e, 0x4f, 0x1b, 0x38, 0x2a, 0xc6, 0xf4, 0x47, 0x9a, 0x98, 0x74, 0x0c, 0xf7, 0x93, + 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xc0, 0x01, 0x6f, 0xe9, 0xbd, 0x0f, 0x00, 0x00, } diff --git a/options/gorm.proto b/options/gorm.proto deleted file mode 100644 index aeeecfd4..00000000 --- a/options/gorm.proto +++ /dev/null @@ -1,152 +0,0 @@ -syntax = "proto2"; -package gorm; - -option go_package = "github.com/infobloxopen/protoc-gen-gorm/options;gorm"; - -import "google/protobuf/descriptor.proto"; -// TODO: The option number 52119 lies within the internally reserved extension -// range. I believe a publicly unique number should be requested. - -// Currently no file options -extend google.protobuf.FileOptions { - optional GormFileOptions file_opts = 52119; -} - -message GormFileOptions { -} - -// Validation rules applied at the message level -extend google.protobuf.MessageOptions { - // ormable will cause orm code to be generated for this message/object - optional GormMessageOptions opts = 52119; -} - -message GormMessageOptions { - required bool ormable = 1; - repeated ExtraField include = 2; - optional string table = 3; - optional bool multi_account = 4; -} - -message ExtraField { - required string type = 1; - required string name = 2; - optional GormTag tag = 3; - optional string package = 4; -} - -// Field level specifications -extend google.protobuf.FieldOptions { - optional GormFieldOptions field = 52119; -} - -message GormFieldOptions { - optional GormTag tag = 1; - optional bool drop = 2; - oneof association { - HasOneOptions has_one = 3; - BelongsToOptions belongs_to = 4; - HasManyOptions has_many = 5; - ManyToManyOptions many_to_many = 6; - } - optional string reference_of = 7; -} - -message GormTag { - optional string column = 1; - optional string type = 2; - optional int32 size = 3; - optional int32 precision = 4; - optional bool primary_key = 5; - optional bool unique = 6; - optional string default = 7; - optional bool not_null = 8; - optional bool auto_increment = 9; - optional string index = 10; - optional string unique_index = 11; - optional bool embedded = 12; - optional string embedded_prefix = 13; - optional bool ignore = 14; - optional string foreignkey = 15; - optional string association_foreignkey = 16; - optional string many_to_many = 17; - optional string jointable_foreignkey = 18; - optional string association_jointable_foreignkey = 19; - optional bool association_autoupdate = 20; - optional bool association_autocreate = 21; - optional bool association_save_reference = 22; - optional bool preload = 23; -} - -message HasOneOptions { - optional string foreignkey = 1; - optional GormTag foreignkey_tag = 2; - optional string association_foreignkey = 3; - optional bool association_autoupdate = 4; - optional bool association_autocreate = 5; - optional bool association_save_reference = 6; - optional bool preload = 7; - optional bool replace = 8; - optional bool append = 9; - optional bool clear = 10; -} - -message BelongsToOptions { - optional string foreignkey = 1; - optional GormTag foreignkey_tag = 2; - optional string association_foreignkey = 3; - optional bool association_autoupdate = 4; - optional bool association_autocreate = 5; - optional bool association_save_reference = 6; - optional bool preload = 7; -} - -message HasManyOptions { - optional string foreignkey = 1; - optional GormTag foreignkey_tag = 2; - optional string association_foreignkey = 3; - optional string position_field = 4; - optional GormTag position_field_tag = 5; - optional bool association_autoupdate = 6; - optional bool association_autocreate = 7; - optional bool association_save_reference = 8; - optional bool preload = 9; - optional bool replace = 10; - optional bool append = 11; - optional bool clear = 12; -} - -message ManyToManyOptions { - optional string jointable = 1; - optional string foreignkey = 2; - optional string jointable_foreignkey = 3; - optional string association_foreignkey = 4; - optional string association_jointable_foreignkey = 5; - optional bool association_autoupdate = 6; - optional bool association_autocreate = 7; - optional bool association_save_reference = 8; - optional bool preload = 9; - optional bool replace = 10; - optional bool append = 11; - optional bool clear = 13; -} - - -// To be used in (leiu of) the interceptor -extend google.protobuf.ServiceOptions { - optional AutoServerOptions server = 52119; -} - -message AutoServerOptions { - optional bool autogen = 1; - optional bool txn_middleware = 2; - optional bool with_tracing = 3; -} - -extend google.protobuf.MethodOptions { - optional MethodOptions method = 52119; -} - -message MethodOptions { - optional string object_type = 1; -} diff --git a/plugin/associations.go b/plugin/associations.go index 64322876..f2783a40 100644 --- a/plugin/associations.go +++ b/plugin/associations.go @@ -104,7 +104,7 @@ func (p *OrmPlugin) countManyToManyAssociationDimension(msg *generator.Descripto func (p *OrmPlugin) resolveAliasName(goType, goPackage string, file *generator.FileDescriptor) string { originFile := p.currentFile - p.setFile(file) + p.setFile(*file.Name, goPackage) isPointer := strings.HasPrefix(goType, "*") typeParts := strings.Split(goType, ".") if len(typeParts) == 2 { @@ -121,7 +121,7 @@ func (p *OrmPlugin) resolveAliasName(goType, goPackage string, file *generator.F } return newType } - p.setFile(originFile) + p.setFile(originFile, goPackage) return goType } @@ -157,7 +157,8 @@ func (p *OrmPlugin) parseHasMany(msg *generator.Descriptor, parent *OrmableType, p.Fail("Missing", assocKeyName, "field in", parent.Name, ".") } } - hasMany.AssociationForeignkey = &assocKeyName + + hasMany.AssociationForeignkey = assocKeyName var foreignKeyType string if hasMany.GetForeignkeyTag().GetNotNull() { foreignKeyType = strings.TrimPrefix(assocKey.Type, "*") @@ -178,7 +179,7 @@ func (p *OrmPlugin) parseHasMany(msg *generator.Descriptor, parent *OrmableType, foreignKeyName = fmt.Sprintf(fieldName + typeName + assocKeyName) } } - hasMany.Foreignkey = &foreignKeyName + hasMany.Foreignkey = foreignKeyName if _, ok := child.Fields[foreignKeyName]; child.Package != parent.Package && !ok { p.Fail(`Object`, child.Name, `from package`, child.Package, `cannot be used for has-many in`, parent.Name, `since it`, `does not have FK`, foreignKeyName, `defined. Manually define the key, or switch to many-to-many`) @@ -203,7 +204,7 @@ func (p *OrmPlugin) parseHasMany(msg *generator.Descriptor, parent *OrmableType, p.Fail("Cannot include", posField, "field into", child.Name, "as it already exists there with a different type.") } } - hasMany.PositionField = &posField + hasMany.PositionField = posField } } @@ -225,7 +226,7 @@ func (p *OrmPlugin) parseHasOne(msg *generator.Descriptor, parent *OrmableType, p.Fail("Missing", assocKeyName, "field in", parent.Name, ".") } } - hasOne.AssociationForeignkey = &assocKeyName + hasOne.AssociationForeignkey = assocKeyName var foreignKeyType string if hasOne.GetForeignkeyTag().GetNotNull() { foreignKeyType = strings.TrimPrefix(assocKey.Type, "*") @@ -246,7 +247,7 @@ func (p *OrmPlugin) parseHasOne(msg *generator.Descriptor, parent *OrmableType, foreignKeyName = fmt.Sprintf(fieldName + typeName + assocKeyName) } } - hasOne.Foreignkey = &foreignKeyName + hasOne.Foreignkey = foreignKeyName if _, ok := child.Fields[foreignKeyName]; child.Package != parent.Package && !ok { p.Fail(`Object`, child.Name, `from package`, child.Package, `cannot be used for has-one in`, parent.Name, `since it`, `does not have FK field`, foreignKeyName, `defined. Manually define the key, or switch to belongs-to`) @@ -280,7 +281,7 @@ func (p *OrmPlugin) parseBelongsTo(msg *generator.Descriptor, child *OrmableType p.Fail("Missing", assocKeyName, "field in", parent.Name, ".") } } - belongsTo.AssociationForeignkey = &assocKeyName + belongsTo.AssociationForeignkey = assocKeyName var foreignKeyType string if belongsTo.GetForeignkeyTag().GetNotNull() { foreignKeyType = strings.TrimPrefix(assocKey.Type, "*") @@ -301,7 +302,7 @@ func (p *OrmPlugin) parseBelongsTo(msg *generator.Descriptor, child *OrmableType foreignKeyName = fmt.Sprintf(fieldName + assocKeyName) } } - belongsTo.Foreignkey = &foreignKeyName + belongsTo.Foreignkey = foreignKeyName if exField, ok := child.Fields[foreignKeyName]; !ok { child.Fields[foreignKeyName] = foreignKey } else { @@ -332,7 +333,7 @@ func (p *OrmPlugin) parseManyToMany(msg *generator.Descriptor, ormable *OrmableT p.Fail("Missing", foreignKeyName, "field in", ormable.Name, ".") } } - mtm.Foreignkey = &foreignKeyName + mtm.Foreignkey = foreignKeyName var assocKeyName string if assocKeyName = generator.CamelCase(mtm.GetAssociationForeignkey()); assocKeyName == "" { assocKeyName, _ = p.findPrimaryKey(assoc) @@ -343,7 +344,7 @@ func (p *OrmPlugin) parseManyToMany(msg *generator.Descriptor, ormable *OrmableT p.Fail("Missing", assocKeyName, "field in", assoc.Name, ".") } } - mtm.AssociationForeignkey = &assocKeyName + mtm.AssociationForeignkey = assocKeyName var jt string if jt = jgorm.ToDBName(mtm.GetJointable()); jt == "" { if p.countManyToManyAssociationDimension(msg, fieldType) == 1 && typeName != fieldType { @@ -352,12 +353,12 @@ func (p *OrmPlugin) parseManyToMany(msg *generator.Descriptor, ormable *OrmableT jt = jgorm.ToDBName(typeName + inflection.Plural(fieldName)) } } - mtm.Jointable = &jt + mtm.Jointable = jt var jtForeignKey string if jtForeignKey = generator.CamelCase(mtm.GetJointableForeignkey()); jtForeignKey == "" { jtForeignKey = jgorm.ToDBName(typeName + foreignKeyName) } - mtm.JointableForeignkey = &jtForeignKey + mtm.JointableForeignkey = jtForeignKey var jtAssocForeignKey string if jtAssocForeignKey = generator.CamelCase(mtm.GetAssociationJointableForeignkey()); jtAssocForeignKey == "" { if typeName == fieldType { @@ -366,7 +367,7 @@ func (p *OrmPlugin) parseManyToMany(msg *generator.Descriptor, ormable *OrmableT jtAssocForeignKey = jgorm.ToDBName(fieldType + assocKeyName) } } - mtm.AssociationJointableForeignkey = &jtAssocForeignKey + mtm.AssociationJointableForeignkey = jtAssocForeignKey } func (p *OrmPlugin) findPrimaryKey(ormable *OrmableType) (string, *Field) { diff --git a/plugin/handlergen.go b/plugin/handlergen.go index a088df4b..0400fc74 100644 --- a/plugin/handlergen.go +++ b/plugin/handlergen.go @@ -232,6 +232,7 @@ func (p *OrmPlugin) generateApplyFieldMask(message *generator.Descriptor) { // for ormable message, do recursive patching if field.IsMessage() && p.isOrmable(fieldType) && !field.IsRepeated() { p.UsingGoImports(stdStringsImport) + p.P(`if !updated`, ccName, ` && strings.HasPrefix(f, prefix+"`, ccName, `.") {`) p.P(`updated`, ccName, ` = true`) p.P(`if patcher.`, ccName, ` == nil {`) diff --git a/plugin/imports.go b/plugin/imports.go index a0af2d54..cec4bdfd 100644 --- a/plugin/imports.go +++ b/plugin/imports.go @@ -12,7 +12,8 @@ import ( // Imports that are added by default but unneeded in GORM code var unneededImports = []string{ - "import proto \"github.com/gogo/protobuf/proto\"\n", + "proto \"github.com/gogo/protobuf/proto\"", + "import proto \"github.com/golang.org/protobuf/proto\"\n", "import _ \"github.com/infobloxopen/protoc-gen-gorm/options\"\n", // if needed will be imported with an alias "import _ \"github.com/infobloxopen/protoc-gen-gorm/types\"\n", @@ -50,6 +51,7 @@ var ( gatewayImport = "github.com/infobloxopen/atlas-app-toolkit/gateway" pqImport = "github.com/lib/pq" gerrorsImport = "github.com/infobloxopen/protoc-gen-gorm/errors" + timestampImport = "github.com/golang/protobuf/ptypes/timestamp" stdFmtImport = "fmt" stdCtxImport = "context" stdStringsImport = "strings" @@ -106,14 +108,14 @@ func (p *OrmPlugin) GetFileImports() *fileImports { // GenerateImports writes out required imports for the generated files func (p *OrmPlugin) GenerateImports(file *generator.FileDescriptor) { - imports := p.fileImports[file] + imports := p.fileImports[*file.Name] for _, typeName := range imports.typesToRegister { p.RecordTypeUse(typeName) } githubImports := imports.packages sort.Strings(imports.stdImports) for _, dep := range imports.stdImports { - p.PrintImport(dep, dep) + p.PrintImport(generator.GoPackageName(dep), generator.GoImportPath(dep)) } p.P() aliases := []string{} @@ -122,7 +124,7 @@ func (p *OrmPlugin) GenerateImports(file *generator.FileDescriptor) { } sort.Strings(aliases) for _, a := range aliases { - p.PrintImport(a, githubImports[a].packagePath) + p.PrintImport(generator.GoPackageName(a), generator.GoImportPath(githubImports[a].packagePath)) } p.P() } diff --git a/plugin/plugin.go b/plugin/plugin.go index 21c5b4a4..1e7e1dd3 100644 --- a/plugin/plugin.go +++ b/plugin/plugin.go @@ -6,7 +6,6 @@ import ( "strconv" "strings" - "github.com/gogo/protobuf/proto" "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" "github.com/gogo/protobuf/protoc-gen-gogo/generator" jgorm "github.com/jinzhu/gorm" @@ -98,17 +97,17 @@ type OrmPlugin struct { ormableTypes map[string]*OrmableType EmptyFiles []string currentPackage string - currentFile *generator.FileDescriptor - fileImports map[*generator.FileDescriptor]*fileImports + currentFile string + fileImports map[string]*fileImports messages map[string]struct{} ormableServices []autogenService suppressWarn bool } -func (p *OrmPlugin) setFile(file *generator.FileDescriptor) { +func (p *OrmPlugin) setFile(file string, pkg string) { p.currentFile = file - p.currentPackage = file.GetPackage() - p.Generator.SetFile(file.FileDescriptorProto) + p.currentPackage = pkg + p.Generator.SetFile(file) } // Name identifies the plugin @@ -120,7 +119,7 @@ func (p *OrmPlugin) Name() string { // code generation begins. func (p *OrmPlugin) Init(g *generator.Generator) { p.Generator = g - p.fileImports = make(map[*generator.FileDescriptor]*fileImports) + p.fileImports = make(map[string]*fileImports) p.messages = make(map[string]struct{}) if strings.EqualFold(g.Param["engine"], "postgres") { p.dbEngine = ENGINE_POSTGRES @@ -145,52 +144,52 @@ func (p *OrmPlugin) Generate(file *generator.FileDescriptor) { // so that cross-file assocations within the same package work if p.ormableTypes == nil { p.ormableTypes = make(map[string]*OrmableType) - for _, fileProto := range p.AllFiles().GetFile() { - file := p.FileOf(fileProto) - p.fileImports[file] = newFileImports() - p.setFile(file) - // Preload just the types we'll be creating - for _, msg := range file.Messages() { - // We don't want to bother with the MapEntry stuff - if msg.GetOptions().GetMapEntry() { - continue - } - typeName := p.getMsgName(msg) - p.messages[typeName] = struct{}{} + } + for _, fileProto := range p.AllFiles().GetFile() { + // file := p.FileOf(fileProto) + p.fileImports[*fileProto.Name] = newFileImports() + p.setFile(*fileProto.Name, *file.Package) + // Preload just the types we'll be creating + for _, msg := range file.Messages() { + // We don't want to bother with the MapEntry stuff + if msg.GetOptions().GetMapEntry() { + continue + } + typeName := p.getMsgName(msg) + p.messages[typeName] = struct{}{} - if getMessageOptions(msg).GetOrmable() { - ormable := NewOrmableType(typeName, fileProto.GetPackage(), file) - if _, ok := p.ormableTypes[typeName]; !ok { - p.ormableTypes[typeName] = ormable - } + if getMessageOptions(msg).GetOrmable() { + ormable := NewOrmableType(typeName, fileProto.GetPackage(), file) + if _, ok := p.ormableTypes[typeName]; !ok { + p.ormableTypes[typeName] = ormable } } - for _, msg := range file.Messages() { - typeName := p.getMsgName(msg) - if p.isOrmable(typeName) { - p.parseBasicFields(msg) - } + } + for _, msg := range file.Messages() { + typeName := p.getMsgName(msg) + if p.isOrmable(typeName) { + p.parseBasicFields(msg) } - for _, msg := range file.Messages() { - typeName := p.getMsgName(msg) - if p.isOrmable(typeName) { - p.parseAssociations(msg) - o := p.getOrmable(typeName) - if p.hasPrimaryKey(o) { - _, fd := p.findPrimaryKey(o) - fd.ParentOriginName = o.OriginName - } + } + for _, msg := range file.Messages() { + typeName := p.getMsgName(msg) + if p.isOrmable(typeName) { + p.parseAssociations(msg) + o := p.getOrmable(typeName) + if p.hasPrimaryKey(o) { + _, fd := p.findPrimaryKey(o) + fd.ParentOriginName = o.OriginName } } } - for _, fileProto := range p.AllFiles().GetFile() { - file := p.FileOf(fileProto) - p.setFile(file) - p.parseServices(file) - } } + for _, fileProto := range p.AllFiles().GetFile() { + p.setFile(*fileProto.Name, *fileProto.Package) + p.parseServices(file) + } + // Return to the file at hand and then generate anything needed - p.setFile(file) + p.setFile(*file.Name, *file.Package) empty := true for _, msg := range file.Messages() { typeName := p.getMsgName(msg) @@ -359,7 +358,7 @@ func tagWithType(tag *gorm.GormTag, typename string) *gorm.GormTag { if tag == nil { tag = &gorm.GormTag{} } - tag.Type = proto.String(typename) + tag.Type = typename return tag } @@ -446,16 +445,16 @@ func (p *OrmPlugin) renderGormTag(field *Field) string { tag = &gorm.GormTag{} } - if tag.Column != nil { + if len(tag.Column) > 0 { gormRes += fmt.Sprintf("column:%s;", tag.GetColumn()) } - if tag.Type != nil { + if len(tag.Type) > 0 { gormRes += fmt.Sprintf("type:%s;", tag.GetType()) } - if tag.Size_ != nil { + if tag.GetSize_() > 0 { gormRes += fmt.Sprintf("size:%d;", tag.GetSize_()) } - if tag.Precision != nil { + if tag.Precision > 0 { gormRes += fmt.Sprintf("precision:%d;", tag.GetPrecision()) } if tag.GetPrimaryKey() { @@ -464,7 +463,7 @@ func (p *OrmPlugin) renderGormTag(field *Field) string { if tag.GetUnique() { gormRes += "unique;" } - if tag.Default != nil { + if len(tag.Default) > 0 { gormRes += fmt.Sprintf("default:%s;", tag.GetDefault()) } if tag.GetNotNull() { @@ -473,14 +472,14 @@ func (p *OrmPlugin) renderGormTag(field *Field) string { if tag.GetAutoIncrement() { gormRes += "auto_increment;" } - if tag.Index != nil { + if len(tag.Index) > 0 { if tag.GetIndex() == "" { gormRes += "index;" } else { gormRes += fmt.Sprintf("index:%s;", tag.GetIndex()) } } - if tag.UniqueIndex != nil { + if len(tag.UniqueIndex) > 0 { if tag.GetUniqueIndex() == "" { gormRes += "unique_index;" } else { @@ -490,15 +489,15 @@ func (p *OrmPlugin) renderGormTag(field *Field) string { if tag.GetEmbedded() { gormRes += "embedded;" } - if tag.EmbeddedPrefix != nil { + if len(tag.EmbeddedPrefix) > 0 { gormRes += fmt.Sprintf("embedded_prefix:%s;", tag.GetEmbeddedPrefix()) } if tag.GetIgnore() { gormRes += "-;" } - var foreignKey, associationForeignKey, joinTable, joinTableForeignKey, associationJoinTableForeignKey *string - var associationAutoupdate, associationAutocreate, associationSaveReference, preload, replace, append, clear *bool + var foreignKey, associationForeignKey, joinTable, joinTableForeignKey, associationJoinTableForeignKey string + var associationAutoupdate, associationAutocreate, associationSaveReference, preload, replace, append, clear bool if hasOne := field.GetHasOne(); hasOne != nil { foreignKey = hasOne.Foreignkey associationForeignKey = hasOne.AssociationForeignkey @@ -526,7 +525,7 @@ func (p *OrmPlugin) renderGormTag(field *Field) string { preload = hasMany.Preload replace = hasMany.Replace append = hasMany.Append - if hasMany.PositionField != nil { + if len(hasMany.PositionField) > 0 { atlasRes += fmt.Sprintf("position:%s;", hasMany.GetPositionField()) } } else if mtm := field.GetManyToMany(); mtm != nil { @@ -554,39 +553,46 @@ func (p *OrmPlugin) renderGormTag(field *Field) string { preload = tag.Preload } - if foreignKey != nil { - gormRes += fmt.Sprintf("foreignkey:%s;", *foreignKey) + if len(foreignKey) > 0 { + gormRes += fmt.Sprintf("foreignkey:%s;", foreignKey) } - if associationForeignKey != nil { - gormRes += fmt.Sprintf("association_foreignkey:%s;", *associationForeignKey) + + if len(associationForeignKey) > 0 { + gormRes += fmt.Sprintf("association_foreignkey:%s;", associationForeignKey) } - if joinTable != nil { - gormRes += fmt.Sprintf("many2many:%s;", *joinTable) + + if len(joinTable) > 0 { + gormRes += fmt.Sprintf("many2many:%s;", joinTable) } - if joinTableForeignKey != nil { - gormRes += fmt.Sprintf("jointable_foreignkey:%s;", *joinTableForeignKey) + if len(joinTableForeignKey) > 0 { + gormRes += fmt.Sprintf("jointable_foreignkey:%s;", joinTableForeignKey) } - if associationJoinTableForeignKey != nil { - gormRes += fmt.Sprintf("association_jointable_foreignkey:%s;", *associationJoinTableForeignKey) + if len(associationJoinTableForeignKey) > 0 { + gormRes += fmt.Sprintf("association_jointable_foreignkey:%s;", associationJoinTableForeignKey) } - if associationAutoupdate != nil { - gormRes += fmt.Sprintf("association_autoupdate:%s;", strconv.FormatBool(*associationAutoupdate)) + + if associationAutoupdate { + gormRes += fmt.Sprintf("association_autoupdate:%s;", strconv.FormatBool(associationAutoupdate)) } - if associationAutocreate != nil { - gormRes += fmt.Sprintf("association_autocreate:%s;", strconv.FormatBool(*associationAutocreate)) + + if associationAutocreate { + gormRes += fmt.Sprintf("association_autocreate:%s;", strconv.FormatBool(associationAutocreate)) } - if associationSaveReference != nil { - gormRes += fmt.Sprintf("association_save_reference:%s;", strconv.FormatBool(*associationSaveReference)) + + if associationSaveReference { + gormRes += fmt.Sprintf("association_save_reference:%s;", strconv.FormatBool(associationSaveReference)) } - if preload != nil { - gormRes += fmt.Sprintf("preload:%s;", strconv.FormatBool(*preload)) + + if preload { + gormRes += fmt.Sprintf("preload:%s;", strconv.FormatBool(preload)) } - if clear != nil { - gormRes += fmt.Sprintf("clear:%s;", strconv.FormatBool(*clear)) - } else if replace != nil { - gormRes += fmt.Sprintf("replace:%s;", strconv.FormatBool(*replace)) - } else if append != nil { - gormRes += fmt.Sprintf("append:%s;", strconv.FormatBool(*append)) + + if clear { + gormRes += fmt.Sprintf("clear:%s;", strconv.FormatBool(clear)) + } else if replace { + gormRes += fmt.Sprintf("replace:%s;", strconv.FormatBool(replace)) + } else if append { + gormRes += fmt.Sprintf("append:%s;", strconv.FormatBool(append)) } var gormTag, atlasTag string @@ -613,7 +619,7 @@ func (p *OrmPlugin) generateTableNameFunction(message *generator.Descriptor) { p.P(`func (`, typeName, `ORM) TableName() string {`) tableName := inflection.Plural(jgorm.ToDBName(message.GetName())) - if opts := getMessageOptions(message); opts != nil && opts.Table != nil { + if opts := getMessageOptions(message); opts != nil && len(opts.Table) > 0 { tableName = opts.GetTable() } p.P(`return "`, tableName, `"`) diff --git a/plugin/servergen.go b/plugin/servergen.go index c8f2069a..8883b97f 100644 --- a/plugin/servergen.go +++ b/plugin/servergen.go @@ -112,7 +112,7 @@ func (p *OrmPlugin) generateDefaultServer(file *generator.FileDescriptor) { } p.P(`}`) withSpan := getServiceOptions(service.ServiceDescriptorProto).WithTracing - if withSpan != nil && *withSpan { + if withSpan { p.generateSpanInstantiationMethod(service) p.generateSpanErrorMethod(service) p.generateSpanResultMethod(service) @@ -180,7 +180,7 @@ func (p *OrmPlugin) generateSpanResultMethod(service autogenService) { func (p *OrmPlugin) wrapSpanError(service autogenService, errVarName string) string { withSpan := getServiceOptions(service.ServiceDescriptorProto).WithTracing - if withSpan != nil && *withSpan { + if withSpan { return fmt.Sprint(`m.spanError(span, `, errVarName, `)`) } return errVarName @@ -411,7 +411,7 @@ func (p *OrmPlugin) generateUpdateSetServerMethod(service autogenService, method p.generatePostserviceCall(service, typeName, method.ccName) p.P(``) withSpan := getServiceOptions(service.ServiceDescriptorProto).WithTracing - if withSpan != nil && *withSpan { + if withSpan { p.P(`err = m.spanResult(span, out)`) p.P(`if err != nil {`) p.P(`return nil,`, p.wrapSpanError(service, "err")) @@ -671,7 +671,7 @@ func (p *OrmPlugin) generateMethodSignature(service autogenService, method autog p.RecordTypeUse(method.GetInputType()) p.RecordTypeUse(method.GetOutputType()) withSpan := getServiceOptions(service.ServiceDescriptorProto).WithTracing - if withSpan != nil && *withSpan { + if withSpan { p.P(`span, errSpanCreate := m.spanCreate(ctx, in, "`, method.ccName, `")`) p.P(`if errSpanCreate != nil {`) p.P(`return nil, errSpanCreate`) @@ -698,7 +698,7 @@ func (p *OrmPlugin) generateDBSetup(service autogenService) error { func (p *OrmPlugin) spanResultHandling(service autogenService) { withSpan := getServiceOptions(service.ServiceDescriptorProto).WithTracing - if withSpan != nil && *withSpan { + if withSpan { p.P(`errSpanResult := m.spanResult(span, out)`) p.P(`if errSpanResult != nil {`) p.P(`return nil, `, p.wrapSpanError(service, "errSpanResult")) diff --git a/plugin/utilities.go b/plugin/utilities.go index 4c3bf9dd..83e2aeb7 100644 --- a/plugin/utilities.go +++ b/plugin/utilities.go @@ -25,6 +25,7 @@ func getMessageOptions(message *generator.Descriptor) *gorm.GormMessageOptions { if err != nil { return nil } + opts, ok := v.(*gorm.GormMessageOptions) if !ok { return nil @@ -36,6 +37,7 @@ func getFieldOptions(field *descriptor.FieldDescriptorProto) *gorm.GormFieldOpti if field.Options == nil { return nil } + v, err := proto.GetExtension(field.Options, gorm.E_Field) if err != nil { return nil diff --git a/plugin/utilities_test.go b/plugin/utilities_test.go new file mode 100644 index 00000000..e3db7078 --- /dev/null +++ b/plugin/utilities_test.go @@ -0,0 +1,6 @@ +package plugin + +import "testing" + +func TestGetMessageOptions(t *testing.T) { +} diff --git a/proto/options/buf.gen.yaml b/proto/options/buf.gen.yaml new file mode 100644 index 00000000..207f2e51 --- /dev/null +++ b/proto/options/buf.gen.yaml @@ -0,0 +1,6 @@ +version: v1beta1 +plugins: + - name: gogo + out: . + opt: + - paths=source_relative diff --git a/proto/options/gorm.proto b/proto/options/gorm.proto new file mode 100644 index 00000000..23734bd0 --- /dev/null +++ b/proto/options/gorm.proto @@ -0,0 +1,154 @@ +syntax = "proto3"; + +package gorm; + +option go_package = "github.com/infobloxopen/protoc-gen-gorm/options;gorm"; + +import "google/protobuf/descriptor.proto"; + +// TODO: The option number 52119 lies within the internally reserved extension +// range. I believe a publicly unique number should be requested. + +// Currently no file options +extend google.protobuf.FileOptions { + GormFileOptions file_opts = 52119; +} + +message GormFileOptions { +} + +// Validation rules applied at the message level +extend google.protobuf.MessageOptions { + // ormable will cause orm code to be generated for this message/object + GormMessageOptions opts = 52119; +} + +message GormMessageOptions { + bool ormable = 1; + repeated ExtraField include = 2; + string table = 3; + bool multi_account = 4; +} + +message ExtraField { + string type = 1; + string name = 2; + GormTag tag = 3; + string package = 4; +} + +// Field level specifications +extend google.protobuf.FieldOptions { + GormFieldOptions field = 52119; +} + +message GormFieldOptions { + GormTag tag = 1; + bool drop = 2; + oneof association { + HasOneOptions has_one = 3; + BelongsToOptions belongs_to = 4; + HasManyOptions has_many = 5; + ManyToManyOptions many_to_many = 6; + } + string reference_of = 7; +} + +message GormTag { + string column = 1; + string type = 2; + int32 size = 3; + int32 precision = 4; + bool primary_key = 5; + bool unique = 6; + string default = 7; + bool not_null = 8; + bool auto_increment = 9; + string index = 10; + string unique_index = 11; + bool embedded = 12; + string embedded_prefix = 13; + bool ignore = 14; + string foreignkey = 15; + string association_foreignkey = 16; + string many_to_many = 17; + string jointable_foreignkey = 18; + string association_jointable_foreignkey = 19; + bool association_autoupdate = 20; + bool association_autocreate = 21; + bool association_save_reference = 22; + bool preload = 23; +} + +message HasOneOptions { + string foreignkey = 1; + GormTag foreignkey_tag = 2; + string association_foreignkey = 3; + bool association_autoupdate = 4; + bool association_autocreate = 5; + bool association_save_reference = 6; + bool preload = 7; + bool replace = 8; + bool append = 9; + bool clear = 10; +} + +message BelongsToOptions { + string foreignkey = 1; + GormTag foreignkey_tag = 2; + string association_foreignkey = 3; + bool association_autoupdate = 4; + bool association_autocreate = 5; + bool association_save_reference = 6; + bool preload = 7; +} + +message HasManyOptions { + string foreignkey = 1; + GormTag foreignkey_tag = 2; + string association_foreignkey = 3; + string position_field = 4; + GormTag position_field_tag = 5; + bool association_autoupdate = 6; + bool association_autocreate = 7; + bool association_save_reference = 8; + bool preload = 9; + bool replace = 10; + bool append = 11; + bool clear = 12; +} + +message ManyToManyOptions { + string jointable = 1; + string foreignkey = 2; + string jointable_foreignkey = 3; + string association_foreignkey = 4; + string association_jointable_foreignkey = 5; + bool association_autoupdate = 6; + bool association_autocreate = 7; + bool association_save_reference = 8; + bool preload = 9; + bool replace = 10; + bool append = 11; + bool clear = 13; +} + + +// To be used in (leiu of) the interceptor +extend google.protobuf.ServiceOptions { + AutoServerOptions server = 52119; +} + +message AutoServerOptions { + bool autogen = 1; + bool txn_middleware = 2; + bool with_tracing = 3; +} + +extend google.protobuf.MethodOptions { + MethodOptions method = 52119; +} + +message MethodOptions { + string object_type = 1; +} diff --git a/types/types.proto b/proto/types/types.proto similarity index 100% rename from types/types.proto rename to proto/types/types.proto diff --git a/third_party/proto/atlas/query/v1/collection_operators.proto b/third_party/proto/atlas/query/v1/collection_operators.proto new file mode 100644 index 00000000..dca57dda --- /dev/null +++ b/third_party/proto/atlas/query/v1/collection_operators.proto @@ -0,0 +1,228 @@ +syntax = "proto3"; + +package atlas.query.v1; + +import "protoc-gen-openapiv2/options/annotations.proto"; + +option go_package = "github.com/infobloxopen/atlas-app-toolkit/query;query"; + +// SortCriteriaOrder specifies the sort order. +enum SortCriteriaOrder { + // Order not specified + SORT_CRITERIA_ORDER_UNSPECIFIED = 0; + // ascending sort order + SORT_CRITERIA_ORDER_ASC = 1; + // descending sort order + SORT_CRITERIA_ORDER_DESC = 2; +} + +// SortCriteria represents sort criteria +message SortCriteria { + // Tag is a JSON tag. + string tag = 1; + // Order is a sort order. + SortCriteriaOrder order = 2; +} + +// Sorting represents list of sort criterias. +message Sorting { + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema: { + type: STRING; + description: "atlas.api.sorting"; + }; + }; + + repeated SortCriteria criterias = 1; +} + +// FieldSelection represents a group of fields for some object. +// Main use case for if is to store information about object fields that +// need to be ratained prior to sending object as a response +message FieldSelection { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema: { + type: STRING; + description: "atlas.api.field_selection"; + }; + }; + map fields = 1; +} + +// Field represents a single field for an object. +// It contains fields name and also may contain a group of sub-fields for cases +// when a fields represents some structure. +message Field { + string name = 1; + map subs = 2; +} + +// Filtering represents filtering expression. +// root could be either LogicalOperator or one of the supported conditions. +message Filtering { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema: { + type: STRING; + description: "atlas.api.filtering"; + }; + }; + + + oneof root { + LogicalOperator operator = 1; + StringCondition string_condition = 2; + NumberCondition number_condition = 3; + NullCondition null_condition = 4; + StringArrayCondition string_array_condition = 5; + NumberArrayCondition number_array_condition = 6; + } +} + +// LogicalOperator represents binary logical operator, either AND or OR depending on type. +// left and right are respectively left and right operands of the operator, could be +// either LogicalOperator or one of the supported conditions. +// is_negative is set to true if the operator is negated. +message LogicalOperator { + oneof left { + LogicalOperator left_operator = 1; + StringCondition left_string_condition = 2; + NumberCondition left_number_condition = 3; + NullCondition left_null_condition = 4; + StringArrayCondition left_string_array_condition = 11; + NumberArrayCondition left_number_array_condition = 12; + } + oneof right { + LogicalOperator right_operator = 5; + StringCondition right_string_condition = 6; + NumberCondition right_number_condition = 7; + NullCondition right_null_condition = 8; + StringArrayCondition right_string_array_condition = 13; + NumberArrayCondition right_number_array_condition = 14; + } + enum Type { + TYPE_AND_UNSPECIFIED = 0; + TYPE_OR = 1; + } + Type type = 9; + bool is_negative = 10; +} + +// StringCondition represents a condition with a string literal, e.g. field == 'string'. +// field_path is a reference to a value of a resource. +// value is the string literal. +// type is a type of the condition. +// is_negative is set to true if the condition is negated. +message StringCondition { + repeated string field_path = 1; + string value = 2; + enum Type { + TYPE_EQ_UNSPECIFIED = 0; + TYPE_MATCH = 1; + TYPE_GT = 2; + TYPE_GE = 3; + TYPE_LT = 4; + TYPE_LE = 5; + TYPE_IEQ = 6; + } + Type type = 3; + bool is_negative = 4; +} + +// NumberCondition represents a condition with a number literal, e.g. field > 3. +// field_path is a reference to a value of a resource. +// value is the number literal. +// type is a type of the condition. +// is_negative is set to true if the condition is negated. +message NumberCondition { + repeated string field_path = 1; + double value = 2; + enum Type { + TYPE_EQ_UNSPECIFIED = 0; + TYPE_GT = 1; + TYPE_GE = 2; + TYPE_LT = 3; + TYPE_LE = 4; + } + Type type = 3; + bool is_negative = 4; +} + +// NullCondition represents a condition with a null literal, e.g. field == null. +// field_path is a reference to a value of a resource. +// is_negative is set to true if the condition is negated. +message NullCondition { + repeated string field_path = 1; + bool is_negative = 2; +} + +// StringArrayCondition represents a condition with string arrays, e.g. field in ['hello','world'] +// field_path is a reference to a value of a resource. +// is_negative is set to true if the condition is negated +message StringArrayCondition { + repeated string field_path = 1; + repeated string values = 2; + enum Type { + TYPE_IN_UNSPECIFIED = 0; + } + Type type = 3; + bool is_negative = 4; +} + + +// NumberArrayCondition represents a condition with string arrays, e.g. field in [1, 5, 7] +// field_path is a reference to a value of a resource. +// is_negative is set to true if the condition is negated +message NumberArrayCondition { + repeated string field_path = 1; + repeated double values = 2; + enum Type { + TYPE_IN_UNSPECIFIED = 0; + } + Type type = 3; + bool is_negative = 4; +} + +// Pagination represents both server-driven and client-driven pagination request. +// Server-driven pagination is a model in which the server returns some +// amount of data along with an token indicating there is more data +// and where subsequent queries can get the next page of data. +// Client-driven pagination is a model in which rows are addressable by +// offset and page size (limit). +message Pagination { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema: { + type: STRING; + description: "atlas.api.paging"; + }; + }; + + // The service-defined string used to identify a page of resources. + // A null value indicates the first page. + string page_token = 1; + // The integer index of the offset into a collection of resources. + // If omitted or null the value is assumed to be "0". + int32 offset = 2; + // The integer number of resources to be returned in the response. + // The service may impose maximum value. + // If omitted the service may impose a default value. + int32 limit = 3; +} + +// PageInfo represents both server-driven and client-driven pagination response. +// Server-driven pagination is a model in which the server returns some +// amount of data along with an token indicating there is more data +// and where subsequent queries can get the next page of data. +// Client-driven pagination is a model in which rows are addressable by +// offset and page size (limit). +message PageInfo { + // The service response should contain a string to indicate + // the next page of resources. + // A null value indicates no more pages. + string page_token = 1; + // The service may optionally include the total number of resources being paged. + int32 size = 2; + // The service may optionally include the offset of the next page of resources. + // A null value indicates no more pages. + int32 offset = 3; +} diff --git a/third_party/proto/atlas/resource/v1/resource.proto b/third_party/proto/atlas/resource/v1/resource.proto new file mode 100644 index 00000000..1520a97b --- /dev/null +++ b/third_party/proto/atlas/resource/v1/resource.proto @@ -0,0 +1,32 @@ +syntax = "proto3"; + +package atlas.resource.v1; + +import "protoc-gen-openapiv2/options/annotations.proto"; + +option go_package = "github.com/infobloxopen/atlas-app-toolkit/atlas/resource;resource"; + +// A number of application services require a mechanism to +// encode the identity of a particular resource across applications. +// The resource identifiers consist of the application ID, +// an application-defined resource type, +// and an application-defined ID for that resource +message Identifier { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema: { + type: STRING; + // TODO: update to correct name atlas.resource.v1.Identifier + description: "atlas.rpc.Identifier"; + }; + }; + + // An application identifier that will be used among + // other infrastructure services to identify the application + string application_name = 1; + + // An application specific type name of a resource + string resource_type = 2; + + // An application specific resource identity of a resource + string resource_id = 3; +} diff --git a/third_party/proto/google/README.md b/third_party/proto/google/README.md new file mode 100644 index 00000000..5fa3cb78 --- /dev/null +++ b/third_party/proto/google/README.md @@ -0,0 +1 @@ +Copy required dependencies from here https://github.com/googleapis/googleapis diff --git a/third_party/proto/google/api/annotations.proto b/third_party/proto/google/api/annotations.proto new file mode 100644 index 00000000..14a3f411 --- /dev/null +++ b/third_party/proto/google/api/annotations.proto @@ -0,0 +1,32 @@ +// Copyright (c) 2015, Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.api; + +// import "google/api/http.proto"; +import "google/protobuf/descriptor.proto"; + +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "AnnotationsProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +extend google.protobuf.MethodOptions { + // See `HttpRule`. + // HttpRule http = 72295728; + string http = 1234; +} diff --git a/third_party/proto/google/api/http.proto b/third_party/proto/google/api/http.proto new file mode 100644 index 00000000..69460cf7 --- /dev/null +++ b/third_party/proto/google/api/http.proto @@ -0,0 +1,375 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.api; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "HttpProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// Defines the HTTP configuration for an API service. It contains a list of +// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method +// to one or more HTTP REST API methods. +message Http { + // A list of HTTP configuration rules that apply to individual API methods. + // + // **NOTE:** All service configuration rules follow "last one wins" order. + repeated HttpRule rules = 1; + + // When set to true, URL path parameters will be fully URI-decoded except in + // cases of single segment matches in reserved expansion, where "%2F" will be + // left encoded. + // + // The default behavior is to not decode RFC 6570 reserved characters in multi + // segment matches. + bool fully_decode_reserved_expansion = 2; +} + +// # gRPC Transcoding +// +// gRPC Transcoding is a feature for mapping between a gRPC method and one or +// more HTTP REST endpoints. It allows developers to build a single API service +// that supports both gRPC APIs and REST APIs. Many systems, including [Google +// APIs](https://github.com/googleapis/googleapis), +// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC +// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), +// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature +// and use it for large scale production services. +// +// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies +// how different portions of the gRPC request message are mapped to the URL +// path, URL query parameters, and HTTP request body. It also controls how the +// gRPC response message is mapped to the HTTP response body. `HttpRule` is +// typically specified as an `google.api.http` annotation on the gRPC method. +// +// Each mapping specifies a URL path template and an HTTP method. The path +// template may refer to one or more fields in the gRPC request message, as long +// as each field is a non-repeated field with a primitive (non-message) type. +// The path template controls how fields of the request message are mapped to +// the URL path. +// +// Example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get: "/v1/{name=messages/*}" +// }; +// } +// } +// message GetMessageRequest { +// string name = 1; // Mapped to URL path. +// } +// message Message { +// string text = 1; // The resource content. +// } +// +// This enables an HTTP REST to gRPC mapping as below: +// +// HTTP | gRPC +// -----|----- +// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` +// +// Any fields in the request message which are not bound by the path template +// automatically become HTTP query parameters if there is no HTTP request body. +// For example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get:"/v1/messages/{message_id}" +// }; +// } +// } +// message GetMessageRequest { +// message SubMessage { +// string subfield = 1; +// } +// string message_id = 1; // Mapped to URL path. +// int64 revision = 2; // Mapped to URL query parameter `revision`. +// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. +// } +// +// This enables a HTTP JSON to RPC mapping as below: +// +// HTTP | gRPC +// -----|----- +// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | +// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: +// "foo"))` +// +// Note that fields which are mapped to URL query parameters must have a +// primitive type or a repeated primitive type or a non-repeated message type. +// In the case of a repeated type, the parameter can be repeated in the URL +// as `...?param=A¶m=B`. In the case of a message type, each field of the +// message is mapped to a separate parameter, such as +// `...?foo.a=A&foo.b=B&foo.c=C`. +// +// For HTTP methods that allow a request body, the `body` field +// specifies the mapping. Consider a REST update method on the +// message resource collection: +// +// service Messaging { +// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { +// option (google.api.http) = { +// patch: "/v1/messages/{message_id}" +// body: "message" +// }; +// } +// } +// message UpdateMessageRequest { +// string message_id = 1; // mapped to the URL +// Message message = 2; // mapped to the body +// } +// +// The following HTTP JSON to RPC mapping is enabled, where the +// representation of the JSON in the request body is determined by +// protos JSON encoding: +// +// HTTP | gRPC +// -----|----- +// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: +// "123456" message { text: "Hi!" })` +// +// The special name `*` can be used in the body mapping to define that +// every field not bound by the path template should be mapped to the +// request body. This enables the following alternative definition of +// the update method: +// +// service Messaging { +// rpc UpdateMessage(Message) returns (Message) { +// option (google.api.http) = { +// patch: "/v1/messages/{message_id}" +// body: "*" +// }; +// } +// } +// message Message { +// string message_id = 1; +// string text = 2; +// } +// +// +// The following HTTP JSON to RPC mapping is enabled: +// +// HTTP | gRPC +// -----|----- +// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: +// "123456" text: "Hi!")` +// +// Note that when using `*` in the body mapping, it is not possible to +// have HTTP parameters, as all fields not bound by the path end in +// the body. This makes this option more rarely used in practice when +// defining REST APIs. The common usage of `*` is in custom methods +// which don't use the URL at all for transferring data. +// +// It is possible to define multiple HTTP methods for one RPC by using +// the `additional_bindings` option. Example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get: "/v1/messages/{message_id}" +// additional_bindings { +// get: "/v1/users/{user_id}/messages/{message_id}" +// } +// }; +// } +// } +// message GetMessageRequest { +// string message_id = 1; +// string user_id = 2; +// } +// +// This enables the following two alternative HTTP JSON to RPC mappings: +// +// HTTP | gRPC +// -----|----- +// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` +// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: +// "123456")` +// +// ## Rules for HTTP mapping +// +// 1. Leaf request fields (recursive expansion nested messages in the request +// message) are classified into three categories: +// - Fields referred by the path template. They are passed via the URL path. +// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They are passed via the HTTP +// request body. +// - All other fields are passed via the URL query parameters, and the +// parameter name is the field path in the request message. A repeated +// field can be represented as multiple query parameters under the same +// name. +// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL query parameter, all fields +// are passed via URL path and HTTP request body. +// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP request body, all +// fields are passed via URL path and URL query parameters. +// +// ### Path template syntax +// +// Template = "/" Segments [ Verb ] ; +// Segments = Segment { "/" Segment } ; +// Segment = "*" | "**" | LITERAL | Variable ; +// Variable = "{" FieldPath [ "=" Segments ] "}" ; +// FieldPath = IDENT { "." IDENT } ; +// Verb = ":" LITERAL ; +// +// The syntax `*` matches a single URL path segment. The syntax `**` matches +// zero or more URL path segments, which must be the last part of the URL path +// except the `Verb`. +// +// The syntax `Variable` matches part of the URL path as specified by its +// template. A variable template must not contain other variables. If a variable +// matches a single path segment, its template may be omitted, e.g. `{var}` +// is equivalent to `{var=*}`. +// +// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` +// contains any reserved character, such characters should be percent-encoded +// before the matching. +// +// If a variable contains exactly one path segment, such as `"{var}"` or +// `"{var=*}"`, when such a variable is expanded into a URL path on the client +// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The +// server side does the reverse decoding. Such variables show up in the +// [Discovery +// Document](https://developers.google.com/discovery/v1/reference/apis) as +// `{var}`. +// +// If a variable contains multiple path segments, such as `"{var=foo/*}"` +// or `"{var=**}"`, when such a variable is expanded into a URL path on the +// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. +// The server side does the reverse decoding, except "%2F" and "%2f" are left +// unchanged. Such variables show up in the +// [Discovery +// Document](https://developers.google.com/discovery/v1/reference/apis) as +// `{+var}`. +// +// ## Using gRPC API Service Configuration +// +// gRPC API Service Configuration (service config) is a configuration language +// for configuring a gRPC service to become a user-facing product. The +// service config is simply the YAML representation of the `google.api.Service` +// proto message. +// +// As an alternative to annotating your proto file, you can configure gRPC +// transcoding in your service config YAML files. You do this by specifying a +// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same +// effect as the proto annotation. This can be particularly useful if you +// have a proto that is reused in multiple services. Note that any transcoding +// specified in the service config will override any matching transcoding +// configuration in the proto. +// +// Example: +// +// http: +// rules: +// # Selects a gRPC method and applies HttpRule to it. +// - selector: example.v1.Messaging.GetMessage +// get: /v1/messages/{message_id}/{sub.subfield} +// +// ## Special notes +// +// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the +// proto to JSON conversion must follow the [proto3 +// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). +// +// While the single segment variable follows the semantics of +// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String +// Expansion, the multi segment variable **does not** follow RFC 6570 Section +// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion +// does not expand special characters like `?` and `#`, which would lead +// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding +// for multi segment variables. +// +// The path variables **must not** refer to any repeated or mapped field, +// because client libraries are not capable of handling such variable expansion. +// +// The path variables **must not** capture the leading "/" character. The reason +// is that the most common use case "{var}" does not capture the leading "/" +// character. For consistency, all path variables must share the same behavior. +// +// Repeated message fields must not be mapped to URL query parameters, because +// no client library can support such complicated mapping. +// +// If an API needs to use a JSON array for request or response body, it can map +// the request or response body to a repeated field. However, some gRPC +// Transcoding implementations may not support this feature. +message HttpRule { + // Selects a method to which this rule applies. + // + // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. + string selector = 1; + + // Determines the URL pattern is matched by this rules. This pattern can be + // used with any of the {get|put|post|delete|patch} methods. A custom method + // can be defined using the 'custom' field. + oneof pattern { + // Maps to HTTP GET. Used for listing and getting information about + // resources. + string get = 2; + + // Maps to HTTP PUT. Used for replacing a resource. + string put = 3; + + // Maps to HTTP POST. Used for creating a resource or performing an action. + string post = 4; + + // Maps to HTTP DELETE. Used for deleting a resource. + string delete = 5; + + // Maps to HTTP PATCH. Used for updating a resource. + string patch = 6; + + // The custom pattern is used for specifying an HTTP method that is not + // included in the `pattern` field, such as HEAD, or "*" to leave the + // HTTP method unspecified for this rule. The wild-card rule is useful + // for services that provide content to Web (HTML) clients. + CustomHttpPattern custom = 8; + } + + // The name of the request field whose value is mapped to the HTTP request + // body, or `*` for mapping all request fields not captured by the path + // pattern to the HTTP body, or omitted for not having any HTTP request body. + // + // NOTE: the referred field must be present at the top-level of the request + // message type. + string body = 7; + + // Optional. The name of the response field whose value is mapped to the HTTP + // response body. When omitted, the entire response message will be used + // as the HTTP response body. + // + // NOTE: The referred field must be present at the top-level of the response + // message type. + string response_body = 12; + + // Additional HTTP bindings for the selector. Nested bindings must + // not contain an `additional_bindings` field themselves (that is, + // the nesting may only be one level deep). + repeated HttpRule additional_bindings = 11; +} + +// A custom pattern is used for defining custom HTTP verb. +message CustomHttpPattern { + // The name of this custom HTTP verb. + string kind = 1; + + // The path matched by this custom verb. + string path = 2; +} diff --git a/third_party/proto/google/protobuf/descriptor.proto b/third_party/proto/google/protobuf/descriptor.proto new file mode 100644 index 00000000..0214a5ae --- /dev/null +++ b/third_party/proto/google/protobuf/descriptor.proto @@ -0,0 +1,885 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Author: kenton@google.com (Kenton Varda) +// Based on original Protocol Buffers design by +// Sanjay Ghemawat, Jeff Dean, and others. +// +// The messages in this file describe the definitions found in .proto files. +// A valid .proto file can be translated directly to a FileDescriptorProto +// without any other information (e.g. without reading its imports). + + +syntax = "proto2"; + +package google.protobuf; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/descriptor;descriptor"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "DescriptorProtos"; +option csharp_namespace = "Google.Protobuf.Reflection"; +option objc_class_prefix = "GPB"; +option cc_enable_arenas = true; + +// descriptor.proto must be optimized for speed because reflection-based +// algorithms don't work during bootstrapping. +option optimize_for = SPEED; + +// The protocol compiler can output a FileDescriptorSet containing the .proto +// files it parses. +message FileDescriptorSet { + repeated FileDescriptorProto file = 1; +} + +// Describes a complete .proto file. +message FileDescriptorProto { + optional string name = 1; // file name, relative to root of source tree + optional string package = 2; // e.g. "foo", "foo.bar", etc. + + // Names of files imported by this file. + repeated string dependency = 3; + // Indexes of the public imported files in the dependency list above. + repeated int32 public_dependency = 10; + // Indexes of the weak imported files in the dependency list. + // For Google-internal migration only. Do not use. + repeated int32 weak_dependency = 11; + + // All top-level definitions in this file. + repeated DescriptorProto message_type = 4; + repeated EnumDescriptorProto enum_type = 5; + repeated ServiceDescriptorProto service = 6; + repeated FieldDescriptorProto extension = 7; + + optional FileOptions options = 8; + + // This field contains optional information about the original source code. + // You may safely remove this entire field without harming runtime + // functionality of the descriptors -- the information is needed only by + // development tools. + optional SourceCodeInfo source_code_info = 9; + + // The syntax of the proto file. + // The supported values are "proto2" and "proto3". + optional string syntax = 12; +} + +// Describes a message type. +message DescriptorProto { + optional string name = 1; + + repeated FieldDescriptorProto field = 2; + repeated FieldDescriptorProto extension = 6; + + repeated DescriptorProto nested_type = 3; + repeated EnumDescriptorProto enum_type = 4; + + message ExtensionRange { + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Exclusive. + + optional ExtensionRangeOptions options = 3; + } + repeated ExtensionRange extension_range = 5; + + repeated OneofDescriptorProto oneof_decl = 8; + + optional MessageOptions options = 7; + + // Range of reserved tag numbers. Reserved tag numbers may not be used by + // fields or extension ranges in the same message. Reserved ranges may + // not overlap. + message ReservedRange { + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Exclusive. + } + repeated ReservedRange reserved_range = 9; + // Reserved field names, which may not be used by fields in the same message. + // A given name may only be reserved once. + repeated string reserved_name = 10; +} + +message ExtensionRangeOptions { + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +// Describes a field within a message. +message FieldDescriptorProto { + enum Type { + // 0 is reserved for errors. + // Order is weird for historical reasons. + TYPE_DOUBLE = 1; + TYPE_FLOAT = 2; + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if + // negative values are likely. + TYPE_INT64 = 3; + TYPE_UINT64 = 4; + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if + // negative values are likely. + TYPE_INT32 = 5; + TYPE_FIXED64 = 6; + TYPE_FIXED32 = 7; + TYPE_BOOL = 8; + TYPE_STRING = 9; + // Tag-delimited aggregate. + // Group type is deprecated and not supported in proto3. However, Proto3 + // implementations should still be able to parse the group wire format and + // treat group fields as unknown fields. + TYPE_GROUP = 10; + TYPE_MESSAGE = 11; // Length-delimited aggregate. + + // New in version 2. + TYPE_BYTES = 12; + TYPE_UINT32 = 13; + TYPE_ENUM = 14; + TYPE_SFIXED32 = 15; + TYPE_SFIXED64 = 16; + TYPE_SINT32 = 17; // Uses ZigZag encoding. + TYPE_SINT64 = 18; // Uses ZigZag encoding. + } + + enum Label { + // 0 is reserved for errors + LABEL_OPTIONAL = 1; + LABEL_REQUIRED = 2; + LABEL_REPEATED = 3; + } + + optional string name = 1; + optional int32 number = 3; + optional Label label = 4; + + // If type_name is set, this need not be set. If both this and type_name + // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. + optional Type type = 5; + + // For message and enum types, this is the name of the type. If the name + // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping + // rules are used to find the type (i.e. first the nested types within this + // message are searched, then within the parent, on up to the root + // namespace). + optional string type_name = 6; + + // For extensions, this is the name of the type being extended. It is + // resolved in the same manner as type_name. + optional string extendee = 2; + + // For numeric types, contains the original text representation of the value. + // For booleans, "true" or "false". + // For strings, contains the default text contents (not escaped in any way). + // For bytes, contains the C escaped value. All bytes >= 128 are escaped. + // TODO(kenton): Base-64 encode? + optional string default_value = 7; + + // If set, gives the index of a oneof in the containing type's oneof_decl + // list. This field is a member of that oneof. + optional int32 oneof_index = 9; + + // JSON name of this field. The value is set by protocol compiler. If the + // user has set a "json_name" option on this field, that option's value + // will be used. Otherwise, it's deduced from the field's name by converting + // it to camelCase. + optional string json_name = 10; + + optional FieldOptions options = 8; +} + +// Describes a oneof. +message OneofDescriptorProto { + optional string name = 1; + optional OneofOptions options = 2; +} + +// Describes an enum type. +message EnumDescriptorProto { + optional string name = 1; + + repeated EnumValueDescriptorProto value = 2; + + optional EnumOptions options = 3; + + // Range of reserved numeric values. Reserved values may not be used by + // entries in the same enum. Reserved ranges may not overlap. + // + // Note that this is distinct from DescriptorProto.ReservedRange in that it + // is inclusive such that it can appropriately represent the entire int32 + // domain. + message EnumReservedRange { + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Inclusive. + } + + // Range of reserved numeric values. Reserved numeric values may not be used + // by enum values in the same enum declaration. Reserved ranges may not + // overlap. + repeated EnumReservedRange reserved_range = 4; + + // Reserved enum value names, which may not be reused. A given name may only + // be reserved once. + repeated string reserved_name = 5; +} + +// Describes a value within an enum. +message EnumValueDescriptorProto { + optional string name = 1; + optional int32 number = 2; + + optional EnumValueOptions options = 3; +} + +// Describes a service. +message ServiceDescriptorProto { + optional string name = 1; + repeated MethodDescriptorProto method = 2; + + optional ServiceOptions options = 3; +} + +// Describes a method of a service. +message MethodDescriptorProto { + optional string name = 1; + + // Input and output type names. These are resolved in the same way as + // FieldDescriptorProto.type_name, but must refer to a message type. + optional string input_type = 2; + optional string output_type = 3; + + optional MethodOptions options = 4; + + // Identifies if client streams multiple client messages + optional bool client_streaming = 5 [default = false]; + // Identifies if server streams multiple server messages + optional bool server_streaming = 6 [default = false]; +} + + +// =================================================================== +// Options + +// Each of the definitions above may have "options" attached. These are +// just annotations which may cause code to be generated slightly differently +// or may contain hints for code that manipulates protocol messages. +// +// Clients may define custom options as extensions of the *Options messages. +// These extensions may not yet be known at parsing time, so the parser cannot +// store the values in them. Instead it stores them in a field in the *Options +// message called uninterpreted_option. This field must have the same name +// across all *Options messages. We then use this field to populate the +// extensions when we build a descriptor, at which point all protos have been +// parsed and so all extensions are known. +// +// Extension numbers for custom options may be chosen as follows: +// * For options which will only be used within a single application or +// organization, or for experimental options, use field numbers 50000 +// through 99999. It is up to you to ensure that you do not use the +// same number for multiple options. +// * For options which will be published and used publicly by multiple +// independent entities, e-mail protobuf-global-extension-registry@google.com +// to reserve extension numbers. Simply provide your project name (e.g. +// Objective-C plugin) and your project website (if available) -- there's no +// need to explain how you intend to use them. Usually you only need one +// extension number. You can declare multiple options with only one extension +// number by putting them in a sub-message. See the Custom Options section of +// the docs for examples: +// https://developers.google.com/protocol-buffers/docs/proto#options +// If this turns out to be popular, a web service will be set up +// to automatically assign option numbers. + +message FileOptions { + + // Sets the Java package where classes generated from this .proto will be + // placed. By default, the proto package is used, but this is often + // inappropriate because proto packages do not normally start with backwards + // domain names. + optional string java_package = 1; + + + // If set, all the classes from the .proto file are wrapped in a single + // outer class with the given name. This applies to both Proto1 + // (equivalent to the old "--one_java_file" option) and Proto2 (where + // a .proto always translates to a single class, but you may want to + // explicitly choose the class name). + optional string java_outer_classname = 8; + + // If set true, then the Java code generator will generate a separate .java + // file for each top-level message, enum, and service defined in the .proto + // file. Thus, these types will *not* be nested inside the outer class + // named by java_outer_classname. However, the outer class will still be + // generated to contain the file's getDescriptor() method as well as any + // top-level extensions defined in the file. + optional bool java_multiple_files = 10 [default = false]; + + // This option does nothing. + optional bool java_generate_equals_and_hash = 20 [deprecated=true]; + + // If set true, then the Java2 code generator will generate code that + // throws an exception whenever an attempt is made to assign a non-UTF-8 + // byte sequence to a string field. + // Message reflection will do the same. + // However, an extension field still accepts non-UTF-8 byte sequences. + // This option has no effect on when used with the lite runtime. + optional bool java_string_check_utf8 = 27 [default = false]; + + + // Generated classes can be optimized for speed or code size. + enum OptimizeMode { + SPEED = 1; // Generate complete code for parsing, serialization, + // etc. + CODE_SIZE = 2; // Use ReflectionOps to implement these methods. + LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. + } + optional OptimizeMode optimize_for = 9 [default = SPEED]; + + // Sets the Go package where structs generated from this .proto will be + // placed. If omitted, the Go package will be derived from the following: + // - The basename of the package import path, if provided. + // - Otherwise, the package statement in the .proto file, if present. + // - Otherwise, the basename of the .proto file, without extension. + optional string go_package = 11; + + + + + // Should generic services be generated in each language? "Generic" services + // are not specific to any particular RPC system. They are generated by the + // main code generators in each language (without additional plugins). + // Generic services were the only kind of service generation supported by + // early versions of google.protobuf. + // + // Generic services are now considered deprecated in favor of using plugins + // that generate code specific to your particular RPC system. Therefore, + // these default to false. Old code which depends on generic services should + // explicitly set them to true. + optional bool cc_generic_services = 16 [default = false]; + optional bool java_generic_services = 17 [default = false]; + optional bool py_generic_services = 18 [default = false]; + optional bool php_generic_services = 42 [default = false]; + + // Is this file deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for everything in the file, or it will be completely ignored; in the very + // least, this is a formalization for deprecating files. + optional bool deprecated = 23 [default = false]; + + // Enables the use of arenas for the proto messages in this file. This applies + // only to generated classes for C++. + optional bool cc_enable_arenas = 31 [default = false]; + + + // Sets the objective c class prefix which is prepended to all objective c + // generated classes from this .proto. There is no default. + optional string objc_class_prefix = 36; + + // Namespace for generated classes; defaults to the package. + optional string csharp_namespace = 37; + + // By default Swift generators will take the proto package and CamelCase it + // replacing '.' with underscore and use that to prefix the types/symbols + // defined. When this options is provided, they will use this value instead + // to prefix the types/symbols defined. + optional string swift_prefix = 39; + + // Sets the php class prefix which is prepended to all php generated classes + // from this .proto. Default is empty. + optional string php_class_prefix = 40; + + // Use this option to change the namespace of php generated classes. Default + // is empty. When this option is empty, the package name will be used for + // determining the namespace. + optional string php_namespace = 41; + + // Use this option to change the namespace of php generated metadata classes. + // Default is empty. When this option is empty, the proto file name will be + // used for determining the namespace. + optional string php_metadata_namespace = 44; + + // Use this option to change the package of ruby generated classes. Default + // is empty. When this option is not set, the package name will be used for + // determining the ruby package. + optional string ruby_package = 45; + + + // The parser stores options it doesn't recognize here. + // See the documentation for the "Options" section above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. + // See the documentation for the "Options" section above. + extensions 1000 to max; + + //reserved 38; +} + +message MessageOptions { + // Set true to use the old proto1 MessageSet wire format for extensions. + // This is provided for backwards-compatibility with the MessageSet wire + // format. You should not use this for any other reason: It's less + // efficient, has fewer features, and is more complicated. + // + // The message must be defined exactly as follows: + // message Foo { + // option message_set_wire_format = true; + // extensions 4 to max; + // } + // Note that the message cannot have any defined fields; MessageSets only + // have extensions. + // + // All extensions of your type must be singular messages; e.g. they cannot + // be int32s, enums, or repeated messages. + // + // Because this is an option, the above two restrictions are not enforced by + // the protocol compiler. + optional bool message_set_wire_format = 1 [default = false]; + + // Disables the generation of the standard "descriptor()" accessor, which can + // conflict with a field of the same name. This is meant to make migration + // from proto1 easier; new code should avoid fields named "descriptor". + optional bool no_standard_descriptor_accessor = 2 [default = false]; + + // Is this message deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the message, or it will be completely ignored; in the very least, + // this is a formalization for deprecating messages. + optional bool deprecated = 3 [default = false]; + + // Whether the message is an automatically generated map entry type for the + // maps field. + // + // For maps fields: + // map map_field = 1; + // The parsed descriptor looks like: + // message MapFieldEntry { + // option map_entry = true; + // optional KeyType key = 1; + // optional ValueType value = 2; + // } + // repeated MapFieldEntry map_field = 1; + // + // Implementations may choose not to generate the map_entry=true message, but + // use a native map in the target language to hold the keys and values. + // The reflection APIs in such implementations still need to work as + // if the field is a repeated message field. + // + // NOTE: Do not set the option in .proto files. Always use the maps syntax + // instead. The option should only be implicitly set by the proto compiler + // parser. + optional bool map_entry = 7; + + //reserved 8; // javalite_serializable + //reserved 9; // javanano_as_lite + + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message FieldOptions { + // The ctype option instructs the C++ code generator to use a different + // representation of the field than it normally would. See the specific + // options below. This option is not yet implemented in the open source + // release -- sorry, we'll try to include it in a future version! + optional CType ctype = 1 [default = STRING]; + enum CType { + // Default mode. + STRING = 0; + + CORD = 1; + + STRING_PIECE = 2; + } + // The packed option can be enabled for repeated primitive fields to enable + // a more efficient representation on the wire. Rather than repeatedly + // writing the tag and type for each element, the entire array is encoded as + // a single length-delimited blob. In proto3, only explicit setting it to + // false will avoid using packed encoding. + optional bool packed = 2; + + // The jstype option determines the JavaScript type used for values of the + // field. The option is permitted only for 64 bit integral and fixed types + // (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING + // is represented as JavaScript string, which avoids loss of precision that + // can happen when a large value is converted to a floating point JavaScript. + // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to + // use the JavaScript "number" type. The behavior of the default option + // JS_NORMAL is implementation dependent. + // + // This option is an enum to permit additional types to be added, e.g. + // goog.math.Integer. + optional JSType jstype = 6 [default = JS_NORMAL]; + enum JSType { + // Use the default type. + JS_NORMAL = 0; + + // Use JavaScript strings. + JS_STRING = 1; + + // Use JavaScript numbers. + JS_NUMBER = 2; + } + + // Should this field be parsed lazily? Lazy applies only to message-type + // fields. It means that when the outer message is initially parsed, the + // inner message's contents will not be parsed but instead stored in encoded + // form. The inner message will actually be parsed when it is first accessed. + // + // This is only a hint. Implementations are free to choose whether to use + // eager or lazy parsing regardless of the value of this option. However, + // setting this option true suggests that the protocol author believes that + // using lazy parsing on this field is worth the additional bookkeeping + // overhead typically needed to implement it. + // + // This option does not affect the public interface of any generated code; + // all method signatures remain the same. Furthermore, thread-safety of the + // interface is not affected by this option; const methods remain safe to + // call from multiple threads concurrently, while non-const methods continue + // to require exclusive access. + // + // + // Note that implementations may choose not to check required fields within + // a lazy sub-message. That is, calling IsInitialized() on the outer message + // may return true even if the inner message has missing required fields. + // This is necessary because otherwise the inner message would have to be + // parsed in order to perform the check, defeating the purpose of lazy + // parsing. An implementation which chooses not to check required fields + // must be consistent about it. That is, for any particular sub-message, the + // implementation must either *always* check its required fields, or *never* + // check its required fields, regardless of whether or not the message has + // been parsed. + optional bool lazy = 5 [default = false]; + + // Is this field deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for accessors, or it will be completely ignored; in the very least, this + // is a formalization for deprecating fields. + optional bool deprecated = 3 [default = false]; + + // For Google-internal migration only. Do not use. + optional bool weak = 10 [default = false]; + + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; + + //reserved 4; // removed jtype +} + +message OneofOptions { + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message EnumOptions { + + // Set this option to true to allow mapping different tag names to the same + // value. + optional bool allow_alias = 2; + + // Is this enum deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the enum, or it will be completely ignored; in the very least, this + // is a formalization for deprecating enums. + optional bool deprecated = 3 [default = false]; + + //reserved 5; // javanano_as_lite + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message EnumValueOptions { + // Is this enum value deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the enum value, or it will be completely ignored; in the very least, + // this is a formalization for deprecating enum values. + optional bool deprecated = 1 [default = false]; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message ServiceOptions { + + // Note: Field numbers 1 through 32 are reserved for Google's internal RPC + // framework. We apologize for hoarding these numbers to ourselves, but + // we were already using them long before we decided to release Protocol + // Buffers. + + // Is this service deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the service, or it will be completely ignored; in the very least, + // this is a formalization for deprecating services. + optional bool deprecated = 33 [default = false]; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message MethodOptions { + + // Note: Field numbers 1 through 32 are reserved for Google's internal RPC + // framework. We apologize for hoarding these numbers to ourselves, but + // we were already using them long before we decided to release Protocol + // Buffers. + + // Is this method deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the method, or it will be completely ignored; in the very least, + // this is a formalization for deprecating methods. + optional bool deprecated = 33 [default = false]; + + // Is this method side-effect-free (or safe in HTTP parlance), or idempotent, + // or neither? HTTP based RPC implementation may choose GET verb for safe + // methods, and PUT verb for idempotent methods instead of the default POST. + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0; + NO_SIDE_EFFECTS = 1; // implies idempotent + IDEMPOTENT = 2; // idempotent, but may have side effects + } + optional IdempotencyLevel idempotency_level = 34 + [default = IDEMPOTENCY_UNKNOWN]; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + + +// A message representing a option the parser does not recognize. This only +// appears in options protos created by the compiler::Parser class. +// DescriptorPool resolves these when building Descriptor objects. Therefore, +// options protos in descriptor objects (e.g. returned by Descriptor::options(), +// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions +// in them. +message UninterpretedOption { + // The name of the uninterpreted option. Each string represents a segment in + // a dot-separated name. is_extension is true iff a segment represents an + // extension (denoted with parentheses in options specs in .proto files). + // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents + // "foo.(bar.baz).qux". + message NamePart { + required string name_part = 1; + required bool is_extension = 2; + } + repeated NamePart name = 2; + + // The value of the uninterpreted option, in whatever type the tokenizer + // identified it as during parsing. Exactly one of these should be set. + optional string identifier_value = 3; + optional uint64 positive_int_value = 4; + optional int64 negative_int_value = 5; + optional double double_value = 6; + optional bytes string_value = 7; + optional string aggregate_value = 8; +} + +// =================================================================== +// Optional source code info + +// Encapsulates information about the original source file from which a +// FileDescriptorProto was generated. +message SourceCodeInfo { + // A Location identifies a piece of source code in a .proto file which + // corresponds to a particular definition. This information is intended + // to be useful to IDEs, code indexers, documentation generators, and similar + // tools. + // + // For example, say we have a file like: + // message Foo { + // optional string foo = 1; + // } + // Let's look at just the field definition: + // optional string foo = 1; + // ^ ^^ ^^ ^ ^^^ + // a bc de f ghi + // We have the following locations: + // span path represents + // [a,i) [ 4, 0, 2, 0 ] The whole field definition. + // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). + // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). + // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). + // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). + // + // Notes: + // - A location may refer to a repeated field itself (i.e. not to any + // particular index within it). This is used whenever a set of elements are + // logically enclosed in a single code segment. For example, an entire + // extend block (possibly containing multiple extension definitions) will + // have an outer location whose path refers to the "extensions" repeated + // field without an index. + // - Multiple locations may have the same path. This happens when a single + // logical declaration is spread out across multiple places. The most + // obvious example is the "extend" block again -- there may be multiple + // extend blocks in the same scope, each of which will have the same path. + // - A location's span is not always a subset of its parent's span. For + // example, the "extendee" of an extension declaration appears at the + // beginning of the "extend" block and is shared by all extensions within + // the block. + // - Just because a location's span is a subset of some other location's span + // does not mean that it is a descendant. For example, a "group" defines + // both a type and a field in a single declaration. Thus, the locations + // corresponding to the type and field and their components will overlap. + // - Code which tries to interpret locations should probably be designed to + // ignore those that it doesn't understand, as more types of locations could + // be recorded in the future. + repeated Location location = 1; + message Location { + // Identifies which part of the FileDescriptorProto was defined at this + // location. + // + // Each element is a field number or an index. They form a path from + // the root FileDescriptorProto to the place where the definition. For + // example, this path: + // [ 4, 3, 2, 7, 1 ] + // refers to: + // file.message_type(3) // 4, 3 + // .field(7) // 2, 7 + // .name() // 1 + // This is because FileDescriptorProto.message_type has field number 4: + // repeated DescriptorProto message_type = 4; + // and DescriptorProto.field has field number 2: + // repeated FieldDescriptorProto field = 2; + // and FieldDescriptorProto.name has field number 1: + // optional string name = 1; + // + // Thus, the above path gives the location of a field name. If we removed + // the last element: + // [ 4, 3, 2, 7 ] + // this path refers to the whole field declaration (from the beginning + // of the label to the terminating semicolon). + repeated int32 path = 1 [packed = true]; + + // Always has exactly three or four elements: start line, start column, + // end line (optional, otherwise assumed same as start line), end column. + // These are packed into a single field for efficiency. Note that line + // and column numbers are zero-based -- typically you will want to add + // 1 to each before displaying to a user. + repeated int32 span = 2 [packed = true]; + + // If this SourceCodeInfo represents a complete declaration, these are any + // comments appearing before and after the declaration which appear to be + // attached to the declaration. + // + // A series of line comments appearing on consecutive lines, with no other + // tokens appearing on those lines, will be treated as a single comment. + // + // leading_detached_comments will keep paragraphs of comments that appear + // before (but not connected to) the current element. Each paragraph, + // separated by empty lines, will be one comment element in the repeated + // field. + // + // Only the comment content is provided; comment markers (e.g. //) are + // stripped out. For block comments, leading whitespace and an asterisk + // will be stripped from the beginning of each line other than the first. + // Newlines are included in the output. + // + // Examples: + // + // optional int32 foo = 1; // Comment attached to foo. + // // Comment attached to bar. + // optional int32 bar = 2; + // + // optional string baz = 3; + // // Comment attached to baz. + // // Another line attached to baz. + // + // // Comment attached to qux. + // // + // // Another line attached to qux. + // optional double qux = 4; + // + // // Detached comment for corge. This is not leading or trailing comments + // // to qux or corge because there are blank lines separating it from + // // both. + // + // // Detached comment for corge paragraph 2. + // + // optional string corge = 5; + // /* Block comment attached + // * to corge. Leading asterisks + // * will be removed. */ + // /* Block comment attached to + // * grault. */ + // optional int32 grault = 6; + // + // // ignored detached comments. + optional string leading_comments = 3; + optional string trailing_comments = 4; + repeated string leading_detached_comments = 6; + } +} + +// Describes the relationship between generated code and its original source +// file. A GeneratedCodeInfo message is associated with only one generated +// source file, but may contain references to different source .proto files. +message GeneratedCodeInfo { + // An Annotation connects some span of text in generated code to an element + // of its generating .proto file. + repeated Annotation annotation = 1; + message Annotation { + // Identifies the element in the original source .proto file. This field + // is formatted the same as SourceCodeInfo.Location.path. + repeated int32 path = 1 [packed = true]; + + // Identifies the filesystem path to the original source .proto. + optional string source_file = 2; + + // Identifies the starting offset in bytes in the generated code + // that relates to the identified object. + optional int32 begin = 3; + + // Identifies the ending offset in bytes in the generated code that + // relates to the identified offset. The end offset should be one past + // the last relevant byte (so the length of the text = end - begin). + optional int32 end = 4; + } +} diff --git a/third_party/proto/google/protobuf/timestamp.proto b/third_party/proto/google/protobuf/timestamp.proto new file mode 100644 index 00000000..0ebe36ea --- /dev/null +++ b/third_party/proto/google/protobuf/timestamp.proto @@ -0,0 +1,138 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option cc_enable_arenas = true; +option go_package = "types"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "TimestampProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +// A Timestamp represents a point in time independent of any time zone or local +// calendar, encoded as a count of seconds and fractions of seconds at +// nanosecond resolution. The count is relative to an epoch at UTC midnight on +// January 1, 1970, in the proleptic Gregorian calendar which extends the +// Gregorian calendar backwards to year one. +// +// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap +// second table is needed for interpretation, using a [24-hour linear +// smear](https://developers.google.com/time/smear). +// +// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By +// restricting to that range, we ensure that we can convert to and from [RFC +// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. +// +// # Examples +// +// Example 1: Compute Timestamp from POSIX `time()`. +// +// Timestamp timestamp; +// timestamp.set_seconds(time(NULL)); +// timestamp.set_nanos(0); +// +// Example 2: Compute Timestamp from POSIX `gettimeofday()`. +// +// struct timeval tv; +// gettimeofday(&tv, NULL); +// +// Timestamp timestamp; +// timestamp.set_seconds(tv.tv_sec); +// timestamp.set_nanos(tv.tv_usec * 1000); +// +// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. +// +// FILETIME ft; +// GetSystemTimeAsFileTime(&ft); +// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; +// +// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z +// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. +// Timestamp timestamp; +// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); +// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); +// +// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. +// +// long millis = System.currentTimeMillis(); +// +// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) +// .setNanos((int) ((millis % 1000) * 1000000)).build(); +// +// +// Example 5: Compute Timestamp from current time in Python. +// +// timestamp = Timestamp() +// timestamp.GetCurrentTime() +// +// # JSON Mapping +// +// In JSON format, the Timestamp type is encoded as a string in the +// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the +// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" +// where {year} is always expressed using four digits while {month}, {day}, +// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional +// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), +// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone +// is required. A proto3 JSON serializer should always use UTC (as indicated by +// "Z") when printing the Timestamp type and a proto3 JSON parser should be +// able to accept both UTC and other timezones (as indicated by an offset). +// +// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past +// 01:30 UTC on January 15, 2017. +// +// In JavaScript, one can convert a Date object to this format using the +// standard +// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) +// method. In Python, a standard `datetime.datetime` object can be converted +// to this format using +// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with +// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use +// the Joda Time's [`ISODateTimeFormat.dateTime()`]( +// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D +// ) to obtain a formatter capable of generating timestamps in this format. +// +// +message Timestamp { + // Represents seconds of UTC time since Unix epoch + // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + // 9999-12-31T23:59:59Z inclusive. + int64 seconds = 1; + + // Non-negative fractions of a second at nanosecond resolution. Negative + // second values with fractions must still have non-negative nanos values + // that count forward in time. Must be from 0 to 999,999,999 + // inclusive. + int32 nanos = 2; +} diff --git a/third_party/proto/protoc-gen-openapiv2/options/annotations.proto b/third_party/proto/protoc-gen-openapiv2/options/annotations.proto new file mode 100644 index 00000000..1c189e20 --- /dev/null +++ b/third_party/proto/protoc-gen-openapiv2/options/annotations.proto @@ -0,0 +1,44 @@ +syntax = "proto3"; + +package grpc.gateway.protoc_gen_openapiv2.options; + +option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"; + +import "google/protobuf/descriptor.proto"; +import "protoc-gen-openapiv2/options/openapiv2.proto"; + +extend google.protobuf.FileOptions { + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + Swagger openapiv2_swagger = 1042; +} +extend google.protobuf.MethodOptions { + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + Operation openapiv2_operation = 1042; +} +extend google.protobuf.MessageOptions { + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + Schema openapiv2_schema = 1042; +} +extend google.protobuf.ServiceOptions { + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + Tag openapiv2_tag = 1042; +} +extend google.protobuf.FieldOptions { + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + JSONSchema openapiv2_field = 1042; +} diff --git a/third_party/proto/protoc-gen-openapiv2/options/openapiv2.proto b/third_party/proto/protoc-gen-openapiv2/options/openapiv2.proto new file mode 100644 index 00000000..7be1fb57 --- /dev/null +++ b/third_party/proto/protoc-gen-openapiv2/options/openapiv2.proto @@ -0,0 +1,645 @@ +syntax = "proto3"; + +package grpc.gateway.protoc_gen_openapiv2.options; + +option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"; + +import "google/protobuf/struct.proto"; + +// Scheme describes the schemes supported by the OpenAPI Swagger +// and Operation objects. +enum Scheme { + UNKNOWN = 0; + HTTP = 1; + HTTPS = 2; + WS = 3; + WSS = 4; +} + +// `Swagger` is a representation of OpenAPI v2 specification's Swagger object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// title: "Echo API"; +// version: "1.0"; +// description: "; +// contact: { +// name: "gRPC-Gateway project"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// email: "none@example.com"; +// }; +// license: { +// name: "BSD 3-Clause License"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt"; +// }; +// }; +// schemes: HTTPS; +// consumes: "application/json"; +// produces: "application/json"; +// }; +// +message Swagger { + // Specifies the OpenAPI Specification version being used. It can be + // used by the OpenAPI UI and other clients to interpret the API listing. The + // value MUST be "2.0". + string swagger = 1; + // Provides metadata about the API. The metadata can be used by the + // clients if needed. + Info info = 2; + // The host (name or ip) serving the API. This MUST be the host only and does + // not include the scheme nor sub-paths. It MAY include a port. If the host is + // not included, the host serving the documentation is to be used (including + // the port). The host does not support path templating. + string host = 3; + // The base path on which the API is served, which is relative to the host. If + // it is not included, the API is served directly under the host. The value + // MUST start with a leading slash (/). The basePath does not support path + // templating. + // Note that using `base_path` does not change the endpoint paths that are + // generated in the resulting OpenAPI file. If you wish to use `base_path` + // with relatively generated OpenAPI paths, the `base_path` prefix must be + // manually removed from your `google.api.http` paths and your code changed to + // serve the API from the `base_path`. + string base_path = 4; + // The transfer protocol of the API. Values MUST be from the list: "http", + // "https", "ws", "wss". If the schemes is not included, the default scheme to + // be used is the one used to access the OpenAPI definition itself. + repeated Scheme schemes = 5; + // A list of MIME types the APIs can consume. This is global to all APIs but + // can be overridden on specific API calls. Value MUST be as described under + // Mime Types. + repeated string consumes = 6; + // A list of MIME types the APIs can produce. This is global to all APIs but + // can be overridden on specific API calls. Value MUST be as described under + // Mime Types. + repeated string produces = 7; + // field 8 is reserved for 'paths'. + reserved 8; + // field 9 is reserved for 'definitions', which at this time are already + // exposed as and customizable as proto messages. + reserved 9; + // An object to hold responses that can be used across operations. This + // property does not define global responses for all operations. + map responses = 10; + // Security scheme definitions that can be used across the specification. + SecurityDefinitions security_definitions = 11; + // A declaration of which security schemes are applied for the API as a whole. + // The list of values describes alternative security schemes that can be used + // (that is, there is a logical OR between the security requirements). + // Individual operations can override this definition. + repeated SecurityRequirement security = 12; + // field 13 is reserved for 'tags', which are supposed to be exposed as and + // customizable as proto services. TODO(ivucica): add processing of proto + // service objects into OpenAPI v2 Tag objects. + reserved 13; + // Additional external documentation. + ExternalDocumentation external_docs = 14; + map extensions = 15; +} + +// `Operation` is a representation of OpenAPI v2 specification's Operation object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject +// +// Example: +// +// service EchoService { +// rpc Echo(SimpleMessage) returns (SimpleMessage) { +// option (google.api.http) = { +// get: "/v1/example/echo/{id}" +// }; +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { +// summary: "Get a message."; +// operation_id: "getMessage"; +// tags: "echo"; +// responses: { +// key: "200" +// value: { +// description: "OK"; +// } +// } +// }; +// } +// } +message Operation { + // A list of tags for API documentation control. Tags can be used for logical + // grouping of operations by resources or any other qualifier. + repeated string tags = 1; + // A short summary of what the operation does. For maximum readability in the + // swagger-ui, this field SHOULD be less than 120 characters. + string summary = 2; + // A verbose explanation of the operation behavior. GFM syntax can be used for + // rich text representation. + string description = 3; + // Additional external documentation for this operation. + ExternalDocumentation external_docs = 4; + // Unique string used to identify the operation. The id MUST be unique among + // all operations described in the API. Tools and libraries MAY use the + // operationId to uniquely identify an operation, therefore, it is recommended + // to follow common programming naming conventions. + string operation_id = 5; + // A list of MIME types the operation can consume. This overrides the consumes + // definition at the OpenAPI Object. An empty value MAY be used to clear the + // global definition. Value MUST be as described under Mime Types. + repeated string consumes = 6; + // A list of MIME types the operation can produce. This overrides the produces + // definition at the OpenAPI Object. An empty value MAY be used to clear the + // global definition. Value MUST be as described under Mime Types. + repeated string produces = 7; + // field 8 is reserved for 'parameters'. + reserved 8; + // The list of possible responses as they are returned from executing this + // operation. + map responses = 9; + // The transfer protocol for the operation. Values MUST be from the list: + // "http", "https", "ws", "wss". The value overrides the OpenAPI Object + // schemes definition. + repeated Scheme schemes = 10; + // Declares this operation to be deprecated. Usage of the declared operation + // should be refrained. Default value is false. + bool deprecated = 11; + // A declaration of which security schemes are applied for this operation. The + // list of values describes alternative security schemes that can be used + // (that is, there is a logical OR between the security requirements). This + // definition overrides any declared top-level security. To remove a top-level + // security declaration, an empty array can be used. + repeated SecurityRequirement security = 12; + map extensions = 13; +} + +// `Header` is a representation of OpenAPI v2 specification's Header object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject +// +message Header { + // `Description` is a short description of the header. + string description = 1; + // The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. + string type = 2; + // `Format` The extending format for the previously mentioned type. + string format = 3; + // field 4 is reserved for 'items', but in OpenAPI-specific way. + reserved 4; + // field 5 is reserved `Collection Format` Determines the format of the array if type array is used. + reserved 5; + // `Default` Declares the value of the header that the server will use if none is provided. + // See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. + // Unlike JSON Schema this value MUST conform to the defined type for the header. + string default = 6; + // field 7 is reserved for 'maximum'. + reserved 7; + // field 8 is reserved for 'exclusiveMaximum'. + reserved 8; + // field 9 is reserved for 'minimum'. + reserved 9; + // field 10 is reserved for 'exclusiveMinimum'. + reserved 10; + // field 11 is reserved for 'maxLength'. + reserved 11; + // field 12 is reserved for 'minLength'. + reserved 12; + // 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3. + string pattern = 13; + // field 14 is reserved for 'maxItems'. + reserved 14; + // field 15 is reserved for 'minItems'. + reserved 15; + // field 16 is reserved for 'uniqueItems'. + reserved 16; + // field 17 is reserved for 'enum'. + reserved 17; + // field 18 is reserved for 'multipleOf'. + reserved 18; +} + +// `Response` is a representation of OpenAPI v2 specification's Response object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject +// +message Response { + // `Description` is a short description of the response. + // GFM syntax can be used for rich text representation. + string description = 1; + // `Schema` optionally defines the structure of the response. + // If `Schema` is not provided, it means there is no content to the response. + Schema schema = 2; + // `Headers` A list of headers that are sent with the response. + // `Header` name is expected to be a string in the canonical format of the MIME header key + // See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey + map headers = 3; + // `Examples` gives per-mimetype response examples. + // See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object + map examples = 4; + map extensions = 5; +} + +// `Info` is a representation of OpenAPI v2 specification's Info object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// title: "Echo API"; +// version: "1.0"; +// description: "; +// contact: { +// name: "gRPC-Gateway project"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// email: "none@example.com"; +// }; +// license: { +// name: "BSD 3-Clause License"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt"; +// }; +// }; +// ... +// }; +// +message Info { + // The title of the application. + string title = 1; + // A short description of the application. GFM syntax can be used for rich + // text representation. + string description = 2; + // The Terms of Service for the API. + string terms_of_service = 3; + // The contact information for the exposed API. + Contact contact = 4; + // The license information for the exposed API. + License license = 5; + // Provides the version of the application API (not to be confused + // with the specification version). + string version = 6; + map extensions = 7; +} + +// `Contact` is a representation of OpenAPI v2 specification's Contact object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// ... +// contact: { +// name: "gRPC-Gateway project"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// email: "none@example.com"; +// }; +// ... +// }; +// ... +// }; +// +message Contact { + // The identifying name of the contact person/organization. + string name = 1; + // The URL pointing to the contact information. MUST be in the format of a + // URL. + string url = 2; + // The email address of the contact person/organization. MUST be in the format + // of an email address. + string email = 3; +} + +// `License` is a representation of OpenAPI v2 specification's License object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// ... +// license: { +// name: "BSD 3-Clause License"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt"; +// }; +// ... +// }; +// ... +// }; +// +message License { + // The license name used for the API. + string name = 1; + // A URL to the license used for the API. MUST be in the format of a URL. + string url = 2; +} + +// `ExternalDocumentation` is a representation of OpenAPI v2 specification's +// ExternalDocumentation object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// ... +// external_docs: { +// description: "More about gRPC-Gateway"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// } +// ... +// }; +// +message ExternalDocumentation { + // A short description of the target documentation. GFM syntax can be used for + // rich text representation. + string description = 1; + // The URL for the target documentation. Value MUST be in the format + // of a URL. + string url = 2; +} + +// `Schema` is a representation of OpenAPI v2 specification's Schema object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject +// +message Schema { + JSONSchema json_schema = 1; + // Adds support for polymorphism. The discriminator is the schema property + // name that is used to differentiate between other schema that inherit this + // schema. The property name used MUST be defined at this schema and it MUST + // be in the required property list. When used, the value MUST be the name of + // this schema or any schema that inherits it. + string discriminator = 2; + // Relevant only for Schema "properties" definitions. Declares the property as + // "read only". This means that it MAY be sent as part of a response but MUST + // NOT be sent as part of the request. Properties marked as readOnly being + // true SHOULD NOT be in the required list of the defined schema. Default + // value is false. + bool read_only = 3; + // field 4 is reserved for 'xml'. + reserved 4; + // Additional external documentation for this schema. + ExternalDocumentation external_docs = 5; + // A free-form property to include an example of an instance for this schema in JSON. + // This is copied verbatim to the output. + string example = 6; +} + +// `JSONSchema` represents properties from JSON Schema taken, and as used, in +// the OpenAPI v2 spec. +// +// This includes changes made by OpenAPI v2. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject +// +// See also: https://cswr.github.io/JsonSchema/spec/basic_types/, +// https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json +// +// Example: +// +// message SimpleMessage { +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { +// json_schema: { +// title: "SimpleMessage" +// description: "A simple message." +// required: ["id"] +// } +// }; +// +// // Id represents the message identifier. +// string id = 1; [ +// (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { +// {description: "The unique identifier of the simple message." +// }]; +// } +// +message JSONSchema { + // field 1 is reserved for '$id', omitted from OpenAPI v2. + reserved 1; + // field 2 is reserved for '$schema', omitted from OpenAPI v2. + reserved 2; + // Ref is used to define an external reference to include in the message. + // This could be a fully qualified proto message reference, and that type must + // be imported into the protofile. If no message is identified, the Ref will + // be used verbatim in the output. + // For example: + // `ref: ".google.protobuf.Timestamp"`. + string ref = 3; + // field 4 is reserved for '$comment', omitted from OpenAPI v2. + reserved 4; + // The title of the schema. + string title = 5; + // A short description of the schema. + string description = 6; + string default = 7; + bool read_only = 8; + // A free-form property to include a JSON example of this field. This is copied + // verbatim to the output swagger.json. Quotes must be escaped. + // This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject + string example = 9; + double multiple_of = 10; + // Maximum represents an inclusive upper limit for a numeric instance. The + // value of MUST be a number, + double maximum = 11; + bool exclusive_maximum = 12; + // minimum represents an inclusive lower limit for a numeric instance. The + // value of MUST be a number, + double minimum = 13; + bool exclusive_minimum = 14; + uint64 max_length = 15; + uint64 min_length = 16; + string pattern = 17; + // field 18 is reserved for 'additionalItems', omitted from OpenAPI v2. + reserved 18; + // field 19 is reserved for 'items', but in OpenAPI-specific way. + // TODO(ivucica): add 'items'? + reserved 19; + uint64 max_items = 20; + uint64 min_items = 21; + bool unique_items = 22; + // field 23 is reserved for 'contains', omitted from OpenAPI v2. + reserved 23; + uint64 max_properties = 24; + uint64 min_properties = 25; + repeated string required = 26; + // field 27 is reserved for 'additionalProperties', but in OpenAPI-specific + // way. TODO(ivucica): add 'additionalProperties'? + reserved 27; + // field 28 is reserved for 'definitions', omitted from OpenAPI v2. + reserved 28; + // field 29 is reserved for 'properties', but in OpenAPI-specific way. + // TODO(ivucica): add 'additionalProperties'? + reserved 29; + // following fields are reserved, as the properties have been omitted from + // OpenAPI v2: + // patternProperties, dependencies, propertyNames, const + reserved 30 to 33; + // Items in 'array' must be unique. + repeated string array = 34; + + enum JSONSchemaSimpleTypes { + UNKNOWN = 0; + ARRAY = 1; + BOOLEAN = 2; + INTEGER = 3; + NULL = 4; + NUMBER = 5; + OBJECT = 6; + STRING = 7; + } + + repeated JSONSchemaSimpleTypes type = 35; + // `Format` + string format = 36; + // following fields are reserved, as the properties have been omitted from + // OpenAPI v2: contentMediaType, contentEncoding, if, then, else + reserved 37 to 41; + // field 42 is reserved for 'allOf', but in OpenAPI-specific way. + // TODO(ivucica): add 'allOf'? + reserved 42; + // following fields are reserved, as the properties have been omitted from + // OpenAPI v2: + // anyOf, oneOf, not + reserved 43 to 45; + // Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 + repeated string enum = 46; +} + +// `Tag` is a representation of OpenAPI v2 specification's Tag object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject +// +message Tag { + // field 1 is reserved for 'name'. In our generator, this is (to be) extracted + // from the name of proto service, and thus not exposed to the user, as + // changing tag object's name would break the link to the references to the + // tag in individual operation specifications. + // + // TODO(ivucica): Add 'name' property. Use it to allow override of the name of + // global Tag object, then use that name to reference the tag throughout the + // OpenAPI file. + reserved 1; + // A short description for the tag. GFM syntax can be used for rich text + // representation. + string description = 2; + // Additional external documentation for this tag. + ExternalDocumentation external_docs = 3; +} + +// `SecurityDefinitions` is a representation of OpenAPI v2 specification's +// Security Definitions object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject +// +// A declaration of the security schemes available to be used in the +// specification. This does not enforce the security schemes on the operations +// and only serves to provide the relevant details for each scheme. +message SecurityDefinitions { + // A single security scheme definition, mapping a "name" to the scheme it + // defines. + map security = 1; +} + +// `SecurityScheme` is a representation of OpenAPI v2 specification's +// Security Scheme object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject +// +// Allows the definition of a security scheme that can be used by the +// operations. Supported schemes are basic authentication, an API key (either as +// a header or as a query parameter) and OAuth2's common flows (implicit, +// password, application and access code). +message SecurityScheme { + // The type of the security scheme. Valid values are "basic", + // "apiKey" or "oauth2". + enum Type { + TYPE_INVALID = 0; + TYPE_BASIC = 1; + TYPE_API_KEY = 2; + TYPE_OAUTH2 = 3; + } + + // The location of the API key. Valid values are "query" or "header". + enum In { + IN_INVALID = 0; + IN_QUERY = 1; + IN_HEADER = 2; + } + + // The flow used by the OAuth2 security scheme. Valid values are + // "implicit", "password", "application" or "accessCode". + enum Flow { + FLOW_INVALID = 0; + FLOW_IMPLICIT = 1; + FLOW_PASSWORD = 2; + FLOW_APPLICATION = 3; + FLOW_ACCESS_CODE = 4; + } + + // The type of the security scheme. Valid values are "basic", + // "apiKey" or "oauth2". + Type type = 1; + // A short description for security scheme. + string description = 2; + // The name of the header or query parameter to be used. + // Valid for apiKey. + string name = 3; + // The location of the API key. Valid values are "query" or + // "header". + // Valid for apiKey. + In in = 4; + // The flow used by the OAuth2 security scheme. Valid values are + // "implicit", "password", "application" or "accessCode". + // Valid for oauth2. + Flow flow = 5; + // The authorization URL to be used for this flow. This SHOULD be in + // the form of a URL. + // Valid for oauth2/implicit and oauth2/accessCode. + string authorization_url = 6; + // The token URL to be used for this flow. This SHOULD be in the + // form of a URL. + // Valid for oauth2/password, oauth2/application and oauth2/accessCode. + string token_url = 7; + // The available scopes for the OAuth2 security scheme. + // Valid for oauth2. + Scopes scopes = 8; + map extensions = 9; +} + +// `SecurityRequirement` is a representation of OpenAPI v2 specification's +// Security Requirement object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject +// +// Lists the required security schemes to execute this operation. The object can +// have multiple security schemes declared in it which are all required (that +// is, there is a logical AND between the schemes). +// +// The name used for each property MUST correspond to a security scheme +// declared in the Security Definitions. +message SecurityRequirement { + // If the security scheme is of type "oauth2", then the value is a list of + // scope names required for the execution. For other security scheme types, + // the array MUST be empty. + message SecurityRequirementValue { + repeated string scope = 1; + } + // Each name must correspond to a security scheme which is declared in + // the Security Definitions. If the security scheme is of type "oauth2", + // then the value is a list of scope names required for the execution. + // For other security scheme types, the array MUST be empty. + map security_requirement = 1; +} + +// `Scopes` is a representation of OpenAPI v2 specification's Scopes object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject +// +// Lists the available scopes for an OAuth2 security scheme. +message Scopes { + // Maps between a name of a scope to a short description of it (as the value + // of the property). + map scope = 1; +} diff --git a/types/marshal_test.go b/types/marshal_test.go index 0155f458..c696a7c6 100644 --- a/types/marshal_test.go +++ b/types/marshal_test.go @@ -1,11 +1,12 @@ package types import ( - "reflect" "strings" "testing" "github.com/golang/protobuf/jsonpb" + "github.com/google/go-cmp/cmp" + "google.golang.org/protobuf/testing/protocmp" ) // WrapperMessage implements protobuf.Message but is not a normal generated message type. @@ -30,27 +31,26 @@ func (m *WrapperMessage) ProtoMessage() { func TestSuccessfulUnmarshalTypes(t *testing.T) { unmarshaler := &jsonpb.Unmarshaler{} for in, expected := range map[string]WrapperMessage{ - `{}`: {JSON: nil, UUID: nil}, + `{}`: {JSON: nil, UUID: nil, Inet: nil}, // Can't unmarshal 'null' to nil like a WKT, only an invalid, empty state // which will be remarshalled to 'null' `{"json":null}`: {JSON: &JSONValue{}}, `{"uuid_value":null}`: {UUIDValue: &UUIDValue{}}, // Still can't unmarshal 'null' to nil, but will initialize to zero-UUID - `{"uuid":null}`: {UUID: &UUID{Value: "00000000-0000-0000-0000-000000000000"}}, - `{"json": {"key": "value"}}`: {JSON: &JSONValue{Value: `{"key": "value"}`}}, + `{"uuid":null}`: {UUID: &UUID{Value: "00000000-0000-0000-0000-000000000000"}}, + `{"json": {"key": "value"}}`: {JSON: &JSONValue{Value: `{"key": "value"}`}}, `{"uuid_value": "6ba7b810-9dad-11d1-80b4-00c04fd430c8" }`: {UUIDValue: &UUIDValue{Value: `6ba7b810-9dad-11d1-80b4-00c04fd430c8`}}, `{"uuid_value": "6ba7b8109dad11d180b400c04fd430c8" }`: {UUIDValue: &UUIDValue{Value: `6ba7b8109dad11d180b400c04fd430c8`}}, - `{"inet": "1.2.3.4"}`: {Inet: &InetValue{Value: `1.2.3.4`}}, - `{"inet":null}`: {Inet: &InetValue{Value: ""}}, + `{"inet": "1.2.3.4"}`: {Inet: &InetValue{Value: `1.2.3.4`}}, + `{"inet":null}`: {Inet: &InetValue{Value: ""}}, } { - jv := &WrapperMessage{} - err := unmarshaler.Unmarshal(strings.NewReader(in), jv) + jv := WrapperMessage{} + err := unmarshaler.Unmarshal(strings.NewReader(in), &jv) if err != nil { t.Error(err.Error()) } - if !reflect.DeepEqual(*jv, expected) { - t.Errorf("Expected unmarshaled output '%+v' did not match actual output '%+v'", - expected, *jv) + if !cmp.Equal(jv, expected, protocmp.Transform()) { + t.Errorf("in: %s\ngot: '%+v'\nwanted: '%+v'", in, jv, expected) } } } @@ -60,7 +60,7 @@ func TestBrokenUnmarshalTypes(t *testing.T) { for in, expected := range map[string]string{ // A couple cases to demo standard json unmarshaling handling `{"}`: "unexpected EOF", - `{"uuid":"6ba7b810-9dad-11d1-80b4-00c04fd430c8}`: "unexpected EOF", + `{"uuid":"6ba7b810-9dad-11d1-80b4-00c04fd430c8}`: "unexpected EOF", `{"json":[1,2,3,4,`: "unexpected EOF", `{"json":}`: "invalid character '}' looking for beginning of value", `{"json":[1,2,3,4,]}`: "invalid character ']' looking for beginning of value", @@ -106,10 +106,10 @@ func TestMarshalTypes(t *testing.T) { func TestMarshalTypesOmitEmpty(t *testing.T) { marshaller := &jsonpb.Marshaler{OrigName: true} for expected, in := range map[string]WrapperMessage{ - `{}`: {}, - `{"json":null}`: {JSON: &JSONValue{}}, - `{"uuid_value":null}`: {UUIDValue: &UUIDValue{}}, - `{"json":{"key": "value"}}`: {JSON: &JSONValue{Value: `{"key": "value"}`}}, + `{}`: {}, + `{"json":null}`: {JSON: &JSONValue{}}, + `{"uuid_value":null}`: {UUIDValue: &UUIDValue{}}, + `{"json":{"key": "value"}}`: {JSON: &JSONValue{Value: `{"key": "value"}`}}, `{"uuid_value":"6ba7b810-9dad-11d1-80b4-00c04fd430c8"}`: {UUIDValue: &UUIDValue{Value: `6ba7b810-9dad-11d1-80b4-00c04fd430c8`}}, `{"json":{"key": "value"},"uuid_value":"6ba7b810-9dad-11d1-80b4-00c04fd430c8"}`: {JSON: &JSONValue{Value: `{"key": "value"}`}, UUIDValue: &UUIDValue{Value: `6ba7b810-9dad-11d1-80b4-00c04fd430c8`}}, `{"inet":null}`: {Inet: &InetValue{}}, diff --git a/types/types.pb.go b/types/types.pb.go index 5f9797ab..1f745e31 100644 --- a/types/types.pb.go +++ b/types/types.pb.go @@ -1,137 +1,398 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.23.0 +// protoc v3.13.0 // source: types/types.proto -/* -Package types is a generated protocol buffer package. - -It is generated from these files: - types/types.proto - -It has these top-level messages: - UUIDValue - JSONValue - UUID - InetValue - TimeOnly -*/ package types -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" +import ( + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +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) +) -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 type UUIDValue struct { - Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` } -func (m *UUIDValue) Reset() { *m = UUIDValue{} } -func (m *UUIDValue) String() string { return proto.CompactTextString(m) } -func (*UUIDValue) ProtoMessage() {} -func (*UUIDValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (x *UUIDValue) Reset() { + *x = UUIDValue{} + if protoimpl.UnsafeEnabled { + mi := &file_types_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} -func (m *UUIDValue) GetValue() string { - if m != nil { - return m.Value +func (x *UUIDValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UUIDValue) ProtoMessage() {} + +func (x *UUIDValue) ProtoReflect() protoreflect.Message { + mi := &file_types_types_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 UUIDValue.ProtoReflect.Descriptor instead. +func (*UUIDValue) Descriptor() ([]byte, []int) { + return file_types_types_proto_rawDescGZIP(), []int{0} +} + +func (x *UUIDValue) GetValue() string { + if x != nil { + return x.Value } return "" } type JSONValue struct { - Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *JSONValue) Reset() { + *x = JSONValue{} + if protoimpl.UnsafeEnabled { + mi := &file_types_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *JSONValue) Reset() { *m = JSONValue{} } -func (m *JSONValue) String() string { return proto.CompactTextString(m) } -func (*JSONValue) ProtoMessage() {} -func (*JSONValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +func (x *JSONValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JSONValue) ProtoMessage() {} -func (m *JSONValue) GetValue() string { - if m != nil { - return m.Value +func (x *JSONValue) ProtoReflect() protoreflect.Message { + mi := &file_types_types_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 JSONValue.ProtoReflect.Descriptor instead. +func (*JSONValue) Descriptor() ([]byte, []int) { + return file_types_types_proto_rawDescGZIP(), []int{1} +} + +func (x *JSONValue) GetValue() string { + if x != nil { + return x.Value } return "" } type UUID struct { - Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *UUID) Reset() { + *x = UUID{} + if protoimpl.UnsafeEnabled { + mi := &file_types_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UUID) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UUID) ProtoMessage() {} + +func (x *UUID) ProtoReflect() protoreflect.Message { + mi := &file_types_types_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) } -func (m *UUID) Reset() { *m = UUID{} } -func (m *UUID) String() string { return proto.CompactTextString(m) } -func (*UUID) ProtoMessage() {} -func (*UUID) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } +// Deprecated: Use UUID.ProtoReflect.Descriptor instead. +func (*UUID) Descriptor() ([]byte, []int) { + return file_types_types_proto_rawDescGZIP(), []int{2} +} -func (m *UUID) GetValue() string { - if m != nil { - return m.Value +func (x *UUID) GetValue() string { + if x != nil { + return x.Value } return "" } type InetValue struct { - Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` } -func (m *InetValue) Reset() { *m = InetValue{} } -func (m *InetValue) String() string { return proto.CompactTextString(m) } -func (*InetValue) ProtoMessage() {} -func (*InetValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } +func (x *InetValue) Reset() { + *x = InetValue{} + if protoimpl.UnsafeEnabled { + mi := &file_types_types_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} -func (m *InetValue) GetValue() string { - if m != nil { - return m.Value +func (x *InetValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InetValue) ProtoMessage() {} + +func (x *InetValue) ProtoReflect() protoreflect.Message { + mi := &file_types_types_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 InetValue.ProtoReflect.Descriptor instead. +func (*InetValue) Descriptor() ([]byte, []int) { + return file_types_types_proto_rawDescGZIP(), []int{3} +} + +func (x *InetValue) GetValue() string { + if x != nil { + return x.Value } return "" } type TimeOnly struct { - Value uint32 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *TimeOnly) Reset() { + *x = TimeOnly{} + if protoimpl.UnsafeEnabled { + mi := &file_types_types_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TimeOnly) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TimeOnly) Reset() { *m = TimeOnly{} } -func (m *TimeOnly) String() string { return proto.CompactTextString(m) } -func (*TimeOnly) ProtoMessage() {} -func (*TimeOnly) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } +func (*TimeOnly) ProtoMessage() {} -func (m *TimeOnly) GetValue() uint32 { - if m != nil { - return m.Value +func (x *TimeOnly) ProtoReflect() protoreflect.Message { + mi := &file_types_types_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 TimeOnly.ProtoReflect.Descriptor instead. +func (*TimeOnly) Descriptor() ([]byte, []int) { + return file_types_types_proto_rawDescGZIP(), []int{4} +} + +func (x *TimeOnly) GetValue() uint32 { + if x != nil { + return x.Value } return 0 } -func init() { - proto.RegisterType((*UUIDValue)(nil), "gorm.types.UUIDValue") - proto.RegisterType((*JSONValue)(nil), "gorm.types.JSONValue") - proto.RegisterType((*UUID)(nil), "gorm.types.UUID") - proto.RegisterType((*InetValue)(nil), "gorm.types.InetValue") - proto.RegisterType((*TimeOnly)(nil), "gorm.types.TimeOnly") -} - -func init() { proto.RegisterFile("types/types.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 164 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2c, 0xa9, 0x2c, 0x48, - 0x2d, 0xd6, 0x07, 0x93, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x5c, 0xe9, 0xf9, 0x45, 0xb9, - 0x7a, 0x60, 0x11, 0x25, 0x45, 0x2e, 0xce, 0xd0, 0x50, 0x4f, 0x97, 0xb0, 0xc4, 0x9c, 0xd2, 0x54, - 0x21, 0x11, 0x2e, 0xd6, 0x32, 0x10, 0x43, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0xc2, 0x01, - 0x29, 0xf1, 0x0a, 0xf6, 0xf7, 0xc3, 0xa7, 0x44, 0x86, 0x8b, 0x05, 0x64, 0x0a, 0x6e, 0x03, 0x3c, - 0xf3, 0x52, 0x4b, 0xf0, 0x19, 0xa0, 0xc0, 0xc5, 0x11, 0x92, 0x99, 0x9b, 0xea, 0x9f, 0x97, 0x53, - 0x89, 0xaa, 0x82, 0x17, 0xaa, 0xc2, 0xc9, 0x34, 0xca, 0x38, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, - 0x2f, 0x39, 0x3f, 0x57, 0x3f, 0x33, 0x2f, 0x2d, 0x3f, 0x29, 0x27, 0xbf, 0x22, 0xbf, 0x20, 0x35, - 0x4f, 0x1f, 0xec, 0xab, 0x64, 0xdd, 0xf4, 0xd4, 0x3c, 0x5d, 0x90, 0xcf, 0x20, 0x7e, 0xb5, 0x06, - 0x93, 0x49, 0x6c, 0x60, 0x49, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xef, 0xd0, 0x86, 0xc7, - 0x07, 0x01, 0x00, 0x00, +var File_types_types_proto protoreflect.FileDescriptor + +var file_types_types_proto_rawDesc = []byte{ + 0x0a, 0x11, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x72, 0x6d, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, + 0x21, 0x0a, 0x09, 0x55, 0x55, 0x49, 0x44, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0x21, 0x0a, 0x09, 0x4a, 0x53, 0x4f, 0x4e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x1c, 0x0a, 0x04, 0x55, 0x55, 0x49, 0x44, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x22, 0x21, 0x0a, 0x09, 0x49, 0x6e, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x20, 0x0a, 0x08, 0x54, 0x69, 0x6d, 0x65, 0x4f, 0x6e, + 0x6c, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x6f, + 0x70, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x67, + 0x6f, 0x72, 0x6d, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x73, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_types_types_proto_rawDescOnce sync.Once + file_types_types_proto_rawDescData = file_types_types_proto_rawDesc +) + +func file_types_types_proto_rawDescGZIP() []byte { + file_types_types_proto_rawDescOnce.Do(func() { + file_types_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_types_types_proto_rawDescData) + }) + return file_types_types_proto_rawDescData +} + +var file_types_types_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_types_types_proto_goTypes = []interface{}{ + (*UUIDValue)(nil), // 0: gorm.types.UUIDValue + (*JSONValue)(nil), // 1: gorm.types.JSONValue + (*UUID)(nil), // 2: gorm.types.UUID + (*InetValue)(nil), // 3: gorm.types.InetValue + (*TimeOnly)(nil), // 4: gorm.types.TimeOnly +} +var file_types_types_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_types_types_proto_init() } +func file_types_types_proto_init() { + if File_types_types_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_types_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UUIDValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_types_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JSONValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_types_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UUID); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_types_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InetValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_types_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TimeOnly); 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{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_types_types_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_types_types_proto_goTypes, + DependencyIndexes: file_types_types_proto_depIdxs, + MessageInfos: file_types_types_proto_msgTypes, + }.Build() + File_types_types_proto = out.File + file_types_types_proto_rawDesc = nil + file_types_types_proto_goTypes = nil + file_types_types_proto_depIdxs = nil }