From 222624f22e5c3a0824684e6056c35de1998db055 Mon Sep 17 00:00:00 2001 From: Viktor Nosov Date: Sun, 3 Dec 2023 16:20:30 +0300 Subject: [PATCH 1/4] ccpackage --- cmd/ccpackage/README.md | 22 + cmd/ccpackage/main.go | 61 + go.mod | 57 +- service/ccpackage/fetcher/fetcher.go | 72 ++ service/ccpackage/fetcher/file.go | 47 + service/ccpackage/fetcher/file_test.go | 42 + service/ccpackage/fetcher/gogit.go | 136 ++ service/ccpackage/fetcher/gogit_test.go | 34 + service/ccpackage/fetcher/nope.go | 15 + service/ccpackage/fetcher/tar.go | 57 + service/ccpackage/packages.pb.go | 1149 +++++++++++++++++ service/ccpackage/packages.pb.gw.go | 769 +++++++++++ service/ccpackage/packages.pb.validate.go | 1042 +++++++++++++++ service/ccpackage/packages.proto | 118 ++ service/ccpackage/packages.swagger.json | 500 +++++++ service/ccpackage/packer/docker/container.go | 221 ++++ service/ccpackage/packer/docker/packer.go | 204 +++ service/ccpackage/packer/docker/tar.go | 36 + service/ccpackage/packer/packer.go | 20 + service/ccpackage/store/file/file.go | 100 ++ service/ccpackage/store/memory/memory.go | 123 ++ service/ccpackage/store/memory/memory_test.go | 79 ++ service/ccpackage/store/storage.go | 54 + service/systemcc/lifecycle/lifecycle.pb.go | 200 +-- service/systemcc/lifecycle/lifecycle.pb.gw.go | 18 +- service/systemcc/lifecycle/lifecycle.proto | 18 +- .../systemcc/lifecycle/lifecycle.swagger.json | 16 +- service/systemcc/lscc/lscc.pb.go | 100 +- service/systemcc/lscc/lscc.pb.gw.go | 12 +- service/systemcc/lscc/lscc.proto | 12 +- service/systemcc/lscc/lscc.swagger.json | 8 +- service/systemcc/qscc/qscc.pb.go | 99 +- service/systemcc/qscc/qscc.pb.gw.go | 10 +- service/systemcc/qscc/qscc.proto | 10 +- service/systemcc/qscc/qscc.swagger.json | 10 +- service/wallet/wallet.pb.go | 316 ++--- service/wallet/wallet.proto | 7 +- service/wallet/wallet.swagger.json | 2 +- 38 files changed, 5367 insertions(+), 429 deletions(-) create mode 100644 cmd/ccpackage/README.md create mode 100644 cmd/ccpackage/main.go create mode 100644 service/ccpackage/fetcher/fetcher.go create mode 100644 service/ccpackage/fetcher/file.go create mode 100644 service/ccpackage/fetcher/file_test.go create mode 100644 service/ccpackage/fetcher/gogit.go create mode 100644 service/ccpackage/fetcher/gogit_test.go create mode 100644 service/ccpackage/fetcher/nope.go create mode 100644 service/ccpackage/fetcher/tar.go create mode 100644 service/ccpackage/packages.pb.go create mode 100644 service/ccpackage/packages.pb.gw.go create mode 100644 service/ccpackage/packages.pb.validate.go create mode 100644 service/ccpackage/packages.proto create mode 100644 service/ccpackage/packages.swagger.json create mode 100644 service/ccpackage/packer/docker/container.go create mode 100644 service/ccpackage/packer/docker/packer.go create mode 100644 service/ccpackage/packer/docker/tar.go create mode 100644 service/ccpackage/packer/packer.go create mode 100644 service/ccpackage/store/file/file.go create mode 100644 service/ccpackage/store/memory/memory.go create mode 100644 service/ccpackage/store/memory/memory_test.go create mode 100644 service/ccpackage/store/storage.go diff --git a/cmd/ccpackage/README.md b/cmd/ccpackage/README.md new file mode 100644 index 0000000..2bdae33 --- /dev/null +++ b/cmd/ccpackage/README.md @@ -0,0 +1,22 @@ +# CCPackage CLI example + +``` +go run main.go \ + --repo=https://github.com/hyperledger-labs/cckit \ + --version=main --name=cars \ + --chaincodePath=github.com/hyperledger-labs/cckit \ + --binaryPath=examples/cars/bin/cars \ + --fabricVersion=FABRIC_V2_LIFECYCLE +``` + +``` +go run main.go \ +--repo=https://github.com/hyperledger/fabric-samples \ +--version=main \ +--name=asset-transfer-abac \ +--chaincodePath=github.com/hyperledger/fabric-samples \ +--binaryPath=asset-transfer-abac/chaincode-go \ +--fabricVersion=FABRIC_V2_LIFECYCLE +``` + + diff --git a/cmd/ccpackage/main.go b/cmd/ccpackage/main.go new file mode 100644 index 0000000..721180a --- /dev/null +++ b/cmd/ccpackage/main.go @@ -0,0 +1,61 @@ +package main + +import ( + "context" + "flag" + "fmt" + "os" + + "go.uber.org/zap" + + "github.com/s7techlab/hlf-sdk-go/service/ccpackage" + "github.com/s7techlab/hlf-sdk-go/service/ccpackage/fetcher" + dockerpacker "github.com/s7techlab/hlf-sdk-go/service/ccpackage/packer/docker" +) + +func main() { + spec := &ccpackage.PackageSpec{ + Id: &ccpackage.PackageID{}, + } + flag.StringVar(&spec.Id.Name, `name`, ``, `chaincode name`) + flag.StringVar(&spec.Repository, `repo`, ``, `chaincode repo`) + fabricVersion := flag.String(`fabricVersion`, ``, + `fabric version (FABRIC_V1, FABRIC_V2, fFABRIC_V2_LIFECYCLE`) + flag.StringVar(&spec.ChaincodePath, `chaincodePath`, ``, `chaincode path`) + flag.StringVar(&spec.Id.Version, `version`, ``, `chaincode version`) + flag.StringVar(&spec.BinaryPath, `binaryPath`, ``, `binaryPath`) + + flag.Parse() + if *fabricVersion != `` { + if enumVersion, ok := ccpackage.FabricVersion_value[*fabricVersion]; ok { + spec.Id.FabricVersion = ccpackage.FabricVersion(enumVersion) + } else { + fmt.Println(`unknown fabric version: `, *fabricVersion) + os.Exit(1) + } + } + + if err := spec.Validate(); err != nil { + fmt.Println(err) + os.Exit(1) + } + var ( + logger, _ = zap.NewDevelopment() + ctx = context.Background() + ) + + tar, err := fetcher.Fetch(ctx, spec.Repository, spec.Id.Version, logger) + if err != nil { + logger.Fatal(err.Error()) + } + + logger.Info(`package repository source code`, zap.Int(`size`, len(tar))) + + packer := dockerpacker.New(logger) + pkg, err := packer.PackFromTar(ctx, spec, tar) + if err != nil { + logger.Fatal(err.Error()) + } + + fmt.Println(pkg) +} diff --git a/go.mod b/go.mod index 7582a4c..87b341c 100644 --- a/go.mod +++ b/go.mod @@ -16,12 +16,12 @@ require ( github.com/mitchellh/mapstructure v1.5.0 github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 github.com/onsi/ginkgo v1.14.0 - github.com/onsi/gomega v1.10.1 + github.com/onsi/gomega v1.27.10 github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.7.1-0.20210116013205-6990a05d54c2 go.opencensus.io v0.22.0 go.uber.org/zap v1.14.1 - golang.org/x/crypto v0.10.0 + golang.org/x/crypto v0.14.0 golang.org/x/sync v0.4.0 google.golang.org/genproto v0.0.0-20210122163508-8081c04a3579 google.golang.org/grpc v1.33.1 @@ -30,36 +30,48 @@ require ( ) require ( + github.com/docker/docker v17.12.0-ce-rc1.0.20190628135806-70f67c6240bb+incompatible + github.com/fsouza/go-dockerclient v1.4.1 + github.com/go-git/go-billy/v5 v5.5.0 + github.com/go-git/go-git/v5 v5.9.0 +) + +require ( + dario.cat/mergo v1.0.0 // indirect github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect github.com/BurntSushi/toml v0.3.1 // indirect github.com/DataDog/zstd v1.4.0 // indirect github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible // indirect - github.com/Microsoft/go-winio v0.4.12 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Microsoft/hcsshim v0.8.6 // indirect github.com/OpenPeeDeeP/depguard v1.0.0 // indirect + github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect github.com/Shopify/sarama v1.22.1 // indirect github.com/VictoriaMetrics/fastcache v1.5.7 // indirect + github.com/acomagu/bufpipe v1.0.4 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/speakeasy v0.1.0 // indirect github.com/cenkalti/backoff/v3 v3.0.0 // indirect github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/cloudflare/circl v1.3.3 // indirect github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc // indirect github.com/coreos/go-semver v0.3.0 // indirect github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a // indirect github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect + github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/distribution v2.7.1+incompatible // indirect - github.com/docker/docker v17.12.0-ce-rc1.0.20190628135806-70f67c6240bb+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect - github.com/dustin/go-humanize v1.0.0 // indirect + github.com/dustin/go-humanize v1.0.1 // indirect github.com/eapache/go-resiliency v1.2.0 // indirect github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect github.com/eapache/queue v1.1.0 // indirect + github.com/emirpasic/gods v1.18.1 // indirect github.com/fatih/color v1.7.0 // indirect github.com/fsnotify/fsnotify v1.4.9 // indirect - github.com/fsouza/go-dockerclient v1.4.1 // indirect github.com/go-critic/go-critic v0.3.5-0.20190526074819-1df300866540 // indirect + github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-jose/go-jose/v3 v3.0.0 // indirect github.com/go-lintpack/lintpack v0.5.2 // indirect github.com/go-toolsmith/astcast v1.0.0 // indirect @@ -73,7 +85,7 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt v3.2.1+incompatible // indirect github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect - github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.3.1 // indirect github.com/golang/snappy v0.0.2 // indirect github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect @@ -94,8 +106,9 @@ require ( github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0 // indirect github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect github.com/google/btree v1.0.0 // indirect + github.com/google/go-cmp v0.5.9 // indirect github.com/google/monologue v0.0.0-20190606152607-4b11a32b5934 // indirect - github.com/google/uuid v1.0.0 // indirect + github.com/google/uuid v1.3.0 // indirect github.com/gorilla/websocket v1.4.2 // indirect github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect @@ -114,10 +127,11 @@ require ( github.com/hyperledger/fabric-lib-go v1.0.0 // indirect github.com/ijc/Gotty v0.0.0-20170406111628-a8b993ba6abd // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/jonboulle/clockwork v0.1.0 // indirect - github.com/json-iterator/go v1.1.7 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/kisielk/gotool v1.0.0 // indirect - github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect github.com/magiconair/properties v1.8.1 // indirect github.com/mattn/go-colorable v0.1.6 // indirect github.com/mattn/go-isatty v0.0.12 // indirect @@ -126,7 +140,7 @@ require ( github.com/miekg/pkcs11 v1.0.3 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.1 // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect github.com/nbutton23/zxcvbn-go v0.0.0-20171102151520-eafdab6b0663 // indirect github.com/nxadm/tail v1.4.4 // indirect github.com/olekukonko/tablewriter v0.0.1 // indirect @@ -135,6 +149,7 @@ require ( github.com/opencontainers/runc v1.0.0-rc8 // indirect github.com/pelletier/go-toml v1.8.0 // indirect github.com/pierrec/lz4 v2.5.0+incompatible // indirect + github.com/pjbgf/sha1cd v0.3.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.1.0 // indirect github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 // indirect @@ -142,7 +157,9 @@ require ( github.com/prometheus/procfs v0.0.3 // indirect github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a // indirect github.com/ryanuber/go-glob v1.0.0 // indirect - github.com/sirupsen/logrus v1.4.2 // indirect + github.com/sergi/go-diff v1.1.0 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect + github.com/skeema/knownhosts v1.2.0 // indirect github.com/soheilhy/cmux v0.1.4 // indirect github.com/sourcegraph/go-diff v0.5.1 // indirect github.com/spf13/afero v1.3.3 // indirect @@ -160,22 +177,22 @@ require ( github.com/ultraware/funlen v0.0.1 // indirect github.com/urfave/cli v1.20.0 // indirect github.com/willf/bitset v1.1.10 // indirect + github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect go.etcd.io/bbolt v1.3.3 // indirect go.etcd.io/etcd v3.3.13+incompatible // indirect go.uber.org/atomic v1.6.0 // indirect go.uber.org/multierr v1.5.0 // indirect - golang.org/x/mod v0.11.0 // indirect - golang.org/x/net v0.11.0 // indirect - golang.org/x/sys v0.9.0 // indirect - golang.org/x/text v0.10.0 // indirect + golang.org/x/mod v0.12.0 // indirect + golang.org/x/net v0.17.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1 // indirect - golang.org/x/tools v0.10.0 // indirect - golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect - gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect + golang.org/x/tools v0.13.0 // indirect gopkg.in/cheggaaa/pb.v1 v1.0.28 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect - gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect + gopkg.in/warnings.v0 v0.1.2 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect mvdan.cc/unparam v0.0.0-20190209190245-fbb59629db34 // indirect diff --git a/service/ccpackage/fetcher/fetcher.go b/service/ccpackage/fetcher/fetcher.go new file mode 100644 index 0000000..e8c5321 --- /dev/null +++ b/service/ccpackage/fetcher/fetcher.go @@ -0,0 +1,72 @@ +package fetcher + +import ( + "context" + "errors" + "fmt" + "net/url" + "strings" + + "go.uber.org/zap" +) + +const ( + FileProtocolPrefix = `file://` + GitProtocolPrefix = `https://` + LocalMountProtocolPrefix = `local://` +) + +var ( + ErrUnknownProtocol = errors.New(`unknown protocol`) +) + +type Fetcher interface { + // Fetch code by presented path and returns tar representation + Fetch(ctx context.Context, repo, version string) ([]byte, error) +} + +// Fetch repo from file path , git repo +// file - file://path/to/repo +// git repo with basic auth and token - https://{user}:{pass}@github.com/s7techlab/{repo}.git +// git repo with token - https://{token}@github.com/s7techlab/{repo}.git +func Fetch(ctx context.Context, repo, version string, logger *zap.Logger) ([]byte, error) { + f, err := Create(repo, logger) + if err != nil { + return nil, fmt.Errorf("fetcher get: %w", err) + } + + return f.Fetch(ctx, repo, version) +} + +// Create returns Fetcher instance by repo scheme +// Scheme file:// returns FileFetcher +// Scheme https:// returns GitFetcher +// Scheme local:// returns Local mount fetcher +// git repo with basic auth and token - https://{user}:{pass}@github.com/s7techlab/{repo}.git +// git repo with token - https://{token}@github.com/s7techlab/{repo}.git +// Returns non-fetcher for unrecognized scheme +func Create(repo string, l *zap.Logger) (Fetcher, error) { + switch { + case strings.HasPrefix(repo, FileProtocolPrefix): + return NewFile(l), nil + case strings.HasPrefix(repo, GitProtocolPrefix): + var opts []GitOpt + // Set auth options for repository if provided + u, err := url.Parse(repo) + if err != nil { + return nil, fmt.Errorf("parse repo url: %w", err) + } + if p, set := u.User.Password(); set { + opts = append(opts, GitBasicAuth(u.User.Username(), p)) + } else if u.User.Username() != `` { + opts = append(opts, GitTokenAuth(u.User.Username())) + } + opts = append(opts, WithLogger(l)) + return NewGit(opts...), nil + case strings.HasPrefix(repo, LocalMountProtocolPrefix): + return NewNope(), nil + + default: + return nil, ErrUnknownProtocol + } +} diff --git a/service/ccpackage/fetcher/file.go b/service/ccpackage/fetcher/file.go new file mode 100644 index 0000000..5e6d5ed --- /dev/null +++ b/service/ccpackage/fetcher/file.go @@ -0,0 +1,47 @@ +package fetcher + +import ( + "archive/tar" + "bytes" + "context" + "fmt" + "strings" + + "github.com/go-git/go-billy/v5/osfs" + "go.uber.org/zap" +) + +type File struct { + Logger *zap.Logger +} + +func NewFile(l *zap.Logger) *File { + return &File{ + Logger: l, + } +} + +func (f *File) Fetch(ctx context.Context, path, _ string) (code []byte, err error) { + bf := new(bytes.Buffer) + tw := tar.NewWriter(bf) + + defer func() { + twErr := tw.Close() + if err == nil && twErr != nil { + err = fmt.Errorf("close tar writer: %w", err) + } + }() + + path = strings.TrimPrefix(path, FileProtocolPrefix) + + fs := osfs.New(path) + + f.Logger.Debug(`adding path to tar`, zap.String(`path`, path)) + + if err = AddFileToTar(tw, `/`, fs); err != nil { + err = fmt.Errorf("fetch filepath=%s to tar: %w", path, err) + return + } + + return bf.Bytes(), nil +} diff --git a/service/ccpackage/fetcher/file_test.go b/service/ccpackage/fetcher/file_test.go new file mode 100644 index 0000000..2c84666 --- /dev/null +++ b/service/ccpackage/fetcher/file_test.go @@ -0,0 +1,42 @@ +package fetcher_test + +import ( + "archive/tar" + "bytes" + "context" + "io" + "path/filepath" + "testing" + + "github.com/stretchr/testify/assert" + "go.uber.org/zap" + + "github.com/s7techlab/hlf-sdk-go/service/ccpackage/fetcher" +) + +func TestFileFetcher_Fetch(t *testing.T) { + f := fetcher.NewFile(zap.NewNop()) + assert.NotNil(t, f) + + abs, err := filepath.Abs(`../`) + assert.NoError(t, err) + + code, err := f.Fetch(context.Background(), abs+`/`, `some ver`) + assert.NoError(t, err) + assert.NotNil(t, code) + assert.NoError(t, expectTar(code)) +} + +func expectTar(b []byte) error { + r := bytes.NewReader(b) + tr := tar.NewReader(r) + for { + _, err := tr.Next() + if err != nil { + if err == io.EOF { + return nil + } + return err + } + } +} diff --git a/service/ccpackage/fetcher/gogit.go b/service/ccpackage/fetcher/gogit.go new file mode 100644 index 0000000..e031f08 --- /dev/null +++ b/service/ccpackage/fetcher/gogit.go @@ -0,0 +1,136 @@ +package fetcher + +import ( + "archive/tar" + "bytes" + "context" + "fmt" + "net/url" + + "github.com/go-git/go-billy/v5/memfs" + "github.com/go-git/go-git/v5" + "github.com/go-git/go-git/v5/plumbing" + "github.com/go-git/go-git/v5/plumbing/transport" + "github.com/go-git/go-git/v5/plumbing/transport/http" + "github.com/go-git/go-git/v5/storage" + "github.com/go-git/go-git/v5/storage/memory" + "go.uber.org/zap" +) + +const defaultMode = 0755 + +type ( + Git struct { + s storage.Storer + auth transport.AuthMethod + Logger *zap.Logger + } + + GitOpt func(*Git) +) + +func WithLogger(l *zap.Logger) GitOpt { + return func(g *Git) { + g.Logger = l + } +} + +func GitBasicAuth(username, password string) GitOpt { + return func(g *Git) { + g.auth = &http.BasicAuth{ + Username: username, + Password: password, + } + } +} + +func GitTokenAuth(token string) GitOpt { + return func(g *Git) { + g.auth = &http.TokenAuth{Token: token} + } +} + +func NewGit(opts ...GitOpt) *Git { + git := &Git{s: memory.NewStorage()} + for _, o := range opts { + o(git) + } + + if git.Logger == nil { + git.Logger = zap.NewNop() + } + return git +} + +func (g *Git) prepareUrl(rawUrl string) (string, error) { + u, err := url.Parse(rawUrl) + if err != nil { + return ``, fmt.Errorf("failed to parse url: %w", err) + } + + if u.Scheme == `` { + u.Scheme = `https` + } + + if u.User != nil { + if pass, ok := u.User.Password(); ok { + GitBasicAuth(u.User.Username(), pass)(g) + } + + } else if u.Fragment != `` { + // consider as token + GitTokenAuth(u.Fragment)(g) + u.Fragment = `` + } + return u.String(), nil +} + +func (g Git) Fetch(ctx context.Context, repo, version string) ([]byte, error) { + + url, err := g.prepareUrl(repo) + if err != nil { + return nil, fmt.Errorf("prepare repo url: %w", err) + } + + fs := memfs.New() + + var refName plumbing.ReferenceName + + if version != `` { + refName = plumbing.NewHashReference(plumbing.Master, plumbing.NewHash(version)).Target() + } + + fields := []zap.Field{ + zap.String(`url`, url), + zap.String(`version`, version), + zap.String(`auth`, fmt.Sprintf(`%T`, g.auth))} + g.Logger.Info(`cloning git repo...`, fields...) + + if _, err = git.CloneContext(ctx, g.s, fs, &git.CloneOptions{ + URL: url, + Auth: g.auth, + SingleBranch: true, + Progress: nil, + ReferenceName: refName, + }); err != nil { + return nil, fmt.Errorf("clone repository=%s, version=%s: %w", url, version, err) + } + + g.Logger.Debug(`git repo cloned`, fields...) + + bf := new(bytes.Buffer) + tw := tar.NewWriter(bf) + + defer func() { + twErr := tw.Close() + if err == nil && twErr != nil { + err = fmt.Errorf("close tar writer: %w", err) + } + }() + + if err = AddFileToTar(tw, fs.Root(), fs); err != nil { + return nil, fmt.Errorf("add file to archive: %w", err) + } + + return bf.Bytes(), nil +} diff --git a/service/ccpackage/fetcher/gogit_test.go b/service/ccpackage/fetcher/gogit_test.go new file mode 100644 index 0000000..3bd6de5 --- /dev/null +++ b/service/ccpackage/fetcher/gogit_test.go @@ -0,0 +1,34 @@ +package fetcher_test + +//import ( +// "archive/tar" +// "bytes" +// "context" +// "io" +// "testing" +// +// "github.com/stretchr/testify/assert" + +// +//var ( +// f fetcher.Fetcher +//) +// +//func TestNewGoGitFetcher(t *testing.T) { +// f = fetcher.NewGit(fetcher.GitBasicAuth(testdata.DeployUser, testdata.DeployPassword)) +// assert.NotNil(t, f) +//} +// +//func TestGoGitFetcher_Fetch(t *testing.T) { +// if testing.Short() { +// t.Skip("skipping test in short mode.") +// } +// +// for _, p := range testdata.Packages { +// code, err := f.Fetch(context.Background(), p.Repository, p.Version) +// assert.NoError(t, err) +// assert.NotNil(t, code) +// assert.NoError(t, expectTar(code)) +// } +//} +// diff --git a/service/ccpackage/fetcher/nope.go b/service/ccpackage/fetcher/nope.go new file mode 100644 index 0000000..7af3715 --- /dev/null +++ b/service/ccpackage/fetcher/nope.go @@ -0,0 +1,15 @@ +package fetcher + +import "context" + +// Nope do nothing +type Nope struct { +} + +func (n *Nope) Fetch(ctx context.Context, repo, version string) ([]byte, error) { + return nil, nil +} + +func NewNope() *Nope { + return &Nope{} +} diff --git a/service/ccpackage/fetcher/tar.go b/service/ccpackage/fetcher/tar.go new file mode 100644 index 0000000..3414d31 --- /dev/null +++ b/service/ccpackage/fetcher/tar.go @@ -0,0 +1,57 @@ +package fetcher + +import ( + "archive/tar" + "fmt" + "io" + fsPath "path" + + "github.com/go-git/go-billy/v5" +) + +func AddFileToTar(tw *tar.Writer, path string, fs billy.Filesystem) error { + files, err := fs.ReadDir(path) + if err != nil { + return fmt.Errorf("failed to read dir: %w", err) + } + + if err = tw.WriteHeader(&tar.Header{ + Typeflag: tar.TypeDir, + Name: path, + Mode: defaultMode, + }); err != nil { + return fmt.Errorf("failed to write tar header: %w", err) + } + + for _, f := range files { + fPath := fsPath.Join(path, f.Name()) + if f.IsDir() { + if f.Name()[0:1] == `.` { + continue + } + if err = AddFileToTar(tw, fPath, fs); err != nil { + return fmt.Errorf("failed to write path %s: %w", fPath, err) + } + continue + } + + if err = tw.WriteHeader(&tar.Header{ + Name: fPath, + Size: f.Size(), + Mode: defaultMode, + ModTime: f.ModTime(), + }); err != nil { + return fmt.Errorf("failed to write tar header: %w", err) + } + file, err := fs.Open(fPath) + if err != nil { + return fmt.Errorf("failed to read file: %w", err) + } + if _, err = io.Copy(tw, file); err != nil { + file.Close() + return fmt.Errorf("failed to write file to tar: %w", err) + } + file.Close() + } + return nil +} diff --git a/service/ccpackage/packages.pb.go b/service/ccpackage/packages.pb.go new file mode 100644 index 0000000..5b479eb --- /dev/null +++ b/service/ccpackage/packages.pb.go @@ -0,0 +1,1149 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: ccpackage/packages.proto + +package ccpackage + +import ( + context "context" + _ "github.com/envoyproxy/protoc-gen-validate/validate" + peer "github.com/hyperledger/fabric-protos-go/peer" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type FabricVersion int32 + +const ( + // Fabric v1.4 tools + FabricVersion_FABRIC_VERSION_UNSPECIFIED FabricVersion = 0 + // Fabric v1.4 tools + FabricVersion_FABRIC_V1 FabricVersion = 1 + // Fabric v2.3 tools + FabricVersion_FABRIC_V2 FabricVersion = 2 + // Fabric v2.3 tools with lifecycle + FabricVersion_FABRIC_V2_LIFECYCLE FabricVersion = 3 +) + +// Enum value maps for FabricVersion. +var ( + FabricVersion_name = map[int32]string{ + 0: "FABRIC_VERSION_UNSPECIFIED", + 1: "FABRIC_V1", + 2: "FABRIC_V2", + 3: "FABRIC_V2_LIFECYCLE", + } + FabricVersion_value = map[string]int32{ + "FABRIC_VERSION_UNSPECIFIED": 0, + "FABRIC_V1": 1, + "FABRIC_V2": 2, + "FABRIC_V2_LIFECYCLE": 3, + } +) + +func (x FabricVersion) Enum() *FabricVersion { + p := new(FabricVersion) + *p = x + return p +} + +func (x FabricVersion) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FabricVersion) Descriptor() protoreflect.EnumDescriptor { + return file_ccpackage_packages_proto_enumTypes[0].Descriptor() +} + +func (FabricVersion) Type() protoreflect.EnumType { + return &file_ccpackage_packages_proto_enumTypes[0] +} + +func (x FabricVersion) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FabricVersion.Descriptor instead. +func (FabricVersion) EnumDescriptor() ([]byte, []int) { + return file_ccpackage_packages_proto_rawDescGZIP(), []int{0} +} + +type PackageID struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name is a chaincode name, ex: payment + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Version is a chaincode version to use, ex: 2800dea5e957b3b65f48340337fdbbedc7caf396 + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + // Fabric version to use to build chaincode. + FabricVersion FabricVersion `protobuf:"varint,3,opt,name=fabric_version,json=fabricVersion,proto3,enum=hlfsdkgo.service.ccpackage.FabricVersion" json:"fabric_version,omitempty"` +} + +func (x *PackageID) Reset() { + *x = PackageID{} + if protoimpl.UnsafeEnabled { + mi := &file_ccpackage_packages_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PackageID) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PackageID) ProtoMessage() {} + +func (x *PackageID) ProtoReflect() protoreflect.Message { + mi := &file_ccpackage_packages_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 PackageID.ProtoReflect.Descriptor instead. +func (*PackageID) Descriptor() ([]byte, []int) { + return file_ccpackage_packages_proto_rawDescGZIP(), []int{0} +} + +func (x *PackageID) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PackageID) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *PackageID) GetFabricVersion() FabricVersion { + if x != nil { + return x.FabricVersion + } + return FabricVersion_FABRIC_VERSION_UNSPECIFIED +} + +type PackageSpec struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Package ID is package identification data + Id *PackageID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Repository is url to git sources, ex: http://:token@{repo url} + // or http://login:password@github.com/hyperledger-labs/cckit/examples/cars + // or path to local directory file:///path/to/sources/hyperledger-labs/cckit + Repository string `protobuf:"bytes,2,opt,name=repository,proto3" json:"repository,omitempty"` + // Chaincode path is path to chaincode, ex: github.com/hyperledger-labs/cckit + ChaincodePath string `protobuf:"bytes,3,opt,name=chaincode_path,json=chaincodePath,proto3" json:"chaincode_path,omitempty"` + // BinaryPath is path to chaincode binary in given repository, + // ex: `examples/cars`. + BinaryPath string `protobuf:"bytes,4,opt,name=binary_path,json=binaryPath,proto3" json:"binary_path,omitempty"` +} + +func (x *PackageSpec) Reset() { + *x = PackageSpec{} + if protoimpl.UnsafeEnabled { + mi := &file_ccpackage_packages_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PackageSpec) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PackageSpec) ProtoMessage() {} + +func (x *PackageSpec) ProtoReflect() protoreflect.Message { + mi := &file_ccpackage_packages_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 PackageSpec.ProtoReflect.Descriptor instead. +func (*PackageSpec) Descriptor() ([]byte, []int) { + return file_ccpackage_packages_proto_rawDescGZIP(), []int{1} +} + +func (x *PackageSpec) GetId() *PackageID { + if x != nil { + return x.Id + } + return nil +} + +func (x *PackageSpec) GetRepository() string { + if x != nil { + return x.Repository + } + return "" +} + +func (x *PackageSpec) GetChaincodePath() string { + if x != nil { + return x.ChaincodePath + } + return "" +} + +func (x *PackageSpec) GetBinaryPath() string { + if x != nil { + return x.BinaryPath + } + return "" +} + +type PackageInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *PackageID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Size int64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` +} + +func (x *PackageInfo) Reset() { + *x = PackageInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_ccpackage_packages_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PackageInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PackageInfo) ProtoMessage() {} + +func (x *PackageInfo) ProtoReflect() protoreflect.Message { + mi := &file_ccpackage_packages_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 PackageInfo.ProtoReflect.Descriptor instead. +func (*PackageInfo) Descriptor() ([]byte, []int) { + return file_ccpackage_packages_proto_rawDescGZIP(), []int{2} +} + +func (x *PackageInfo) GetId() *PackageID { + if x != nil { + return x.Id + } + return nil +} + +func (x *PackageInfo) GetSize() int64 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *PackageInfo) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +type PackageInfoList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Items []*PackageInfo `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` +} + +func (x *PackageInfoList) Reset() { + *x = PackageInfoList{} + if protoimpl.UnsafeEnabled { + mi := &file_ccpackage_packages_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PackageInfoList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PackageInfoList) ProtoMessage() {} + +func (x *PackageInfoList) ProtoReflect() protoreflect.Message { + mi := &file_ccpackage_packages_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 PackageInfoList.ProtoReflect.Descriptor instead. +func (*PackageInfoList) Descriptor() ([]byte, []int) { + return file_ccpackage_packages_proto_rawDescGZIP(), []int{3} +} + +func (x *PackageInfoList) GetItems() []*PackageInfo { + if x != nil { + return x.Items + } + return nil +} + +type FileChunk struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *FileChunk) Reset() { + *x = FileChunk{} + if protoimpl.UnsafeEnabled { + mi := &file_ccpackage_packages_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FileChunk) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FileChunk) ProtoMessage() {} + +func (x *FileChunk) ProtoReflect() protoreflect.Message { + mi := &file_ccpackage_packages_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 FileChunk.ProtoReflect.Descriptor instead. +func (*FileChunk) Descriptor() ([]byte, []int) { + return file_ccpackage_packages_proto_rawDescGZIP(), []int{4} +} + +func (x *FileChunk) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +type PutPackageRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *PackageID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *PutPackageRequest) Reset() { + *x = PutPackageRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_ccpackage_packages_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PutPackageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutPackageRequest) ProtoMessage() {} + +func (x *PutPackageRequest) ProtoReflect() protoreflect.Message { + mi := &file_ccpackage_packages_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 PutPackageRequest.ProtoReflect.Descriptor instead. +func (*PutPackageRequest) Descriptor() ([]byte, []int) { + return file_ccpackage_packages_proto_rawDescGZIP(), []int{5} +} + +func (x *PutPackageRequest) GetId() *PackageID { + if x != nil { + return x.Id + } + return nil +} + +func (x *PutPackageRequest) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +type Package struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id *PackageID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *Package) Reset() { + *x = Package{} + if protoimpl.UnsafeEnabled { + mi := &file_ccpackage_packages_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Package) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Package) ProtoMessage() {} + +func (x *Package) ProtoReflect() protoreflect.Message { + mi := &file_ccpackage_packages_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 Package.ProtoReflect.Descriptor instead. +func (*Package) Descriptor() ([]byte, []int) { + return file_ccpackage_packages_proto_rawDescGZIP(), []int{6} +} + +func (x *Package) GetId() *PackageID { + if x != nil { + return x.Id + } + return nil +} + +func (x *Package) GetSize() int64 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *Package) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Package) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +var File_ccpackage_packages_proto protoreflect.FileDescriptor + +var file_ccpackage_packages_proto_rawDesc = []byte{ + 0x0a, 0x18, 0x63, 0x63, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2f, 0x70, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x68, 0x6c, 0x66, 0x73, + 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x63, 0x70, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x1a, 0x2e, 0x68, 0x79, 0x70, 0x65, 0x72, 0x6c, 0x65, 0x64, + 0x67, 0x65, 0x72, 0x2f, 0x66, 0x61, 0x62, 0x72, 0x69, 0x63, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x73, 0x2f, 0x70, 0x65, 0x65, 0x72, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 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, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa9, 0x01, 0x0a, 0x09, + 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x44, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x5c, 0x0a, 0x0e, 0x66, 0x61, 0x62, + 0x72, 0x69, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x29, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x63, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x46, + 0x61, 0x62, 0x72, 0x69, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, + 0x07, 0x82, 0x01, 0x04, 0x10, 0x01, 0x20, 0x00, 0x52, 0x0d, 0x66, 0x61, 0x62, 0x72, 0x69, 0x63, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xd1, 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x3f, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x63, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x44, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, + 0x01, 0x02, 0x10, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, + 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x12, 0x2e, 0x0a, 0x0e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x70, + 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, + 0x10, 0x01, 0x52, 0x0d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x50, 0x61, 0x74, + 0x68, 0x12, 0x28, 0x0a, 0x0b, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, + 0x0a, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x50, 0x61, 0x74, 0x68, 0x22, 0x93, 0x01, 0x0a, 0x0b, + 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x35, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, + 0x67, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x63, 0x70, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x44, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 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, 0x22, 0x50, 0x0a, 0x0f, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x63, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x69, 0x74, + 0x65, 0x6d, 0x73, 0x22, 0x1f, 0x0a, 0x09, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x68, 0x75, 0x6e, 0x6b, + 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x22, 0x5e, 0x0a, 0x11, 0x50, 0x75, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x63, 0x70, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x44, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x22, 0xa3, 0x01, 0x0a, 0x07, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x12, 0x35, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x68, + 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x63, 0x63, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x49, 0x44, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x2a, 0x66, 0x0a, 0x0d, 0x46, 0x61, + 0x62, 0x72, 0x69, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x1a, 0x46, + 0x41, 0x42, 0x52, 0x49, 0x43, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x46, + 0x41, 0x42, 0x52, 0x49, 0x43, 0x5f, 0x56, 0x31, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x46, 0x41, + 0x42, 0x52, 0x49, 0x43, 0x5f, 0x56, 0x32, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, 0x42, + 0x52, 0x49, 0x43, 0x5f, 0x56, 0x32, 0x5f, 0x4c, 0x49, 0x46, 0x45, 0x43, 0x59, 0x43, 0x4c, 0x45, + 0x10, 0x03, 0x32, 0x86, 0x07, 0x0a, 0x0e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x72, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, + 0x27, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x63, 0x63, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x53, 0x70, 0x65, 0x63, 0x1a, 0x27, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, + 0x6b, 0x67, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x63, 0x70, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x3a, 0x01, 0x2a, 0x22, 0x0b, 0x2f, 0x63, + 0x63, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x12, 0x90, 0x01, 0x0a, 0x07, 0x47, 0x65, + 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x25, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x63, 0x70, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x44, 0x1a, 0x27, 0x2e, 0x68, + 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x63, 0x63, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, + 0x63, 0x63, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, + 0x7d, 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x7b, 0x66, 0x61, 0x62, + 0x72, 0x69, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x12, 0x77, 0x0a, 0x0b, + 0x47, 0x65, 0x74, 0x4f, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x27, 0x2e, 0x68, 0x6c, + 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x63, + 0x63, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x53, 0x70, 0x65, 0x63, 0x1a, 0x27, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x63, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x16, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x3a, 0x01, 0x2a, 0x1a, 0x0b, 0x2f, 0x63, 0x63, 0x70, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x73, 0x12, 0x64, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x66, + 0x6f, 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, 0x2b, 0x2e, 0x68, 0x6c, 0x66, 0x73, + 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x63, 0x70, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, + 0x2f, 0x63, 0x63, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x12, 0xa2, 0x01, 0x0a, 0x11, + 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, + 0x63, 0x12, 0x25, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x63, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x50, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x44, 0x1a, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x73, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x22, 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x3f, 0x12, 0x3d, 0x2f, 0x63, 0x63, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, + 0x7b, 0x66, 0x61, 0x62, 0x72, 0x69, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, + 0x2f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2d, 0x73, 0x70, 0x65, 0x63, + 0x12, 0x8d, 0x01, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x25, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, + 0x6b, 0x67, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x63, 0x70, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x44, 0x1a, + 0x23, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x63, 0x63, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x22, 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x63, + 0x63, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, + 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x7b, 0x66, 0x61, 0x62, 0x72, + 0x69, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x59, 0x0a, 0x05, 0x46, 0x65, 0x74, 0x63, 0x68, 0x12, 0x25, 0x2e, 0x68, 0x6c, 0x66, 0x73, + 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x63, 0x70, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x44, + 0x1a, 0x25, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x63, 0x63, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x46, 0x69, + 0x6c, 0x65, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x22, 0x00, 0x30, 0x01, 0x42, 0x33, 0x5a, 0x31, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x37, 0x74, 0x65, 0x63, 0x68, + 0x6c, 0x61, 0x62, 0x2f, 0x68, 0x6c, 0x66, 0x2d, 0x73, 0x64, 0x6b, 0x2d, 0x67, 0x6f, 0x2f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x63, 0x63, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_ccpackage_packages_proto_rawDescOnce sync.Once + file_ccpackage_packages_proto_rawDescData = file_ccpackage_packages_proto_rawDesc +) + +func file_ccpackage_packages_proto_rawDescGZIP() []byte { + file_ccpackage_packages_proto_rawDescOnce.Do(func() { + file_ccpackage_packages_proto_rawDescData = protoimpl.X.CompressGZIP(file_ccpackage_packages_proto_rawDescData) + }) + return file_ccpackage_packages_proto_rawDescData +} + +var file_ccpackage_packages_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_ccpackage_packages_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_ccpackage_packages_proto_goTypes = []interface{}{ + (FabricVersion)(0), // 0: hlfsdkgo.service.ccpackage.FabricVersion + (*PackageID)(nil), // 1: hlfsdkgo.service.ccpackage.PackageID + (*PackageSpec)(nil), // 2: hlfsdkgo.service.ccpackage.PackageSpec + (*PackageInfo)(nil), // 3: hlfsdkgo.service.ccpackage.PackageInfo + (*PackageInfoList)(nil), // 4: hlfsdkgo.service.ccpackage.PackageInfoList + (*FileChunk)(nil), // 5: hlfsdkgo.service.ccpackage.FileChunk + (*PutPackageRequest)(nil), // 6: hlfsdkgo.service.ccpackage.PutPackageRequest + (*Package)(nil), // 7: hlfsdkgo.service.ccpackage.Package + (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 9: google.protobuf.Empty + (*peer.ChaincodeDeploymentSpec)(nil), // 10: protos.ChaincodeDeploymentSpec +} +var file_ccpackage_packages_proto_depIdxs = []int32{ + 0, // 0: hlfsdkgo.service.ccpackage.PackageID.fabric_version:type_name -> hlfsdkgo.service.ccpackage.FabricVersion + 1, // 1: hlfsdkgo.service.ccpackage.PackageSpec.id:type_name -> hlfsdkgo.service.ccpackage.PackageID + 1, // 2: hlfsdkgo.service.ccpackage.PackageInfo.id:type_name -> hlfsdkgo.service.ccpackage.PackageID + 8, // 3: hlfsdkgo.service.ccpackage.PackageInfo.created_at:type_name -> google.protobuf.Timestamp + 3, // 4: hlfsdkgo.service.ccpackage.PackageInfoList.items:type_name -> hlfsdkgo.service.ccpackage.PackageInfo + 1, // 5: hlfsdkgo.service.ccpackage.PutPackageRequest.id:type_name -> hlfsdkgo.service.ccpackage.PackageID + 1, // 6: hlfsdkgo.service.ccpackage.Package.id:type_name -> hlfsdkgo.service.ccpackage.PackageID + 8, // 7: hlfsdkgo.service.ccpackage.Package.created_at:type_name -> google.protobuf.Timestamp + 2, // 8: hlfsdkgo.service.ccpackage.PackageService.Create:input_type -> hlfsdkgo.service.ccpackage.PackageSpec + 1, // 9: hlfsdkgo.service.ccpackage.PackageService.GetInfo:input_type -> hlfsdkgo.service.ccpackage.PackageID + 2, // 10: hlfsdkgo.service.ccpackage.PackageService.GetOrCreate:input_type -> hlfsdkgo.service.ccpackage.PackageSpec + 9, // 11: hlfsdkgo.service.ccpackage.PackageService.ListInfo:input_type -> google.protobuf.Empty + 1, // 12: hlfsdkgo.service.ccpackage.PackageService.GetDeploymentSpec:input_type -> hlfsdkgo.service.ccpackage.PackageID + 1, // 13: hlfsdkgo.service.ccpackage.PackageService.Get:input_type -> hlfsdkgo.service.ccpackage.PackageID + 1, // 14: hlfsdkgo.service.ccpackage.PackageService.Fetch:input_type -> hlfsdkgo.service.ccpackage.PackageID + 3, // 15: hlfsdkgo.service.ccpackage.PackageService.Create:output_type -> hlfsdkgo.service.ccpackage.PackageInfo + 3, // 16: hlfsdkgo.service.ccpackage.PackageService.GetInfo:output_type -> hlfsdkgo.service.ccpackage.PackageInfo + 3, // 17: hlfsdkgo.service.ccpackage.PackageService.GetOrCreate:output_type -> hlfsdkgo.service.ccpackage.PackageInfo + 4, // 18: hlfsdkgo.service.ccpackage.PackageService.ListInfo:output_type -> hlfsdkgo.service.ccpackage.PackageInfoList + 10, // 19: hlfsdkgo.service.ccpackage.PackageService.GetDeploymentSpec:output_type -> protos.ChaincodeDeploymentSpec + 7, // 20: hlfsdkgo.service.ccpackage.PackageService.Get:output_type -> hlfsdkgo.service.ccpackage.Package + 5, // 21: hlfsdkgo.service.ccpackage.PackageService.Fetch:output_type -> hlfsdkgo.service.ccpackage.FileChunk + 15, // [15:22] is the sub-list for method output_type + 8, // [8:15] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_ccpackage_packages_proto_init() } +func file_ccpackage_packages_proto_init() { + if File_ccpackage_packages_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_ccpackage_packages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PackageID); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ccpackage_packages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PackageSpec); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ccpackage_packages_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PackageInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ccpackage_packages_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PackageInfoList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ccpackage_packages_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FileChunk); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ccpackage_packages_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PutPackageRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_ccpackage_packages_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Package); 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_ccpackage_packages_proto_rawDesc, + NumEnums: 1, + NumMessages: 7, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_ccpackage_packages_proto_goTypes, + DependencyIndexes: file_ccpackage_packages_proto_depIdxs, + EnumInfos: file_ccpackage_packages_proto_enumTypes, + MessageInfos: file_ccpackage_packages_proto_msgTypes, + }.Build() + File_ccpackage_packages_proto = out.File + file_ccpackage_packages_proto_rawDesc = nil + file_ccpackage_packages_proto_goTypes = nil + file_ccpackage_packages_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// PackageServiceClient is the client API for PackageService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type PackageServiceClient interface { + Create(ctx context.Context, in *PackageSpec, opts ...grpc.CallOption) (*PackageInfo, error) + GetInfo(ctx context.Context, in *PackageID, opts ...grpc.CallOption) (*PackageInfo, error) + GetOrCreate(ctx context.Context, in *PackageSpec, opts ...grpc.CallOption) (*PackageInfo, error) + ListInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PackageInfoList, error) + GetDeploymentSpec(ctx context.Context, in *PackageID, opts ...grpc.CallOption) (*peer.ChaincodeDeploymentSpec, error) + Get(ctx context.Context, in *PackageID, opts ...grpc.CallOption) (*Package, error) + Fetch(ctx context.Context, in *PackageID, opts ...grpc.CallOption) (PackageService_FetchClient, error) +} + +type packageServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewPackageServiceClient(cc grpc.ClientConnInterface) PackageServiceClient { + return &packageServiceClient{cc} +} + +func (c *packageServiceClient) Create(ctx context.Context, in *PackageSpec, opts ...grpc.CallOption) (*PackageInfo, error) { + out := new(PackageInfo) + err := c.cc.Invoke(ctx, "/hlfsdkgo.service.ccpackage.PackageService/Create", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *packageServiceClient) GetInfo(ctx context.Context, in *PackageID, opts ...grpc.CallOption) (*PackageInfo, error) { + out := new(PackageInfo) + err := c.cc.Invoke(ctx, "/hlfsdkgo.service.ccpackage.PackageService/GetInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *packageServiceClient) GetOrCreate(ctx context.Context, in *PackageSpec, opts ...grpc.CallOption) (*PackageInfo, error) { + out := new(PackageInfo) + err := c.cc.Invoke(ctx, "/hlfsdkgo.service.ccpackage.PackageService/GetOrCreate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *packageServiceClient) ListInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PackageInfoList, error) { + out := new(PackageInfoList) + err := c.cc.Invoke(ctx, "/hlfsdkgo.service.ccpackage.PackageService/ListInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *packageServiceClient) GetDeploymentSpec(ctx context.Context, in *PackageID, opts ...grpc.CallOption) (*peer.ChaincodeDeploymentSpec, error) { + out := new(peer.ChaincodeDeploymentSpec) + err := c.cc.Invoke(ctx, "/hlfsdkgo.service.ccpackage.PackageService/GetDeploymentSpec", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *packageServiceClient) Get(ctx context.Context, in *PackageID, opts ...grpc.CallOption) (*Package, error) { + out := new(Package) + err := c.cc.Invoke(ctx, "/hlfsdkgo.service.ccpackage.PackageService/Get", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *packageServiceClient) Fetch(ctx context.Context, in *PackageID, opts ...grpc.CallOption) (PackageService_FetchClient, error) { + stream, err := c.cc.NewStream(ctx, &_PackageService_serviceDesc.Streams[0], "/hlfsdkgo.service.ccpackage.PackageService/Fetch", opts...) + if err != nil { + return nil, err + } + x := &packageServiceFetchClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type PackageService_FetchClient interface { + Recv() (*FileChunk, error) + grpc.ClientStream +} + +type packageServiceFetchClient struct { + grpc.ClientStream +} + +func (x *packageServiceFetchClient) Recv() (*FileChunk, error) { + m := new(FileChunk) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// PackageServiceServer is the server API for PackageService service. +type PackageServiceServer interface { + Create(context.Context, *PackageSpec) (*PackageInfo, error) + GetInfo(context.Context, *PackageID) (*PackageInfo, error) + GetOrCreate(context.Context, *PackageSpec) (*PackageInfo, error) + ListInfo(context.Context, *emptypb.Empty) (*PackageInfoList, error) + GetDeploymentSpec(context.Context, *PackageID) (*peer.ChaincodeDeploymentSpec, error) + Get(context.Context, *PackageID) (*Package, error) + Fetch(*PackageID, PackageService_FetchServer) error +} + +// UnimplementedPackageServiceServer can be embedded to have forward compatible implementations. +type UnimplementedPackageServiceServer struct { +} + +func (*UnimplementedPackageServiceServer) Create(context.Context, *PackageSpec) (*PackageInfo, error) { + return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") +} +func (*UnimplementedPackageServiceServer) GetInfo(context.Context, *PackageID) (*PackageInfo, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented") +} +func (*UnimplementedPackageServiceServer) GetOrCreate(context.Context, *PackageSpec) (*PackageInfo, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetOrCreate not implemented") +} +func (*UnimplementedPackageServiceServer) ListInfo(context.Context, *emptypb.Empty) (*PackageInfoList, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListInfo not implemented") +} +func (*UnimplementedPackageServiceServer) GetDeploymentSpec(context.Context, *PackageID) (*peer.ChaincodeDeploymentSpec, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDeploymentSpec not implemented") +} +func (*UnimplementedPackageServiceServer) Get(context.Context, *PackageID) (*Package, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (*UnimplementedPackageServiceServer) Fetch(*PackageID, PackageService_FetchServer) error { + return status.Errorf(codes.Unimplemented, "method Fetch not implemented") +} + +func RegisterPackageServiceServer(s *grpc.Server, srv PackageServiceServer) { + s.RegisterService(&_PackageService_serviceDesc, srv) +} + +func _PackageService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PackageSpec) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PackageServiceServer).Create(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/hlfsdkgo.service.ccpackage.PackageService/Create", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PackageServiceServer).Create(ctx, req.(*PackageSpec)) + } + return interceptor(ctx, in, info, handler) +} + +func _PackageService_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PackageID) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PackageServiceServer).GetInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/hlfsdkgo.service.ccpackage.PackageService/GetInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PackageServiceServer).GetInfo(ctx, req.(*PackageID)) + } + return interceptor(ctx, in, info, handler) +} + +func _PackageService_GetOrCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PackageSpec) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PackageServiceServer).GetOrCreate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/hlfsdkgo.service.ccpackage.PackageService/GetOrCreate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PackageServiceServer).GetOrCreate(ctx, req.(*PackageSpec)) + } + return interceptor(ctx, in, info, handler) +} + +func _PackageService_ListInfo_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.(PackageServiceServer).ListInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/hlfsdkgo.service.ccpackage.PackageService/ListInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PackageServiceServer).ListInfo(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _PackageService_GetDeploymentSpec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PackageID) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PackageServiceServer).GetDeploymentSpec(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/hlfsdkgo.service.ccpackage.PackageService/GetDeploymentSpec", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PackageServiceServer).GetDeploymentSpec(ctx, req.(*PackageID)) + } + return interceptor(ctx, in, info, handler) +} + +func _PackageService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PackageID) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PackageServiceServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/hlfsdkgo.service.ccpackage.PackageService/Get", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PackageServiceServer).Get(ctx, req.(*PackageID)) + } + return interceptor(ctx, in, info, handler) +} + +func _PackageService_Fetch_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(PackageID) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(PackageServiceServer).Fetch(m, &packageServiceFetchServer{stream}) +} + +type PackageService_FetchServer interface { + Send(*FileChunk) error + grpc.ServerStream +} + +type packageServiceFetchServer struct { + grpc.ServerStream +} + +func (x *packageServiceFetchServer) Send(m *FileChunk) error { + return x.ServerStream.SendMsg(m) +} + +var _PackageService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "hlfsdkgo.service.ccpackage.PackageService", + HandlerType: (*PackageServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Create", + Handler: _PackageService_Create_Handler, + }, + { + MethodName: "GetInfo", + Handler: _PackageService_GetInfo_Handler, + }, + { + MethodName: "GetOrCreate", + Handler: _PackageService_GetOrCreate_Handler, + }, + { + MethodName: "ListInfo", + Handler: _PackageService_ListInfo_Handler, + }, + { + MethodName: "GetDeploymentSpec", + Handler: _PackageService_GetDeploymentSpec_Handler, + }, + { + MethodName: "Get", + Handler: _PackageService_Get_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "Fetch", + Handler: _PackageService_Fetch_Handler, + ServerStreams: true, + }, + }, + Metadata: "ccpackage/packages.proto", +} diff --git a/service/ccpackage/packages.pb.gw.go b/service/ccpackage/packages.pb.gw.go new file mode 100644 index 0000000..ab1cc1b --- /dev/null +++ b/service/ccpackage/packages.pb.gw.go @@ -0,0 +1,769 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: ccpackage/packages.proto + +/* +Package ccpackage is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package ccpackage + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/types/known/emptypb" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +func request_PackageService_Create_0(ctx context.Context, marshaler runtime.Marshaler, client PackageServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PackageSpec + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Create(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_PackageService_Create_0(ctx context.Context, marshaler runtime.Marshaler, server PackageServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PackageSpec + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Create(ctx, &protoReq) + return msg, metadata, err + +} + +func request_PackageService_GetInfo_0(ctx context.Context, marshaler runtime.Marshaler, client PackageServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PackageID + var metadata runtime.ServerMetadata + + var ( + val string + e int32 + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + val, ok = pathParams["version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version") + } + + protoReq.Version, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version", err) + } + + val, ok = pathParams["fabric_version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "fabric_version") + } + + e, err = runtime.Enum(val, FabricVersion_value) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "fabric_version", err) + } + + protoReq.FabricVersion = FabricVersion(e) + + msg, err := client.GetInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_PackageService_GetInfo_0(ctx context.Context, marshaler runtime.Marshaler, server PackageServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PackageID + var metadata runtime.ServerMetadata + + var ( + val string + e int32 + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + val, ok = pathParams["version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version") + } + + protoReq.Version, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version", err) + } + + val, ok = pathParams["fabric_version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "fabric_version") + } + + e, err = runtime.Enum(val, FabricVersion_value) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "fabric_version", err) + } + + protoReq.FabricVersion = FabricVersion(e) + + msg, err := server.GetInfo(ctx, &protoReq) + return msg, metadata, err + +} + +func request_PackageService_GetOrCreate_0(ctx context.Context, marshaler runtime.Marshaler, client PackageServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PackageSpec + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetOrCreate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_PackageService_GetOrCreate_0(ctx context.Context, marshaler runtime.Marshaler, server PackageServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PackageSpec + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetOrCreate(ctx, &protoReq) + return msg, metadata, err + +} + +func request_PackageService_ListInfo_0(ctx context.Context, marshaler runtime.Marshaler, client PackageServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq emptypb.Empty + var metadata runtime.ServerMetadata + + msg, err := client.ListInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_PackageService_ListInfo_0(ctx context.Context, marshaler runtime.Marshaler, server PackageServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq emptypb.Empty + var metadata runtime.ServerMetadata + + msg, err := server.ListInfo(ctx, &protoReq) + return msg, metadata, err + +} + +func request_PackageService_GetDeploymentSpec_0(ctx context.Context, marshaler runtime.Marshaler, client PackageServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PackageID + var metadata runtime.ServerMetadata + + var ( + val string + e int32 + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + val, ok = pathParams["version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version") + } + + protoReq.Version, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version", err) + } + + val, ok = pathParams["fabric_version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "fabric_version") + } + + e, err = runtime.Enum(val, FabricVersion_value) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "fabric_version", err) + } + + protoReq.FabricVersion = FabricVersion(e) + + msg, err := client.GetDeploymentSpec(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_PackageService_GetDeploymentSpec_0(ctx context.Context, marshaler runtime.Marshaler, server PackageServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PackageID + var metadata runtime.ServerMetadata + + var ( + val string + e int32 + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + val, ok = pathParams["version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version") + } + + protoReq.Version, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version", err) + } + + val, ok = pathParams["fabric_version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "fabric_version") + } + + e, err = runtime.Enum(val, FabricVersion_value) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "fabric_version", err) + } + + protoReq.FabricVersion = FabricVersion(e) + + msg, err := server.GetDeploymentSpec(ctx, &protoReq) + return msg, metadata, err + +} + +func request_PackageService_Get_0(ctx context.Context, marshaler runtime.Marshaler, client PackageServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PackageID + var metadata runtime.ServerMetadata + + var ( + val string + e int32 + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + val, ok = pathParams["version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version") + } + + protoReq.Version, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version", err) + } + + val, ok = pathParams["fabric_version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "fabric_version") + } + + e, err = runtime.Enum(val, FabricVersion_value) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "fabric_version", err) + } + + protoReq.FabricVersion = FabricVersion(e) + + msg, err := client.Get(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_PackageService_Get_0(ctx context.Context, marshaler runtime.Marshaler, server PackageServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PackageID + var metadata runtime.ServerMetadata + + var ( + val string + e int32 + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + val, ok = pathParams["version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version") + } + + protoReq.Version, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version", err) + } + + val, ok = pathParams["fabric_version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "fabric_version") + } + + e, err = runtime.Enum(val, FabricVersion_value) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "fabric_version", err) + } + + protoReq.FabricVersion = FabricVersion(e) + + msg, err := server.Get(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterPackageServiceHandlerServer registers the http handlers for service PackageService to "mux". +// UnaryRPC :call PackageServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPackageServiceHandlerFromEndpoint instead. +func RegisterPackageServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PackageServiceServer) error { + + mux.Handle("POST", pattern_PackageService_Create_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_PackageService_Create_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_PackageService_Create_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_PackageService_GetInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_PackageService_GetInfo_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_PackageService_GetInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_PackageService_GetOrCreate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_PackageService_GetOrCreate_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_PackageService_GetOrCreate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_PackageService_ListInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_PackageService_ListInfo_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_PackageService_ListInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_PackageService_GetDeploymentSpec_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_PackageService_GetDeploymentSpec_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_PackageService_GetDeploymentSpec_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_PackageService_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_PackageService_Get_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_PackageService_Get_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterPackageServiceHandlerFromEndpoint is same as RegisterPackageServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterPackageServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterPackageServiceHandler(ctx, mux, conn) +} + +// RegisterPackageServiceHandler registers the http handlers for service PackageService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterPackageServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterPackageServiceHandlerClient(ctx, mux, NewPackageServiceClient(conn)) +} + +// RegisterPackageServiceHandlerClient registers the http handlers for service PackageService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PackageServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PackageServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "PackageServiceClient" to call the correct interceptors. +func RegisterPackageServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PackageServiceClient) error { + + mux.Handle("POST", pattern_PackageService_Create_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_PackageService_Create_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_PackageService_Create_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_PackageService_GetInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_PackageService_GetInfo_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_PackageService_GetInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_PackageService_GetOrCreate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_PackageService_GetOrCreate_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_PackageService_GetOrCreate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_PackageService_ListInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_PackageService_ListInfo_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_PackageService_ListInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_PackageService_GetDeploymentSpec_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_PackageService_GetDeploymentSpec_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_PackageService_GetDeploymentSpec_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_PackageService_Get_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_PackageService_Get_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_PackageService_Get_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_PackageService_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"ccpackages"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_PackageService_GetInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3}, []string{"ccpackages", "name", "version", "fabric_version"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_PackageService_GetOrCreate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"ccpackages"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_PackageService_ListInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"ccpackages"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_PackageService_GetDeploymentSpec_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"ccpackages", "name", "version", "fabric_version", "deployment-spec"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_PackageService_Get_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"ccpackages", "name", "version", "fabric_version", "data"}, "", runtime.AssumeColonVerbOpt(true))) +) + +var ( + forward_PackageService_Create_0 = runtime.ForwardResponseMessage + + forward_PackageService_GetInfo_0 = runtime.ForwardResponseMessage + + forward_PackageService_GetOrCreate_0 = runtime.ForwardResponseMessage + + forward_PackageService_ListInfo_0 = runtime.ForwardResponseMessage + + forward_PackageService_GetDeploymentSpec_0 = runtime.ForwardResponseMessage + + forward_PackageService_Get_0 = runtime.ForwardResponseMessage +) diff --git a/service/ccpackage/packages.pb.validate.go b/service/ccpackage/packages.pb.validate.go new file mode 100644 index 0000000..c058e87 --- /dev/null +++ b/service/ccpackage/packages.pb.validate.go @@ -0,0 +1,1042 @@ +// Code generated by protoc-gen-validate. DO NOT EDIT. +// source: ccpackage/packages.proto + +package ccpackage + +import ( + "bytes" + "errors" + "fmt" + "net" + "net/mail" + "net/url" + "regexp" + "sort" + "strings" + "time" + "unicode/utf8" + + "google.golang.org/protobuf/types/known/anypb" +) + +// ensure the imports are used +var ( + _ = bytes.MinRead + _ = errors.New("") + _ = fmt.Print + _ = utf8.UTFMax + _ = (*regexp.Regexp)(nil) + _ = (*strings.Reader)(nil) + _ = net.IPv4len + _ = time.Duration(0) + _ = (*url.URL)(nil) + _ = (*mail.Address)(nil) + _ = anypb.Any{} + _ = sort.Sort +) + +// Validate checks the field values on PackageID with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *PackageID) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PackageID with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in PackageIDMultiError, or nil +// if none found. +func (m *PackageID) ValidateAll() error { + return m.validate(true) +} + +func (m *PackageID) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetName()) < 1 { + err := PackageIDValidationError{ + field: "Name", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if utf8.RuneCountInString(m.GetVersion()) < 1 { + err := PackageIDValidationError{ + field: "Version", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if _, ok := _PackageID_FabricVersion_NotInLookup[m.GetFabricVersion()]; ok { + err := PackageIDValidationError{ + field: "FabricVersion", + reason: "value must not be in list [FABRIC_VERSION_UNSPECIFIED]", + } + if !all { + return err + } + errors = append(errors, err) + } + + if _, ok := FabricVersion_name[int32(m.GetFabricVersion())]; !ok { + err := PackageIDValidationError{ + field: "FabricVersion", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return PackageIDMultiError(errors) + } + + return nil +} + +// PackageIDMultiError is an error wrapping multiple validation errors returned +// by PackageID.ValidateAll() if the designated constraints aren't met. +type PackageIDMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PackageIDMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PackageIDMultiError) AllErrors() []error { return m } + +// PackageIDValidationError is the validation error returned by +// PackageID.Validate if the designated constraints aren't met. +type PackageIDValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PackageIDValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PackageIDValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PackageIDValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PackageIDValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PackageIDValidationError) ErrorName() string { return "PackageIDValidationError" } + +// Error satisfies the builtin error interface +func (e PackageIDValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sPackageID.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PackageIDValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PackageIDValidationError{} + +var _PackageID_FabricVersion_NotInLookup = map[FabricVersion]struct{}{ + 0: {}, +} + +// Validate checks the field values on PackageSpec with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *PackageSpec) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PackageSpec with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in PackageSpecMultiError, or +// nil if none found. +func (m *PackageSpec) ValidateAll() error { + return m.validate(true) +} + +func (m *PackageSpec) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if m.GetId() == nil { + err := PackageSpecValidationError{ + field: "Id", + reason: "value is required", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PackageSpecValidationError{ + field: "Id", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PackageSpecValidationError{ + field: "Id", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetId()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PackageSpecValidationError{ + field: "Id", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if utf8.RuneCountInString(m.GetRepository()) < 1 { + err := PackageSpecValidationError{ + field: "Repository", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if utf8.RuneCountInString(m.GetChaincodePath()) < 1 { + err := PackageSpecValidationError{ + field: "ChaincodePath", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if utf8.RuneCountInString(m.GetBinaryPath()) < 1 { + err := PackageSpecValidationError{ + field: "BinaryPath", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(errors) > 0 { + return PackageSpecMultiError(errors) + } + + return nil +} + +// PackageSpecMultiError is an error wrapping multiple validation errors +// returned by PackageSpec.ValidateAll() if the designated constraints aren't met. +type PackageSpecMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PackageSpecMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PackageSpecMultiError) AllErrors() []error { return m } + +// PackageSpecValidationError is the validation error returned by +// PackageSpec.Validate if the designated constraints aren't met. +type PackageSpecValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PackageSpecValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PackageSpecValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PackageSpecValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PackageSpecValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PackageSpecValidationError) ErrorName() string { return "PackageSpecValidationError" } + +// Error satisfies the builtin error interface +func (e PackageSpecValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sPackageSpec.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PackageSpecValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PackageSpecValidationError{} + +// Validate checks the field values on PackageInfo with the rules defined in +// the proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *PackageInfo) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PackageInfo with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in PackageInfoMultiError, or +// nil if none found. +func (m *PackageInfo) ValidateAll() error { + return m.validate(true) +} + +func (m *PackageInfo) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PackageInfoValidationError{ + field: "Id", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PackageInfoValidationError{ + field: "Id", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetId()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PackageInfoValidationError{ + field: "Id", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Size + + if all { + switch v := interface{}(m.GetCreatedAt()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PackageInfoValidationError{ + field: "CreatedAt", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PackageInfoValidationError{ + field: "CreatedAt", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCreatedAt()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PackageInfoValidationError{ + field: "CreatedAt", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return PackageInfoMultiError(errors) + } + + return nil +} + +// PackageInfoMultiError is an error wrapping multiple validation errors +// returned by PackageInfo.ValidateAll() if the designated constraints aren't met. +type PackageInfoMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PackageInfoMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PackageInfoMultiError) AllErrors() []error { return m } + +// PackageInfoValidationError is the validation error returned by +// PackageInfo.Validate if the designated constraints aren't met. +type PackageInfoValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PackageInfoValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PackageInfoValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PackageInfoValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PackageInfoValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PackageInfoValidationError) ErrorName() string { return "PackageInfoValidationError" } + +// Error satisfies the builtin error interface +func (e PackageInfoValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sPackageInfo.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PackageInfoValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PackageInfoValidationError{} + +// Validate checks the field values on PackageInfoList with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *PackageInfoList) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PackageInfoList with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// PackageInfoListMultiError, or nil if none found. +func (m *PackageInfoList) ValidateAll() error { + return m.validate(true) +} + +func (m *PackageInfoList) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetItems() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PackageInfoListValidationError{ + field: fmt.Sprintf("Items[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PackageInfoListValidationError{ + field: fmt.Sprintf("Items[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PackageInfoListValidationError{ + field: fmt.Sprintf("Items[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return PackageInfoListMultiError(errors) + } + + return nil +} + +// PackageInfoListMultiError is an error wrapping multiple validation errors +// returned by PackageInfoList.ValidateAll() if the designated constraints +// aren't met. +type PackageInfoListMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PackageInfoListMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PackageInfoListMultiError) AllErrors() []error { return m } + +// PackageInfoListValidationError is the validation error returned by +// PackageInfoList.Validate if the designated constraints aren't met. +type PackageInfoListValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PackageInfoListValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PackageInfoListValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PackageInfoListValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PackageInfoListValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PackageInfoListValidationError) ErrorName() string { return "PackageInfoListValidationError" } + +// Error satisfies the builtin error interface +func (e PackageInfoListValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sPackageInfoList.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PackageInfoListValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PackageInfoListValidationError{} + +// Validate checks the field values on FileChunk with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *FileChunk) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on FileChunk with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in FileChunkMultiError, or nil +// if none found. +func (m *FileChunk) ValidateAll() error { + return m.validate(true) +} + +func (m *FileChunk) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Data + + if len(errors) > 0 { + return FileChunkMultiError(errors) + } + + return nil +} + +// FileChunkMultiError is an error wrapping multiple validation errors returned +// by FileChunk.ValidateAll() if the designated constraints aren't met. +type FileChunkMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m FileChunkMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m FileChunkMultiError) AllErrors() []error { return m } + +// FileChunkValidationError is the validation error returned by +// FileChunk.Validate if the designated constraints aren't met. +type FileChunkValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e FileChunkValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e FileChunkValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e FileChunkValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e FileChunkValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e FileChunkValidationError) ErrorName() string { return "FileChunkValidationError" } + +// Error satisfies the builtin error interface +func (e FileChunkValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sFileChunk.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = FileChunkValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = FileChunkValidationError{} + +// Validate checks the field values on PutPackageRequest with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *PutPackageRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on PutPackageRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// PutPackageRequestMultiError, or nil if none found. +func (m *PutPackageRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *PutPackageRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PutPackageRequestValidationError{ + field: "Id", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PutPackageRequestValidationError{ + field: "Id", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetId()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PutPackageRequestValidationError{ + field: "Id", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Data + + if len(errors) > 0 { + return PutPackageRequestMultiError(errors) + } + + return nil +} + +// PutPackageRequestMultiError is an error wrapping multiple validation errors +// returned by PutPackageRequest.ValidateAll() if the designated constraints +// aren't met. +type PutPackageRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PutPackageRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PutPackageRequestMultiError) AllErrors() []error { return m } + +// PutPackageRequestValidationError is the validation error returned by +// PutPackageRequest.Validate if the designated constraints aren't met. +type PutPackageRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PutPackageRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PutPackageRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PutPackageRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PutPackageRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PutPackageRequestValidationError) ErrorName() string { + return "PutPackageRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e PutPackageRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sPutPackageRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PutPackageRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PutPackageRequestValidationError{} + +// Validate checks the field values on Package with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Package) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Package with the rules defined in the +// proto definition for this message. If any rules are violated, the result is +// a list of violation errors wrapped in PackageMultiError, or nil if none found. +func (m *Package) ValidateAll() error { + return m.validate(true) +} + +func (m *Package) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetId()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PackageValidationError{ + field: "Id", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PackageValidationError{ + field: "Id", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetId()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PackageValidationError{ + field: "Id", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Size + + if all { + switch v := interface{}(m.GetCreatedAt()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, PackageValidationError{ + field: "CreatedAt", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, PackageValidationError{ + field: "CreatedAt", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCreatedAt()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return PackageValidationError{ + field: "CreatedAt", + reason: "embedded message failed validation", + cause: err, + } + } + } + + // no validation rules for Data + + if len(errors) > 0 { + return PackageMultiError(errors) + } + + return nil +} + +// PackageMultiError is an error wrapping multiple validation errors returned +// by Package.ValidateAll() if the designated constraints aren't met. +type PackageMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m PackageMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m PackageMultiError) AllErrors() []error { return m } + +// PackageValidationError is the validation error returned by Package.Validate +// if the designated constraints aren't met. +type PackageValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e PackageValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e PackageValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e PackageValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e PackageValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e PackageValidationError) ErrorName() string { return "PackageValidationError" } + +// Error satisfies the builtin error interface +func (e PackageValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sPackage.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = PackageValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = PackageValidationError{} diff --git a/service/ccpackage/packages.proto b/service/ccpackage/packages.proto new file mode 100644 index 0000000..5af5743 --- /dev/null +++ b/service/ccpackage/packages.proto @@ -0,0 +1,118 @@ +syntax = "proto3"; + +package hlfsdkgo.service.ccpackage; +option go_package = "github.com/s7techlab/hlf-sdk-go/service/ccpackage"; + +import "hyperledger/fabric-protos/peer/chaincode.proto"; + +import "google/api/annotations.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/empty.proto"; +import "validate/validate.proto"; + + + +// Service Packages install on operator service +// and give opportunity to members of network fetch and install chaincode to +// self peer directly please use `Get` and after `Fetch` for correctly fetch +// package +service PackageService { + + rpc Create (PackageSpec) returns (PackageInfo) { + option (google.api.http) = { + post: "/ccpackages" + body: "*" + }; + } + rpc GetInfo (PackageID) returns (PackageInfo) { + option (google.api.http) = { + get: "/ccpackages/{name}/{version}/{fabric_version}" + }; + } + + rpc GetOrCreate (PackageSpec) returns (PackageInfo) { + option (google.api.http) = { + put: "/ccpackages" + body: "*" + }; + } + + rpc ListInfo (google.protobuf.Empty) returns (PackageInfoList) { + option (google.api.http) = { + get: "/ccpackages" + }; + } + rpc GetDeploymentSpec (PackageID) returns (protos.ChaincodeDeploymentSpec) { + option (google.api.http) = { + get: "/ccpackages/{name}/{version}/{fabric_version}/deployment-spec" + }; + } + + rpc Get(PackageID) returns (Package) { + option (google.api.http) = { + get: "/ccpackages/{name}/{version}/{fabric_version}/data" + }; + } + + rpc Fetch (PackageID) returns (stream FileChunk) {} +} + +enum FabricVersion { + // Fabric v1.4 tools + FABRIC_VERSION_UNSPECIFIED = 0; + // Fabric v1.4 tools + FABRIC_V1 = 1; + // Fabric v2.3 tools + FABRIC_V2 = 2; + // Fabric v2.3 tools with lifecycle + FABRIC_V2_LIFECYCLE = 3; +} + +message PackageID { + // Name is a chaincode name, ex: payment + string name = 1 [(validate.rules).string.min_len = 1]; + // Version is a chaincode version to use, ex: 2800dea5e957b3b65f48340337fdbbedc7caf396 + string version = 2 [(validate.rules).string.min_len = 1]; + // Fabric version to use to build chaincode. + FabricVersion fabric_version = 3 [(validate.rules).enum = {defined_only: true; not_in: [0]}]; +} + +message PackageSpec { + // Package ID is package identification data + PackageID id = 1 [(validate.rules).message.required = true]; + // Repository is url to git sources, ex: http://:token@{repo url} + // or http://login:password@github.com/hyperledger-labs/cckit/examples/cars + // or path to local directory file:///path/to/sources/hyperledger-labs/cckit + string repository = 2 [(validate.rules).string.min_len = 1]; + // Chaincode path is path to chaincode, ex: github.com/hyperledger-labs/cckit + string chaincode_path = 3 [(validate.rules).string.min_len = 1]; + // BinaryPath is path to chaincode binary in given repository, + // ex: `examples/cars`. + string binary_path = 4 [(validate.rules).string.min_len = 1]; +} + +message PackageInfo { + PackageID id = 1; + int64 size = 4; + google.protobuf.Timestamp created_at = 5; +} + +message PackageInfoList { + repeated PackageInfo items = 1; +} + +message FileChunk { + bytes data = 1; +} + +message PutPackageRequest { + PackageID id = 1; + bytes data = 4; +} + +message Package { + PackageID id = 1; + int64 size = 2; + google.protobuf.Timestamp created_at = 3; + bytes data = 4; +} diff --git a/service/ccpackage/packages.swagger.json b/service/ccpackage/packages.swagger.json new file mode 100644 index 0000000..dc78039 --- /dev/null +++ b/service/ccpackage/packages.swagger.json @@ -0,0 +1,500 @@ +{ + "swagger": "2.0", + "info": { + "title": "ccpackage/packages.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/ccpackages": { + "get": { + "operationId": "PackageService_ListInfo", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ccpackagePackageInfoList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + }, + "tags": [ + "PackageService" + ] + }, + "post": { + "operationId": "PackageService_Create", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ccpackagePackageInfo" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ccpackagePackageSpec" + } + } + ], + "tags": [ + "PackageService" + ] + }, + "put": { + "operationId": "PackageService_GetOrCreate", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ccpackagePackageInfo" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ccpackagePackageSpec" + } + } + ], + "tags": [ + "PackageService" + ] + } + }, + "/ccpackages/{name}/{version}/{fabric_version}": { + "get": { + "operationId": "PackageService_GetInfo", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ccpackagePackageInfo" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + }, + "parameters": [ + { + "name": "name", + "description": "Name is a chaincode name, ex: payment", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "version", + "description": "Version is a chaincode version to use, ex: 2800dea5e957b3b65f48340337fdbbedc7caf396", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "fabric_version", + "description": "Fabric version to use to build chaincode.", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "FABRIC_VERSION_UNSPECIFIED", + "FABRIC_V1", + "FABRIC_V2", + "FABRIC_V2_LIFECYCLE" + ] + } + ], + "tags": [ + "PackageService" + ] + } + }, + "/ccpackages/{name}/{version}/{fabric_version}/data": { + "get": { + "operationId": "PackageService_Get", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ccpackagePackage" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + }, + "parameters": [ + { + "name": "name", + "description": "Name is a chaincode name, ex: payment", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "version", + "description": "Version is a chaincode version to use, ex: 2800dea5e957b3b65f48340337fdbbedc7caf396", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "fabric_version", + "description": "Fabric version to use to build chaincode.", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "FABRIC_VERSION_UNSPECIFIED", + "FABRIC_V1", + "FABRIC_V2", + "FABRIC_V2_LIFECYCLE" + ] + } + ], + "tags": [ + "PackageService" + ] + } + }, + "/ccpackages/{name}/{version}/{fabric_version}/deployment-spec": { + "get": { + "operationId": "PackageService_GetDeploymentSpec", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/protosChaincodeDeploymentSpec" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/runtimeError" + } + } + }, + "parameters": [ + { + "name": "name", + "description": "Name is a chaincode name, ex: payment", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "version", + "description": "Version is a chaincode version to use, ex: 2800dea5e957b3b65f48340337fdbbedc7caf396", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "fabric_version", + "description": "Fabric version to use to build chaincode.", + "in": "path", + "required": true, + "type": "string", + "enum": [ + "FABRIC_VERSION_UNSPECIFIED", + "FABRIC_V1", + "FABRIC_V2", + "FABRIC_V2_LIFECYCLE" + ] + } + ], + "tags": [ + "PackageService" + ] + } + } + }, + "definitions": { + "ccpackageFabricVersion": { + "type": "string", + "enum": [ + "FABRIC_VERSION_UNSPECIFIED", + "FABRIC_V1", + "FABRIC_V2", + "FABRIC_V2_LIFECYCLE" + ], + "default": "FABRIC_VERSION_UNSPECIFIED", + "title": "- FABRIC_VERSION_UNSPECIFIED: Fabric v1.4 tools\n - FABRIC_V1: Fabric v1.4 tools\n - FABRIC_V2: Fabric v2.3 tools\n - FABRIC_V2_LIFECYCLE: Fabric v2.3 tools with lifecycle" + }, + "ccpackageFileChunk": { + "type": "object", + "properties": { + "data": { + "type": "string", + "format": "byte" + } + } + }, + "ccpackagePackage": { + "type": "object", + "properties": { + "id": { + "$ref": "#/definitions/ccpackagePackageID" + }, + "size": { + "type": "string", + "format": "int64" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "data": { + "type": "string", + "format": "byte" + } + } + }, + "ccpackagePackageID": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Name is a chaincode name, ex: payment" + }, + "version": { + "type": "string", + "title": "Version is a chaincode version to use, ex: 2800dea5e957b3b65f48340337fdbbedc7caf396" + }, + "fabric_version": { + "$ref": "#/definitions/ccpackageFabricVersion", + "description": "Fabric version to use to build chaincode." + } + } + }, + "ccpackagePackageInfo": { + "type": "object", + "properties": { + "id": { + "$ref": "#/definitions/ccpackagePackageID" + }, + "size": { + "type": "string", + "format": "int64" + }, + "created_at": { + "type": "string", + "format": "date-time" + } + } + }, + "ccpackagePackageInfoList": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/ccpackagePackageInfo" + } + } + } + }, + "ccpackagePackageSpec": { + "type": "object", + "properties": { + "id": { + "$ref": "#/definitions/ccpackagePackageID", + "title": "Package ID is package identification data" + }, + "repository": { + "type": "string", + "title": "Repository is url to git sources, ex: http://:token@{repo url}\nor http://login:password@github.com/hyperledger-labs/cckit/examples/cars\nor path to local directory file:///path/to/sources/hyperledger-labs/cckit" + }, + "chaincode_path": { + "type": "string", + "title": "Chaincode path is path to chaincode, ex: github.com/hyperledger-labs/cckit" + }, + "binary_path": { + "type": "string", + "description": "BinaryPath is path to chaincode binary in given repository,\nex: `examples/cars`." + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "type_url": { + "type": "string" + }, + "value": { + "type": "string", + "format": "byte" + } + } + }, + "protosChaincodeDeploymentSpec": { + "type": "object", + "properties": { + "chaincode_spec": { + "$ref": "#/definitions/protosChaincodeSpec" + }, + "code_package": { + "type": "string", + "format": "byte" + } + }, + "description": "Specify the deployment of a chaincode.\nTODO: Define `codePackage`." + }, + "protosChaincodeID": { + "type": "object", + "properties": { + "path": { + "type": "string", + "title": "deploy transaction will use the path" + }, + "name": { + "type": "string", + "title": "all other requests will use the name (really a hashcode) generated by\nthe deploy transaction" + }, + "version": { + "type": "string", + "title": "user friendly version name for the chaincode" + } + }, + "title": "ChaincodeID contains the path as specified by the deploy transaction\nthat created it as well as the hashCode that is generated by the\nsystem for the path. From the user level (ie, CLI, REST API and so on)\ndeploy transaction is expected to provide the path and other requests\nare expected to provide the hashCode. The other value will be ignored.\nInternally, the structure could contain both values. For instance, the\nhashCode will be set when first generated using the path" + }, + "protosChaincodeInput": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "type": "string", + "format": "byte" + } + }, + "decorations": { + "type": "object", + "additionalProperties": { + "type": "string", + "format": "byte" + } + }, + "is_init": { + "type": "boolean", + "description": "is_init is used for the application to signal that an invocation is to be routed\nto the legacy 'Init' function for compatibility with chaincodes which handled\nInit in the old way. New applications should manage their initialized state\nthemselves." + } + }, + "description": "Carries the chaincode function and its arguments.\nUnmarshalJSON in transaction.go converts the string-based REST/JSON input to\nthe []byte-based current ChaincodeInput structure." + }, + "protosChaincodeSpec": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/protosChaincodeSpecType" + }, + "chaincode_id": { + "$ref": "#/definitions/protosChaincodeID" + }, + "input": { + "$ref": "#/definitions/protosChaincodeInput" + }, + "timeout": { + "type": "integer", + "format": "int32" + } + }, + "description": "Carries the chaincode specification. This is the actual metadata required for\ndefining a chaincode." + }, + "protosChaincodeSpecType": { + "type": "string", + "enum": [ + "UNDEFINED", + "GOLANG", + "NODE", + "CAR", + "JAVA" + ], + "default": "UNDEFINED" + }, + "runtimeError": { + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "runtimeStreamError": { + "type": "object", + "properties": { + "grpc_code": { + "type": "integer", + "format": "int32" + }, + "http_code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "http_status": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/service/ccpackage/packer/docker/container.go b/service/ccpackage/packer/docker/container.go new file mode 100644 index 0000000..11195b2 --- /dev/null +++ b/service/ccpackage/packer/docker/container.go @@ -0,0 +1,221 @@ +package docker + +import ( + "bytes" + "context" + "errors" + "fmt" + + docker "github.com/fsouza/go-dockerclient" + "go.uber.org/zap" +) + +const ( + ContainerGoPath = `/go` + containerSrcPath = ContainerGoPath + `/src` +) + +type ( + Container struct { + docker *docker.Client + instance *docker.Container // current container + + image string + logger *zap.Logger + } + + CreateContainerOpt func(*docker.CreateContainerOptions) +) + +var ErrContainerNotCreated = errors.New(`container not created`) + +func CreateContainer(ctx context.Context, image string, logger *zap.Logger, opts ...CreateContainerOpt) ( + container *Container, err error) { + // Create new Docker client based on environment variables + client, err := docker.NewClientFromEnv() + if err != nil { + return nil, fmt.Errorf("create docker client: %w", err) + } + + // Ping Docker daemon for checking connectivity + if err = client.Ping(); err != nil { + return nil, fmt.Errorf("ping docker: %w", err) + } + + c := &Container{ + docker: client, + instance: nil, + image: image, + logger: logger, + } + + logger.Info(`create container`, zap.String(`image`, image)) + if err := c.checkImage(ctx); err != nil { + return nil, err + } + + containerOpts := docker.CreateContainerOptions{ + Config: &docker.Config{ + Image: image, + WorkingDir: containerSrcPath, + Entrypoint: []string{`tail`, `-f`, `/dev/null`}, + Env: []string{ + fmt.Sprintf("GOPATH=%s", ContainerGoPath), + }, + }, + Context: ctx, + } + + for _, opt := range opts { + opt(&containerOpts) + } + // Create Docker container with infinite endpoint + c.instance, err = c.docker.CreateContainer(containerOpts) + if err != nil { + return nil, fmt.Errorf("create docker container: %w", err) + } + + c.logger.Debug(`container created`, zap.String(`id`, c.instance.ID)) + c.logger.Debug(`start docker container`, zap.String(`id`, c.instance.ID)) + + // Start Docker container + if err = c.docker.StartContainer(c.instance.ID, nil); err != nil { + return nil, fmt.Errorf("start docker container: %w", err) + } + + return c, nil +} + +// checkImage checks image existences, otherwise pulls it +func (c *Container) checkImage(ctx context.Context) error { + c.logger.Debug(`inspect docker image`, zap.String(`image`, c.image)) + + _, err := c.docker.InspectImage(c.image) + switch err { + case docker.ErrNoSuchImage: + c.logger.Info(`pulling image`, zap.String(`image`, c.image)) + + return c.docker.PullImage(docker.PullImageOptions{ + Repository: c.image, + Context: ctx, + }, docker.AuthConfiguration{}) + default: + return err + } +} + +func (c *Container) Exec(ctx context.Context, cmd []string) error { + c.logger.Info(`exec cmd`, zap.Strings(`cmd`, cmd)) + + // Create exec with peer command + exec, err := c.docker.CreateExec(docker.CreateExecOptions{ + AttachStderr: true, + AttachStdout: true, + Cmd: cmd, + Container: c.instance.ID, + Context: ctx, + }) + if err != nil { + return fmt.Errorf("create docker exec: %w", err) + } + + // Start exec + errorBuf := new(bytes.Buffer) + outBuf := new(bytes.Buffer) + + if err = c.docker.StartExec(exec.ID, docker.StartExecOptions{ + ErrorStream: errorBuf, + OutputStream: outBuf, + Context: ctx, + }); err != nil { + return fmt.Errorf("start docker exec: %w", err) + } + + for { + select { + case <-ctx.Done(): + return ctx.Err() + default: + // Inspect exec for results + ex, err := c.docker.InspectExec(exec.ID) + if err != nil { + return fmt.Errorf("inspect docker exec: %w", err) + } + // Continue if program is still running + if ex.Running { + continue + } else { + // Expect error code is successful (zero) + if ex.ExitCode != 0 { + return fmt.Errorf("exec exit code is %d with output: %s", ex.ExitCode, errorBuf.String()) + } + return nil + } + } + } +} + +func (c *Container) Remove(ctx context.Context) error { + c.logger.Info(`remove container`, zap.String(`id`, c.instance.ID)) + if c.instance == nil { + return ErrContainerNotCreated + } + + // Remove container in all cases (cleanup) + err := c.docker.RemoveContainer(docker.RemoveContainerOptions{ + ID: c.instance.ID, + RemoveVolumes: true, + Force: true, + Context: ctx, + }) + if err != nil { + return fmt.Errorf("remove docker container with id=%s: %w", c.instance.ID, err) + } + + c.instance = nil + return nil +} + +func (c *Container) UploadTar(ctx context.Context, tar []byte, path string) error { + c.logger.Debug(`upload tar to container`, zap.String(`path`, path), zap.Int(`size`, len(tar))) + + if c.instance == nil { + return ErrContainerNotCreated + } + + // Upload tar archive with chaincode source code to container + if err := c.docker.UploadToContainer(c.instance.ID, docker.UploadToContainerOptions{ + InputStream: bytes.NewReader(tar), + Path: path, + NoOverwriteDirNonDir: true, + Context: ctx, + }); err != nil { + return fmt.Errorf("upload tar to container: %w", err) + } + + return nil +} + +func (c *Container) DownloadPath(ctx context.Context, path string) ([]byte, error) { + if c.instance == nil { + return nil, ErrContainerNotCreated + } + + // Download artifacts from container to buffer + outBf := new(bytes.Buffer) + if err := c.docker.DownloadFromContainer(c.instance.ID, docker.DownloadFromContainerOptions{ + OutputStream: outBf, + Path: path, + InactivityTimeout: 0, + Context: ctx, + }); err != nil { + err = fmt.Errorf("download path=%s from container: %w", path, err) + } + + pkgTar, err := UnTarFirstFile(outBf) + if err != nil { + return nil, err + } + + return pkgTar.Bytes(), nil +} diff --git a/service/ccpackage/packer/docker/packer.go b/service/ccpackage/packer/docker/packer.go new file mode 100644 index 0000000..331128f --- /dev/null +++ b/service/ccpackage/packer/docker/packer.go @@ -0,0 +1,204 @@ +package docker + +import ( + "context" + "errors" + "fmt" + "path/filepath" + + "github.com/docker/docker/api/types/mount" + docker "github.com/fsouza/go-dockerclient" + "go.uber.org/zap" + "google.golang.org/protobuf/types/known/timestamppb" + + "github.com/s7techlab/hlf-sdk-go/service/ccpackage" +) + +const ( + containerPkgOutputPath = `/tmp/chaincode.pkg` + + fabricImage = "hyperledger/fabric-tools" + DefaultFabricV1Image = fabricImage + `:1.4` + DefaultFabricV2Image = fabricImage + `:2.5` +) + +var ErrUnsupportedFabricVersion = errors.New(`unsupported fabric version`) + +type ( + Packer struct { + logger *zap.Logger + fabricV1Image string + fabricV2Image string + } + + PackerOpt func(*Packer) +) + +func UseFabricV1Image(image string) PackerOpt { + return func(p *Packer) { + p.fabricV1Image = image + } +} + +func UseFabricV2Image(image string) PackerOpt { + return func(p *Packer) { + p.fabricV2Image = image + } +} + +func New(logger *zap.Logger, opts ...PackerOpt) *Packer { + p := &Packer{ + logger: logger, + } + + for _, opt := range opts { + opt(p) + } + + if p.fabricV1Image == `` { + p.fabricV1Image = DefaultFabricV1Image + } + + if p.fabricV2Image == `` { + p.fabricV2Image = DefaultFabricV2Image + } + + return p +} + +func (p *Packer) imageLifecycle(version ccpackage.FabricVersion) (image string, lifecycle bool, err error) { + switch version { + case ccpackage.FabricVersion_FABRIC_V1: + image = p.fabricV1Image + case ccpackage.FabricVersion_FABRIC_V2: + image = p.fabricV1Image + case ccpackage.FabricVersion_FABRIC_V2_LIFECYCLE: + image = p.fabricV2Image + lifecycle = true + case ccpackage.FabricVersion_FABRIC_VERSION_UNSPECIFIED: + return ``, false, fmt.Errorf("version=%s: %w", version, ErrUnsupportedFabricVersion) + } + return image, lifecycle, nil +} + +func (p *Packer) PackFromTar(ctx context.Context, spec *ccpackage.PackageSpec, tar []byte) (pkg *ccpackage.Package, err error) { + if err := spec.Validate(); err != nil { + return nil, err + } + image, lifecycle, err := p.imageLifecycle(spec.Id.FabricVersion) + if err != nil { + return nil, err + } + + container, err := CreateContainer(ctx, image, p.logger) + if err != nil { + return nil, err + } + defer func() { + removeErr := container.Remove(ctx) + if removeErr != nil { + err = removeErr + } + }() + + sourcePath := filepath.Join(containerSrcPath, spec.ChaincodePath) + + // Create chaincode path in container + if err = container.Exec(ctx, []string{`mkdir`, `-p`, sourcePath}); err != nil { + return nil, fmt.Errorf("create chaincode repo path=%s: %w", sourcePath, err) + } + // Set permissions on package path for upload + if err = container.Exec(ctx, []string{`chmod`, `-R`, `777`, sourcePath}); err != nil { + return nil, fmt.Errorf("set permissions on path=%s: %w", sourcePath, err) + } + + if err = container.UploadTar(ctx, tar, sourcePath); err != nil { + return nil, err + } + + binaryPath := fmt.Sprintf("%s/%s", spec.ChaincodePath, spec.BinaryPath) + + // path should point to directory with go file with main func + if err = container.Exec(ctx, []string{"ls", binaryPath}); err != nil { + return nil, fmt.Errorf(`check chaincode binary path=%s: %w`, binaryPath, err) + } + + p.logger.Info(`peer chaincode package`, + zap.String(`name`, spec.Id.Name), + zap.String(`path`, binaryPath), + zap.String(`version`, spec.Id.Version), + zap.Stringer(`fabric_version`, spec.Id.FabricVersion)) + + if err = container.Exec(ctx, packageCmd(lifecycle, binaryPath, spec.Id.Name, spec.Id.Version)); err != nil { + return nil, fmt.Errorf("create chaincode package path=%s, fabric_version=%s: %w", + binaryPath, spec.Id.FabricVersion, err) + } + + data, downloadErr := container.DownloadPath(ctx, containerPkgOutputPath) + if downloadErr != nil { + return nil, fmt.Errorf(`download package=%s: %w`, containerPkgOutputPath, err) + } + + return &ccpackage.Package{ + Id: spec.Id, + Size: int64(len(data)), + CreatedAt: timestamppb.Now(), + Data: data, + }, nil +} + +func (p *Packer) PackFromFiles(ctx context.Context, spec *ccpackage.PackageSpec, path string) (pkg *ccpackage.Package, err error) { + if err := spec.Validate(); err != nil { + return nil, err + } + + image, lifecycle, err := p.imageLifecycle(spec.Id.FabricVersion) + sourcePath := filepath.Join(containerSrcPath, spec.ChaincodePath) + + p.logger.Info(`created container with mounted source code`, + zap.String(`path`, path), + zap.String(`target`, sourcePath)) + + container, err := CreateContainer(ctx, image, p.logger, func(opts *docker.CreateContainerOptions) { + opts.HostConfig = &docker.HostConfig{ + Mounts: []docker.HostMount{ + { + Target: sourcePath, + Source: path, + Type: string(mount.TypeBind), + ReadOnly: true, + }, + }, + } + }) + if err != nil { + return nil, err + } + defer func() { + err = container.Remove(ctx) + }() + + fmt.Println(lifecycle) + + return nil, nil +} + +func packageCmd(lifecycle bool, path, name, version string) []string { + if lifecycle { + return []string{ + `peer`, `lifecycle`, `chaincode`, `package`, + `--path`, path, + `--lang`, `golang`, + `--label`, fmt.Sprintf("%s_%s", name, version), + containerPkgOutputPath, + } + } + + return []string{ + `peer`, `chaincode`, `package`, + `-n`, name, + `-p`, path, + `-v`, version, + containerPkgOutputPath, + } +} diff --git a/service/ccpackage/packer/docker/tar.go b/service/ccpackage/packer/docker/tar.go new file mode 100644 index 0000000..526af38 --- /dev/null +++ b/service/ccpackage/packer/docker/tar.go @@ -0,0 +1,36 @@ +package docker + +import ( + "archive/tar" + "bytes" + "errors" + "io" +) + +var ErrFileNotFound = errors.New(`file not found`) + +func UnTarFirstFile(r io.Reader) (*bytes.Buffer, error) { + tr := tar.NewReader(r) + file := new(bytes.Buffer) + + header, err := tr.Next() + + switch { + case header == nil: + return nil, nil + + case err != nil: + return nil, err + } + + switch header.Typeflag { + case tar.TypeReg: + if _, err := io.CopyN(file, tr, header.Size); err != nil { + return nil, err + } + return file, nil + + default: + return nil, ErrFileNotFound + } +} diff --git a/service/ccpackage/packer/packer.go b/service/ccpackage/packer/packer.go new file mode 100644 index 0000000..6639c65 --- /dev/null +++ b/service/ccpackage/packer/packer.go @@ -0,0 +1,20 @@ +package packer + +import ( + "context" + + "github.com/s7techlab/hlf-sdk-go/service/ccpackage" +) + +type ( + Packer interface { + PackFromTar(ctx context.Context, spec *ccpackage.PackageSpec, tar []byte) (*ccpackage.Package, error) + PackFromFiles(ctx context.Context, spec *ccpackage.PackageSpec, path string) (*ccpackage.Package, error) + } + + PackFromTarRequest struct { + } + + PackFromFileRequest struct { + } +) diff --git a/service/ccpackage/store/file/file.go b/service/ccpackage/store/file/file.go new file mode 100644 index 0000000..72fad2b --- /dev/null +++ b/service/ccpackage/store/file/file.go @@ -0,0 +1,100 @@ +package file + +import ( + "context" + "errors" + "fmt" + "io" + "io/ioutil" + "os" + "path/filepath" + + "google.golang.org/protobuf/types/known/timestamppb" + + "github.com/s7techlab/hlf-sdk-go/service/ccpackage" + "github.com/s7techlab/hlf-sdk-go/service/ccpackage/store" +) + +type Params struct { + RootPath string `mapstructure:"root_path"` +} + +type Store struct { + rootPath string + perm os.FileMode +} + +func New(ps Params) *Store { + return &Store{ + rootPath: ps.RootPath, + perm: 0644, + } +} + +func (s *Store) filePath(id *ccpackage.PackageID) string { + return filepath.Join(s.rootPath, store.ObjectKey(id)) +} + +func (s *Store) Put(ctx context.Context, req *ccpackage.PutPackageRequest) error { + return os.WriteFile(s.filePath(req.Id), req.Data, s.perm) +} + +// Get gets chaincode package info from storage. +func (s *Store) Get(_ context.Context, id *ccpackage.PackageID) (*ccpackage.PackageData, error) { + fStat, err := os.Stat(s.filePath(id)) + if err != nil { + if errors.Is(err, os.ErrNotExist) { + return nil, store.ErrPackageNotFound + } + return nil, fmt.Errorf("stat file: %w", err) + } + + return &ccpackage.PackageData{ + Id: id, + Size: fStat.Size(), + CreatedAt: timestamppb.New(fStat.ModTime()), + }, nil +} + +// List gets stored chaincode packages' infos. +func (s *Store) List(ctx context.Context) ([]*ccpackage.Package, error) { + fs, err := ioutil.ReadDir(s.rootPath) + if err != nil { + return nil, fmt.Errorf("read root path: %w", err) + } + + var ps []*ccpackage.Package + + for _, f := range fs { + + if f.IsDir() { + continue + } + + name, version, fabricVersion, ok := store.ParseObjectKey(f.Name()) + if !ok { + continue + } + + ps = append(ps, &ccpackage.Package{ + Id: &ccpackage.PackageID{ + Name: name, + Version: version, + FabricVersion: fabricVersion, + }, + Size: f.Size(), + CreatedAt: timestamppb.New(f.ModTime()), + }) + } + + return ps, nil +} + +// Fetch fetches chaincode package. +func (s *Store) Fetch(ctx context.Context, id *ccpackage.PackageID) (io.ReadCloser, error) { + return os.Open(s.filePath(id)) +} + +func (s *Store) Close() error { + return nil +} diff --git a/service/ccpackage/store/memory/memory.go b/service/ccpackage/store/memory/memory.go new file mode 100644 index 0000000..c1b165b --- /dev/null +++ b/service/ccpackage/store/memory/memory.go @@ -0,0 +1,123 @@ +package memory + +import ( + "bytes" + "context" + "io" + "sync" + "time" + + "github.com/golang/protobuf/ptypes" + + "github.com/s7techlab/hlf-sdk-go/service/ccpackage" + "github.com/s7techlab/hlf-sdk-go/service/ccpackage/store" +) + +const ( + // memoryPackageTTL package in memory time to live + memoryPackageTTL = 24 * time.Hour + memoryTickerPeriod = 1 * time.Hour +) + +type Storage struct { + packages map[string]*ccpackage.PackageData + mx sync.RWMutex + wg sync.WaitGroup + stop chan struct{} +} + +func New() *Storage { + m := &Storage{ + packages: map[string]*ccpackage.PackageData{}, + stop: make(chan struct{}), + } + + m.wg.Add(1) + go func() { + defer m.wg.Done() + + t := time.NewTicker(memoryTickerPeriod) + defer t.Stop() + + for { + select { + case <-m.stop: + return + case <-t.C: + } + + m.mx.Lock() + + for key, pi := range m.packages { + if time.Since(pi.CreatedAt.AsTime()) > memoryPackageTTL { + delete(m.packages, key) + } + } + + m.mx.Unlock() + } + }() + + return m +} + +// Put saves chaincode package into packages. +func (m *Storage) Put(ctx context.Context, req *ccpackage.PutPackageRequest) error { + m.mx.Lock() + defer m.mx.Unlock() + + m.packages[store.ObjectKey(req.Id)] = &ccpackage.PackageData{ + Id: req.Id, + Size: int64(len(req.Data)), + CreatedAt: ptypes.TimestampNow(), + Data: req.Data, + } + return nil +} + +// Get gets chaincode package info from packages. +func (m *Storage) Get(_ context.Context, id *ccpackage.PackageID) (*ccpackage.PackageData, error) { + m.mx.RLock() + defer m.mx.RUnlock() + + value, ok := m.packages[store.ObjectKey(id)] + if !ok { + return nil, store.ErrPackageNotFound + } + return value, nil +} + +// List gets stored chaincode packages' infos. +func (m *Storage) List(ctx context.Context) ([]*ccpackage.Package, error) { + m.mx.RLock() + defer m.mx.RUnlock() + + var pgs []*ccpackage.Package + for _, p := range m.packages { + pgs = append(pgs, &ccpackage.Package{ + Id: p.Id, + Size: p.Size, + CreatedAt: p.CreatedAt, + }) + } + + return pgs, nil +} + +// Fetch fetches chaincode package. +func (m *Storage) Fetch(ctx context.Context, id *ccpackage.PackageID) (io.ReadCloser, error) { + m.mx.RLock() + defer m.mx.RUnlock() + + pkg, err := m.Get(ctx, id) + if err != nil { + return nil, err + } + return io.NopCloser(bytes.NewBuffer(pkg.Data)), nil +} + +func (m *Storage) Close() error { + close(m.stop) + m.wg.Wait() + return nil +} diff --git a/service/ccpackage/store/memory/memory_test.go b/service/ccpackage/store/memory/memory_test.go new file mode 100644 index 0000000..f29e69a --- /dev/null +++ b/service/ccpackage/store/memory/memory_test.go @@ -0,0 +1,79 @@ +package memory_test + +import ( + "context" + "io" + "testing" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + + "github.com/s7techlab/hlf-sdk-go/service/ccpackage" + "github.com/s7techlab/hlf-sdk-go/service/ccpackage/store" + "github.com/s7techlab/hlf-sdk-go/service/ccpackage/store/memory" +) + +func TestMemoryStorage(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Memory storage test suite") +} + +var ( + m *memory.Storage + + packageID1 = &ccpackage.PackageID{ + Name: "cc", + Version: "v1", + FabricVersion: ccpackage.FabricVersion_FABRIC_V2, + } + + packageData1 = []byte(`aaaaaaaaasonmebytes`) +) + +var _ = Describe("Memory package storage", func() { + + ctx := context.Background() + + It("allow to init", func() { + m = memory.New() + Expect(m).NotTo(BeNil()) + }) + + It("allow to put item", func() { + err := m.Put(ctx, &ccpackage.PutPackageRequest{ + Id: packageID1, + Data: packageData1, + }) + + Expect(err).NotTo(HaveOccurred()) + }) + + It("allow to get item", func() { + p, err := m.Get(ctx, packageID1) + + Expect(err).NotTo(HaveOccurred()) + Expect(p.Id.String()).To(Equal(packageID1.String())) + Expect(int(p.Size)).To(Equal(len(packageData1))) + }) + + It("should returns error for unknown package", func() { + _, err := m.Get(ctx, &ccpackage.PackageID{ + Name: "xxx", + Version: "xxx", + FabricVersion: 0, + }) + Expect(err).To(MatchError(store.ErrPackageNotFound)) + }) + + It("allow to fetch item multiple times", func() { + for i := 0; i < 3; i++ { + data, err := m.Fetch(ctx, packageID1) + Expect(err).NotTo(HaveOccurred()) + + bytes, err := io.ReadAll(data) + + Expect(err).NotTo(HaveOccurred()) + Expect(bytes).To(Equal(packageData1)) + } + }) +}) diff --git a/service/ccpackage/store/storage.go b/service/ccpackage/store/storage.go new file mode 100644 index 0000000..ca28045 --- /dev/null +++ b/service/ccpackage/store/storage.go @@ -0,0 +1,54 @@ +package store + +import ( + "context" + "fmt" + "io" + "regexp" + + "github.com/s7techlab/hlf-sdk-go/service/ccpackage" +) + +var ( + ErrPackageNotFound = fmt.Errorf("package not found") + + objectNameRegexp = regexp.MustCompile(`^([^_\s]+)_([^_\s]+)_([^_\s]+)\.pkg$`) +) + +const ( + TypeS3 = "s3" + TypeFile = "file" + TypeMemory = "memory" +) + +type ( + Storage interface { + // Put saves chaincode package into storage. + Put(context.Context, *ccpackage.PutPackageRequest) error + // Get gets chaincode package info from storage. + Get(context.Context, *ccpackage.PackageID) (*ccpackage.PackageData, error) + // List gets stored chaincode packages' infos. + List(context.Context) ([]*ccpackage.Package, error) + // Fetch fetches chaincode package. + Fetch(context.Context, *ccpackage.PackageID) (io.ReadCloser, error) + // Close closes storage + Close() error + } +) + +func ParseObjectKey(s string) ( + name string, + version string, + fabricVersion ccpackage.FabricVersion, + ok bool, +) { + ss := objectNameRegexp.FindStringSubmatch(s) + if len(ss) != 4 { + return "", "", ccpackage.FabricVersion_FABRIC_VERSION_UNSPECIFIED, false + } + return ss[1], ss[2], ccpackage.FabricVersion(ccpackage.FabricVersion_value[ss[3]]), true +} + +func ObjectKey(id *ccpackage.PackageID) string { + return fmt.Sprintf("%s_%s_%s.pkg", id.Name, id.Version, id.FabricVersion) +} diff --git a/service/systemcc/lifecycle/lifecycle.pb.go b/service/systemcc/lifecycle/lifecycle.pb.go index 8a9a807..08c4942 100644 --- a/service/systemcc/lifecycle/lifecycle.pb.go +++ b/service/systemcc/lifecycle/lifecycle.pb.go @@ -419,108 +419,114 @@ var file_systemcc_lifecycle_lifecycle_proto_rawDesc = []byte{ 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x41, 0x72, 0x67, 0x73, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x32, 0x89, 0x0c, 0x0a, + 0x6e, 0x73, 0x41, 0x72, 0x67, 0x73, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x32, 0xdc, 0x0c, 0x0a, 0x10, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x7c, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, - 0x6c, 0x65, 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, 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, 0x29, 0x2e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, + 0x65, 0x12, 0x85, 0x01, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6c, 0x6c, 0x65, 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, 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, 0x29, 0x2e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, + 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, + 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x73, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x63, 0x63, 0x2f, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2f, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x12, 0xa0, 0x01, 0x0a, 0x17, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x43, 0x68, 0x61, 0x69, + 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x26, 0x2e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x6c, 0x69, 0x66, 0x65, 0x63, - 0x79, 0x63, 0x6c, 0x65, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x12, - 0x97, 0x01, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, - 0x65, 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x26, 0x2e, 0x6c, 0x69, - 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x41, - 0x72, 0x67, 0x73, 0x1a, 0x28, 0x2e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x2a, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, - 0x65, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x61, - 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x78, 0x0a, 0x10, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6c, 0x6c, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x2e, - 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, - 0x6c, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x21, - 0x2e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6c, 0x6c, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x3a, 0x01, 0x2a, 0x22, 0x15, 0x2f, 0x6c, - 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, - 0x64, 0x65, 0x73, 0x12, 0xb6, 0x01, 0x0a, 0x22, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x43, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x28, 0x2e, + 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, + 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, + 0x2b, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2f, 0x6c, 0x69, 0x66, 0x65, 0x63, + 0x79, 0x63, 0x6c, 0x65, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x2f, + 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x81, 0x01, 0x0a, + 0x10, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, + 0x65, 0x12, 0x1f, 0x2e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x41, 0x72, + 0x67, 0x73, 0x1a, 0x21, 0x2e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x01, 0x2a, + 0x22, 0x1e, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2f, 0x6c, 0x69, 0x66, 0x65, + 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, + 0x12, 0xbf, 0x01, 0x0a, 0x22, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x43, 0x68, 0x61, 0x69, + 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46, + 0x6f, 0x72, 0x4d, 0x79, 0x4f, 0x72, 0x67, 0x12, 0x4e, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, + 0x63, 0x2e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x63, 0x63, 0x2e, 0x41, 0x70, + 0x70, 0x72, 0x6f, 0x76, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x44, 0x65, + 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x4d, 0x79, 0x4f, 0x72, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, + 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x3a, 0x01, 0x2a, 0x22, 0x26, 0x2f, 0x73, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2f, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2f, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x72, 0x6f, + 0x76, 0x65, 0x12, 0xd7, 0x01, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x70, 0x70, 0x72, + 0x6f, 0x76, 0x65, 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x66, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4c, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, + 0x63, 0x2e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x63, 0x63, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, + 0x63, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, + 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x4d, 0x79, 0x4f, 0x72, 0x67, 0x12, 0x4e, 0x2e, 0x68, 0x6c, 0x66, - 0x73, 0x64, 0x6b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x63, 0x63, 0x2e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x63, 0x63, - 0x2e, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, - 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x4d, 0x79, - 0x4f, 0x72, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, - 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, - 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x12, 0xce, 0x01, 0x0a, - 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x4c, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2e, 0x6c, 0x69, 0x66, 0x65, - 0x63, 0x79, 0x63, 0x6c, 0x65, 0x63, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x70, 0x70, - 0x72, 0x6f, 0x76, 0x65, 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x44, 0x65, - 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x31, 0x2e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, - 0x64, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x01, 0x2a, 0x22, 0x1e, 0x2f, - 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, - 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x12, 0xa7, 0x01, - 0x0a, 0x14, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x61, - 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x40, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, - 0x2e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x63, 0x63, 0x2e, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6c, 0x69, 0x66, 0x65, 0x63, - 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, - 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x6c, 0x69, 0x66, - 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x2d, 0x72, 0x65, - 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x12, 0xb7, 0x01, 0x0a, 0x19, 0x43, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x2e, 0x73, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, + 0x3a, 0x01, 0x2a, 0x22, 0x27, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2f, 0x6c, + 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, + 0x64, 0x65, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x12, 0xb0, 0x01, 0x0a, + 0x14, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x61, 0x64, + 0x69, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x40, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2e, - 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x63, 0x63, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6c, - 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x43, - 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, - 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2f, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, - 0x74, 0x12, 0xba, 0x01, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x63, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, - 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, - 0x6c, 0x65, 0x63, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, + 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x63, 0x63, 0x2e, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, + 0x63, 0x6c, 0x65, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, + 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x2f, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x73, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x63, 0x63, 0x2f, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x2d, 0x72, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x12, + 0xc0, 0x01, 0x0a, 0x19, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, + 0x6f, 0x64, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x45, 0x2e, + 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, + 0x65, 0x63, 0x63, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x44, - 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, - 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x3a, 0x01, 0x2a, 0x22, 0x22, 0x2f, 0x6c, 0x69, 0x66, - 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, - 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x2d, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x12, 0xb7, - 0x01, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, - 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x45, 0x2e, 0x68, - 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, - 0x63, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, - 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x44, 0x65, - 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, - 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x6c, 0x69, 0x66, - 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, - 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x37, 0x74, 0x65, 0x63, 0x68, 0x6c, 0x61, 0x62, - 0x2f, 0x68, 0x6c, 0x66, 0x2d, 0x73, 0x64, 0x6b, 0x2d, 0x67, 0x6f, 0x2f, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2f, 0x6c, 0x69, 0x66, - 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, + 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, + 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x3a, 0x01, 0x2a, 0x22, 0x25, 0x2f, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2f, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, + 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x12, 0xc3, 0x01, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x68, 0x61, 0x69, + 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x44, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, + 0x63, 0x6c, 0x65, 0x63, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, + 0x63, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, + 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, + 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x3a, 0x01, 0x2a, 0x22, 0x2b, 0x2f, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2f, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, + 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x2d, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x12, 0xc0, 0x01, 0x0a, 0x19, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x45, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, + 0x2e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x63, 0x63, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, + 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, + 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x2a, 0x3a, 0x01, 0x2a, 0x22, 0x25, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2f, + 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, + 0x6f, 0x64, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x42, 0x3c, 0x5a, 0x3a, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x37, 0x74, 0x65, 0x63, 0x68, + 0x6c, 0x61, 0x62, 0x2f, 0x68, 0x6c, 0x66, 0x2d, 0x73, 0x64, 0x6b, 0x2d, 0x67, 0x6f, 0x2f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2f, + 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/service/systemcc/lifecycle/lifecycle.pb.gw.go b/service/systemcc/lifecycle/lifecycle.pb.gw.go index abad9b9..25b1d50 100644 --- a/service/systemcc/lifecycle/lifecycle.pb.gw.go +++ b/service/systemcc/lifecycle/lifecycle.pb.gw.go @@ -783,23 +783,23 @@ func RegisterLifecycleServiceHandlerClient(ctx context.Context, mux *runtime.Ser } var ( - pattern_LifecycleService_QueryInstalledChaincodes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"lifecycle", "chaincodes"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_LifecycleService_QueryInstalledChaincodes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"systemcc", "lifecycle", "chaincodes"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_LifecycleService_QueryInstalledChaincode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"lifecycle", "chaincodes", "package_id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_LifecycleService_QueryInstalledChaincode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"systemcc", "lifecycle", "chaincodes", "package_id"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_LifecycleService_InstallChaincode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"lifecycle", "chaincodes"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_LifecycleService_InstallChaincode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"systemcc", "lifecycle", "chaincodes"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_LifecycleService_ApproveChaincodeDefinitionForMyOrg_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"lifecycle", "chaincodes", "approve"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_LifecycleService_ApproveChaincodeDefinitionForMyOrg_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"systemcc", "lifecycle", "chaincodes", "approve"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_LifecycleService_QueryApprovedChaincodeDefinition_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"lifecycle", "chaincodes", "approved"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_LifecycleService_QueryApprovedChaincodeDefinition_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"systemcc", "lifecycle", "chaincodes", "approved"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_LifecycleService_CheckCommitReadiness_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"lifecycle", "commit-readiness"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_LifecycleService_CheckCommitReadiness_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"systemcc", "lifecycle", "commit-readiness"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_LifecycleService_CommitChaincodeDefinition_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"lifecycle", "chaincodes", "commit"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_LifecycleService_CommitChaincodeDefinition_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"systemcc", "lifecycle", "chaincodes", "commit"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_LifecycleService_QueryChaincodeDefinition_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"lifecycle", "chaincodes", "commit-check"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_LifecycleService_QueryChaincodeDefinition_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"systemcc", "lifecycle", "chaincodes", "commit-check"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_LifecycleService_QueryChaincodeDefinitions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"lifecycle", "chaincode", "commits"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_LifecycleService_QueryChaincodeDefinitions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"systemcc", "lifecycle", "chaincode", "commits"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( diff --git a/service/systemcc/lifecycle/lifecycle.proto b/service/systemcc/lifecycle/lifecycle.proto index 5b2b172..ddd8824 100644 --- a/service/systemcc/lifecycle/lifecycle.proto +++ b/service/systemcc/lifecycle/lifecycle.proto @@ -15,21 +15,21 @@ service LifecycleService { // QueryInstalledChaincodes returns chaincode packages list installed on peer rpc QueryInstalledChaincodes(google.protobuf.Empty) returns (lifecycle.QueryInstalledChaincodesResult) { option (google.api.http) = { - get: "/lifecycle/chaincodes" + get: "/systemcc/lifecycle/chaincodes" }; } // QueryInstalledChaincode returns chaincode package installed on peer rpc QueryInstalledChaincode(lifecycle.QueryInstalledChaincodeArgs) returns (lifecycle.QueryInstalledChaincodeResult) { option (google.api.http) = { - get: "/lifecycle/chaincodes/{package_id}" + get: "/systemcc/lifecycle/chaincodes/{package_id}" }; } // InstallChaincode sets up chaincode package on peer rpc InstallChaincode(lifecycle.InstallChaincodeArgs) returns (lifecycle.InstallChaincodeResult) { option (google.api.http) = { - post: "/lifecycle/chaincodes" + post: "/systemcc/lifecycle/chaincodes" body: "*" }; } @@ -38,7 +38,7 @@ service LifecycleService { // ApproveChaincodeDefinitionForMyOrg marks chaincode definition on a channel rpc ApproveChaincodeDefinitionForMyOrg(ApproveChaincodeDefinitionForMyOrgRequest) returns (google.protobuf.Empty) { option (google.api.http) = { - post: "/lifecycle/chaincodes/approve" + post: "/systemcc/lifecycle/chaincodes/approve" body: "*" }; } @@ -46,7 +46,7 @@ service LifecycleService { // QueryApprovedChaincodeDefinition returns approved chaincode definition rpc QueryApprovedChaincodeDefinition(QueryApprovedChaincodeDefinitionRequest) returns (lifecycle.QueryApprovedChaincodeDefinitionResult) { option (google.api.http) = { - post: "/lifecycle/chaincodes/approved" + post: "/systemcc/lifecycle/chaincodes/approved" body: "*" }; } @@ -54,7 +54,7 @@ service LifecycleService { // CheckCommitReadiness returns commitments statuses of participants on chaincode definition rpc CheckCommitReadiness(CheckCommitReadinessRequest) returns (lifecycle.CheckCommitReadinessResult) { option (google.api.http) = { - post: "/lifecycle/commit-readiness" + post: "/systemcc/lifecycle/commit-readiness" body: "*" }; } @@ -62,7 +62,7 @@ service LifecycleService { // CommitChaincodeDefinition the chaincode definition on the channel rpc CommitChaincodeDefinition(CommitChaincodeDefinitionRequest) returns (lifecycle.CommitChaincodeDefinitionResult) { option (google.api.http) = { - post: "/lifecycle/chaincodes/commit" + post: "/systemcc/lifecycle/chaincodes/commit" body: "*" }; } @@ -70,7 +70,7 @@ service LifecycleService { // QueryChaincodeDefinition returns chaincode definition committed on the channel rpc QueryChaincodeDefinition(QueryChaincodeDefinitionRequest) returns (lifecycle.QueryChaincodeDefinitionResult) { option (google.api.http) = { - post: "/lifecycle/chaincodes/commit-check" + post: "/systemcc/lifecycle/chaincodes/commit-check" body: "*" }; } @@ -79,7 +79,7 @@ service LifecycleService { // QueryChaincodeDefinitions returns chaincode definitions committed on the channel rpc QueryChaincodeDefinitions(QueryChaincodeDefinitionsRequest) returns (lifecycle.QueryChaincodeDefinitionsResult) { option (google.api.http) = { - post: "/lifecycle/chaincode/commits" + post: "/systemcc/lifecycle/chaincode/commits" body: "*" }; } diff --git a/service/systemcc/lifecycle/lifecycle.swagger.json b/service/systemcc/lifecycle/lifecycle.swagger.json index 6e02021..c2d8a03 100644 --- a/service/systemcc/lifecycle/lifecycle.swagger.json +++ b/service/systemcc/lifecycle/lifecycle.swagger.json @@ -11,7 +11,7 @@ "application/json" ], "paths": { - "/lifecycle/chaincode/commits": { + "/systemcc/lifecycle/chaincode/commits": { "post": { "summary": "QueryChaincodeDefinitions returns chaincode definitions committed on the channel", "operationId": "LifecycleService_QueryChaincodeDefinitions", @@ -44,7 +44,7 @@ ] } }, - "/lifecycle/chaincodes": { + "/systemcc/lifecycle/chaincodes": { "get": { "summary": "QueryInstalledChaincodes returns chaincode packages list installed on peer", "operationId": "LifecycleService_QueryInstalledChaincodes", @@ -98,7 +98,7 @@ ] } }, - "/lifecycle/chaincodes/approve": { + "/systemcc/lifecycle/chaincodes/approve": { "post": { "summary": "ApproveChaincodeDefinitionForMyOrg marks chaincode definition on a channel", "operationId": "LifecycleService_ApproveChaincodeDefinitionForMyOrg", @@ -131,7 +131,7 @@ ] } }, - "/lifecycle/chaincodes/approved": { + "/systemcc/lifecycle/chaincodes/approved": { "post": { "summary": "QueryApprovedChaincodeDefinition returns approved chaincode definition", "operationId": "LifecycleService_QueryApprovedChaincodeDefinition", @@ -164,7 +164,7 @@ ] } }, - "/lifecycle/chaincodes/commit": { + "/systemcc/lifecycle/chaincodes/commit": { "post": { "summary": "CommitChaincodeDefinition the chaincode definition on the channel", "operationId": "LifecycleService_CommitChaincodeDefinition", @@ -197,7 +197,7 @@ ] } }, - "/lifecycle/chaincodes/commit-check": { + "/systemcc/lifecycle/chaincodes/commit-check": { "post": { "summary": "QueryChaincodeDefinition returns chaincode definition committed on the channel", "operationId": "LifecycleService_QueryChaincodeDefinition", @@ -230,7 +230,7 @@ ] } }, - "/lifecycle/chaincodes/{package_id}": { + "/systemcc/lifecycle/chaincodes/{package_id}": { "get": { "summary": "QueryInstalledChaincode returns chaincode package installed on peer", "operationId": "LifecycleService_QueryInstalledChaincode", @@ -261,7 +261,7 @@ ] } }, - "/lifecycle/commit-readiness": { + "/systemcc/lifecycle/commit-readiness": { "post": { "summary": "CheckCommitReadiness returns commitments statuses of participants on chaincode definition", "operationId": "LifecycleService_CheckCommitReadiness", diff --git a/service/systemcc/lscc/lscc.pb.go b/service/systemcc/lscc/lscc.pb.go index e96569e..b414d49 100644 --- a/service/systemcc/lscc/lscc.pb.go +++ b/service/systemcc/lscc/lscc.pb.go @@ -347,60 +347,64 @@ var file_systemcc_lscc_lscc_proto_rawDesc = []byte{ 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x32, 0x96, 0x06, 0x0a, 0x0b, 0x4c, 0x53, 0x43, 0x43, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x90, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, + 0x01, 0x32, 0xcc, 0x06, 0x0a, 0x0b, 0x4c, 0x53, 0x43, 0x43, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x99, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x35, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2e, 0x6c, 0x73, 0x63, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, - 0x44, 0x61, 0x74, 0x61, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x6c, - 0x73, 0x63, 0x63, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x7b, - 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x7d, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, - 0x6f, 0x64, 0x65, 0x7d, 0x12, 0x6a, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6c, 0x6c, 0x65, 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, 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, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, - 0x2f, 0x6c, 0x73, 0x63, 0x63, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, - 0x12, 0x87, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, - 0x65, 0x73, 0x12, 0x32, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2e, 0x6c, 0x73, 0x63, - 0x63, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, - 0x2f, 0x6c, 0x73, 0x63, 0x63, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, - 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x7d, 0x12, 0xac, 0x01, 0x0a, 0x11, 0x47, - 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, - 0x12, 0x36, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2e, 0x6c, 0x73, 0x63, 0x63, 0x2e, - 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, - 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x73, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x38, 0x12, 0x36, 0x2f, 0x6c, 0x73, 0x63, 0x63, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, - 0x64, 0x65, 0x73, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x7d, 0x2f, 0x7b, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x7d, 0x2f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, - 0x6d, 0x65, 0x6e, 0x74, 0x2d, 0x73, 0x70, 0x65, 0x63, 0x12, 0x5f, 0x0a, 0x07, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6c, 0x6c, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, - 0x74, 0x53, 0x70, 0x65, 0x63, 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, 0x1b, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, 0x2f, 0x6c, 0x73, 0x63, 0x63, 0x2f, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x6e, 0x0a, 0x06, 0x44, 0x65, - 0x70, 0x6c, 0x6f, 0x79, 0x12, 0x2b, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x2e, 0x73, 0x65, + 0x44, 0x61, 0x74, 0x61, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2f, 0x6c, 0x73, 0x63, 0x63, 0x2f, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, + 0x7d, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x7d, 0x12, 0x73, 0x0a, + 0x16, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, 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, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, + 0x64, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x63, 0x63, 0x2f, 0x6c, 0x73, 0x63, 0x63, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, + 0x65, 0x73, 0x12, 0x90, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, + 0x6f, 0x64, 0x65, 0x73, 0x12, 0x32, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2e, 0x6c, - 0x73, 0x63, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, - 0x2f, 0x6c, 0x73, 0x63, 0x63, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, - 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x7d, 0x42, 0x37, 0x5a, 0x35, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x37, 0x74, 0x65, 0x63, 0x68, 0x6c, - 0x61, 0x62, 0x2f, 0x68, 0x6c, 0x66, 0x2d, 0x73, 0x64, 0x6b, 0x2d, 0x67, 0x6f, 0x2f, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2f, 0x6c, - 0x73, 0x63, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x63, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x73, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, + 0x12, 0x23, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2f, 0x6c, 0x73, 0x63, 0x63, + 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x7b, 0x63, 0x68, 0x61, + 0x6e, 0x6e, 0x65, 0x6c, 0x7d, 0x12, 0xb5, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, + 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x12, 0x36, 0x2e, 0x68, 0x6c, + 0x66, 0x73, 0x64, 0x6b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2e, 0x6c, 0x73, 0x63, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x53, 0x70, 0x65, 0x63, 0x22, 0x47, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x41, 0x12, 0x3f, 0x2f, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2f, 0x6c, 0x73, 0x63, 0x63, 0x2f, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, + 0x7d, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x7d, 0x2f, 0x64, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x2d, 0x73, 0x70, 0x65, 0x63, 0x12, 0x68, 0x0a, + 0x07, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x73, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x65, 0x63, 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, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22, 0x19, 0x2f, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2f, 0x6c, 0x73, 0x63, 0x63, 0x2f, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x77, 0x0a, 0x06, 0x44, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x12, 0x2b, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2e, 0x6c, 0x73, 0x63, 0x63, + 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x01, 0x2a, 0x22, 0x23, 0x2f, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2f, 0x6c, 0x73, 0x63, 0x63, 0x2f, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x7d, + 0x42, 0x37, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, + 0x37, 0x74, 0x65, 0x63, 0x68, 0x6c, 0x61, 0x62, 0x2f, 0x68, 0x6c, 0x66, 0x2d, 0x73, 0x64, 0x6b, + 0x2d, 0x67, 0x6f, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x63, 0x63, 0x2f, 0x6c, 0x73, 0x63, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/service/systemcc/lscc/lscc.pb.gw.go b/service/systemcc/lscc/lscc.pb.gw.go index 78fdd94..c179d0c 100644 --- a/service/systemcc/lscc/lscc.pb.gw.go +++ b/service/systemcc/lscc/lscc.pb.gw.go @@ -672,17 +672,17 @@ func RegisterLSCCServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux } var ( - pattern_LSCCService_GetChaincodeData_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3}, []string{"lscc", "chaincodes", "channel", "chaincode"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_LSCCService_GetChaincodeData_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"systemcc", "lscc", "chaincodes", "channel", "chaincode"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_LSCCService_GetInstalledChaincodes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"lscc", "chaincodes"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_LSCCService_GetInstalledChaincodes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"systemcc", "lscc", "chaincodes"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_LSCCService_GetChaincodes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"lscc", "chaincodes", "channel"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_LSCCService_GetChaincodes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"systemcc", "lscc", "chaincodes", "channel"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_LSCCService_GetDeploymentSpec_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"lscc", "chaincodes", "channel", "chaincode", "deployment-spec"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_LSCCService_GetDeploymentSpec_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"systemcc", "lscc", "chaincodes", "channel", "chaincode", "deployment-spec"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_LSCCService_Install_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"lscc", "chaincodes"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_LSCCService_Install_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"systemcc", "lscc", "chaincodes"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_LSCCService_Deploy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"lscc", "chaincodes", "channel"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_LSCCService_Deploy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"systemcc", "lscc", "chaincodes", "channel"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( diff --git a/service/systemcc/lscc/lscc.proto b/service/systemcc/lscc/lscc.proto index 182c298..7b98917 100644 --- a/service/systemcc/lscc/lscc.proto +++ b/service/systemcc/lscc/lscc.proto @@ -21,35 +21,35 @@ service LSCCService { // GetChaincodeData returns information about instantiated chaincode on target channel rpc GetChaincodeData (GetChaincodeDataRequest) returns (protos.ChaincodeData) { option (google.api.http) = { - get: "/lscc/chaincodes/{channel}/{chaincode}" + get: "/systemcc/lscc/chaincodes/{channel}/{chaincode}" }; } // GetInstalledChaincodes returns list of installed chaincodes on peer rpc GetInstalledChaincodes (google.protobuf.Empty) returns (protos.ChaincodeQueryResponse) { option (google.api.http) = { - get: "/lscc/chaincodes" + get: "/systemcc/lscc/chaincodes" }; } // GetChaincodes returns list of instantiated chaincodes on channel rpc GetChaincodes (GetChaincodesRequest) returns (protos.ChaincodeQueryResponse) { option (google.api.http) = { - get: "/lscc/chaincodes/{channel}" + get: "/systemcc/lscc/chaincodes/{channel}" }; } // GetDeploymentSpec returns spec for installed chaincode rpc GetDeploymentSpec (GetDeploymentSpecRequest) returns (protos.ChaincodeDeploymentSpec) { option (google.api.http) = { - get: "/lscc/chaincodes/{channel}/{chaincode}/deployment-spec" + get: "/systemcc/lscc/chaincodes/{channel}/{chaincode}/deployment-spec" }; } // Install allows installing chaincode using deployment specification rpc Install (protos.ChaincodeDeploymentSpec) returns (google.protobuf.Empty) { option (google.api.http) = { - post: "/lscc/chaincodes" + post: "/systemcc/lscc/chaincodes" body: "*" }; } @@ -58,7 +58,7 @@ service LSCCService { // Currently, deploy method is not canonical as lscc implementation, but currently we need to get full proposal, and it's response to broadcast to orderer rpc Deploy (DeployRequest) returns (protos.Response ) { option (google.api.http) = { - post: "/lscc/chaincodes/{channel}" + post: "/systemcc/lscc/chaincodes/{channel}" body: "*" }; } diff --git a/service/systemcc/lscc/lscc.swagger.json b/service/systemcc/lscc/lscc.swagger.json index a1af88e..01a3b7e 100644 --- a/service/systemcc/lscc/lscc.swagger.json +++ b/service/systemcc/lscc/lscc.swagger.json @@ -11,7 +11,7 @@ "application/json" ], "paths": { - "/lscc/chaincodes": { + "/systemcc/lscc/chaincodes": { "get": { "summary": "GetInstalledChaincodes returns list of installed chaincodes on peer", "operationId": "LSCCService_GetInstalledChaincodes", @@ -65,7 +65,7 @@ ] } }, - "/lscc/chaincodes/{channel}": { + "/systemcc/lscc/chaincodes/{channel}": { "get": { "summary": "GetChaincodes returns list of instantiated chaincodes on channel", "operationId": "LSCCService_GetChaincodes", @@ -133,7 +133,7 @@ ] } }, - "/lscc/chaincodes/{channel}/{chaincode}": { + "/systemcc/lscc/chaincodes/{channel}/{chaincode}": { "get": { "summary": "GetChaincodeData returns information about instantiated chaincode on target channel", "operationId": "LSCCService_GetChaincodeData", @@ -170,7 +170,7 @@ ] } }, - "/lscc/chaincodes/{channel}/{chaincode}/deployment-spec": { + "/systemcc/lscc/chaincodes/{channel}/{chaincode}/deployment-spec": { "get": { "summary": "GetDeploymentSpec returns spec for installed chaincode", "operationId": "LSCCService_GetDeploymentSpec", diff --git a/service/systemcc/qscc/qscc.pb.go b/service/systemcc/qscc/qscc.pb.go index 6ab9e89..936825c 100644 --- a/service/systemcc/qscc/qscc.pb.go +++ b/service/systemcc/qscc/qscc.pb.go @@ -337,55 +337,58 @@ var file_systemcc_qscc_qscc_proto_rawDesc = []byte{ 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x74, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x78, - 0x49, 0x64, 0x32, 0xca, 0x05, 0x0a, 0x0b, 0x51, 0x53, 0x43, 0x43, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x7d, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, - 0x66, 0x6f, 0x12, 0x31, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2e, 0x71, 0x73, 0x63, - 0x63, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x22, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x71, 0x73, 0x63, 0x63, 0x2f, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x7d, 0x12, 0x8b, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x79, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x35, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, - 0x2e, 0x71, 0x73, 0x63, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x79, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, - 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x31, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x2b, 0x12, 0x29, 0x2f, 0x71, 0x73, 0x63, 0x63, 0x2f, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, - 0x2f, 0x7b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x7d, 0x12, - 0x8c, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x79, 0x48, 0x61, - 0x73, 0x68, 0x12, 0x33, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2e, 0x71, 0x73, 0x63, - 0x63, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x79, 0x48, 0x61, 0x73, 0x68, + 0x49, 0x64, 0x32, 0xf8, 0x05, 0x0a, 0x0b, 0x51, 0x53, 0x43, 0x43, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x86, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x31, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2e, 0x71, 0x73, + 0x63, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x2b, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, + 0x63, 0x2f, 0x71, 0x73, 0x63, 0x63, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x7b, 0x63, 0x68, + 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x94, 0x01, 0x0a, 0x10, + 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x79, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x35, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2e, 0x71, 0x73, 0x63, 0x63, 0x2e, + 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x79, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, - 0x2f, 0x71, 0x73, 0x63, 0x63, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x7b, 0x63, 0x68, 0x61, - 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x62, 0x79, 0x68, 0x61, 0x73, - 0x68, 0x2f, 0x7b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x7d, 0x12, 0x87, - 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x79, 0x54, 0x78, 0x49, - 0x44, 0x12, 0x33, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2e, 0x71, 0x73, 0x63, 0x63, - 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x79, 0x54, 0x78, 0x49, 0x44, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x12, 0x29, 0x2f, - 0x71, 0x73, 0x63, 0x63, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x6e, - 0x6e, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x62, 0x79, 0x74, 0x78, 0x69, 0x64, - 0x2f, 0x7b, 0x74, 0x78, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x94, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, 0x12, - 0x37, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2e, 0x71, 0x73, 0x63, 0x63, 0x2e, 0x47, - 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x49, - 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, - 0x2f, 0x71, 0x73, 0x63, 0x63, 0x2f, 0x74, 0x78, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, - 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x74, 0x78, 0x5f, 0x69, 0x64, 0x7d, 0x42, - 0x37, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x37, - 0x74, 0x65, 0x63, 0x68, 0x6c, 0x61, 0x62, 0x2f, 0x68, 0x6c, 0x66, 0x2d, 0x73, 0x64, 0x6b, 0x2d, - 0x67, 0x6f, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, - 0x6d, 0x63, 0x63, 0x2f, 0x71, 0x73, 0x63, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, + 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2f, 0x71, 0x73, 0x63, 0x63, 0x2f, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x7d, 0x12, 0x95, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, + 0x79, 0x48, 0x61, 0x73, 0x68, 0x12, 0x33, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2e, + 0x71, 0x73, 0x63, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x79, 0x48, + 0x61, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x39, 0x12, 0x37, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2f, 0x71, 0x73, 0x63, + 0x63, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x62, 0x79, 0x68, 0x61, 0x73, 0x68, 0x2f, 0x7b, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x7d, 0x12, 0x90, 0x01, 0x0a, 0x0e, 0x47, + 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x79, 0x54, 0x78, 0x49, 0x44, 0x12, 0x33, 0x2e, + 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2e, 0x71, 0x73, 0x63, 0x63, 0x2e, 0x47, 0x65, 0x74, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x42, 0x79, 0x54, 0x78, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x22, 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x73, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x63, 0x63, 0x2f, 0x71, 0x73, 0x63, 0x63, 0x2f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, + 0x7b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x62, + 0x79, 0x74, 0x78, 0x69, 0x64, 0x2f, 0x7b, 0x74, 0x78, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x9d, 0x01, + 0x0a, 0x12, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x79, 0x49, 0x44, 0x12, 0x37, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2e, 0x71, + 0x73, 0x63, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x79, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x30, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, 0x63, 0x2f, 0x71, + 0x73, 0x63, 0x63, 0x2f, 0x74, 0x78, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x74, 0x78, 0x5f, 0x69, 0x64, 0x7d, 0x42, 0x37, 0x5a, + 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x37, 0x74, 0x65, + 0x63, 0x68, 0x6c, 0x61, 0x62, 0x2f, 0x68, 0x6c, 0x66, 0x2d, 0x73, 0x64, 0x6b, 0x2d, 0x67, 0x6f, + 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x63, + 0x63, 0x2f, 0x71, 0x73, 0x63, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/service/systemcc/qscc/qscc.pb.gw.go b/service/systemcc/qscc/qscc.pb.gw.go index 7c9370a..49d88e4 100644 --- a/service/systemcc/qscc/qscc.pb.gw.go +++ b/service/systemcc/qscc/qscc.pb.gw.go @@ -657,15 +657,15 @@ func RegisterQSCCServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux } var ( - pattern_QSCCService_GetChainInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"qscc", "chain", "channel_name"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_QSCCService_GetChainInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"systemcc", "qscc", "chain", "channel_name"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_QSCCService_GetBlockByNumber_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3}, []string{"qscc", "chain", "channel_name", "block_number"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_QSCCService_GetBlockByNumber_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"systemcc", "qscc", "chain", "channel_name", "block_number"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_QSCCService_GetBlockByHash_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"qscc", "chain", "channel_name", "byhash", "block_hash"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_QSCCService_GetBlockByHash_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"systemcc", "qscc", "chain", "channel_name", "byhash", "block_hash"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_QSCCService_GetBlockByTxID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"qscc", "chain", "channel_name", "bytxid", "tx_id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_QSCCService_GetBlockByTxID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"systemcc", "qscc", "chain", "channel_name", "bytxid", "tx_id"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_QSCCService_GetTransactionByID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3}, []string{"qscc", "tx", "channel_name", "tx_id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_QSCCService_GetTransactionByID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"systemcc", "qscc", "tx", "channel_name", "tx_id"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( diff --git a/service/systemcc/qscc/qscc.proto b/service/systemcc/qscc/qscc.proto index e237ec8..da0e97f 100644 --- a/service/systemcc/qscc/qscc.proto +++ b/service/systemcc/qscc/qscc.proto @@ -16,35 +16,35 @@ service QSCCService { // GetChainInfo allows getting common info about channel blockchain rpc GetChainInfo(GetChainInfoRequest) returns (common.BlockchainInfo) { option (google.api.http) = { - get: "/qscc/chain/{channel_name}" + get: "/systemcc/qscc/chain/{channel_name}" }; } // GetBlockByNumber allows getting block by number rpc GetBlockByNumber(GetBlockByNumberRequest) returns (common.Block) { option (google.api.http) = { - get: "/qscc/chain/{channel_name}/{block_number}" + get: "/systemcc/qscc/chain/{channel_name}/{block_number}" }; } // GetBlockByHash allows getting block by hash rpc GetBlockByHash(GetBlockByHashRequest) returns (common.Block) { option (google.api.http) = { - get: "/qscc/chain/{channel_name}/byhash/{block_hash}" + get: "/systemcc/qscc/chain/{channel_name}/byhash/{block_hash}" }; } // GetBlockByTxID allows getting block by transaction rpc GetBlockByTxID (GetBlockByTxIDRequest) returns (common.Block) { option (google.api.http) = { - get: "/qscc/chain/{channel_name}/bytxid/{tx_id}" + get: "/systemcc/qscc/chain/{channel_name}/bytxid/{tx_id}" }; } // GetTransactionByID allows getting transaction by id rpc GetTransactionByID(GetTransactionByIDRequest) returns (protos.ProcessedTransaction) { option (google.api.http) = { - get: "/qscc/tx/{channel_name}/{tx_id}" + get: "/systemcc/qscc/tx/{channel_name}/{tx_id}" }; } } diff --git a/service/systemcc/qscc/qscc.swagger.json b/service/systemcc/qscc/qscc.swagger.json index c9f9b75..ba01557 100644 --- a/service/systemcc/qscc/qscc.swagger.json +++ b/service/systemcc/qscc/qscc.swagger.json @@ -11,7 +11,7 @@ "application/json" ], "paths": { - "/qscc/chain/{channel_name}": { + "/systemcc/qscc/chain/{channel_name}": { "get": { "summary": "GetChainInfo allows getting common info about channel blockchain", "operationId": "QSCCService_GetChainInfo", @@ -42,7 +42,7 @@ ] } }, - "/qscc/chain/{channel_name}/byhash/{block_hash}": { + "/systemcc/qscc/chain/{channel_name}/byhash/{block_hash}": { "get": { "summary": "GetBlockByHash allows getting block by hash", "operationId": "QSCCService_GetBlockByHash", @@ -80,7 +80,7 @@ ] } }, - "/qscc/chain/{channel_name}/bytxid/{tx_id}": { + "/systemcc/qscc/chain/{channel_name}/bytxid/{tx_id}": { "get": { "summary": "GetBlockByTxID allows getting block by transaction", "operationId": "QSCCService_GetBlockByTxID", @@ -117,7 +117,7 @@ ] } }, - "/qscc/chain/{channel_name}/{block_number}": { + "/systemcc/qscc/chain/{channel_name}/{block_number}": { "get": { "summary": "GetBlockByNumber allows getting block by number", "operationId": "QSCCService_GetBlockByNumber", @@ -155,7 +155,7 @@ ] } }, - "/qscc/tx/{channel_name}/{tx_id}": { + "/systemcc/qscc/tx/{channel_name}/{tx_id}": { "get": { "summary": "GetTransactionByID allows getting transaction by id", "operationId": "QSCCService_GetTransactionByID", diff --git a/service/wallet/wallet.pb.go b/service/wallet/wallet.pb.go index 3e443db..90cfe3d 100644 --- a/service/wallet/wallet.pb.go +++ b/service/wallet/wallet.pb.go @@ -4,7 +4,7 @@ // protoc (unknown) // source: wallet/wallet.proto -// Wallet - identity +// Wallet - identity storage package wallet @@ -530,126 +530,134 @@ var File_wallet_wallet_proto protoreflect.FileDescriptor var file_wallet_wallet_proto_rawDesc = []byte{ 0x0a, 0x13, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, - 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x83, 0x01, 0x0a, 0x08, 0x49, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, - 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1e, 0x0a, 0x06, 0x6d, 0x73, 0x70, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, - 0x05, 0x6d, 0x73, 0x70, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, - 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x63, 0x65, 0x72, 0x74, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x22, 0xab, 0x01, 0x0a, 0x14, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x57, 0x69, 0x74, - 0x68, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1d, 0x0a, 0x05, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1e, 0x0a, 0x06, 0x6d, 0x73, 0x70, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, - 0x01, 0x52, 0x05, 0x6d, 0x73, 0x70, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x63, 0x65, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x63, 0x65, 0x72, 0x74, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x56, - 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, - 0x72, 0x64, 0x12, 0x1d, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x12, 0x23, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x70, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0xb0, 0x01, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x49, 0x6e, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x05, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1e, 0x0a, 0x06, 0x6d, 0x73, - 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, - 0x02, 0x10, 0x01, 0x52, 0x05, 0x6d, 0x73, 0x70, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, - 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x63, 0x65, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x63, 0x65, - 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x70, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x77, 0x69, 0x74, - 0x68, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0xd7, 0x01, 0x0a, 0x14, 0x49, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x54, 0x65, - 0x78, 0x74, 0x12, 0x1d, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x12, 0x1e, 0x0a, 0x06, 0x6d, 0x73, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x6d, 0x73, 0x70, 0x49, - 0x64, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x72, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x65, 0x72, - 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x63, 0x65, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x23, - 0x0a, 0x0d, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x77, 0x69, 0x74, 0x68, 0x50, 0x61, 0x73, 0x73, 0x77, - 0x6f, 0x72, 0x64, 0x22, 0x25, 0x0a, 0x0d, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0x28, 0x0a, 0x0e, 0x49, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x16, 0x0a, 0x06, - 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x73, 0x32, 0xf3, 0x06, 0x0a, 0x0d, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x74, 0x0a, 0x0b, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x47, 0x65, 0x74, 0x12, 0x1e, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x1a, 0x1c, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x83, 0x01, 0x0a, 0x08, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, + 0x1d, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1e, + 0x0a, 0x06, 0x6d, 0x73, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x6d, 0x73, 0x70, 0x49, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, + 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x04, 0x63, 0x65, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0xab, 0x01, 0x0a, 0x14, 0x49, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x57, 0x69, 0x74, 0x68, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x12, 0x1d, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, + 0x12, 0x1e, 0x0a, 0x06, 0x6d, 0x73, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x6d, 0x73, 0x70, 0x49, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x04, 0x63, 0x65, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x56, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1d, 0x0a, 0x05, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, + 0x10, 0x01, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x23, 0x0a, 0x08, 0x70, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0xb0, + 0x01, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x57, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x12, 0x1e, 0x0a, 0x06, 0x6d, 0x73, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x05, 0x6d, 0x73, 0x70, + 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x72, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x63, 0x65, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x0d, + 0x77, 0x69, 0x74, 0x68, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0c, 0x77, 0x69, 0x74, 0x68, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x22, 0xd7, 0x01, 0x0a, 0x14, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, + 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x54, 0x65, 0x78, 0x74, 0x12, 0x1d, 0x0a, 0x05, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, + 0x10, 0x01, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1e, 0x0a, 0x06, 0x6d, 0x73, 0x70, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, + 0x10, 0x01, 0x52, 0x05, 0x6d, 0x73, 0x70, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, + 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x63, 0x65, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, 0x72, + 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x70, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x77, + 0x69, 0x74, 0x68, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x25, 0x0a, 0x0d, 0x49, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x22, 0x28, 0x0a, 0x0e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x32, 0xdd, 0x07, 0x0a, + 0x0d, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x84, + 0x01, 0x0a, 0x0b, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x47, 0x65, 0x74, 0x12, 0x26, + 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x1a, 0x29, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, + 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x57, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x77, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x7d, 0x12, 0x91, 0x01, 0x0a, 0x0f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x47, 0x65, 0x74, 0x54, 0x65, 0x78, 0x74, 0x12, 0x26, 0x2e, 0x68, 0x6c, 0x66, 0x73, + 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x77, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x1a, 0x2d, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x54, 0x65, 0x78, 0x74, + 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x77, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x7d, 0x2f, 0x74, 0x65, 0x78, 0x74, 0x12, 0x7a, 0x0a, 0x0b, 0x49, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x65, 0x74, 0x12, 0x21, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, + 0x6b, 0x67, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x77, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x1a, 0x29, 0x2e, 0x68, 0x6c, + 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x77, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, + 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, + 0x2a, 0x1a, 0x12, 0x2f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x9f, 0x01, 0x0a, 0x17, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x53, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x12, 0x2d, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x57, 0x69, 0x74, 0x68, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, + 0x1a, 0x29, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x49, 0x6e, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x22, 0x2a, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, 0x1a, 0x1f, 0x2f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2f, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x77, 0x69, 0x74, 0x68, 0x70, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x9b, 0x01, 0x0a, 0x17, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x79, 0x47, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, 0x50, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x12, 0x29, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x49, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x1a, 0x29, + 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x49, 0x6e, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x24, 0x3a, 0x01, 0x2a, 0x22, 0x1f, 0x2f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2f, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x77, 0x69, 0x74, 0x68, 0x70, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x6b, 0x0a, 0x0c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x27, 0x2e, + 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x1a, 0x21, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, + 0x2f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, + 0x65, 0x73, 0x12, 0x87, 0x01, 0x0a, 0x0e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x26, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, + 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x1a, 0x29, 0x2e, + 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, - 0x12, 0x1a, 0x2f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x7d, 0x12, 0x81, 0x01, 0x0a, - 0x0f, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x47, 0x65, 0x74, 0x54, 0x65, 0x78, 0x74, - 0x12, 0x1e, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x1a, 0x25, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x57, 0x61, 0x6c, - 0x6c, 0x65, 0x74, 0x54, 0x65, 0x78, 0x74, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, - 0x1f, 0x2f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, - 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x7d, 0x2f, 0x74, 0x65, 0x78, 0x74, - 0x12, 0x6a, 0x0a, 0x0b, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x65, 0x74, 0x12, - 0x19, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x1a, 0x21, 0x2e, 0x68, 0x6c, 0x66, - 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x49, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x22, 0x1d, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x1a, 0x12, 0x2f, 0x77, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x8f, 0x01, 0x0a, - 0x17, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x53, 0x65, 0x74, 0x57, 0x69, 0x74, 0x68, - 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x25, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, - 0x6b, 0x67, 0x6f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x57, 0x69, 0x74, 0x68, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x1a, - 0x21, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x57, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, 0x1a, 0x1f, 0x2f, - 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, - 0x73, 0x2f, 0x77, 0x69, 0x74, 0x68, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x8b, - 0x01, 0x0a, 0x17, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x47, 0x65, 0x74, 0x57, 0x69, - 0x74, 0x68, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x21, 0x2e, 0x68, 0x6c, 0x66, - 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x49, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x1a, 0x21, 0x2e, - 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, - 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x01, 0x2a, 0x22, 0x1f, 0x2f, 0x77, 0x61, - 0x6c, 0x6c, 0x65, 0x74, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, - 0x77, 0x69, 0x74, 0x68, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x63, 0x0a, 0x0c, - 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1f, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, - 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, - 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, - 0x73, 0x12, 0x77, 0x0a, 0x0e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x12, 0x1e, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x77, - 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x4c, 0x61, - 0x62, 0x65, 0x6c, 0x1a, 0x21, 0x2e, 0x68, 0x6c, 0x66, 0x73, 0x64, 0x6b, 0x67, 0x6f, 0x2e, 0x77, - 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, - 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x2a, 0x1a, - 0x2f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, - 0x65, 0x73, 0x2f, 0x7b, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x7d, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x37, 0x74, 0x65, 0x63, 0x68, 0x6c, - 0x61, 0x62, 0x2f, 0x68, 0x6c, 0x66, 0x2d, 0x73, 0x64, 0x6b, 0x2d, 0x67, 0x6f, 0x2f, 0x77, 0x61, - 0x6c, 0x6c, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2a, 0x1a, 0x2f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x7d, 0x42, 0x30, 0x5a, 0x2e, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x37, 0x74, 0x65, 0x63, + 0x68, 0x6c, 0x61, 0x62, 0x2f, 0x68, 0x6c, 0x66, 0x2d, 0x73, 0x64, 0x6b, 0x2d, 0x67, 0x6f, 0x2f, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -666,30 +674,30 @@ func file_wallet_wallet_proto_rawDescGZIP() []byte { var file_wallet_wallet_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_wallet_wallet_proto_goTypes = []interface{}{ - (*Identity)(nil), // 0: hlfsdkgo.wallet.Identity - (*IdentityWithPassword)(nil), // 1: hlfsdkgo.wallet.IdentityWithPassword - (*IdentityPassword)(nil), // 2: hlfsdkgo.wallet.IdentityPassword - (*IdentityInWallet)(nil), // 3: hlfsdkgo.wallet.IdentityInWallet - (*IdentityInWalletText)(nil), // 4: hlfsdkgo.wallet.IdentityInWalletText - (*IdentityLabel)(nil), // 5: hlfsdkgo.wallet.IdentityLabel - (*IdentityLabels)(nil), // 6: hlfsdkgo.wallet.IdentityLabels + (*Identity)(nil), // 0: hlfsdkgo.service.wallet.Identity + (*IdentityWithPassword)(nil), // 1: hlfsdkgo.service.wallet.IdentityWithPassword + (*IdentityPassword)(nil), // 2: hlfsdkgo.service.wallet.IdentityPassword + (*IdentityInWallet)(nil), // 3: hlfsdkgo.service.wallet.IdentityInWallet + (*IdentityInWalletText)(nil), // 4: hlfsdkgo.service.wallet.IdentityInWalletText + (*IdentityLabel)(nil), // 5: hlfsdkgo.service.wallet.IdentityLabel + (*IdentityLabels)(nil), // 6: hlfsdkgo.service.wallet.IdentityLabels (*emptypb.Empty)(nil), // 7: google.protobuf.Empty } var file_wallet_wallet_proto_depIdxs = []int32{ - 5, // 0: hlfsdkgo.wallet.WalletService.IdentityGet:input_type -> hlfsdkgo.wallet.IdentityLabel - 5, // 1: hlfsdkgo.wallet.WalletService.IdentityGetText:input_type -> hlfsdkgo.wallet.IdentityLabel - 0, // 2: hlfsdkgo.wallet.WalletService.IdentitySet:input_type -> hlfsdkgo.wallet.Identity - 1, // 3: hlfsdkgo.wallet.WalletService.IdentitySetWithPassword:input_type -> hlfsdkgo.wallet.IdentityWithPassword - 2, // 4: hlfsdkgo.wallet.WalletService.IdentityGetWithPassword:input_type -> hlfsdkgo.wallet.IdentityPassword - 7, // 5: hlfsdkgo.wallet.WalletService.IdentityList:input_type -> google.protobuf.Empty - 5, // 6: hlfsdkgo.wallet.WalletService.IdentityDelete:input_type -> hlfsdkgo.wallet.IdentityLabel - 3, // 7: hlfsdkgo.wallet.WalletService.IdentityGet:output_type -> hlfsdkgo.wallet.IdentityInWallet - 4, // 8: hlfsdkgo.wallet.WalletService.IdentityGetText:output_type -> hlfsdkgo.wallet.IdentityInWalletText - 3, // 9: hlfsdkgo.wallet.WalletService.IdentitySet:output_type -> hlfsdkgo.wallet.IdentityInWallet - 3, // 10: hlfsdkgo.wallet.WalletService.IdentitySetWithPassword:output_type -> hlfsdkgo.wallet.IdentityInWallet - 3, // 11: hlfsdkgo.wallet.WalletService.IdentityGetWithPassword:output_type -> hlfsdkgo.wallet.IdentityInWallet - 6, // 12: hlfsdkgo.wallet.WalletService.IdentityList:output_type -> hlfsdkgo.wallet.IdentityLabels - 3, // 13: hlfsdkgo.wallet.WalletService.IdentityDelete:output_type -> hlfsdkgo.wallet.IdentityInWallet + 5, // 0: hlfsdkgo.service.wallet.WalletService.IdentityGet:input_type -> hlfsdkgo.service.wallet.IdentityLabel + 5, // 1: hlfsdkgo.service.wallet.WalletService.IdentityGetText:input_type -> hlfsdkgo.service.wallet.IdentityLabel + 0, // 2: hlfsdkgo.service.wallet.WalletService.IdentitySet:input_type -> hlfsdkgo.service.wallet.Identity + 1, // 3: hlfsdkgo.service.wallet.WalletService.IdentitySetWithPassword:input_type -> hlfsdkgo.service.wallet.IdentityWithPassword + 2, // 4: hlfsdkgo.service.wallet.WalletService.IdentityGetWithPassword:input_type -> hlfsdkgo.service.wallet.IdentityPassword + 7, // 5: hlfsdkgo.service.wallet.WalletService.IdentityList:input_type -> google.protobuf.Empty + 5, // 6: hlfsdkgo.service.wallet.WalletService.IdentityDelete:input_type -> hlfsdkgo.service.wallet.IdentityLabel + 3, // 7: hlfsdkgo.service.wallet.WalletService.IdentityGet:output_type -> hlfsdkgo.service.wallet.IdentityInWallet + 4, // 8: hlfsdkgo.service.wallet.WalletService.IdentityGetText:output_type -> hlfsdkgo.service.wallet.IdentityInWalletText + 3, // 9: hlfsdkgo.service.wallet.WalletService.IdentitySet:output_type -> hlfsdkgo.service.wallet.IdentityInWallet + 3, // 10: hlfsdkgo.service.wallet.WalletService.IdentitySetWithPassword:output_type -> hlfsdkgo.service.wallet.IdentityInWallet + 3, // 11: hlfsdkgo.service.wallet.WalletService.IdentityGetWithPassword:output_type -> hlfsdkgo.service.wallet.IdentityInWallet + 6, // 12: hlfsdkgo.service.wallet.WalletService.IdentityList:output_type -> hlfsdkgo.service.wallet.IdentityLabels + 3, // 13: hlfsdkgo.service.wallet.WalletService.IdentityDelete:output_type -> hlfsdkgo.service.wallet.IdentityInWallet 7, // [7:14] is the sub-list for method output_type 0, // [0:7] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -846,7 +854,7 @@ func NewWalletServiceClient(cc grpc.ClientConnInterface) WalletServiceClient { func (c *walletServiceClient) IdentityGet(ctx context.Context, in *IdentityLabel, opts ...grpc.CallOption) (*IdentityInWallet, error) { out := new(IdentityInWallet) - err := c.cc.Invoke(ctx, "/hlfsdkgo.wallet.WalletService/IdentityGet", in, out, opts...) + err := c.cc.Invoke(ctx, "/hlfsdkgo.service.wallet.WalletService/IdentityGet", in, out, opts...) if err != nil { return nil, err } @@ -855,7 +863,7 @@ func (c *walletServiceClient) IdentityGet(ctx context.Context, in *IdentityLabel func (c *walletServiceClient) IdentityGetText(ctx context.Context, in *IdentityLabel, opts ...grpc.CallOption) (*IdentityInWalletText, error) { out := new(IdentityInWalletText) - err := c.cc.Invoke(ctx, "/hlfsdkgo.wallet.WalletService/IdentityGetText", in, out, opts...) + err := c.cc.Invoke(ctx, "/hlfsdkgo.service.wallet.WalletService/IdentityGetText", in, out, opts...) if err != nil { return nil, err } @@ -864,7 +872,7 @@ func (c *walletServiceClient) IdentityGetText(ctx context.Context, in *IdentityL func (c *walletServiceClient) IdentitySet(ctx context.Context, in *Identity, opts ...grpc.CallOption) (*IdentityInWallet, error) { out := new(IdentityInWallet) - err := c.cc.Invoke(ctx, "/hlfsdkgo.wallet.WalletService/IdentitySet", in, out, opts...) + err := c.cc.Invoke(ctx, "/hlfsdkgo.service.wallet.WalletService/IdentitySet", in, out, opts...) if err != nil { return nil, err } @@ -873,7 +881,7 @@ func (c *walletServiceClient) IdentitySet(ctx context.Context, in *Identity, opt func (c *walletServiceClient) IdentitySetWithPassword(ctx context.Context, in *IdentityWithPassword, opts ...grpc.CallOption) (*IdentityInWallet, error) { out := new(IdentityInWallet) - err := c.cc.Invoke(ctx, "/hlfsdkgo.wallet.WalletService/IdentitySetWithPassword", in, out, opts...) + err := c.cc.Invoke(ctx, "/hlfsdkgo.service.wallet.WalletService/IdentitySetWithPassword", in, out, opts...) if err != nil { return nil, err } @@ -882,7 +890,7 @@ func (c *walletServiceClient) IdentitySetWithPassword(ctx context.Context, in *I func (c *walletServiceClient) IdentityGetWithPassword(ctx context.Context, in *IdentityPassword, opts ...grpc.CallOption) (*IdentityInWallet, error) { out := new(IdentityInWallet) - err := c.cc.Invoke(ctx, "/hlfsdkgo.wallet.WalletService/IdentityGetWithPassword", in, out, opts...) + err := c.cc.Invoke(ctx, "/hlfsdkgo.service.wallet.WalletService/IdentityGetWithPassword", in, out, opts...) if err != nil { return nil, err } @@ -891,7 +899,7 @@ func (c *walletServiceClient) IdentityGetWithPassword(ctx context.Context, in *I func (c *walletServiceClient) IdentityList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*IdentityLabels, error) { out := new(IdentityLabels) - err := c.cc.Invoke(ctx, "/hlfsdkgo.wallet.WalletService/IdentityList", in, out, opts...) + err := c.cc.Invoke(ctx, "/hlfsdkgo.service.wallet.WalletService/IdentityList", in, out, opts...) if err != nil { return nil, err } @@ -900,7 +908,7 @@ func (c *walletServiceClient) IdentityList(ctx context.Context, in *emptypb.Empt func (c *walletServiceClient) IdentityDelete(ctx context.Context, in *IdentityLabel, opts ...grpc.CallOption) (*IdentityInWallet, error) { out := new(IdentityInWallet) - err := c.cc.Invoke(ctx, "/hlfsdkgo.wallet.WalletService/IdentityDelete", in, out, opts...) + err := c.cc.Invoke(ctx, "/hlfsdkgo.service.wallet.WalletService/IdentityDelete", in, out, opts...) if err != nil { return nil, err } @@ -965,7 +973,7 @@ func _WalletService_IdentityGet_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/hlfsdkgo.wallet.WalletService/IdentityGet", + FullMethod: "/hlfsdkgo.service.wallet.WalletService/IdentityGet", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WalletServiceServer).IdentityGet(ctx, req.(*IdentityLabel)) @@ -983,7 +991,7 @@ func _WalletService_IdentityGetText_Handler(srv interface{}, ctx context.Context } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/hlfsdkgo.wallet.WalletService/IdentityGetText", + FullMethod: "/hlfsdkgo.service.wallet.WalletService/IdentityGetText", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WalletServiceServer).IdentityGetText(ctx, req.(*IdentityLabel)) @@ -1001,7 +1009,7 @@ func _WalletService_IdentitySet_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/hlfsdkgo.wallet.WalletService/IdentitySet", + FullMethod: "/hlfsdkgo.service.wallet.WalletService/IdentitySet", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WalletServiceServer).IdentitySet(ctx, req.(*Identity)) @@ -1019,7 +1027,7 @@ func _WalletService_IdentitySetWithPassword_Handler(srv interface{}, ctx context } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/hlfsdkgo.wallet.WalletService/IdentitySetWithPassword", + FullMethod: "/hlfsdkgo.service.wallet.WalletService/IdentitySetWithPassword", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WalletServiceServer).IdentitySetWithPassword(ctx, req.(*IdentityWithPassword)) @@ -1037,7 +1045,7 @@ func _WalletService_IdentityGetWithPassword_Handler(srv interface{}, ctx context } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/hlfsdkgo.wallet.WalletService/IdentityGetWithPassword", + FullMethod: "/hlfsdkgo.service.wallet.WalletService/IdentityGetWithPassword", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WalletServiceServer).IdentityGetWithPassword(ctx, req.(*IdentityPassword)) @@ -1055,7 +1063,7 @@ func _WalletService_IdentityList_Handler(srv interface{}, ctx context.Context, d } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/hlfsdkgo.wallet.WalletService/IdentityList", + FullMethod: "/hlfsdkgo.service.wallet.WalletService/IdentityList", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WalletServiceServer).IdentityList(ctx, req.(*emptypb.Empty)) @@ -1073,7 +1081,7 @@ func _WalletService_IdentityDelete_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/hlfsdkgo.wallet.WalletService/IdentityDelete", + FullMethod: "/hlfsdkgo.service.wallet.WalletService/IdentityDelete", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(WalletServiceServer).IdentityDelete(ctx, req.(*IdentityLabel)) @@ -1082,7 +1090,7 @@ func _WalletService_IdentityDelete_Handler(srv interface{}, ctx context.Context, } var _WalletService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "hlfsdkgo.wallet.WalletService", + ServiceName: "hlfsdkgo.service.wallet.WalletService", HandlerType: (*WalletServiceServer)(nil), Methods: []grpc.MethodDesc{ { diff --git a/service/wallet/wallet.proto b/service/wallet/wallet.proto index e0b667b..584659f 100644 --- a/service/wallet/wallet.proto +++ b/service/wallet/wallet.proto @@ -1,9 +1,8 @@ syntax = "proto3"; -// Wallet - identity -package hlfsdkgo.wallet; - -option go_package = "github.com/s7techlab/hlf-sdk-go/wallet"; +// Wallet - identity storage +package hlfsdkgo.service.wallet; +option go_package = "github.com/s7techlab/hlf-sdk-go/service/wallet"; import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; diff --git a/service/wallet/wallet.swagger.json b/service/wallet/wallet.swagger.json index 85683f3..a7e686e 100644 --- a/service/wallet/wallet.swagger.json +++ b/service/wallet/wallet.swagger.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "title": "Wallet - identity", + "title": "Wallet - identity storage", "version": "version not set" }, "consumes": [ From 8cf85a3cd7ec88b8c33be1a74f6fe22d524f67f6 Mon Sep 17 00:00:00 2001 From: Viktor Nosov Date: Sun, 3 Dec 2023 16:23:55 +0300 Subject: [PATCH 2/4] alias --- go.sum | 150 +++++++++++++++++++----- service/ccpackage/fetcher/gogit_test.go | 34 ------ 2 files changed, 122 insertions(+), 62 deletions(-) delete mode 100644 service/ccpackage/fetcher/gogit_test.go diff --git a/go.sum b/go.sum index 53462f2..b4d19d0 100644 --- a/go.sum +++ b/go.sum @@ -3,6 +3,8 @@ cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSR code.cloudfoundry.org/clock v1.0.0/go.mod h1:QD9Lzhd/ux6eNQVUDVRJX/RKTigpewimNYBi7ivZKY8= contrib.go.opencensus.io/exporter/stackdriver v0.12.1/go.mod h1:iwB6wGarfphGGe/e5CWqyUk/cLzKnWsOKPVW3no6OTw= contrib.go.opencensus.io/resource v0.1.1/go.mod h1:F361eGI91LCmW1I/Saf+rX0+OFcigGlFvXwEGEnkRLA= +dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= @@ -13,13 +15,17 @@ github.com/DataDog/zstd v1.4.0/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t github.com/Knetic/govaluate v3.0.0+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.4.12 h1:xAfWHN1IrQ0NJ9TBC0KBZoqLjzDTr1ML+4MywiUOryc= github.com/Microsoft/go-winio v0.4.12/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Microsoft/hcsshim v0.8.6 h1:ZfF0+zZeYdzMIVMZHKtDKJvLHj76XCuVae/jNkjj0IA= github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OpenPeeDeeP/depguard v1.0.0 h1:k9QF73nrHT3nPLz3lu6G5s+3Hi8Je36ODr1F5gjAXXM= github.com/OpenPeeDeeP/depguard v1.0.0/go.mod h1:7/4sitnI9YlQgTLLk734QlzXT8DuHVnAyztLplQjk+o= +github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg= +github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/Shopify/sarama v1.20.1/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/sarama v1.22.1 h1:exyEsKLGyCsDiqpV5Lr4slFi8ev2KiM3cP1KZ6vnCQ0= github.com/Shopify/sarama v1.22.1/go.mod h1:FRzlvRpMFO/639zY1SDxUxkqH97Y0ndM5CbGj6oG3As= @@ -29,13 +35,17 @@ github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrU github.com/VictoriaMetrics/fastcache v1.5.7 h1:4y6y0G8PRzszQUYIQHHssv/jgPHAb5qQuuDNdCbyAgw= github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= +github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= 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/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/aws/aws-sdk-go v1.19.18/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= 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= @@ -43,6 +53,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/cenkalti/backoff/v3 v3.0.0 h1:ske+9nBpD9qZsTBoF41nW5L+AIuFBKMeze18XQ3eG1c= github.com/cenkalti/backoff/v3 v3.0.0/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -52,6 +63,8 @@ github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cloudflare/cfssl v0.0.0-20190510060611-9c027c93ba9e h1:ZtyhUG4s94BMUCdgvRZySr/AXYL5CDcjxhIV/83xJog= github.com/cloudflare/cfssl v0.0.0-20190510060611-9c027c93ba9e/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA= +github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= +github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= @@ -75,6 +88,8 @@ github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbp github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= +github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= 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= @@ -90,8 +105,9 @@ github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5Xh github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-resiliency v1.2.0 h1:v7g92e/KSN71Rq7vSThKaWIq68fL4YHvWyiUKorFR1Q= github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= @@ -99,6 +115,9 @@ github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8 github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= +github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= +github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= @@ -114,8 +133,16 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsouza/go-dockerclient v1.4.1 h1:W7wuJ3IB48WYZv/UBk9dCTIb9oX805+L9KIm65HcUYs= github.com/fsouza/go-dockerclient v1.4.1/go.mod h1:PUNHxbowDqRXfRgZqMz1OeGtbWC6VKyZvJ99hDjB0qs= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= github.com/go-critic/go-critic v0.3.5-0.20190526074819-1df300866540 h1:djv/qAomOVj8voCHt0M0OYwR/4vfDq1zNKSPKjJCexs= github.com/go-critic/go-critic v0.3.5-0.20190526074819-1df300866540/go.mod h1:+sE8vrLDS2M0pZkBk0wy6+nLdKexVDrl/jBqQOTDThA= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= +github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= +github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20230305113008-0c11038e723f h1:Pz0DHeFij3XFhoBRGUDPzSJ+w2UcK5/0JvF8DRI58r8= +github.com/go-git/go-git/v5 v5.9.0 h1:cD9SFA7sHVRdJ7AYck1ZaAa/yeuBvGPxwXDL8cxrObY= +github.com/go-git/go-git/v5 v5.9.0/go.mod h1:RKIqga24sWdMGZF+1Ekv9kylsDz6LzdTSI2s/OsZWE0= github.com/go-jose/go-jose/v3 v3.0.0 h1:s6rrhirfEP/CGIoc6p+PZAeogN2SxKav6Wp7+dyMWVo= github.com/go-jose/go-jose/v3 v3.0.0/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= @@ -123,9 +150,11 @@ github.com/go-lintpack/lintpack v0.5.2 h1:DI5mA3+eKdWeJ40nU4d6Wc26qmdG8RCi/btYq0 github.com/go-lintpack/lintpack v0.5.2/go.mod h1:NwZuYi2nUHho8XEIZ6SIxihrnPoqBTDqfpXvXAN0sXM= 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-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-test/deep v1.0.2 h1:onZX1rnHT3Wv6cqNgYyFOOlgVKJrksuCMCRvJStbMYw= github.com/go-toolsmith/astcast v1.0.0 h1:JojxlmI6STnFVG9yOImLeGREv8W2ocNUM+iOhR6jE7g= github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= @@ -159,8 +188,9 @@ github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzq 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-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef h1:veQD95Isof8w9/WXiA+pa3tz3fJXkt5B7QaRBrM62gk= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.0.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 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= @@ -215,17 +245,20 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/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.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/monologue v0.0.0-20190606152607-4b11a32b5934 h1:0+3qDY6030dpAiEdmBqIsz3lg2SgXAvPEEq2sjm5UBk= github.com/google/monologue v0.0.0-20190606152607-4b11a32b5934/go.mod h1:6NTfaQoUpg5QmPsCUWLR3ig33FHrKXhTtWzF0DVdmuk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/trillian v1.2.2-0.20190612132142-05461f4df60a/go.mod h1:YPmUVn5NGwgnDUgqlVyFGMTgaWlnSvH7W5p+NdOG8UA= github.com/google/trillian-examples v0.0.0-20190603134952-4e75ba15216c/go.mod h1:WgL3XZ3pA8/9cm7yxqWrZE6iZkESB2ItGxy5Fo6k2lk= -github.com/google/uuid v1.0.0 h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.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/gorilla/handlers v1.4.0/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= @@ -296,15 +329,20 @@ github.com/ijc/Gotty v0.0.0-20170406111628-a8b993ba6abd h1:anPrsicrIi2ColgWTVPk+ github.com/ijc/Gotty v0.0.0-20170406111628-a8b993ba6abd/go.mod h1:3LVOLeyx9XVvwPgrt2be44XgSqndprz1G18rSk8KD84= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= 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/json-iterator/go v1.1.7 h1:KfgG9LzI+pYjr4xvmz/5H4FXjokeP+rlHLhv3iH62Fo= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= +github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= 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 v0.0.0-20161130080628-0de1eaf82fa3/go.mod h1:jxZFDH7ILpTPQTk+E2s+z4CUas9lVNjIuKR4c5/zKgM= @@ -315,16 +353,15 @@ github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0 github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= 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/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/letsencrypt/pkcs11key v2.0.1-0.20170608213348-396559074696+incompatible/go.mod h1:iGYXKqDXt0cpBthCHdr9ZdsQwyGlYFh/+8xa4WzIQ34= github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= @@ -333,6 +370,8 @@ github.com/magiconair/properties v1.7.6/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czP github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A= +github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -366,8 +405,9 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= github.com/mozilla/tls-observatory v0.0.0-20180409132520-8791a200eb40/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= @@ -386,12 +426,14 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= -github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= @@ -407,6 +449,8 @@ github.com/pelletier/go-toml v1.8.0/go.mod h1:D6yutnOGMveHEPV7VQOuvI/gXY61bv+9bA github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.5.0+incompatible h1:MbdIZ43A//duwOjQqK3nP+up+65yraNFyX3Vp6Rwues= github.com/pierrec/lz4 v2.5.0+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= +github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= 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 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -444,6 +488,7 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= @@ -451,6 +496,8 @@ github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735/go.mod h1:807d1WS github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shirou/gopsutil v0.0.0-20180427012116-c95755e4bcd7/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e h1:MZM7FHLqUHYI0Y/mQAt3d2aYa0SiNms/hFqC9qJYolM= @@ -460,8 +507,12 @@ github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOms github.com/sirupsen/logrus v1.0.5/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/skeema/knownhosts v1.2.0 h1:h9r9cf0+u7wSE+M183ZtMGgOJKiL96brpaz5ekfJCpM= +github.com/skeema/knownhosts v1.2.0/go.mod h1:g4fPeYpque7P0xefxtGzV81ihjC8sX2IqpAoNkjxbMo= github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sourcegraph/go-diff v0.5.1 h1:gO6i5zugwzo1RVTvgvfwCOSVegNuvnNi6bAD1QCmkHs= @@ -530,6 +581,8 @@ github.com/valyala/quicktemplate v1.1.1/go.mod h1:EH+4AkTd43SvgIbQHYu59/cJyxDoOV github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/willf/bitset v1.1.10 h1:NotGKqX0KwQ72NUzqrjZq5ipPNDQex9lo3WpaS8L2sc= github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= +github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= @@ -537,6 +590,7 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= @@ -571,8 +625,12 @@ golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= -golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 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= @@ -583,8 +641,10 @@ golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhp golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= -golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20170915142106-8351a756f30f/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-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -605,8 +665,14 @@ golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/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.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU= -golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= 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-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -619,6 +685,8 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20171026204733-164713f0dfce/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -640,6 +708,7 @@ golang.org/x/sys v0.0.0-20190710143415-6ec70d6a5542/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -648,17 +717,38 @@ golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200819091447-39769834ee22/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.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= -golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.9.0 h1:GRRCnKYhdQrD8kfRAdQ6Zcw1P0OcELxGLKJvtjVMZ28= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/text v0.0.0-20170915090833-1cbadb444a80/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.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= -golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 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= @@ -687,12 +777,13 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200131233409-575de47986ce/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.10.0 h1:tvDr/iQoUqNdohiYm0LmmKcBk+q86lb9EprIUFhHHGg= -golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= 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.5.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= @@ -722,8 +813,8 @@ gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4 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/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/cheggaaa/pb.v1 v1.0.28 h1:n1tBJnnK2r7g9OW2btFH91V92STTUevLXYFb8gy9EMk= gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= @@ -733,6 +824,8 @@ gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKW gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= 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= @@ -740,8 +833,9 @@ 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 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/service/ccpackage/fetcher/gogit_test.go b/service/ccpackage/fetcher/gogit_test.go deleted file mode 100644 index 3bd6de5..0000000 --- a/service/ccpackage/fetcher/gogit_test.go +++ /dev/null @@ -1,34 +0,0 @@ -package fetcher_test - -//import ( -// "archive/tar" -// "bytes" -// "context" -// "io" -// "testing" -// -// "github.com/stretchr/testify/assert" - -// -//var ( -// f fetcher.Fetcher -//) -// -//func TestNewGoGitFetcher(t *testing.T) { -// f = fetcher.NewGit(fetcher.GitBasicAuth(testdata.DeployUser, testdata.DeployPassword)) -// assert.NotNil(t, f) -//} -// -//func TestGoGitFetcher_Fetch(t *testing.T) { -// if testing.Short() { -// t.Skip("skipping test in short mode.") -// } -// -// for _, p := range testdata.Packages { -// code, err := f.Fetch(context.Background(), p.Repository, p.Version) -// assert.NoError(t, err) -// assert.NotNil(t, code) -// assert.NoError(t, expectTar(code)) -// } -//} -// From 09fd054b9bcbbbb06d38bd4fccf762deb161cc02 Mon Sep 17 00:00:00 2001 From: Viktor Nosov Date: Sun, 3 Dec 2023 16:31:52 +0300 Subject: [PATCH 3/4] fix store --- service/ccpackage/store/file/file.go | 4 ++-- service/ccpackage/store/memory/memory.go | 8 ++++---- service/ccpackage/store/storage.go | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/service/ccpackage/store/file/file.go b/service/ccpackage/store/file/file.go index 72fad2b..07cd24e 100644 --- a/service/ccpackage/store/file/file.go +++ b/service/ccpackage/store/file/file.go @@ -40,7 +40,7 @@ func (s *Store) Put(ctx context.Context, req *ccpackage.PutPackageRequest) error } // Get gets chaincode package info from storage. -func (s *Store) Get(_ context.Context, id *ccpackage.PackageID) (*ccpackage.PackageData, error) { +func (s *Store) Get(_ context.Context, id *ccpackage.PackageID) (*ccpackage.Package, error) { fStat, err := os.Stat(s.filePath(id)) if err != nil { if errors.Is(err, os.ErrNotExist) { @@ -49,7 +49,7 @@ func (s *Store) Get(_ context.Context, id *ccpackage.PackageID) (*ccpackage.Pack return nil, fmt.Errorf("stat file: %w", err) } - return &ccpackage.PackageData{ + return &ccpackage.Package{ Id: id, Size: fStat.Size(), CreatedAt: timestamppb.New(fStat.ModTime()), diff --git a/service/ccpackage/store/memory/memory.go b/service/ccpackage/store/memory/memory.go index c1b165b..ef6591a 100644 --- a/service/ccpackage/store/memory/memory.go +++ b/service/ccpackage/store/memory/memory.go @@ -20,7 +20,7 @@ const ( ) type Storage struct { - packages map[string]*ccpackage.PackageData + packages map[string]*ccpackage.Package mx sync.RWMutex wg sync.WaitGroup stop chan struct{} @@ -28,7 +28,7 @@ type Storage struct { func New() *Storage { m := &Storage{ - packages: map[string]*ccpackage.PackageData{}, + packages: map[string]*ccpackage.Package{}, stop: make(chan struct{}), } @@ -66,7 +66,7 @@ func (m *Storage) Put(ctx context.Context, req *ccpackage.PutPackageRequest) err m.mx.Lock() defer m.mx.Unlock() - m.packages[store.ObjectKey(req.Id)] = &ccpackage.PackageData{ + m.packages[store.ObjectKey(req.Id)] = &ccpackage.Package{ Id: req.Id, Size: int64(len(req.Data)), CreatedAt: ptypes.TimestampNow(), @@ -76,7 +76,7 @@ func (m *Storage) Put(ctx context.Context, req *ccpackage.PutPackageRequest) err } // Get gets chaincode package info from packages. -func (m *Storage) Get(_ context.Context, id *ccpackage.PackageID) (*ccpackage.PackageData, error) { +func (m *Storage) Get(_ context.Context, id *ccpackage.PackageID) (*ccpackage.Package, error) { m.mx.RLock() defer m.mx.RUnlock() diff --git a/service/ccpackage/store/storage.go b/service/ccpackage/store/storage.go index ca28045..6055c60 100644 --- a/service/ccpackage/store/storage.go +++ b/service/ccpackage/store/storage.go @@ -26,7 +26,7 @@ type ( // Put saves chaincode package into storage. Put(context.Context, *ccpackage.PutPackageRequest) error // Get gets chaincode package info from storage. - Get(context.Context, *ccpackage.PackageID) (*ccpackage.PackageData, error) + Get(context.Context, *ccpackage.PackageID) (*ccpackage.Package, error) // List gets stored chaincode packages' infos. List(context.Context) ([]*ccpackage.Package, error) // Fetch fetches chaincode package. From 6f5118d3a8b6c34f551c86201fb45d777d4c90dc Mon Sep 17 00:00:00 2001 From: Viktor Nosov Date: Sun, 3 Dec 2023 16:46:53 +0300 Subject: [PATCH 4/4] fix store --- service/ccpackage/packer/docker/container.go | 2 +- service/ccpackage/packer/docker/packer.go | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/service/ccpackage/packer/docker/container.go b/service/ccpackage/packer/docker/container.go index 11195b2..4a59828 100644 --- a/service/ccpackage/packer/docker/container.go +++ b/service/ccpackage/packer/docker/container.go @@ -209,7 +209,7 @@ func (c *Container) DownloadPath(ctx context.Context, path string) ([]byte, erro InactivityTimeout: 0, Context: ctx, }); err != nil { - err = fmt.Errorf("download path=%s from container: %w", path, err) + return nil, fmt.Errorf("download path=%s from container: %w", path, err) } pkgTar, err := UnTarFirstFile(outBf) diff --git a/service/ccpackage/packer/docker/packer.go b/service/ccpackage/packer/docker/packer.go index 331128f..45a2731 100644 --- a/service/ccpackage/packer/docker/packer.go +++ b/service/ccpackage/packer/docker/packer.go @@ -152,7 +152,10 @@ func (p *Packer) PackFromFiles(ctx context.Context, spec *ccpackage.PackageSpec, return nil, err } - image, lifecycle, err := p.imageLifecycle(spec.Id.FabricVersion) + image, lifecycle, imageErr := p.imageLifecycle(spec.Id.FabricVersion) + if imageErr != nil { + return nil, imageErr + } sourcePath := filepath.Join(containerSrcPath, spec.ChaincodePath) p.logger.Info(`created container with mounted source code`,