diff --git a/vendor/github.com/MakeNowJust/heredoc/LICENSE b/vendor/github.com/MakeNowJust/heredoc/LICENSE new file mode 100644 index 000000000..8a58c2220 --- /dev/null +++ b/vendor/github.com/MakeNowJust/heredoc/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017 TSUYUSATO Kitsune + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/github.com/MakeNowJust/heredoc/README.md b/vendor/github.com/MakeNowJust/heredoc/README.md new file mode 100644 index 000000000..7523d204b --- /dev/null +++ b/vendor/github.com/MakeNowJust/heredoc/README.md @@ -0,0 +1,53 @@ +# heredoc [![CircleCI](https://circleci.com/gh/MakeNowJust/heredoc.svg?style=svg)](https://circleci.com/gh/MakeNowJust/heredoc) [![Go Walker](http://gowalker.org/api/v1/badge)](https://gowalker.org/github.com/MakeNowJust/heredoc) + +## About + +Package heredoc provides the here-document with keeping indent. + +## Install + +```console +$ go get github.com/MakeNowJust/heredoc +``` + +## Import + +```go +// usual +import "github.com/MakeNowJust/heredoc" +// shortcuts +import . "github.com/MakeNowJust/heredoc/dot" +``` + +## Example + +```go +package main + +import ( + "fmt" + . "github.com/MakeNowJust/heredoc/dot" +) + +func main() { + fmt.Println(D(` + Lorem ipsum dolor sit amet, consectetur adipisicing elit, + sed do eiusmod tempor incididunt ut labore et dolore magna + aliqua. Ut enim ad minim veniam, ... + `)) + // Output: + // Lorem ipsum dolor sit amet, consectetur adipisicing elit, + // sed do eiusmod tempor incididunt ut labore et dolore magna + // aliqua. Ut enim ad minim veniam, ... + // +} +``` + +## API Document + + - [Go Walker - github.com/MakeNowJust/heredoc](https://gowalker.org/github.com/MakeNowJust/heredoc) + - [Go Walker - github.com/MakeNowJust/heredoc/dot](https://gowalker.org/github.com/MakeNowJust/heredoc/dot) + +## License + +This software is released under the MIT License, see LICENSE. diff --git a/vendor/github.com/MakeNowJust/heredoc/heredoc.go b/vendor/github.com/MakeNowJust/heredoc/heredoc.go new file mode 100644 index 000000000..63ce72adc --- /dev/null +++ b/vendor/github.com/MakeNowJust/heredoc/heredoc.go @@ -0,0 +1,98 @@ +// Copyright (c) 2014-2017 TSUYUSATO Kitsune +// This software is released under the MIT License. +// http://opensource.org/licenses/mit-license.php + +// Package heredoc provides creation of here-documents from raw strings. +// +// Golang supports raw-string syntax. +// doc := ` +// Foo +// Bar +// ` +// But raw-string cannot recognize indentation. Thus such content is an indented string, equivalent to +// "\n\tFoo\n\tBar\n" +// I dont't want this! +// +// However this problem is solved by package heredoc. +// doc := heredoc.Doc(` +// Foo +// Bar +// `) +// Is equivalent to +// "Foo\nBar\n" +package heredoc + +import ( + "fmt" + "strings" + "unicode" +) + +const maxInt = int(^uint(0) >> 1) + +// Doc returns un-indented string as here-document. +func Doc(raw string) string { + skipFirstLine := false + if len(raw) > 0 && raw[0] == '\n' { + raw = raw[1:] + } else { + skipFirstLine = true + } + + lines := strings.Split(raw, "\n") + + minIndentSize := getMinIndent(lines, skipFirstLine) + lines = removeIndentation(lines, minIndentSize, skipFirstLine) + + return strings.Join(lines, "\n") +} + +// getMinIndent calculates the minimum indentation in lines, excluding empty lines. +func getMinIndent(lines []string, skipFirstLine bool) int { + minIndentSize := maxInt + + for i, line := range lines { + if i == 0 && skipFirstLine { + continue + } + + indentSize := 0 + for _, r := range []rune(line) { + if unicode.IsSpace(r) { + indentSize += 1 + } else { + break + } + } + + if len(line) == indentSize { + if i == len(lines)-1 && indentSize < minIndentSize { + lines[i] = "" + } + } else if indentSize < minIndentSize { + minIndentSize = indentSize + } + } + return minIndentSize +} + +// removeIndentation removes n characters from the front of each line in lines. +// Skips first line if skipFirstLine is true, skips empty lines. +func removeIndentation(lines []string, n int, skipFirstLine bool) []string { + for i, line := range lines { + if i == 0 && skipFirstLine { + continue + } + + if len(lines[i]) >= n { + lines[i] = line[n:] + } + } + return lines +} + +// Docf returns unindented and formatted string as here-document. +// Formatting is done as for fmt.Printf(). +func Docf(raw string, args ...interface{}) string { + return fmt.Sprintf(Doc(raw), args...) +} diff --git a/vendor/github.com/Masterminds/semver/v3/.gitignore b/vendor/github.com/Masterminds/semver/v3/.gitignore new file mode 100644 index 000000000..6b061e617 --- /dev/null +++ b/vendor/github.com/Masterminds/semver/v3/.gitignore @@ -0,0 +1 @@ +_fuzz/ \ No newline at end of file diff --git a/vendor/github.com/Masterminds/semver/v3/.golangci.yml b/vendor/github.com/Masterminds/semver/v3/.golangci.yml new file mode 100644 index 000000000..fdbdf1448 --- /dev/null +++ b/vendor/github.com/Masterminds/semver/v3/.golangci.yml @@ -0,0 +1,26 @@ +run: + deadline: 2m + +linters: + disable-all: true + enable: + - deadcode + - dupl + - errcheck + - gofmt + - goimports + - golint + - gosimple + - govet + - ineffassign + - misspell + - nakedret + - structcheck + - unused + - varcheck + +linters-settings: + gofmt: + simplify: true + dupl: + threshold: 400 diff --git a/vendor/github.com/Masterminds/semver/v3/.travis.yml b/vendor/github.com/Masterminds/semver/v3/.travis.yml new file mode 100644 index 000000000..296b83c17 --- /dev/null +++ b/vendor/github.com/Masterminds/semver/v3/.travis.yml @@ -0,0 +1,27 @@ +language: go + +# Testing and linting occuring via go modules does not really work well prior +# to Go 1.12. This is what can happen with experiments. +go: + - 1.11.x + - 1.12.x + - 1.13.x + - tip + +# Setting sudo access to false will let Travis CI use containers rather than +# VMs to run the tests. For more details see: +# - http://docs.travis-ci.com/user/workers/container-based-infrastructure/ +# - http://docs.travis-ci.com/user/workers/standard-infrastructure/ +sudo: false + +script: + - make lint + - make test-cover + +notifications: + webhooks: + urls: + - https://webhooks.gitter.im/e/06e3328629952dabe3e0 + on_success: change # options: [always|never|change] default: always + on_failure: always # options: [always|never|change] default: always + on_start: never # options: [always|never|change] default: always diff --git a/vendor/github.com/Masterminds/semver/v3/CHANGELOG.md b/vendor/github.com/Masterminds/semver/v3/CHANGELOG.md new file mode 100644 index 000000000..6b1788d1d --- /dev/null +++ b/vendor/github.com/Masterminds/semver/v3/CHANGELOG.md @@ -0,0 +1,166 @@ +# Changelog + +## 3.0.1 (2019-09-13) + +### Fixed + +- #125: Fixes issue with module path for v3 + +## 3.0.0 (2019-09-12) + +This is a major release of the semver package which includes API changes. The Go +API is compatible with ^1. The Go API was not changed because many people are using +`go get` without Go modules for their applications and API breaking changes cause +errors which we have or would need to support. + +The changes in this release are the handling based on the data passed into the +functions. These are described in the added and changed sections below. + +### Added + +- StrictNewVersion function. This is similar to NewVersion but will return an + error if the version passed in is not a strict semantic version. For example, + 1.2.3 would pass but v1.2.3 or 1.2 would fail because they are not strictly + speaking semantic versions. This function is faster, performs fewer operations, + and uses fewer allocations than NewVersion. +- Fuzzing has been performed on NewVersion, StrictNewVersion, and NewConstraint. + The Makefile contains the operations used. For more information on you can start + on Wikipedia at https://en.wikipedia.org/wiki/Fuzzing +- Now using Go modules + +### Changed + +- NewVersion has proper prerelease and metadata validation with error messages + to signal an issue with either of them +- ^ now operates using a similar set of rules to npm/js and Rust/Cargo. If the + version is >=1 the ^ ranges works the same as v1. For major versions of 0 the + rules have changed. The minor version is treated as the stable version unless + a patch is specified and then it is equivalent to =. One difference from npm/js + is that prereleases there are only to a specific version (e.g. 1.2.3). + Prereleases here look over multiple versions and follow semantic version + ordering rules. This pattern now follows along with the expected and requested + handling of this packaged by numerous users. + +## 1.5.0 (2019-09-11) + +### Added + +- #103: Add basic fuzzing for `NewVersion()` (thanks @jesse-c) + +### Changed + +- #82: Clarify wildcard meaning in range constraints and update tests for it (thanks @greysteil) +- #83: Clarify caret operator range for pre-1.0.0 dependencies (thanks @greysteil) +- #72: Adding docs comment pointing to vert for a cli +- #71: Update the docs on pre-release comparator handling +- #89: Test with new go versions (thanks @thedevsaddam) +- #87: Added $ to ValidPrerelease for better validation (thanks @jeremycarroll) + +### Fixed + +- #78: Fix unchecked error in example code (thanks @ravron) +- #70: Fix the handling of pre-releases and the 0.0.0 release edge case +- #97: Fixed copyright file for proper display on GitHub +- #107: Fix handling prerelease when sorting alphanum and num +- #109: Fixed where Validate sometimes returns wrong message on error + +## 1.4.2 (2018-04-10) + +### Changed + +- #72: Updated the docs to point to vert for a console appliaction +- #71: Update the docs on pre-release comparator handling + +### Fixed + +- #70: Fix the handling of pre-releases and the 0.0.0 release edge case + +## 1.4.1 (2018-04-02) + +### Fixed + +- Fixed #64: Fix pre-release precedence issue (thanks @uudashr) + +## 1.4.0 (2017-10-04) + +### Changed + +- #61: Update NewVersion to parse ints with a 64bit int size (thanks @zknill) + +## 1.3.1 (2017-07-10) + +### Fixed + +- Fixed #57: number comparisons in prerelease sometimes inaccurate + +## 1.3.0 (2017-05-02) + +### Added + +- #45: Added json (un)marshaling support (thanks @mh-cbon) +- Stability marker. See https://masterminds.github.io/stability/ + +### Fixed + +- #51: Fix handling of single digit tilde constraint (thanks @dgodd) + +### Changed + +- #55: The godoc icon moved from png to svg + +## 1.2.3 (2017-04-03) + +### Fixed + +- #46: Fixed 0.x.x and 0.0.x in constraints being treated as * + +## Release 1.2.2 (2016-12-13) + +### Fixed + +- #34: Fixed issue where hyphen range was not working with pre-release parsing. + +## Release 1.2.1 (2016-11-28) + +### Fixed + +- #24: Fixed edge case issue where constraint "> 0" does not handle "0.0.1-alpha" + properly. + +## Release 1.2.0 (2016-11-04) + +### Added + +- #20: Added MustParse function for versions (thanks @adamreese) +- #15: Added increment methods on versions (thanks @mh-cbon) + +### Fixed + +- Issue #21: Per the SemVer spec (section 9) a pre-release is unstable and + might not satisfy the intended compatibility. The change here ignores pre-releases + on constraint checks (e.g., ~ or ^) when a pre-release is not part of the + constraint. For example, `^1.2.3` will ignore pre-releases while + `^1.2.3-alpha` will include them. + +## Release 1.1.1 (2016-06-30) + +### Changed + +- Issue #9: Speed up version comparison performance (thanks @sdboyer) +- Issue #8: Added benchmarks (thanks @sdboyer) +- Updated Go Report Card URL to new location +- Updated Readme to add code snippet formatting (thanks @mh-cbon) +- Updating tagging to v[SemVer] structure for compatibility with other tools. + +## Release 1.1.0 (2016-03-11) + +- Issue #2: Implemented validation to provide reasons a versions failed a + constraint. + +## Release 1.0.1 (2015-12-31) + +- Fixed #1: * constraint failing on valid versions. + +## Release 1.0.0 (2015-10-20) + +- Initial release diff --git a/vendor/github.com/Masterminds/semver/v3/LICENSE.txt b/vendor/github.com/Masterminds/semver/v3/LICENSE.txt new file mode 100644 index 000000000..9ff7da9c4 --- /dev/null +++ b/vendor/github.com/Masterminds/semver/v3/LICENSE.txt @@ -0,0 +1,19 @@ +Copyright (C) 2014-2019, Matt Butcher and Matt Farina + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/github.com/Masterminds/semver/v3/Makefile b/vendor/github.com/Masterminds/semver/v3/Makefile new file mode 100644 index 000000000..eac19178f --- /dev/null +++ b/vendor/github.com/Masterminds/semver/v3/Makefile @@ -0,0 +1,37 @@ +GOPATH=$(shell go env GOPATH) +GOLANGCI_LINT=$(GOPATH)/bin/golangci-lint +GOFUZZBUILD = $(GOPATH)/bin/go-fuzz-build +GOFUZZ = $(GOPATH)/bin/go-fuzz + +.PHONY: lint +lint: $(GOLANGCI_LINT) + @echo "==> Linting codebase" + @$(GOLANGCI_LINT) run + +.PHONY: test +test: + @echo "==> Running tests" + GO111MODULE=on go test -v + +.PHONY: test-cover +test-cover: + @echo "==> Running Tests with coverage" + GO111MODULE=on go test -cover . + +.PHONY: fuzz +fuzz: $(GOFUZZBUILD) $(GOFUZZ) + @echo "==> Fuzz testing" + $(GOFUZZBUILD) + $(GOFUZZ) -workdir=_fuzz + +$(GOLANGCI_LINT): + # Install golangci-lint. The configuration for it is in the .golangci.yml + # file in the root of the repository + echo ${GOPATH} + curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(GOPATH)/bin v1.17.1 + +$(GOFUZZBUILD): + cd / && go get -u github.com/dvyukov/go-fuzz/go-fuzz-build + +$(GOFUZZ): + cd / && go get -u github.com/dvyukov/go-fuzz/go-fuzz github.com/dvyukov/go-fuzz/go-fuzz-dep \ No newline at end of file diff --git a/vendor/github.com/Masterminds/semver/v3/README.md b/vendor/github.com/Masterminds/semver/v3/README.md new file mode 100644 index 000000000..f1d0ac48e --- /dev/null +++ b/vendor/github.com/Masterminds/semver/v3/README.md @@ -0,0 +1,242 @@ +# SemVer + +The `semver` package provides the ability to work with [Semantic Versions](http://semver.org) in Go. Specifically it provides the ability to: + +* Parse semantic versions +* Sort semantic versions +* Check if a semantic version fits within a set of constraints +* Optionally work with a `v` prefix + +[![Stability: +Active](https://masterminds.github.io/stability/active.svg)](https://masterminds.github.io/stability/active.html) +[![Build Status](https://travis-ci.org/Masterminds/semver.svg)](https://travis-ci.org/Masterminds/semver) [![Build status](https://ci.appveyor.com/api/projects/status/jfk66lib7hb985k8/branch/master?svg=true&passingText=windows%20build%20passing&failingText=windows%20build%20failing)](https://ci.appveyor.com/project/mattfarina/semver/branch/master) [![GoDoc](https://godoc.org/github.com/Masterminds/semver?status.svg)](https://godoc.org/github.com/Masterminds/semver) [![Go Report Card](https://goreportcard.com/badge/github.com/Masterminds/semver)](https://goreportcard.com/report/github.com/Masterminds/semver) + +If you are looking for a command line tool for version comparisons please see +[vert](https://github.com/Masterminds/vert) which uses this library. + +## Package Versions + +There are three major versions fo the `semver` package. + +* 3.x.x is the new stable and active version. This version is focused on constraint + compatibility for range handling in other tools from other languages. It has + a similar API to the v1 releases. The development of this version is on the master + branch. The documentation for this version is below. +* 2.x was developed primarily for [dep](https://github.com/golang/dep). There are + no tagged releases and the development was performed by [@sdboyer](https://github.com/sdboyer). + There are API breaking changes from v1. This version lives on the [2.x branch](https://github.com/Masterminds/semver/tree/2.x). +* 1.x.x is the most widely used version with numerous tagged releases. This is the + previous stable and is still maintained for bug fixes. The development, to fix + bugs, occurs on the release-1 branch. You can read the documentation [here](https://github.com/Masterminds/semver/blob/release-1/README.md). + +## Parsing Semantic Versions + +There are two functions that can parse semantic versions. The `StrictNewVersion` +function only parses valid version 2 semantic versions as outlined in the +specification. The `NewVersion` function attempts to coerce a version into a +semantic version and parse it. For example, if there is a leading v or a version +listed without all 3 parts (e.g. `v1.2`) it will attempt to coerce it into a valid +semantic version (e.g., 1.2.0). In both cases a `Version` object is returned +that can be sorted, compared, and used in constraints. + +When parsing a version an error is returned if there is an issue parsing the +version. For example, + + v, err := semver.NewVersion("1.2.3-beta.1+build345") + +The version object has methods to get the parts of the version, compare it to +other versions, convert the version back into a string, and get the original +string. Getting the original string is useful if the semantic version was coerced +into a valid form. + +## Sorting Semantic Versions + +A set of versions can be sorted using the `sort` package from the standard library. +For example, + +```go +raw := []string{"1.2.3", "1.0", "1.3", "2", "0.4.2",} +vs := make([]*semver.Version, len(raw)) +for i, r := range raw { + v, err := semver.NewVersion(r) + if err != nil { + t.Errorf("Error parsing version: %s", err) + } + + vs[i] = v +} + +sort.Sort(semver.Collection(vs)) +``` + +## Checking Version Constraints + +There are two methods for comparing versions. One uses comparison methods on +`Version` instances and the other uses `Constraints`. There are some important +differences to notes between these two methods of comparison. + +1. When two versions are compared using functions such as `Compare`, `LessThan`, + and others it will follow the specification and always include prereleases + within the comparison. It will provide an answer that is valid with the + comparison section of the spec at https://semver.org/#spec-item-11 +2. When constraint checking is used for checks or validation it will follow a + different set of rules that are common for ranges with tools like npm/js + and Rust/Cargo. This includes considering prereleases to be invalid if the + ranges does not include one. If you want to have it include pre-releases a + simple solution is to include `-0` in your range. +3. Constraint ranges can have some complex rules including the shorthand use of + ~ and ^. For more details on those see the options below. + +There are differences between the two methods or checking versions because the +comparison methods on `Version` follow the specification while comparison ranges +are not part of the specification. Different packages and tools have taken it +upon themselves to come up with range rules. This has resulted in differences. +For example, npm/js and Cargo/Rust follow similar patterns while PHP has a +different pattern for ^. The comparison features in this package follow the +npm/js and Cargo/Rust lead because applications using it have followed similar +patters with their versions. + +Checking a version against version constraints is one of the most featureful +parts of the package. + +```go +c, err := semver.NewConstraint(">= 1.2.3") +if err != nil { + // Handle constraint not being parsable. +} + +v, err := semver.NewVersion("1.3") +if err != nil { + // Handle version not being parsable. +} +// Check if the version meets the constraints. The a variable will be true. +a := c.Check(v) +``` + +### Basic Comparisons + +There are two elements to the comparisons. First, a comparison string is a list +of space or comma separated AND comparisons. These are then separated by || (OR) +comparisons. For example, `">= 1.2 < 3.0.0 || >= 4.2.3"` is looking for a +comparison that's greater than or equal to 1.2 and less than 3.0.0 or is +greater than or equal to 4.2.3. + +The basic comparisons are: + +* `=`: equal (aliased to no operator) +* `!=`: not equal +* `>`: greater than +* `<`: less than +* `>=`: greater than or equal to +* `<=`: less than or equal to + +### Working With Prerelease Versions + +Pre-releases, for those not familiar with them, are used for software releases +prior to stable or generally available releases. Examples of prereleases include +development, alpha, beta, and release candidate releases. A prerelease may be +a version such as `1.2.3-beta.1` while the stable release would be `1.2.3`. In the +order of precedence, prereleases come before their associated releases. In this +example `1.2.3-beta.1 < 1.2.3`. + +According to the Semantic Version specification prereleases may not be +API compliant with their release counterpart. It says, + +> A pre-release version indicates that the version is unstable and might not satisfy the intended compatibility requirements as denoted by its associated normal version. + +SemVer comparisons using constraints without a prerelease comparator will skip +prerelease versions. For example, `>=1.2.3` will skip prereleases when looking +at a list of releases while `>=1.2.3-0` will evaluate and find prereleases. + +The reason for the `0` as a pre-release version in the example comparison is +because pre-releases can only contain ASCII alphanumerics and hyphens (along with +`.` separators), per the spec. Sorting happens in ASCII sort order, again per the +spec. The lowest character is a `0` in ASCII sort order +(see an [ASCII Table](http://www.asciitable.com/)) + +Understanding ASCII sort ordering is important because A-Z comes before a-z. That +means `>=1.2.3-BETA` will return `1.2.3-alpha`. What you might expect from case +sensitivity doesn't apply here. This is due to ASCII sort ordering which is what +the spec specifies. + +### Hyphen Range Comparisons + +There are multiple methods to handle ranges and the first is hyphens ranges. +These look like: + +* `1.2 - 1.4.5` which is equivalent to `>= 1.2 <= 1.4.5` +* `2.3.4 - 4.5` which is equivalent to `>= 2.3.4 <= 4.5` + +### Wildcards In Comparisons + +The `x`, `X`, and `*` characters can be used as a wildcard character. This works +for all comparison operators. When used on the `=` operator it falls +back to the patch level comparison (see tilde below). For example, + +* `1.2.x` is equivalent to `>= 1.2.0, < 1.3.0` +* `>= 1.2.x` is equivalent to `>= 1.2.0` +* `<= 2.x` is equivalent to `< 3` +* `*` is equivalent to `>= 0.0.0` + +### Tilde Range Comparisons (Patch) + +The tilde (`~`) comparison operator is for patch level ranges when a minor +version is specified and major level changes when the minor number is missing. +For example, + +* `~1.2.3` is equivalent to `>= 1.2.3, < 1.3.0` +* `~1` is equivalent to `>= 1, < 2` +* `~2.3` is equivalent to `>= 2.3, < 2.4` +* `~1.2.x` is equivalent to `>= 1.2.0, < 1.3.0` +* `~1.x` is equivalent to `>= 1, < 2` + +### Caret Range Comparisons (Major) + +The caret (`^`) comparison operator is for major level changes once a stable +(1.0.0) release has occurred. Prior to a 1.0.0 release the minor versions acts +as the API stability level. This is useful when comparisons of API versions as a +major change is API breaking. For example, + +* `^1.2.3` is equivalent to `>= 1.2.3, < 2.0.0` +* `^1.2.x` is equivalent to `>= 1.2.0, < 2.0.0` +* `^2.3` is equivalent to `>= 2.3, < 3` +* `^2.x` is equivalent to `>= 2.0.0, < 3` +* `^0.2.3` is equivalent to `>=0.2.3 <0.3.0` +* `^0.2` is equivalent to `>=0.2.0 <0.3.0` +* `^0.0.3` is equivalent to `>=0.0.3 <0.0.4` +* `^0.0` is equivalent to `>=0.0.0 <0.1.0` +* `^0` is equivalent to `>=0.0.0 <1.0.0` + +## Validation + +In addition to testing a version against a constraint, a version can be validated +against a constraint. When validation fails a slice of errors containing why a +version didn't meet the constraint is returned. For example, + +```go +c, err := semver.NewConstraint("<= 1.2.3, >= 1.4") +if err != nil { + // Handle constraint not being parseable. +} + +v, _ := semver.NewVersion("1.3") +if err != nil { + // Handle version not being parseable. +} + +// Validate a version against a constraint. +a, msgs := c.Validate(v) +// a is false +for _, m := range msgs { + fmt.Println(m) + + // Loops over the errors which would read + // "1.3 is greater than 1.2.3" + // "1.3 is less than 1.4" +} +``` + +## Contribute + +If you find an issue or want to contribute please file an [issue](https://github.com/Masterminds/semver/issues) +or [create a pull request](https://github.com/Masterminds/semver/pulls). diff --git a/vendor/github.com/Masterminds/semver/v3/appveyor.yml b/vendor/github.com/Masterminds/semver/v3/appveyor.yml new file mode 100644 index 000000000..5ffa48732 --- /dev/null +++ b/vendor/github.com/Masterminds/semver/v3/appveyor.yml @@ -0,0 +1,17 @@ +version: build-{build}.{branch} + +shallow_clone: true + +environment: + GOPATH: C:\gopath + +platform: + - x64 + +build_script: + - go install -v ./... + +test_script: + - go test -v + +deploy: off diff --git a/vendor/github.com/Masterminds/semver/v3/collection.go b/vendor/github.com/Masterminds/semver/v3/collection.go new file mode 100644 index 000000000..a78235895 --- /dev/null +++ b/vendor/github.com/Masterminds/semver/v3/collection.go @@ -0,0 +1,24 @@ +package semver + +// Collection is a collection of Version instances and implements the sort +// interface. See the sort package for more details. +// https://golang.org/pkg/sort/ +type Collection []*Version + +// Len returns the length of a collection. The number of Version instances +// on the slice. +func (c Collection) Len() int { + return len(c) +} + +// Less is needed for the sort interface to compare two Version objects on the +// slice. If checks if one is less than the other. +func (c Collection) Less(i, j int) bool { + return c[i].LessThan(c[j]) +} + +// Swap is needed for the sort interface to replace the Version objects +// at two different positions in the slice. +func (c Collection) Swap(i, j int) { + c[i], c[j] = c[j], c[i] +} diff --git a/vendor/github.com/Masterminds/semver/v3/constraints.go b/vendor/github.com/Masterminds/semver/v3/constraints.go new file mode 100644 index 000000000..548e84389 --- /dev/null +++ b/vendor/github.com/Masterminds/semver/v3/constraints.go @@ -0,0 +1,527 @@ +package semver + +import ( + "bytes" + "errors" + "fmt" + "regexp" + "strings" +) + +// Constraints is one or more constraint that a semantic version can be +// checked against. +type Constraints struct { + constraints [][]*constraint +} + +// NewConstraint returns a Constraints instance that a Version instance can +// be checked against. If there is a parse error it will be returned. +func NewConstraint(c string) (*Constraints, error) { + + // Rewrite - ranges into a comparison operation. + c = rewriteRange(c) + + ors := strings.Split(c, "||") + or := make([][]*constraint, len(ors)) + for k, v := range ors { + + // TODO: Find a way to validate and fetch all the constraints in a simpler form + + // Validate the segment + if !validConstraintRegex.MatchString(v) { + return nil, fmt.Errorf("improper constraint: %s", v) + } + + cs := findConstraintRegex.FindAllString(v, -1) + if cs == nil { + cs = append(cs, v) + } + result := make([]*constraint, len(cs)) + for i, s := range cs { + pc, err := parseConstraint(s) + if err != nil { + return nil, err + } + + result[i] = pc + } + or[k] = result + } + + o := &Constraints{constraints: or} + return o, nil +} + +// Check tests if a version satisfies the constraints. +func (cs Constraints) Check(v *Version) bool { + // loop over the ORs and check the inner ANDs + for _, o := range cs.constraints { + joy := true + for _, c := range o { + if !c.check(v) { + joy = false + break + } + } + + if joy { + return true + } + } + + return false +} + +// Validate checks if a version satisfies a constraint. If not a slice of +// reasons for the failure are returned in addition to a bool. +func (cs Constraints) Validate(v *Version) (bool, []error) { + // loop over the ORs and check the inner ANDs + var e []error + + // Capture the prerelease message only once. When it happens the first time + // this var is marked + var prerelesase bool + for _, o := range cs.constraints { + joy := true + for _, c := range o { + // Before running the check handle the case there the version is + // a prerelease and the check is not searching for prereleases. + if c.con.pre == "" && v.pre != "" { + if !prerelesase { + em := fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v) + e = append(e, em) + prerelesase = true + } + joy = false + + } else { + + if !c.check(v) { + em := fmt.Errorf(constraintMsg[c.origfunc], v, c.orig) + e = append(e, em) + joy = false + } + } + } + + if joy { + return true, []error{} + } + } + + return false, e +} + +func (cs Constraints) String() string { + buf := make([]string, len(cs.constraints)) + var tmp bytes.Buffer + + for k, v := range cs.constraints { + tmp.Reset() + vlen := len(v) + for kk, c := range v { + tmp.WriteString(c.string()) + + // Space separate the AND conditions + if vlen > 1 && kk < vlen-1 { + tmp.WriteString(" ") + } + } + buf[k] = tmp.String() + } + + return strings.Join(buf, " || ") +} + +var constraintOps map[string]cfunc +var constraintMsg map[string]string +var constraintRegex *regexp.Regexp +var constraintRangeRegex *regexp.Regexp + +// Used to find individual constraints within a multi-constraint string +var findConstraintRegex *regexp.Regexp + +// Used to validate an segment of ANDs is valid +var validConstraintRegex *regexp.Regexp + +const cvRegex string = `v?([0-9|x|X|\*]+)(\.[0-9|x|X|\*]+)?(\.[0-9|x|X|\*]+)?` + + `(-([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?` + + `(\+([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?` + +func init() { + constraintOps = map[string]cfunc{ + "": constraintTildeOrEqual, + "=": constraintTildeOrEqual, + "!=": constraintNotEqual, + ">": constraintGreaterThan, + "<": constraintLessThan, + ">=": constraintGreaterThanEqual, + "=>": constraintGreaterThanEqual, + "<=": constraintLessThanEqual, + "=<": constraintLessThanEqual, + "~": constraintTilde, + "~>": constraintTilde, + "^": constraintCaret, + } + + constraintMsg = map[string]string{ + "": "%s is not equal to %s", + "=": "%s is not equal to %s", + "!=": "%s is equal to %s", + ">": "%s is less than or equal to %s", + "<": "%s is greater than or equal to %s", + ">=": "%s is less than %s", + "=>": "%s is less than %s", + "<=": "%s is greater than %s", + "=<": "%s is greater than %s", + "~": "%s does not have same major and minor version as %s", + "~>": "%s does not have same major and minor version as %s", + "^": "%s does not have same major version as %s", + } + + ops := make([]string, 0, len(constraintOps)) + for k := range constraintOps { + ops = append(ops, regexp.QuoteMeta(k)) + } + + constraintRegex = regexp.MustCompile(fmt.Sprintf( + `^\s*(%s)\s*(%s)\s*$`, + strings.Join(ops, "|"), + cvRegex)) + + constraintRangeRegex = regexp.MustCompile(fmt.Sprintf( + `\s*(%s)\s+-\s+(%s)\s*`, + cvRegex, cvRegex)) + + findConstraintRegex = regexp.MustCompile(fmt.Sprintf( + `(%s)\s*(%s)`, + strings.Join(ops, "|"), + cvRegex)) + + validConstraintRegex = regexp.MustCompile(fmt.Sprintf( + `^(\s*(%s)\s*(%s)\s*\,?)+$`, + strings.Join(ops, "|"), + cvRegex)) +} + +// An individual constraint +type constraint struct { + // The version used in the constraint check. For example, if a constraint + // is '<= 2.0.0' the con a version instance representing 2.0.0. + con *Version + + // The original parsed version (e.g., 4.x from != 4.x) + orig string + + // The original operator for the constraint + origfunc string + + // When an x is used as part of the version (e.g., 1.x) + minorDirty bool + dirty bool + patchDirty bool +} + +// Check if a version meets the constraint +func (c *constraint) check(v *Version) bool { + return constraintOps[c.origfunc](v, c) +} + +// String prints an individual constraint into a string +func (c *constraint) string() string { + return c.origfunc + c.orig +} + +type cfunc func(v *Version, c *constraint) bool + +func parseConstraint(c string) (*constraint, error) { + if len(c) > 0 { + m := constraintRegex.FindStringSubmatch(c) + if m == nil { + return nil, fmt.Errorf("improper constraint: %s", c) + } + + cs := &constraint{ + orig: m[2], + origfunc: m[1], + } + + ver := m[2] + minorDirty := false + patchDirty := false + dirty := false + if isX(m[3]) || m[3] == "" { + ver = "0.0.0" + dirty = true + } else if isX(strings.TrimPrefix(m[4], ".")) || m[4] == "" { + minorDirty = true + dirty = true + ver = fmt.Sprintf("%s.0.0%s", m[3], m[6]) + } else if isX(strings.TrimPrefix(m[5], ".")) || m[5] == "" { + dirty = true + patchDirty = true + ver = fmt.Sprintf("%s%s.0%s", m[3], m[4], m[6]) + } + + con, err := NewVersion(ver) + if err != nil { + + // The constraintRegex should catch any regex parsing errors. So, + // we should never get here. + return nil, errors.New("constraint Parser Error") + } + + cs.con = con + cs.minorDirty = minorDirty + cs.patchDirty = patchDirty + cs.dirty = dirty + + return cs, nil + } + + // The rest is the special case where an empty string was passed in which + // is equivalent to * or >=0.0.0 + con, err := StrictNewVersion("0.0.0") + if err != nil { + + // The constraintRegex should catch any regex parsing errors. So, + // we should never get here. + return nil, errors.New("constraint Parser Error") + } + + cs := &constraint{ + con: con, + orig: c, + origfunc: "", + minorDirty: false, + patchDirty: false, + dirty: true, + } + return cs, nil +} + +// Constraint functions +func constraintNotEqual(v *Version, c *constraint) bool { + if c.dirty { + + // If there is a pre-release on the version but the constraint isn't looking + // for them assume that pre-releases are not compatible. See issue 21 for + // more details. + if v.Prerelease() != "" && c.con.Prerelease() == "" { + return false + } + + if c.con.Major() != v.Major() { + return true + } + if c.con.Minor() != v.Minor() && !c.minorDirty { + return true + } else if c.minorDirty { + return false + } else if c.con.Patch() != v.Patch() && !c.patchDirty { + return true + } else if c.patchDirty { + // Need to handle prereleases if present + if v.Prerelease() != "" || c.con.Prerelease() != "" { + return comparePrerelease(v.Prerelease(), c.con.Prerelease()) != 0 + } + return false + } + } + + return !v.Equal(c.con) +} + +func constraintGreaterThan(v *Version, c *constraint) bool { + + // If there is a pre-release on the version but the constraint isn't looking + // for them assume that pre-releases are not compatible. See issue 21 for + // more details. + if v.Prerelease() != "" && c.con.Prerelease() == "" { + return false + } + + if !c.dirty { + return v.Compare(c.con) == 1 + } + + if v.Major() > c.con.Major() { + return true + } else if v.Major() < c.con.Major() { + return false + } else if c.minorDirty { + // This is a range case such as >11. When the version is something like + // 11.1.0 is it not > 11. For that we would need 12 or higher + return false + } else if c.patchDirty { + // This is for ranges such as >11.1. A version of 11.1.1 is not greater + // which one of 11.2.1 is greater + return v.Minor() > c.con.Minor() + } + + // If we have gotten here we are not comparing pre-preleases and can use the + // Compare function to accomplish that. + return v.Compare(c.con) == 1 +} + +func constraintLessThan(v *Version, c *constraint) bool { + // If there is a pre-release on the version but the constraint isn't looking + // for them assume that pre-releases are not compatible. See issue 21 for + // more details. + if v.Prerelease() != "" && c.con.Prerelease() == "" { + return false + } + + return v.Compare(c.con) < 0 +} + +func constraintGreaterThanEqual(v *Version, c *constraint) bool { + + // If there is a pre-release on the version but the constraint isn't looking + // for them assume that pre-releases are not compatible. See issue 21 for + // more details. + if v.Prerelease() != "" && c.con.Prerelease() == "" { + return false + } + + return v.Compare(c.con) >= 0 +} + +func constraintLessThanEqual(v *Version, c *constraint) bool { + // If there is a pre-release on the version but the constraint isn't looking + // for them assume that pre-releases are not compatible. See issue 21 for + // more details. + if v.Prerelease() != "" && c.con.Prerelease() == "" { + return false + } + + if !c.dirty { + return v.Compare(c.con) <= 0 + } + + if v.Major() > c.con.Major() { + return false + } else if v.Minor() > c.con.Minor() && !c.minorDirty { + return false + } + + return true +} + +// ~*, ~>* --> >= 0.0.0 (any) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0, <3.0.0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0, <2.1.0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0, <1.3.0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3, <1.3.0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0, <1.3.0 +func constraintTilde(v *Version, c *constraint) bool { + // If there is a pre-release on the version but the constraint isn't looking + // for them assume that pre-releases are not compatible. See issue 21 for + // more details. + if v.Prerelease() != "" && c.con.Prerelease() == "" { + return false + } + + if v.LessThan(c.con) { + return false + } + + // ~0.0.0 is a special case where all constraints are accepted. It's + // equivalent to >= 0.0.0. + if c.con.Major() == 0 && c.con.Minor() == 0 && c.con.Patch() == 0 && + !c.minorDirty && !c.patchDirty { + return true + } + + if v.Major() != c.con.Major() { + return false + } + + if v.Minor() != c.con.Minor() && !c.minorDirty { + return false + } + + return true +} + +// When there is a .x (dirty) status it automatically opts in to ~. Otherwise +// it's a straight = +func constraintTildeOrEqual(v *Version, c *constraint) bool { + // If there is a pre-release on the version but the constraint isn't looking + // for them assume that pre-releases are not compatible. See issue 21 for + // more details. + if v.Prerelease() != "" && c.con.Prerelease() == "" { + return false + } + + if c.dirty { + return constraintTilde(v, c) + } + + return v.Equal(c.con) +} + +// ^* --> (any) +// ^1.2.3 --> >=1.2.3 <2.0.0 +// ^1.2 --> >=1.2.0 <2.0.0 +// ^1 --> >=1.0.0 <2.0.0 +// ^0.2.3 --> >=0.2.3 <0.3.0 +// ^0.2 --> >=0.2.0 <0.3.0 +// ^0.0.3 --> >=0.0.3 <0.0.4 +// ^0.0 --> >=0.0.0 <0.1.0 +// ^0 --> >=0.0.0 <1.0.0 +func constraintCaret(v *Version, c *constraint) bool { + // If there is a pre-release on the version but the constraint isn't looking + // for them assume that pre-releases are not compatible. See issue 21 for + // more details. + if v.Prerelease() != "" && c.con.Prerelease() == "" { + return false + } + + // This less than handles prereleases + if v.LessThan(c.con) { + return false + } + + // ^ when the major > 0 is >=x.y.z < x+1 + if c.con.Major() > 0 || c.minorDirty { + + // ^ has to be within a major range for > 0. Everything less than was + // filtered out with the LessThan call above. This filters out those + // that greater but not within the same major range. + return v.Major() == c.con.Major() + } + + // ^ when the major is 0 and minor > 0 is >=0.y.z < 0.y+1 + // If the con Minor is > 0 it is not dirty + if c.con.Minor() > 0 || c.patchDirty { + return v.Minor() == c.con.Minor() + } + + // At this point the major is 0 and the minor is 0 and not dirty. The patch + // is not dirty so we need to check if they are equal. If they are not equal + return c.con.Patch() == v.Patch() +} + +func isX(x string) bool { + switch x { + case "x", "*", "X": + return true + default: + return false + } +} + +func rewriteRange(i string) string { + m := constraintRangeRegex.FindAllStringSubmatch(i, -1) + if m == nil { + return i + } + o := i + for _, v := range m { + t := fmt.Sprintf(">= %s, <= %s", v[1], v[11]) + o = strings.Replace(o, v[0], t, 1) + } + + return o +} diff --git a/vendor/github.com/Masterminds/semver/v3/doc.go b/vendor/github.com/Masterminds/semver/v3/doc.go new file mode 100644 index 000000000..34d78f220 --- /dev/null +++ b/vendor/github.com/Masterminds/semver/v3/doc.go @@ -0,0 +1,184 @@ +/* +Package semver provides the ability to work with Semantic Versions (http://semver.org) in Go. + +Specifically it provides the ability to: + + * Parse semantic versions + * Sort semantic versions + * Check if a semantic version fits within a set of constraints + * Optionally work with a `v` prefix + +Parsing Semantic Versions + +There are two functions that can parse semantic versions. The `StrictNewVersion` +function only parses valid version 2 semantic versions as outlined in the +specification. The `NewVersion` function attempts to coerce a version into a +semantic version and parse it. For example, if there is a leading v or a version +listed without all 3 parts (e.g. 1.2) it will attempt to coerce it into a valid +semantic version (e.g., 1.2.0). In both cases a `Version` object is returned +that can be sorted, compared, and used in constraints. + +When parsing a version an optional error can be returned if there is an issue +parsing the version. For example, + + v, err := semver.NewVersion("1.2.3-beta.1+build345") + +The version object has methods to get the parts of the version, compare it to +other versions, convert the version back into a string, and get the original +string. For more details please see the documentation +at https://godoc.org/github.com/Masterminds/semver. + +Sorting Semantic Versions + +A set of versions can be sorted using the `sort` package from the standard library. +For example, + + raw := []string{"1.2.3", "1.0", "1.3", "2", "0.4.2",} + vs := make([]*semver.Version, len(raw)) + for i, r := range raw { + v, err := semver.NewVersion(r) + if err != nil { + t.Errorf("Error parsing version: %s", err) + } + + vs[i] = v + } + + sort.Sort(semver.Collection(vs)) + +Checking Version Constraints and Comparing Versions + +There are two methods for comparing versions. One uses comparison methods on +`Version` instances and the other is using Constraints. There are some important +differences to notes between these two methods of comparison. + +1. When two versions are compared using functions such as `Compare`, `LessThan`, + and others it will follow the specification and always include prereleases + within the comparison. It will provide an answer valid with the comparison + spec section at https://semver.org/#spec-item-11 +2. When constraint checking is used for checks or validation it will follow a + different set of rules that are common for ranges with tools like npm/js + and Rust/Cargo. This includes considering prereleases to be invalid if the + ranges does not include on. If you want to have it include pre-releases a + simple solution is to include `-0` in your range. +3. Constraint ranges can have some complex rules including the shorthard use of + ~ and ^. For more details on those see the options below. + +There are differences between the two methods or checking versions because the +comparison methods on `Version` follow the specification while comparison ranges +are not part of the specification. Different packages and tools have taken it +upon themselves to come up with range rules. This has resulted in differences. +For example, npm/js and Cargo/Rust follow similar patterns which PHP has a +different pattern for ^. The comparison features in this package follow the +npm/js and Cargo/Rust lead because applications using it have followed similar +patters with their versions. + +Checking a version against version constraints is one of the most featureful +parts of the package. + + c, err := semver.NewConstraint(">= 1.2.3") + if err != nil { + // Handle constraint not being parsable. + } + + v, err := semver.NewVersion("1.3") + if err != nil { + // Handle version not being parsable. + } + // Check if the version meets the constraints. The a variable will be true. + a := c.Check(v) + +Basic Comparisons + +There are two elements to the comparisons. First, a comparison string is a list +of comma or space separated AND comparisons. These are then separated by || (OR) +comparisons. For example, `">= 1.2 < 3.0.0 || >= 4.2.3"` is looking for a +comparison that's greater than or equal to 1.2 and less than 3.0.0 or is +greater than or equal to 4.2.3. This can also be written as +`">= 1.2, < 3.0.0 || >= 4.2.3"` + +The basic comparisons are: + + * `=`: equal (aliased to no operator) + * `!=`: not equal + * `>`: greater than + * `<`: less than + * `>=`: greater than or equal to + * `<=`: less than or equal to + +Hyphen Range Comparisons + +There are multiple methods to handle ranges and the first is hyphens ranges. +These look like: + + * `1.2 - 1.4.5` which is equivalent to `>= 1.2, <= 1.4.5` + * `2.3.4 - 4.5` which is equivalent to `>= 2.3.4 <= 4.5` + +Wildcards In Comparisons + +The `x`, `X`, and `*` characters can be used as a wildcard character. This works +for all comparison operators. When used on the `=` operator it falls +back to the tilde operation. For example, + + * `1.2.x` is equivalent to `>= 1.2.0 < 1.3.0` + * `>= 1.2.x` is equivalent to `>= 1.2.0` + * `<= 2.x` is equivalent to `<= 3` + * `*` is equivalent to `>= 0.0.0` + +Tilde Range Comparisons (Patch) + +The tilde (`~`) comparison operator is for patch level ranges when a minor +version is specified and major level changes when the minor number is missing. +For example, + + * `~1.2.3` is equivalent to `>= 1.2.3 < 1.3.0` + * `~1` is equivalent to `>= 1, < 2` + * `~2.3` is equivalent to `>= 2.3 < 2.4` + * `~1.2.x` is equivalent to `>= 1.2.0 < 1.3.0` + * `~1.x` is equivalent to `>= 1 < 2` + +Caret Range Comparisons (Major) + +The caret (`^`) comparison operator is for major level changes once a stable +(1.0.0) release has occurred. Prior to a 1.0.0 release the minor versions acts +as the API stability level. This is useful when comparisons of API versions as a +major change is API breaking. For example, + + * `^1.2.3` is equivalent to `>= 1.2.3, < 2.0.0` + * `^1.2.x` is equivalent to `>= 1.2.0, < 2.0.0` + * `^2.3` is equivalent to `>= 2.3, < 3` + * `^2.x` is equivalent to `>= 2.0.0, < 3` + * `^0.2.3` is equivalent to `>=0.2.3 <0.3.0` + * `^0.2` is equivalent to `>=0.2.0 <0.3.0` + * `^0.0.3` is equivalent to `>=0.0.3 <0.0.4` + * `^0.0` is equivalent to `>=0.0.0 <0.1.0` + * `^0` is equivalent to `>=0.0.0 <1.0.0` + +Validation + +In addition to testing a version against a constraint, a version can be validated +against a constraint. When validation fails a slice of errors containing why a +version didn't meet the constraint is returned. For example, + + c, err := semver.NewConstraint("<= 1.2.3, >= 1.4") + if err != nil { + // Handle constraint not being parseable. + } + + v, _ := semver.NewVersion("1.3") + if err != nil { + // Handle version not being parseable. + } + + // Validate a version against a constraint. + a, msgs := c.Validate(v) + // a is false + for _, m := range msgs { + fmt.Println(m) + + // Loops over the errors which would read + // "1.3 is greater than 1.2.3" + // "1.3 is less than 1.4" + } +*/ +package semver diff --git a/vendor/github.com/Masterminds/semver/v3/fuzz.go b/vendor/github.com/Masterminds/semver/v3/fuzz.go new file mode 100644 index 000000000..a242ad705 --- /dev/null +++ b/vendor/github.com/Masterminds/semver/v3/fuzz.go @@ -0,0 +1,22 @@ +// +build gofuzz + +package semver + +func Fuzz(data []byte) int { + d := string(data) + + // Test NewVersion + _, _ = NewVersion(d) + + // Test StrictNewVersion + _, _ = StrictNewVersion(d) + + // Test NewConstraint + _, _ = NewConstraint(d) + + // The return value should be 0 normally, 1 if the priority in future tests + // should be increased, and -1 if future tests should skip passing in that + // data. We do not have a reason to change priority so 0 is always returned. + // There are example tests that do this. + return 0 +} diff --git a/vendor/github.com/Masterminds/semver/v3/go.mod b/vendor/github.com/Masterminds/semver/v3/go.mod new file mode 100644 index 000000000..658233c8f --- /dev/null +++ b/vendor/github.com/Masterminds/semver/v3/go.mod @@ -0,0 +1,3 @@ +module github.com/Masterminds/semver/v3 + +go 1.12 diff --git a/vendor/github.com/Masterminds/semver/v3/version.go b/vendor/github.com/Masterminds/semver/v3/version.go new file mode 100644 index 000000000..1bb95f263 --- /dev/null +++ b/vendor/github.com/Masterminds/semver/v3/version.go @@ -0,0 +1,583 @@ +package semver + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "regexp" + "strconv" + "strings" +) + +// The compiled version of the regex created at init() is cached here so it +// only needs to be created once. +var versionRegex *regexp.Regexp + +var ( + // ErrInvalidSemVer is returned a version is found to be invalid when + // being parsed. + ErrInvalidSemVer = errors.New("Invalid Semantic Version") + + // ErrEmptyString is returned when an empty string is passed in for parsing. + ErrEmptyString = errors.New("Version string empty") + + // ErrInvalidCharacters is returned when invalid characters are found as + // part of a version + ErrInvalidCharacters = errors.New("Invalid characters in version") + + // ErrSegmentStartsZero is returned when a version segment starts with 0. + // This is invalid in SemVer. + ErrSegmentStartsZero = errors.New("Version segment starts with 0") + + // ErrInvalidMetadata is returned when the metadata is an invalid format + ErrInvalidMetadata = errors.New("Invalid Metadata string") + + // ErrInvalidPrerelease is returned when the pre-release is an invalid format + ErrInvalidPrerelease = errors.New("Invalid Prerelease string") +) + +// semVerRegex is the regular expression used to parse a semantic version. +const semVerRegex string = `v?([0-9]+)(\.[0-9]+)?(\.[0-9]+)?` + + `(-([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?` + + `(\+([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?` + +// Version represents a single semantic version. +type Version struct { + major, minor, patch uint64 + pre string + metadata string + original string +} + +func init() { + versionRegex = regexp.MustCompile("^" + semVerRegex + "$") +} + +const num string = "0123456789" +const allowed string = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-" + num + +// StrictNewVersion parses a given version and returns an instance of Version or +// an error if unable to parse the version. Only parses valid semantic versions. +// Performs checking that can find errors within the version. +// If you want to coerce a version, such as 1 or 1.2, and perse that as the 1.x +// releases of semver provided use the NewSemver() function. +func StrictNewVersion(v string) (*Version, error) { + // Parsing here does not use RegEx in order to increase performance and reduce + // allocations. + + if len(v) == 0 { + return nil, ErrEmptyString + } + + // Split the parts into [0]major, [1]minor, and [2]patch,prerelease,build + parts := strings.SplitN(v, ".", 3) + if len(parts) != 3 { + return nil, ErrInvalidSemVer + } + + sv := &Version{ + original: v, + } + + // check for prerelease or build metadata + var extra []string + if strings.ContainsAny(parts[2], "-+") { + // Start with the build metadata first as it needs to be on the right + extra = strings.SplitN(parts[2], "+", 2) + if len(extra) > 1 { + // build metadata found + sv.metadata = extra[1] + parts[2] = extra[0] + } + + extra = strings.SplitN(parts[2], "-", 2) + if len(extra) > 1 { + // prerelease found + sv.pre = extra[1] + parts[2] = extra[0] + } + } + + // Validate the number segments are valid. This includes only having positive + // numbers and no leading 0's. + for _, p := range parts { + if !containsOnly(p, num) { + return nil, ErrInvalidCharacters + } + + if len(p) > 1 && p[0] == '0' { + return nil, ErrSegmentStartsZero + } + } + + // Extract the major, minor, and patch elements onto the returned Version + var err error + sv.major, err = strconv.ParseUint(parts[0], 10, 64) + if err != nil { + return nil, err + } + + sv.minor, err = strconv.ParseUint(parts[1], 10, 64) + if err != nil { + return nil, err + } + + sv.patch, err = strconv.ParseUint(parts[2], 10, 64) + if err != nil { + return nil, err + } + + // No prerelease or build metadata found so returning now as a fastpath. + if sv.pre == "" && sv.metadata == "" { + return sv, nil + } + + if sv.pre != "" { + if err = validatePrerelease(sv.pre); err != nil { + return nil, err + } + } + + if sv.metadata != "" { + if err = validateMetadata(sv.metadata); err != nil { + return nil, err + } + } + + return sv, nil +} + +// NewVersion parses a given version and returns an instance of Version or +// an error if unable to parse the version. If the version is SemVer-ish it +// attempts to convert it to SemVer. If you want to validate it was a strict +// semantic version at parse time see StrictNewVersion(). +func NewVersion(v string) (*Version, error) { + m := versionRegex.FindStringSubmatch(v) + if m == nil { + return nil, ErrInvalidSemVer + } + + sv := &Version{ + metadata: m[8], + pre: m[5], + original: v, + } + + var err error + sv.major, err = strconv.ParseUint(m[1], 10, 64) + if err != nil { + return nil, fmt.Errorf("Error parsing version segment: %s", err) + } + + if m[2] != "" { + sv.minor, err = strconv.ParseUint(strings.TrimPrefix(m[2], "."), 10, 64) + if err != nil { + return nil, fmt.Errorf("Error parsing version segment: %s", err) + } + } else { + sv.minor = 0 + } + + if m[3] != "" { + sv.patch, err = strconv.ParseUint(strings.TrimPrefix(m[3], "."), 10, 64) + if err != nil { + return nil, fmt.Errorf("Error parsing version segment: %s", err) + } + } else { + sv.patch = 0 + } + + // Perform some basic due diligence on the extra parts to ensure they are + // valid. + + if sv.pre != "" { + if err = validatePrerelease(sv.pre); err != nil { + return nil, err + } + } + + if sv.metadata != "" { + if err = validateMetadata(sv.metadata); err != nil { + return nil, err + } + } + + return sv, nil +} + +// MustParse parses a given version and panics on error. +func MustParse(v string) *Version { + sv, err := NewVersion(v) + if err != nil { + panic(err) + } + return sv +} + +// String converts a Version object to a string. +// Note, if the original version contained a leading v this version will not. +// See the Original() method to retrieve the original value. Semantic Versions +// don't contain a leading v per the spec. Instead it's optional on +// implementation. +func (v Version) String() string { + var buf bytes.Buffer + + fmt.Fprintf(&buf, "%d.%d.%d", v.major, v.minor, v.patch) + if v.pre != "" { + fmt.Fprintf(&buf, "-%s", v.pre) + } + if v.metadata != "" { + fmt.Fprintf(&buf, "+%s", v.metadata) + } + + return buf.String() +} + +// Original returns the original value passed in to be parsed. +func (v *Version) Original() string { + return v.original +} + +// Major returns the major version. +func (v Version) Major() uint64 { + return v.major +} + +// Minor returns the minor version. +func (v Version) Minor() uint64 { + return v.minor +} + +// Patch returns the patch version. +func (v Version) Patch() uint64 { + return v.patch +} + +// Prerelease returns the pre-release version. +func (v Version) Prerelease() string { + return v.pre +} + +// Metadata returns the metadata on the version. +func (v Version) Metadata() string { + return v.metadata +} + +// originalVPrefix returns the original 'v' prefix if any. +func (v Version) originalVPrefix() string { + + // Note, only lowercase v is supported as a prefix by the parser. + if v.original != "" && v.original[:1] == "v" { + return v.original[:1] + } + return "" +} + +// IncPatch produces the next patch version. +// If the current version does not have prerelease/metadata information, +// it unsets metadata and prerelease values, increments patch number. +// If the current version has any of prerelease or metadata information, +// it unsets both values and keeps current patch value +func (v Version) IncPatch() Version { + vNext := v + // according to http://semver.org/#spec-item-9 + // Pre-release versions have a lower precedence than the associated normal version. + // according to http://semver.org/#spec-item-10 + // Build metadata SHOULD be ignored when determining version precedence. + if v.pre != "" { + vNext.metadata = "" + vNext.pre = "" + } else { + vNext.metadata = "" + vNext.pre = "" + vNext.patch = v.patch + 1 + } + vNext.original = v.originalVPrefix() + "" + vNext.String() + return vNext +} + +// IncMinor produces the next minor version. +// Sets patch to 0. +// Increments minor number. +// Unsets metadata. +// Unsets prerelease status. +func (v Version) IncMinor() Version { + vNext := v + vNext.metadata = "" + vNext.pre = "" + vNext.patch = 0 + vNext.minor = v.minor + 1 + vNext.original = v.originalVPrefix() + "" + vNext.String() + return vNext +} + +// IncMajor produces the next major version. +// Sets patch to 0. +// Sets minor to 0. +// Increments major number. +// Unsets metadata. +// Unsets prerelease status. +func (v Version) IncMajor() Version { + vNext := v + vNext.metadata = "" + vNext.pre = "" + vNext.patch = 0 + vNext.minor = 0 + vNext.major = v.major + 1 + vNext.original = v.originalVPrefix() + "" + vNext.String() + return vNext +} + +// SetPrerelease defines the prerelease value. +// Value must not include the required 'hyphen' prefix. +func (v Version) SetPrerelease(prerelease string) (Version, error) { + vNext := v + if len(prerelease) > 0 { + if err := validatePrerelease(prerelease); err != nil { + return vNext, err + } + } + vNext.pre = prerelease + vNext.original = v.originalVPrefix() + "" + vNext.String() + return vNext, nil +} + +// SetMetadata defines metadata value. +// Value must not include the required 'plus' prefix. +func (v Version) SetMetadata(metadata string) (Version, error) { + vNext := v + if len(metadata) > 0 { + if err := validateMetadata(metadata); err != nil { + return vNext, err + } + } + vNext.metadata = metadata + vNext.original = v.originalVPrefix() + "" + vNext.String() + return vNext, nil +} + +// LessThan tests if one version is less than another one. +func (v *Version) LessThan(o *Version) bool { + return v.Compare(o) < 0 +} + +// GreaterThan tests if one version is greater than another one. +func (v *Version) GreaterThan(o *Version) bool { + return v.Compare(o) > 0 +} + +// Equal tests if two versions are equal to each other. +// Note, versions can be equal with different metadata since metadata +// is not considered part of the comparable version. +func (v *Version) Equal(o *Version) bool { + return v.Compare(o) == 0 +} + +// Compare compares this version to another one. It returns -1, 0, or 1 if +// the version smaller, equal, or larger than the other version. +// +// Versions are compared by X.Y.Z. Build metadata is ignored. Prerelease is +// lower than the version without a prerelease. Compare always takes into account +// prereleases. If you want to work with ranges using typical range syntaxes that +// skip prereleases if the range is not looking for them use constraints. +func (v *Version) Compare(o *Version) int { + // Compare the major, minor, and patch version for differences. If a + // difference is found return the comparison. + if d := compareSegment(v.Major(), o.Major()); d != 0 { + return d + } + if d := compareSegment(v.Minor(), o.Minor()); d != 0 { + return d + } + if d := compareSegment(v.Patch(), o.Patch()); d != 0 { + return d + } + + // At this point the major, minor, and patch versions are the same. + ps := v.pre + po := o.Prerelease() + + if ps == "" && po == "" { + return 0 + } + if ps == "" { + return 1 + } + if po == "" { + return -1 + } + + return comparePrerelease(ps, po) +} + +// UnmarshalJSON implements JSON.Unmarshaler interface. +func (v *Version) UnmarshalJSON(b []byte) error { + var s string + if err := json.Unmarshal(b, &s); err != nil { + return err + } + temp, err := NewVersion(s) + if err != nil { + return err + } + v.major = temp.major + v.minor = temp.minor + v.patch = temp.patch + v.pre = temp.pre + v.metadata = temp.metadata + v.original = temp.original + return nil +} + +// MarshalJSON implements JSON.Marshaler interface. +func (v Version) MarshalJSON() ([]byte, error) { + return json.Marshal(v.String()) +} + +func compareSegment(v, o uint64) int { + if v < o { + return -1 + } + if v > o { + return 1 + } + + return 0 +} + +func comparePrerelease(v, o string) int { + + // split the prelease versions by their part. The separator, per the spec, + // is a . + sparts := strings.Split(v, ".") + oparts := strings.Split(o, ".") + + // Find the longer length of the parts to know how many loop iterations to + // go through. + slen := len(sparts) + olen := len(oparts) + + l := slen + if olen > slen { + l = olen + } + + // Iterate over each part of the prereleases to compare the differences. + for i := 0; i < l; i++ { + // Since the lentgh of the parts can be different we need to create + // a placeholder. This is to avoid out of bounds issues. + stemp := "" + if i < slen { + stemp = sparts[i] + } + + otemp := "" + if i < olen { + otemp = oparts[i] + } + + d := comparePrePart(stemp, otemp) + if d != 0 { + return d + } + } + + // Reaching here means two versions are of equal value but have different + // metadata (the part following a +). They are not identical in string form + // but the version comparison finds them to be equal. + return 0 +} + +func comparePrePart(s, o string) int { + // Fastpath if they are equal + if s == o { + return 0 + } + + // When s or o are empty we can use the other in an attempt to determine + // the response. + if s == "" { + if o != "" { + return -1 + } + return 1 + } + + if o == "" { + if s != "" { + return 1 + } + return -1 + } + + // When comparing strings "99" is greater than "103". To handle + // cases like this we need to detect numbers and compare them. According + // to the semver spec, numbers are always positive. If there is a - at the + // start like -99 this is to be evaluated as an alphanum. numbers always + // have precedence over alphanum. Parsing as Uints because negative numbers + // are ignored. + + oi, n1 := strconv.ParseUint(o, 10, 64) + si, n2 := strconv.ParseUint(s, 10, 64) + + // The case where both are strings compare the strings + if n1 != nil && n2 != nil { + if s > o { + return 1 + } + return -1 + } else if n1 != nil { + // o is a string and s is a number + return -1 + } else if n2 != nil { + // s is a string and o is a number + return 1 + } + // Both are numbers + if si > oi { + return 1 + } + return -1 + +} + +// Like strings.ContainsAny but does an only instead of any. +func containsOnly(s string, comp string) bool { + return strings.IndexFunc(s, func(r rune) bool { + return !strings.ContainsRune(comp, r) + }) == -1 +} + +// From the spec, "Identifiers MUST comprise only +// ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty. +// Numeric identifiers MUST NOT include leading zeroes.". These segments can +// be dot separated. +func validatePrerelease(p string) error { + eparts := strings.Split(p, ".") + for _, p := range eparts { + if containsOnly(p, num) { + if len(p) > 1 && p[0] == '0' { + return ErrSegmentStartsZero + } + } else if !containsOnly(p, allowed) { + return ErrInvalidPrerelease + } + } + + return nil +} + +// From the spec, "Build metadata MAY be denoted by +// appending a plus sign and a series of dot separated identifiers immediately +// following the patch or pre-release version. Identifiers MUST comprise only +// ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty." +func validateMetadata(m string) error { + eparts := strings.Split(m, ".") + for _, p := range eparts { + if !containsOnly(p, allowed) { + return ErrInvalidMetadata + } + } + return nil +} diff --git a/vendor/github.com/opencontainers/go-digest/LICENSE.code b/vendor/github.com/containerd/containerd/LICENSE similarity index 99% rename from vendor/github.com/opencontainers/go-digest/LICENSE.code rename to vendor/github.com/containerd/containerd/LICENSE index 0ea3ff81e..584149b6e 100644 --- a/vendor/github.com/opencontainers/go-digest/LICENSE.code +++ b/vendor/github.com/containerd/containerd/LICENSE @@ -176,7 +176,7 @@ END OF TERMS AND CONDITIONS - Copyright 2016 Docker, Inc. + Copyright The containerd Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/github.com/containerd/containerd/NOTICE b/vendor/github.com/containerd/containerd/NOTICE new file mode 100644 index 000000000..8915f0277 --- /dev/null +++ b/vendor/github.com/containerd/containerd/NOTICE @@ -0,0 +1,16 @@ +Docker +Copyright 2012-2015 Docker, Inc. + +This product includes software developed at Docker, Inc. (https://www.docker.com). + +The following is courtesy of our legal counsel: + + +Use and transfer of Docker may be subject to certain restrictions by the +United States and other governments. +It is your responsibility to ensure that your use and/or transfer does not +violate applicable laws. + +For more information, please see https://www.bis.doc.gov + +See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. diff --git a/vendor/github.com/containerd/containerd/errdefs/errors.go b/vendor/github.com/containerd/containerd/errdefs/errors.go new file mode 100644 index 000000000..b5200afc0 --- /dev/null +++ b/vendor/github.com/containerd/containerd/errdefs/errors.go @@ -0,0 +1,93 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +// Package errdefs defines the common errors used throughout containerd +// packages. +// +// Use with errors.Wrap and error.Wrapf to add context to an error. +// +// To detect an error class, use the IsXXX functions to tell whether an error +// is of a certain type. +// +// The functions ToGRPC and FromGRPC can be used to map server-side and +// client-side errors to the correct types. +package errdefs + +import ( + "context" + + "github.com/pkg/errors" +) + +// Definitions of common error types used throughout containerd. All containerd +// errors returned by most packages will map into one of these errors classes. +// Packages should return errors of these types when they want to instruct a +// client to take a particular action. +// +// For the most part, we just try to provide local grpc errors. Most conditions +// map very well to those defined by grpc. +var ( + ErrUnknown = errors.New("unknown") // used internally to represent a missed mapping. + ErrInvalidArgument = errors.New("invalid argument") + ErrNotFound = errors.New("not found") + ErrAlreadyExists = errors.New("already exists") + ErrFailedPrecondition = errors.New("failed precondition") + ErrUnavailable = errors.New("unavailable") + ErrNotImplemented = errors.New("not implemented") // represents not supported and unimplemented +) + +// IsInvalidArgument returns true if the error is due to an invalid argument +func IsInvalidArgument(err error) bool { + return errors.Cause(err) == ErrInvalidArgument +} + +// IsNotFound returns true if the error is due to a missing object +func IsNotFound(err error) bool { + return errors.Cause(err) == ErrNotFound +} + +// IsAlreadyExists returns true if the error is due to an already existing +// metadata item +func IsAlreadyExists(err error) bool { + return errors.Cause(err) == ErrAlreadyExists +} + +// IsFailedPrecondition returns true if an operation could not proceed to the +// lack of a particular condition +func IsFailedPrecondition(err error) bool { + return errors.Cause(err) == ErrFailedPrecondition +} + +// IsUnavailable returns true if the error is due to a resource being unavailable +func IsUnavailable(err error) bool { + return errors.Cause(err) == ErrUnavailable +} + +// IsNotImplemented returns true if the error is due to not being implemented +func IsNotImplemented(err error) bool { + return errors.Cause(err) == ErrNotImplemented +} + +// IsCanceled returns true if the error is due to `context.Canceled`. +func IsCanceled(err error) bool { + return errors.Cause(err) == context.Canceled +} + +// IsDeadlineExceeded returns true if the error is due to +// `context.DeadlineExceeded`. +func IsDeadlineExceeded(err error) bool { + return errors.Cause(err) == context.DeadlineExceeded +} diff --git a/vendor/github.com/containerd/containerd/errdefs/grpc.go b/vendor/github.com/containerd/containerd/errdefs/grpc.go new file mode 100644 index 000000000..209f63bd0 --- /dev/null +++ b/vendor/github.com/containerd/containerd/errdefs/grpc.go @@ -0,0 +1,147 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package errdefs + +import ( + "context" + "strings" + + "github.com/pkg/errors" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +// ToGRPC will attempt to map the backend containerd error into a grpc error, +// using the original error message as a description. +// +// Further information may be extracted from certain errors depending on their +// type. +// +// If the error is unmapped, the original error will be returned to be handled +// by the regular grpc error handling stack. +func ToGRPC(err error) error { + if err == nil { + return nil + } + + if isGRPCError(err) { + // error has already been mapped to grpc + return err + } + + switch { + case IsInvalidArgument(err): + return status.Errorf(codes.InvalidArgument, err.Error()) + case IsNotFound(err): + return status.Errorf(codes.NotFound, err.Error()) + case IsAlreadyExists(err): + return status.Errorf(codes.AlreadyExists, err.Error()) + case IsFailedPrecondition(err): + return status.Errorf(codes.FailedPrecondition, err.Error()) + case IsUnavailable(err): + return status.Errorf(codes.Unavailable, err.Error()) + case IsNotImplemented(err): + return status.Errorf(codes.Unimplemented, err.Error()) + case IsCanceled(err): + return status.Errorf(codes.Canceled, err.Error()) + case IsDeadlineExceeded(err): + return status.Errorf(codes.DeadlineExceeded, err.Error()) + } + + return err +} + +// ToGRPCf maps the error to grpc error codes, assembling the formatting string +// and combining it with the target error string. +// +// This is equivalent to errors.ToGRPC(errors.Wrapf(err, format, args...)) +func ToGRPCf(err error, format string, args ...interface{}) error { + return ToGRPC(errors.Wrapf(err, format, args...)) +} + +// FromGRPC returns the underlying error from a grpc service based on the grpc error code +func FromGRPC(err error) error { + if err == nil { + return nil + } + + var cls error // divide these into error classes, becomes the cause + + switch code(err) { + case codes.InvalidArgument: + cls = ErrInvalidArgument + case codes.AlreadyExists: + cls = ErrAlreadyExists + case codes.NotFound: + cls = ErrNotFound + case codes.Unavailable: + cls = ErrUnavailable + case codes.FailedPrecondition: + cls = ErrFailedPrecondition + case codes.Unimplemented: + cls = ErrNotImplemented + case codes.Canceled: + cls = context.Canceled + case codes.DeadlineExceeded: + cls = context.DeadlineExceeded + default: + cls = ErrUnknown + } + + msg := rebaseMessage(cls, err) + if msg != "" { + err = errors.Wrap(cls, msg) + } else { + err = errors.WithStack(cls) + } + + return err +} + +// rebaseMessage removes the repeats for an error at the end of an error +// string. This will happen when taking an error over grpc then remapping it. +// +// Effectively, we just remove the string of cls from the end of err if it +// appears there. +func rebaseMessage(cls error, err error) string { + desc := errDesc(err) + clss := cls.Error() + if desc == clss { + return "" + } + + return strings.TrimSuffix(desc, ": "+clss) +} + +func isGRPCError(err error) bool { + _, ok := status.FromError(err) + return ok +} + +func code(err error) codes.Code { + if s, ok := status.FromError(err); ok { + return s.Code() + } + return codes.Unknown +} + +func errDesc(err error) string { + if s, ok := status.FromError(err); ok { + return s.Message() + } + return err.Error() +} diff --git a/vendor/github.com/docker/docker/AUTHORS b/vendor/github.com/docker/docker/AUTHORS index c5f725bc1..ad166ba8d 100644 --- a/vendor/github.com/docker/docker/AUTHORS +++ b/vendor/github.com/docker/docker/AUTHORS @@ -4,6 +4,7 @@ Aanand Prasad Aaron Davidson Aaron Feng +Aaron Hnatiw Aaron Huslage Aaron L. Xu Aaron Lehmann @@ -17,6 +18,7 @@ Abhishek Chanda Abhishek Sharma Abin Shahab Adam Avilla +Adam Dobrawy Adam Eijdenberg Adam Kunk Adam Miller @@ -112,6 +114,7 @@ Anda Xu Anders Janmyr Andre Dublin <81dublin@gmail.com> Andre Granovsky +Andrea Denisse Gómez Andrea Luzzardi Andrea Turli Andreas Elvers @@ -176,8 +179,10 @@ Anusha Ragunathan apocas Arash Deshmeh ArikaChen +Arko Dasgupta Arnaud Lefebvre Arnaud Porterie +Arnaud Rebillout Arthur Barr Arthur Gautier Artur Meyster @@ -279,6 +284,7 @@ Carl Loa Odin Carl X. Su Carlo Mion Carlos Alexandro Becker +Carlos de Paula Carlos Sanchez Carol Fager-Higgins Cary @@ -328,6 +334,7 @@ Chris Gibson Chris Khoo Chris McKinnel Chris McKinnel +Chris Price Chris Seto Chris Snow Chris St. Pierre @@ -417,12 +424,14 @@ Daniel Norberg Daniel Nordberg Daniel Robinson Daniel S +Daniel Sweet Daniel Von Fange Daniel Watkins Daniel X Moore Daniel YC Lin Daniel Zhang Danny Berger +Danny Milosavljevic Danny Yates Danyal Khaliq Darren Coxall @@ -516,6 +525,8 @@ Dmitry Smirnov Dmitry V. Krivenok Dmitry Vorobev Dolph Mathews +Dominic Tubach +Dominic Yin Dominik Dingel Dominik Finkbeiner Dominik Honnef @@ -584,6 +595,7 @@ Erik Weathers Erno Hopearuoho Erwin van der Koogh Ethan Bell +Ethan Mosbaugh Euan Kemp Eugen Krizo Eugene Yakubovich @@ -620,6 +632,7 @@ Fareed Dudhia Fathi Boudra Federico Gimenez Felipe Oliveira +Felipe Ruhland Felix Abecassis Felix Geisendörfer Felix Hupfeld @@ -654,6 +667,7 @@ Frank Groeneveld Frank Herrmann Frank Macreery Frank Rosquin +frankyang Fred Lifton Frederick F. Kautz IV Frederik Loeffert @@ -701,6 +715,7 @@ Gleb M Borisov Glyn Normington GoBella Goffert van Gool +Goldwyn Rodrigues Gopikannan Venugopalsamy Gosuke Miyashita Gou Rao @@ -724,6 +739,7 @@ Guruprasad Gustav Sinder gwx296173 Günter Zöchbauer +Haichao Yang haikuoliu Hakan Özler Hamish Hutchings @@ -732,6 +748,7 @@ Hans Rødtang Hao Shu Wei Hao Zhang <21521210@zju.edu.cn> Harald Albers +Harald Niesche Harley Laue Harold Cooper Harrison Turton @@ -751,9 +768,11 @@ Hobofan Hollie Teal Hong Xu Hongbin Lu +Hongxu Jia hsinko <21551195@zju.edu.cn> Hu Keping Hu Tao +HuanHuan Ye Huanzhong Zhang Huayi Zhang Hugo Duncan @@ -897,6 +916,7 @@ Jie Luo Jihyun Hwang Jilles Oldenbeuving Jim Alateras +Jim Ehrismann Jim Galasyn Jim Minter Jim Perrin @@ -934,7 +954,7 @@ John Feminella John Gardiner Myers John Gossman John Harris -John Howard (VM) +John Howard John Laswell John Maguire John Mulhausen @@ -948,6 +968,7 @@ John Willis Jon Johnson Jon Surrell Jon Wedaman +Jonas Dohse Jonas Pfenniger Jonathan A. Schweder Jonathan A. Sternberg @@ -1001,6 +1022,7 @@ Julio Montes Jun-Ru Chang Jussi Nummelin Justas Brazauskas +Justen Martin Justin Cormack Justin Force Justin Menga @@ -1009,6 +1031,7 @@ Justin Simonelis Justin Terry Justyn Temme Jyrki Puttonen +Jérémy Leherpeur Jérôme Petazzoni Jörg Thalheim K. Heller @@ -1046,6 +1069,7 @@ Ken Reese Kenfe-Mickaël Laventure Kenjiro Nakayama Kent Johnson +Kenta Tada Kevin "qwazerty" Houdebert Kevin Burke Kevin Clark @@ -1056,6 +1080,7 @@ Kevin Kern Kevin Menard Kevin Meredith Kevin P. Kucharczyk +Kevin Parsons Kevin Richardson Kevin Shi Kevin Wallace @@ -1146,6 +1171,7 @@ longliqiang88 <394564827@qq.com> Lorenz Leutgeb Lorenzo Fontana Lotus Fenn +Louis Delossantos Louis Opter Luca Favatella Luca Marturana @@ -1154,15 +1180,18 @@ Luca-Bogdan Grigorescu Lucas Chan Lucas Chi Lucas Molas +Lucas Silvestre Luciano Mores Luis Martínez de Bartolomé Izquierdo Luiz Svoboda +Lukas Heeren Lukas Waslowski lukaspustina Lukasz Zajaczkowski Luke Marsden Lyn Lynda O'Leary +lzhfromutsc Lénaïc Huard Ma Müller Ma Shimiao @@ -1296,6 +1325,7 @@ Michael Stapelberg Michael Steinert Michael Thies Michael West +Michael Zhao Michal Fojtik Michal Gebauer Michal Jemala @@ -1380,6 +1410,7 @@ Neyazul Haque Nghia Tran Niall O'Higgins Nicholas E. Rabenau +Nick Adcock Nick DeCoursin Nick Irvine Nick Neisen @@ -1418,6 +1449,7 @@ Nuutti Kotivuori nzwsch O.S. Tezer objectified +Odin Ugedal Oguz Bilgic Oh Jinkyun Ohad Schneider @@ -1428,6 +1460,7 @@ Oliver Reason Olivier Gambier Olle Jonsson Olli Janatuinen +Olly Pomeroy Omri Shiv Oriol Francès Oskar Niburski @@ -1437,6 +1470,7 @@ Ovidio Mallo Panagiotis Moustafellos Paolo G. Giarrusso Pascal +Pascal Bach Pascal Borreli Pascal Hartig Patrick Böänziger @@ -1461,6 +1495,7 @@ Paul Nasrat Paul Weaver Paulo Ribeiro Pavel Lobashov +Pavel Matěja Pavel Pletenev Pavel Pospisil Pavel Sutyrin @@ -1572,6 +1607,7 @@ Riku Voipio Riley Guerin Ritesh H Shukla Riyaz Faizullabhoy +Rob Gulewich Rob Vesse Robert Bachmann Robert Bittle @@ -1580,11 +1616,13 @@ Robert Schneider Robert Stern Robert Terhaar Robert Wallis +Robert Wang Roberto G. Hashioka Roberto Muñoz Fernández Robin Naundorf Robin Schneider Robin Speekenbrink +Robin Thoni robpc Rodolfo Carvalho Rodrigo Vaz @@ -1618,6 +1656,7 @@ Rozhnov Alexandr Rudolph Gottesheim Rui Cao Rui Lopes +Ruilin Li Runshen Zhu Russ Magee Ryan Abrams @@ -1656,6 +1695,7 @@ Sam J Sharpe Sam Neirinck Sam Reis Sam Rijs +Sam Whited Sambuddha Basu Sami Wagiaalla Samuel Andaya @@ -1670,6 +1710,7 @@ sapphiredev Sargun Dhillon Sascha Andres Sascha Grunert +SataQiu Satnam Singh Satoshi Amemiya Satoshi Tagomori @@ -1718,6 +1759,7 @@ Shijun Qin Shishir Mahajan Shoubhik Bose Shourya Sarcar +Shu-Wai Chow shuai-z Shukui Yang Shuwei Hao @@ -1728,6 +1770,7 @@ Silas Sewell Silvan Jegen Simão Reis Simei He +Simon Barendse Simon Eskildsen Simon Ferquel Simon Leinen @@ -1736,6 +1779,7 @@ Simon Taranto Simon Vikstrom Sindhu S Sjoerd Langkemper +skanehira Solganik Alexander Solomon Hykes Song Gao @@ -1747,16 +1791,18 @@ Sridatta Thatipamala Sridhar Ratnakumar Srini Brahmaroutu Srinivasan Srivatsan +Staf Wagemakers Stanislav Bondarenko Steeve Morin Stefan Berger Stefan J. Wernli Stefan Praszalowicz Stefan S. -Stefan Scherer +Stefan Scherer Stefan Staudenmeyer Stefan Weil Stephan Spindler +Stephen Benjamin Stephen Crosby Stephen Day Stephen Drake @@ -1773,10 +1819,12 @@ Steven Iveson Steven Merrill Steven Richards Steven Taylor +Stig Larsson Subhajit Ghosh Sujith Haridasan Sun Gengze <690388648@qq.com> Sun Jianbo +Sune Keller Sunny Gogoi Suryakumar Sudar Sven Dowideit @@ -1827,6 +1875,7 @@ Tianyi Wang Tibor Vass Tiffany Jernigan Tiffany Low +Tim Tim Bart Tim Bosse Tim Dettrick @@ -1912,6 +1961,7 @@ Victor Palma Victor Vieux Victoria Bialas Vijaya Kumar K +Vikram bir Singh Viktor Stanchev Viktor Vojnovski VinayRaghavanKS @@ -1969,6 +2019,7 @@ Wenyu You <21551128@zju.edu.cn> Wenzhi Liang Wes Morgan Wewang Xiaorenfine +Wiktor Kwapisiewicz Will Dietz Will Rouesnel Will Weaver @@ -1996,6 +2047,7 @@ xichengliudui <1693291525@qq.com> xiekeyang Ximo Guanter Gonzálbez Xinbo Weng +Xinfeng Liu Xinzi Zhou Xiuming Chen Xuecong Liao @@ -2010,6 +2062,7 @@ Yang Pengfei yangchenliang Yanqiang Miao Yao Zaiyong +Yash Murty Yassine Tijani Yasunori Mahata Yazhong Liu @@ -2024,6 +2077,7 @@ Yongxin Li Yongzhi Pan Yosef Fertel You-Sheng Yang (楊有勝) +youcai Youcef YEKHLEF Yu Changchun Yu Chengxia @@ -2060,6 +2114,7 @@ Zhoulin Xie Zhu Guihua Zhu Kunjia Zhuoyun Wei +Ziheng Liu Zilin Du zimbatm Ziming Dong @@ -2068,7 +2123,7 @@ zmarouf Zoltan Tombol Zou Yu zqh -Zuhayr Elahi +Zuhayr Elahi Zunayed Ali Álex González Álvaro Lázaro diff --git a/vendor/github.com/docker/docker/NOTICE b/vendor/github.com/docker/docker/NOTICE index 0c74e15b0..58b19b6d1 100644 --- a/vendor/github.com/docker/docker/NOTICE +++ b/vendor/github.com/docker/docker/NOTICE @@ -3,7 +3,7 @@ Copyright 2012-2017 Docker, Inc. This product includes software developed at Docker, Inc. (https://www.docker.com). -This product contains software (https://github.com/kr/pty) developed +This product contains software (https://github.com/creack/pty) developed by Keith Rarick, licensed under the MIT License. The following is courtesy of our legal counsel: diff --git a/vendor/github.com/docker/docker/api/common.go b/vendor/github.com/docker/docker/api/common.go index aa146cdae..1565e2af6 100644 --- a/vendor/github.com/docker/docker/api/common.go +++ b/vendor/github.com/docker/docker/api/common.go @@ -3,7 +3,7 @@ package api // import "github.com/docker/docker/api" // Common constants for daemon and client. const ( // DefaultVersion of Current REST API - DefaultVersion = "1.40" + DefaultVersion = "1.41" // NoBaseImageSpecifier is the symbol used by the FROM // command to specify that no base image is to be used. diff --git a/vendor/github.com/docker/docker/api/swagger.yaml b/vendor/github.com/docker/docker/api/swagger.yaml index 6e0bc25b5..b57184b28 100644 --- a/vendor/github.com/docker/docker/api/swagger.yaml +++ b/vendor/github.com/docker/docker/api/swagger.yaml @@ -19,10 +19,10 @@ produces: consumes: - "application/json" - "text/plain" -basePath: "/v1.40" +basePath: "/v1.41" info: title: "Docker Engine API" - version: "1.40" + version: "1.41" x-logo: url: "https://docs.docker.com/images/logo-docker-main.png" description: | @@ -49,8 +49,8 @@ info: the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. - If you omit the version-prefix, the current version of the API (v1.40) is used. - For example, calling `/info` is the same as calling `/v1.40/info`. Using the + If you omit the version-prefix, the current version of the API (v1.41) is used. + For example, calling `/info` is the same as calling `/v1.41/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, @@ -618,6 +618,71 @@ definitions: description: "Start period for the container to initialize before starting health-retries countdown in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit." type: "integer" + Health: + description: | + Health stores information about the container's healthcheck results. + type: "object" + properties: + Status: + description: | + Status is one of `none`, `starting`, `healthy` or `unhealthy` + + - "none" Indicates there is no healthcheck + - "starting" Starting indicates that the container is not yet ready + - "healthy" Healthy indicates that the container is running correctly + - "unhealthy" Unhealthy indicates that the container has a problem + type: "string" + enum: + - "none" + - "starting" + - "healthy" + - "unhealthy" + example: "healthy" + FailingStreak: + description: "FailingStreak is the number of consecutive failures" + type: "integer" + example: 0 + Log: + type: "array" + description: | + Log contains the last few results (oldest first) + items: + x-nullable: true + $ref: "#/definitions/HealthcheckResult" + + HealthcheckResult: + description: | + HealthcheckResult stores information about a single run of a healthcheck probe + type: "object" + properties: + Start: + description: | + Date and time at which this check started in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "date-time" + example: "2020-01-04T10:44:24.496525531Z" + End: + description: | + Date and time at which this check ended in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + type: "string" + format: "dateTime" + example: "2020-01-04T10:45:21.364524523Z" + ExitCode: + description: | + ExitCode meanings: + + - `0` healthy + - `1` unhealthy + - `2` reserved (considered unhealthy) + - other values: error running probe + type: "integer" + example: 0 + Output: + description: "Output from last check" + type: "string" + HostConfig: description: "Container configuration that depends on the host we are running on" allOf: @@ -628,12 +693,44 @@ definitions: Binds: type: "array" description: | - A list of volume bindings for this container. Each volume binding is a string in one of these forms: + A list of volume bindings for this container. Each volume binding + is a string in one of these forms: - - `host-src:container-dest` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path. - - `host-src:container-dest:ro` to make the bind mount read-only inside the container. Both `host-src`, and `container-dest` must be an _absolute_ path. - - `volume-name:container-dest` to bind-mount a volume managed by a volume driver into the container. `container-dest` must be an _absolute_ path. - - `volume-name:container-dest:ro` to mount the volume read-only inside the container. `container-dest` must be an _absolute_ path. + - `host-src:container-dest[:options]` to bind-mount a host path + into the container. Both `host-src`, and `container-dest` must + be an _absolute_ path. + - `volume-name:container-dest[:options]` to bind-mount a volume + managed by a volume driver into the container. `container-dest` + must be an _absolute_ path. + + `options` is an optional, comma-delimited list of: + + - `nocopy` disables automatic copying of data from the container + path to the volume. The `nocopy` flag only applies to named volumes. + - `[ro|rw]` mounts a volume read-only or read-write, respectively. + If omitted or set to `rw`, volumes are mounted read-write. + - `[z|Z]` applies SELinux labels to allow or deny multiple containers + to read and write to the same volume. + - `z`: a _shared_ content label is applied to the content. This + label indicates that multiple containers can share the volume + content, for both reading and writing. + - `Z`: a _private unshared_ label is applied to the content. + This label indicates that only the current container can use + a private volume. Labeling systems such as SELinux require + proper labels to be placed on volume content that is mounted + into a container. Without a label, the security system can + prevent a container's processes from using the content. By + default, the labels set by the host operating system are not + modified. + - `[[r]shared|[r]slave|[r]private]` specifies mount + [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt). + This only applies to bind-mounted volumes, not internal volumes + or named volumes. Mount propagation requires the source mount + point (the location where the source directory is mounted in the + host operating system) to have the correct propagation properties. + For shared volumes, the source mount point must be set to `shared`. + For slave volumes, the mount must be set to either `shared` or + `slave`. items: type: "string" ContainerIDFile: @@ -703,6 +800,19 @@ definitions: description: "A list of kernel capabilities to drop from the container. Conflicts with option 'Capabilities'" items: type: "string" + CgroupnsMode: + type: "string" + enum: + - "private" + - "host" + description: | + cgroup namespace mode for the container. Possible values are: + + - `"private"`: the container runs in its own private cgroup namespace + - `"host"`: use the host system's cgroup namespace + + If not specified, the daemon default is used, which can either be `"private"` + or `"host"`, depending on daemon version, kernel support and configuration. Dns: type: "array" description: "A list of DNS servers for the container to use." @@ -2869,6 +2979,18 @@ definitions: type: "object" additionalProperties: type: "string" + # This option is not used by Windows containers + Capabilities: + type: "array" + description: | + A list of kernel capabilities to be available for container (this overrides the default set). + items: + type: "string" + example: + - "CAP_NET_RAW" + - "CAP_SYS_ADMIN" + - "CAP_SYS_CHROOT" + - "CAP_SYSLOG" NetworkAttachmentSpec: description: | Read-only spec type for non-swarm containers attached to swarm overlay @@ -2970,16 +3092,10 @@ definitions: description: "Runtime is the type of runtime specified for the task executor." type: "string" Networks: + description: "Specifies which networks the service should attach to." type: "array" items: - type: "object" - properties: - Target: - type: "string" - Aliases: - type: "array" - items: - type: "string" + $ref: "#/definitions/NetworkAttachmentConfig" LogDriver: description: "Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified." type: "object" @@ -3067,6 +3183,12 @@ definitions: type: "integer" DesiredState: $ref: "#/definitions/TaskState" + JobIteration: + description: | + If the Service this Task belongs to is a job-mode service, contains + the JobIteration of the Service this Task was created for. Absent if + the Task was created for a Replicated or Global Service. + $ref: "#/definitions/ObjectVersion" example: ID: "0kzzo1i0y4jz6027t0k7aezc7" Version: @@ -3159,6 +3281,22 @@ definitions: format: "int64" Global: type: "object" + ReplicatedJob: + description: "The mode used for services with a finite number of tasks that run to a completed state." + type: "object" + properties: + MaxConcurrent: + description: "The maximum number of replicas to run simultaneously." + type: "integer" + format: "int64" + default: 1 + TotalCompletions: + description: "The total number of replicas desired to reach the Completed state. If unset, will default to the value of MaxConcurrent" + type: "integer" + format: "int64" + GlobalJob: + description: "The mode used for services which run a task to the completed state on each valid node." + type: "object" UpdateConfig: description: "Specification for the update strategy of the service." type: "object" @@ -3225,17 +3363,11 @@ definitions: - "stop-first" - "start-first" Networks: - description: "Array of network names or IDs to attach the service to." + description: "Specifies which networks the service should attach to." type: "array" items: - type: "object" - properties: - Target: - type: "string" - Aliases: - type: "array" - items: - type: "string" + $ref: "#/definitions/NetworkAttachmentConfig" + EndpointSpec: $ref: "#/definitions/EndpointSpec" @@ -3262,7 +3394,7 @@ definitions:


- - "ingress" makes the target port accessible on on every node, + - "ingress" makes the target port accessible on every node, regardless of whether there is a task for the service running on that node or not. - "host" bypasses the routing mesh and publish the port directly on @@ -3280,8 +3412,8 @@ definitions: type: "object" properties: Mode: - description: "The mode of resolution to use for internal load balancing - between tasks." + description: | + The mode of resolution to use for internal load balancing between tasks. type: "string" enum: - "vip" @@ -3344,6 +3476,58 @@ definitions: format: "dateTime" Message: type: "string" + ServiceStatus: + description: | + The status of the service's tasks. Provided only when requested as + part of a ServiceList operation. + type: "object" + properties: + RunningTasks: + description: "The number of tasks for the service currently in the Running state" + type: "integer" + format: "uint64" + example: 7 + DesiredTasks: + description: | + The number of tasks for the service desired to be running. + For replicated services, this is the replica count from the + service spec. For global services, this is computed by taking + count of all tasks for the service with a Desired State other + than Shutdown. + type: "integer" + format: "uint64" + example: 10 + CompletedTasks: + description: | + The number of tasks for a job that are in the Completed state. + This field must be cross-referenced with the service type, as the + value of 0 may mean the service is not in a job mode, or it may + mean the job-mode service has no tasks yet Completed. + type: "integer" + format: "uint64" + JobStatus: + description: | + The status of the service when it is in one of ReplicatedJob or + GlobalJob modes. Absent on Replicated and Global mode services. The + JobIteration is an ObjectVersion, but unlike the Service's version, + does not need to be sent with an update request. + type: "object" + properties: + JobIteration: + description: | + JobIteration is a value increased each time a Job is executed, + successfully or otherwise. "Executed", in this case, means the + job as a whole has been started, not that an individual Task has + been launched. A job is "Executed" when its ServiceSpec is + updated. JobIteration can be used to disambiguate Tasks belonging + to different executions of a job. Though JobIteration will + increase with each subsequent execution, it may not necessarily + increase by 1, and so JobIteration should not be used to + $ref: "#/definitions/ObjectVersion" + LastExecution: + description: "The last time, as observed by the server, that this job was started" + type: "string" + format: "dateTime" example: ID: "9mnpnzenvg8p8tdbtq4wvbkcz" Version: @@ -3609,6 +3793,70 @@ definitions: Spec: $ref: "#/definitions/ConfigSpec" + ContainerState: + description: | + ContainerState stores container's running state. It's part of ContainerJSONBase + and will be returned by the "inspect" command. + type: "object" + properties: + Status: + description: | + String representation of the container state. Can be one of "created", + "running", "paused", "restarting", "removing", "exited", or "dead". + type: "string" + enum: ["created", "running", "paused", "restarting", "removing", "exited", "dead"] + example: "running" + Running: + description: | + Whether this container is running. + + Note that a running container can be _paused_. The `Running` and `Paused` + booleans are not mutually exclusive: + + When pausing a container (on Linux), the freezer cgroup is used to suspend + all processes in the container. Freezing the process requires the process to + be running. As a result, paused containers are both `Running` _and_ `Paused`. + + Use the `Status` field instead to determine if a container's state is "running". + type: "boolean" + example: true + Paused: + description: "Whether this container is paused." + type: "boolean" + example: false + Restarting: + description: "Whether this container is restarting." + type: "boolean" + example: false + OOMKilled: + description: "Whether this container has been killed because it ran out of memory." + type: "boolean" + example: false + Dead: + type: "boolean" + example: false + Pid: + description: "The process ID of this container" + type: "integer" + example: 1234 + ExitCode: + description: "The last exit code of this container" + type: "integer" + example: 0 + Error: + type: "string" + StartedAt: + description: "The time when this container was last started." + type: "string" + example: "2020-01-06T09:06:59.461876391Z" + FinishedAt: + description: "The time when this container last exited." + type: "string" + example: "2020-01-06T09:07:59.461876391Z" + Health: + x-nullable: true + $ref: "#/definitions/Health" + SystemInfo: type: "object" properties: @@ -3683,44 +3931,6 @@ definitions: on Windows. type: "string" example: "/var/lib/docker" - SystemStatus: - description: | - Status information about this node (standalone Swarm API). - -


- - > **Note**: The information returned in this field is only propagated - > by the Swarm standalone API, and is empty (`null`) when using - > built-in swarm mode. - type: "array" - items: - type: "array" - items: - type: "string" - example: - - ["Role", "primary"] - - ["State", "Healthy"] - - ["Strategy", "spread"] - - ["Filters", "health, port, containerslots, dependency, affinity, constraint, whitelist"] - - ["Nodes", "2"] - - [" swarm-agent-00", "192.168.99.102:2376"] - - [" └ ID", "5CT6:FBGO:RVGO:CZL4:PB2K:WCYN:2JSV:KSHH:GGFW:QOPG:6J5Q:IOZ2|192.168.99.102:2376"] - - [" └ Status", "Healthy"] - - [" └ Containers", "1 (1 Running, 0 Paused, 0 Stopped)"] - - [" └ Reserved CPUs", "0 / 1"] - - [" └ Reserved Memory", "0 B / 1.021 GiB"] - - [" └ Labels", "kernelversion=4.4.74-boot2docker, operatingsystem=Boot2Docker 17.06.0-ce (TCL 7.2); HEAD : 0672754 - Thu Jun 29 00:06:31 UTC 2017, ostype=linux, provider=virtualbox, storagedriver=aufs"] - - [" └ UpdatedAt", "2017-08-09T10:03:46Z"] - - [" └ ServerVersion", "17.06.0-ce"] - - [" swarm-manager", "192.168.99.101:2376"] - - [" └ ID", "TAMD:7LL3:SEF7:LW2W:4Q2X:WVFH:RTXX:JSYS:XY2P:JEHL:ZMJK:JGIW|192.168.99.101:2376"] - - [" └ Status", "Healthy"] - - [" └ Containers", "2 (2 Running, 0 Paused, 0 Stopped)"] - - [" └ Reserved CPUs", "0 / 1"] - - [" └ Reserved Memory", "0 B / 1.021 GiB"] - - [" └ Labels", "kernelversion=4.4.74-boot2docker, operatingsystem=Boot2Docker 17.06.0-ce (TCL 7.2); HEAD : 0672754 - Thu Jun 29 00:06:31 UTC 2017, ostype=linux, provider=virtualbox, storagedriver=aufs"] - - [" └ UpdatedAt", "2017-08-09T10:04:11Z"] - - [" └ ServerVersion", "17.06.0-ce"] Plugins: $ref: "#/definitions/PluginsInfo" MemoryLimit: @@ -3827,6 +4037,17 @@ definitions: or "Windows Server 2016 Datacenter" type: "string" example: "Alpine Linux v3.5" + OSVersion: + description: | + Version of the host's operating system + +


+ + > **Note**: The information returned in this field, including its + > very existence, and the formatting of values, should not be considered + > stable, and may change without notice. + type: "string" + example: "16.04" OSType: description: | Generic type of the operating system of the host, as returned by the @@ -4407,6 +4628,24 @@ definitions: IP address and ports at which this node can be reached. type: "string" + NetworkAttachmentConfig: + description: "Specifies how a service should be attached to a particular network." + type: "object" + properties: + Target: + description: "The target network for attachment. Must be a network name or ID." + type: "string" + Aliases: + description: "Discoverable alternate names for the service on this network." + type: "array" + items: + type: "string" + DriverOpts: + description: "Driver attachment options for the network target" + type: "object" + additionalProperties: + type: "string" + paths: /containers/json: get: @@ -4822,52 +5061,8 @@ paths: items: type: "string" State: - description: "The state of the container." - type: "object" - properties: - Status: - description: | - The status of the container. For example, `"running"` or `"exited"`. - type: "string" - enum: ["created", "running", "paused", "restarting", "removing", "exited", "dead"] - Running: - description: | - Whether this container is running. - - Note that a running container can be _paused_. The `Running` and `Paused` - booleans are not mutually exclusive: - - When pausing a container (on Linux), the cgroups freezer is used to suspend - all processes in the container. Freezing the process requires the process to - be running. As a result, paused containers are both `Running` _and_ `Paused`. - - Use the `Status` field instead to determine if a container's state is "running". - type: "boolean" - Paused: - description: "Whether this container is paused." - type: "boolean" - Restarting: - description: "Whether this container is restarting." - type: "boolean" - OOMKilled: - description: "Whether this container has been killed because it ran out of memory." - type: "boolean" - Dead: - type: "boolean" - Pid: - description: "The process ID of this container" - type: "integer" - ExitCode: - description: "The last exit code of this container" - type: "integer" - Error: - type: "string" - StartedAt: - description: "The time when this container was last started." - type: "string" - FinishedAt: - description: "The time when this container last exited." - type: "string" + x-nullable: true + $ref: "#/definitions/ContainerState" Image: description: "The container's image" type: "string" @@ -4879,15 +5074,14 @@ paths: type: "string" LogPath: type: "string" - Node: - description: "TODO" - type: "object" Name: type: "string" RestartCount: type: "integer" Driver: type: "string" + Platform: + type: "string" MountLabel: type: "string" ProcessLabel: @@ -4937,6 +5131,8 @@ paths: Domainname: "" Env: - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + Healthcheck: + Test: ["CMD-SHELL", "exit 0"] Hostname: "ba033ac44011" Image: "ubuntu" Labels: @@ -5048,6 +5244,14 @@ paths: Error: "" ExitCode: 9 FinishedAt: "2015-01-06T15:47:32.080254511Z" + Health: + Status: "healthy" + FailingStreak: 0 + Log: + - Start: "2019-12-22T10:59:05.6385933Z" + End: "2019-12-22T10:59:05.8078452Z" + ExitCode: 0 + Output: "" OOMKilled: false Dead: false Paused: false @@ -5507,8 +5711,6 @@ paths: description: "no error" 304: description: "container already started" - schema: - $ref: "#/definitions/ErrorResponse" 404: description: "no such container" schema: @@ -5540,8 +5742,6 @@ paths: description: "no error" 304: description: "container already stopped" - schema: - $ref: "#/definitions/ErrorResponse" 404: description: "no such container" schema: @@ -5732,9 +5932,9 @@ paths: post: summary: "Pause a container" description: | - Use the cgroups freezer to suspend all processes in a container. + Use the freezer cgroup to suspend all processes in a container. - Traditionally, when suspending a process the `SIGSTOP` signal is used, which is observable by the process being suspended. With the cgroups freezer the process is unaware, and unable to capture, that it is being suspended, and subsequently resumed. + Traditionally, when suspending a process the `SIGSTOP` signal is used, which is observable by the process being suspended. With the freezer cgroup the process is unaware, and unable to capture, that it is being suspended, and subsequently resumed. operationId: "ContainerPause" responses: 204: @@ -6457,10 +6657,11 @@ paths: type: "string" - name: "networkmode" in: "query" - description: "Sets the networking mode for the run commands during - build. Supported standard values are: `bridge`, `host`, `none`, and - `container:`. Any other value is taken as a custom network's - name to which this container should connect to." + description: | + Sets the networking mode for the run commands during build. Supported + standard values are: `bridge`, `host`, `none`, and `container:`. + Any other value is taken as a custom network's name or ID to which this + container should connect to. type: "string" - name: "Content-type" in: "header" @@ -6605,6 +6806,10 @@ paths: in: "query" description: "Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled." type: "string" + - name: "message" + in: "query" + description: "Set commit message for imported image." + type: "string" - name: "inputImage" in: "body" description: "Image content if the value `-` has been specified in fromSrc query parameter" @@ -9283,6 +9488,10 @@ paths: - `label=` - `mode=["replicated"|"global"]` - `name=` + - name: "status" + in: "query" + type: "boolean" + description: "Include service status, with count of running and desired tasks" tags: ["Service"] /services/create: post: @@ -9549,17 +9758,19 @@ paths: type: "integer" - name: "registryAuthFrom" in: "query" + description: | + If the `X-Registry-Auth` header is not specified, this parameter + indicates where to find registry authorization credentials. type: "string" - description: "If the X-Registry-Auth header is not specified, this - parameter indicates where to find registry authorization credentials. The - valid values are `spec` and `previous-spec`." + enum: ["spec", "previous-spec"] default: "spec" - name: "rollback" in: "query" + description: | + Set to this parameter to `previous` to cause a server-side rollback + to the previous service spec. The supplied spec will be ignored in + this case. type: "string" - description: "Set to this parameter to `previous` to cause a - server-side rollback to the previous service spec. The supplied spec will be - ignored in this case." - name: "X-Registry-Auth" in: "header" description: "A base64-encoded auth configuration for pulling from private registries. [See the authentication section for details.](#section/Authentication)" @@ -10379,9 +10590,6 @@ paths: description: | Start a new interactive session with a server. Session allows server to call back to the client for advanced capabilities. - > **Note**: This endpoint is *experimental* and only available if the daemon is started with experimental - > features enabled. The specifications for this endpoint may still change in a future version of the API. - ### Hijacking This endpoint hijacks the HTTP connection to HTTP2 transport that allows the client to expose gPRC services on that connection. @@ -10415,4 +10623,4 @@ paths: description: "server error" schema: $ref: "#/definitions/ErrorResponse" - tags: ["Session (experimental)"] + tags: ["Session"] diff --git a/vendor/github.com/docker/docker/api/types/client.go b/vendor/github.com/docker/docker/api/types/client.go index 4b9f50282..6616cbcd5 100644 --- a/vendor/github.com/docker/docker/api/types/client.go +++ b/vendor/github.com/docker/docker/api/types/client.go @@ -205,7 +205,7 @@ const ( // BuilderV1 is the first generation builder in docker daemon BuilderV1 BuilderVersion = "1" // BuilderBuildKit is builder based on moby/buildkit project - BuilderBuildKit = "2" + BuilderBuildKit BuilderVersion = "2" ) // ImageBuildResponse holds information @@ -265,7 +265,7 @@ type ImagePullOptions struct { // if the privilege request fails. type RequestPrivilegeFunc func() (string, error) -//ImagePushOptions holds information to push images. +// ImagePushOptions holds information to push images. type ImagePushOptions ImagePullOptions // ImageRemoveOptions holds parameters to remove images. @@ -363,6 +363,10 @@ type ServiceUpdateOptions struct { // ServiceListOptions holds parameters to list services with. type ServiceListOptions struct { Filters filters.Args + + // Status indicates whether the server should include the service task + // count of running and desired tasks. + Status bool } // ServiceInspectOptions holds parameters related to the "service inspect" diff --git a/vendor/github.com/docker/docker/api/types/container/container_changes.go b/vendor/github.com/docker/docker/api/types/container/container_changes.go index 222d14100..16dd5019e 100644 --- a/vendor/github.com/docker/docker/api/types/container/container_changes.go +++ b/vendor/github.com/docker/docker/api/types/container/container_changes.go @@ -1,8 +1,7 @@ package container // import "github.com/docker/docker/api/types/container" // ---------------------------------------------------------------------------- -// DO NOT EDIT THIS FILE -// This file was generated by `swagger generate operation` +// Code generated by `swagger generate operation`. DO NOT EDIT. // // See hack/generate-swagger-api.sh // ---------------------------------------------------------------------------- diff --git a/vendor/github.com/docker/docker/api/types/container/container_create.go b/vendor/github.com/docker/docker/api/types/container/container_create.go index 1ec9c3728..d0c852f84 100644 --- a/vendor/github.com/docker/docker/api/types/container/container_create.go +++ b/vendor/github.com/docker/docker/api/types/container/container_create.go @@ -1,8 +1,7 @@ package container // import "github.com/docker/docker/api/types/container" // ---------------------------------------------------------------------------- -// DO NOT EDIT THIS FILE -// This file was generated by `swagger generate operation` +// Code generated by `swagger generate operation`. DO NOT EDIT. // // See hack/generate-swagger-api.sh // ---------------------------------------------------------------------------- diff --git a/vendor/github.com/docker/docker/api/types/container/container_top.go b/vendor/github.com/docker/docker/api/types/container/container_top.go index f8a606687..f0ee9dde7 100644 --- a/vendor/github.com/docker/docker/api/types/container/container_top.go +++ b/vendor/github.com/docker/docker/api/types/container/container_top.go @@ -1,8 +1,7 @@ package container // import "github.com/docker/docker/api/types/container" // ---------------------------------------------------------------------------- -// DO NOT EDIT THIS FILE -// This file was generated by `swagger generate operation` +// Code generated by `swagger generate operation`. DO NOT EDIT. // // See hack/generate-swagger-api.sh // ---------------------------------------------------------------------------- diff --git a/vendor/github.com/docker/docker/api/types/container/container_update.go b/vendor/github.com/docker/docker/api/types/container/container_update.go index 33addedf7..c10f175ea 100644 --- a/vendor/github.com/docker/docker/api/types/container/container_update.go +++ b/vendor/github.com/docker/docker/api/types/container/container_update.go @@ -1,8 +1,7 @@ package container // import "github.com/docker/docker/api/types/container" // ---------------------------------------------------------------------------- -// DO NOT EDIT THIS FILE -// This file was generated by `swagger generate operation` +// Code generated by `swagger generate operation`. DO NOT EDIT. // // See hack/generate-swagger-api.sh // ---------------------------------------------------------------------------- diff --git a/vendor/github.com/docker/docker/api/types/container/container_wait.go b/vendor/github.com/docker/docker/api/types/container/container_wait.go index 94b6a20e1..49e05ae66 100644 --- a/vendor/github.com/docker/docker/api/types/container/container_wait.go +++ b/vendor/github.com/docker/docker/api/types/container/container_wait.go @@ -1,8 +1,7 @@ package container // import "github.com/docker/docker/api/types/container" // ---------------------------------------------------------------------------- -// DO NOT EDIT THIS FILE -// This file was generated by `swagger generate operation` +// Code generated by `swagger generate operation`. DO NOT EDIT. // // See hack/generate-swagger-api.sh // ---------------------------------------------------------------------------- diff --git a/vendor/github.com/docker/docker/api/types/container/host_config.go b/vendor/github.com/docker/docker/api/types/container/host_config.go index c3de3d976..b8a4b3aa6 100644 --- a/vendor/github.com/docker/docker/api/types/container/host_config.go +++ b/vendor/github.com/docker/docker/api/types/container/host_config.go @@ -7,9 +7,32 @@ import ( "github.com/docker/docker/api/types/mount" "github.com/docker/docker/api/types/strslice" "github.com/docker/go-connections/nat" - "github.com/docker/go-units" + units "github.com/docker/go-units" ) +// CgroupnsMode represents the cgroup namespace mode of the container +type CgroupnsMode string + +// IsPrivate indicates whether the container uses its own private cgroup namespace +func (c CgroupnsMode) IsPrivate() bool { + return c == "private" +} + +// IsHost indicates whether the container shares the host's cgroup namespace +func (c CgroupnsMode) IsHost() bool { + return c == "host" +} + +// IsEmpty indicates whether the container cgroup namespace mode is unset +func (c CgroupnsMode) IsEmpty() bool { + return c == "" +} + +// Valid indicates whether the cgroup namespace mode is valid +func (c CgroupnsMode) Valid() bool { + return c.IsEmpty() || c.IsPrivate() || c.IsHost() +} + // Isolation represents the isolation technology of a container. The supported // values are platform specific type Isolation string @@ -122,7 +145,7 @@ func (n NetworkMode) ConnectedContainer() string { return "" } -//UserDefined indicates user-created network +// UserDefined indicates user-created network func (n NetworkMode) UserDefined() string { if n.IsUserDefined() { return string(n) @@ -381,9 +404,10 @@ type HostConfig struct { CapAdd strslice.StrSlice // List of kernel capabilities to add to the container CapDrop strslice.StrSlice // List of kernel capabilities to remove from the container Capabilities []string `json:"Capabilities"` // List of kernel capabilities to be available for container (this overrides the default set) - DNS []string `json:"Dns"` // List of DNS server to lookup - DNSOptions []string `json:"DnsOptions"` // List of DNSOption to look for - DNSSearch []string `json:"DnsSearch"` // List of DNSSearch to look for + CgroupnsMode CgroupnsMode // Cgroup namespace mode to use for the container + DNS []string `json:"Dns"` // List of DNS server to lookup + DNSOptions []string `json:"DnsOptions"` // List of DNSOption to look for + DNSSearch []string `json:"DnsSearch"` // List of DNSSearch to look for ExtraHosts []string // List of extra hosts GroupAdd []string // List of additional groups that the container process will run as IpcMode IpcMode // IPC namespace to use for the container diff --git a/vendor/github.com/docker/docker/api/types/error_response_ext.go b/vendor/github.com/docker/docker/api/types/error_response_ext.go new file mode 100644 index 000000000..f84f034cd --- /dev/null +++ b/vendor/github.com/docker/docker/api/types/error_response_ext.go @@ -0,0 +1,6 @@ +package types + +// Error returns the error message +func (e ErrorResponse) Error() string { + return e.Message +} diff --git a/vendor/github.com/docker/docker/api/types/filters/parse.go b/vendor/github.com/docker/docker/api/types/filters/parse.go index 1f75403f7..4bc91cffd 100644 --- a/vendor/github.com/docker/docker/api/types/filters/parse.go +++ b/vendor/github.com/docker/docker/api/types/filters/parse.go @@ -36,6 +36,15 @@ func NewArgs(initialArgs ...KeyValuePair) Args { return args } +// Keys returns all the keys in list of Args +func (args Args) Keys() []string { + keys := make([]string, 0, len(args.fields)) + for k := range args.fields { + keys = append(keys, k) + } + return keys +} + // MarshalJSON returns a JSON byte representation of the Args func (args Args) MarshalJSON() ([]byte, error) { if len(args.fields) == 0 { @@ -57,7 +66,7 @@ func ToJSON(a Args) (string, error) { // then the encoded format will use an older legacy format where the values are a // list of strings, instead of a set. // -// Deprecated: Use ToJSON +// Deprecated: do not use in any new code; use ToJSON instead func ToParamWithVersion(version string, a Args) (string, error) { if a.Len() == 0 { return "", nil @@ -145,7 +154,7 @@ func (args Args) Len() int { func (args Args) MatchKVList(key string, sources map[string]string) bool { fieldValues := args.fields[key] - //do not filter if there is no filter set or cannot determine filter + // do not filter if there is no filter set or cannot determine filter if len(fieldValues) == 0 { return true } @@ -191,7 +200,7 @@ func (args Args) Match(field, source string) bool { // ExactMatch returns true if the source matches exactly one of the values. func (args Args) ExactMatch(key, source string) bool { fieldValues, ok := args.fields[key] - //do not filter if there is no filter set or cannot determine filter + // do not filter if there is no filter set or cannot determine filter if !ok || len(fieldValues) == 0 { return true } @@ -204,7 +213,7 @@ func (args Args) ExactMatch(key, source string) bool { // matches exactly the value. func (args Args) UniqueExactMatch(key, source string) bool { fieldValues := args.fields[key] - //do not filter if there is no filter set or cannot determine filter + // do not filter if there is no filter set or cannot determine filter if len(fieldValues) == 0 { return true } diff --git a/vendor/github.com/docker/docker/api/types/image/image_history.go b/vendor/github.com/docker/docker/api/types/image/image_history.go index b5a7a0c49..e302bb0ae 100644 --- a/vendor/github.com/docker/docker/api/types/image/image_history.go +++ b/vendor/github.com/docker/docker/api/types/image/image_history.go @@ -1,8 +1,7 @@ package image // import "github.com/docker/docker/api/types/image" // ---------------------------------------------------------------------------- -// DO NOT EDIT THIS FILE -// This file was generated by `swagger generate operation` +// Code generated by `swagger generate operation`. DO NOT EDIT. // // See hack/generate-swagger-api.sh // ---------------------------------------------------------------------------- diff --git a/vendor/github.com/docker/docker/api/types/network/network.go b/vendor/github.com/docker/docker/api/types/network/network.go index 71e97338f..7927dbfff 100644 --- a/vendor/github.com/docker/docker/api/types/network/network.go +++ b/vendor/github.com/docker/docker/api/types/network/network.go @@ -13,7 +13,7 @@ type Address struct { // IPAM represents IP Address Management type IPAM struct { Driver string - Options map[string]string //Per network IPAM driver options + Options map[string]string // Per network IPAM driver options Config []IPAMConfig } diff --git a/vendor/github.com/docker/docker/api/types/registry/registry.go b/vendor/github.com/docker/docker/api/types/registry/registry.go index 8789ad3b3..53e47084c 100644 --- a/vendor/github.com/docker/docker/api/types/registry/registry.go +++ b/vendor/github.com/docker/docker/api/types/registry/registry.go @@ -4,7 +4,7 @@ import ( "encoding/json" "net" - "github.com/opencontainers/image-spec/specs-go/v1" + v1 "github.com/opencontainers/image-spec/specs-go/v1" ) // ServiceConfig stores daemon registry services configuration. diff --git a/vendor/github.com/docker/docker/api/types/swarm/container.go b/vendor/github.com/docker/docker/api/types/swarm/container.go index 48190c176..5bbedfcf6 100644 --- a/vendor/github.com/docker/docker/api/types/swarm/container.go +++ b/vendor/github.com/docker/docker/api/types/swarm/container.go @@ -67,10 +67,11 @@ type ContainerSpec struct { // The format of extra hosts on swarmkit is specified in: // http://man7.org/linux/man-pages/man5/hosts.5.html // IP_address canonical_hostname [aliases...] - Hosts []string `json:",omitempty"` - DNSConfig *DNSConfig `json:",omitempty"` - Secrets []*SecretReference `json:",omitempty"` - Configs []*ConfigReference `json:",omitempty"` - Isolation container.Isolation `json:",omitempty"` - Sysctls map[string]string `json:",omitempty"` + Hosts []string `json:",omitempty"` + DNSConfig *DNSConfig `json:",omitempty"` + Secrets []*SecretReference `json:",omitempty"` + Configs []*ConfigReference `json:",omitempty"` + Isolation container.Isolation `json:",omitempty"` + Sysctls map[string]string `json:",omitempty"` + Capabilities []string `json:",omitempty"` } diff --git a/vendor/github.com/docker/docker/api/types/swarm/runtime/plugin.pb.go b/vendor/github.com/docker/docker/api/types/swarm/runtime/plugin.pb.go index 1fdc9b043..e45045866 100644 --- a/vendor/github.com/docker/docker/api/types/swarm/runtime/plugin.pb.go +++ b/vendor/github.com/docker/docker/api/types/swarm/runtime/plugin.pb.go @@ -1,6 +1,5 @@ -// Code generated by protoc-gen-gogo. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: plugin.proto -// DO NOT EDIT! /* Package runtime is a generated protocol buffer package. @@ -38,6 +37,7 @@ type PluginSpec struct { Remote string `protobuf:"bytes,2,opt,name=remote,proto3" json:"remote,omitempty"` Privileges []*PluginPrivilege `protobuf:"bytes,3,rep,name=privileges" json:"privileges,omitempty"` Disabled bool `protobuf:"varint,4,opt,name=disabled,proto3" json:"disabled,omitempty"` + Env []string `protobuf:"bytes,5,rep,name=env" json:"env,omitempty"` } func (m *PluginSpec) Reset() { *m = PluginSpec{} } @@ -73,6 +73,13 @@ func (m *PluginSpec) GetDisabled() bool { return false } +func (m *PluginSpec) GetEnv() []string { + if m != nil { + return m.Env + } + return nil +} + // PluginPrivilege describes a permission the user has to accept // upon installing a plugin. type PluginPrivilege struct { @@ -160,6 +167,21 @@ func (m *PluginSpec) MarshalTo(dAtA []byte) (int, error) { } i++ } + if len(m.Env) > 0 { + for _, s := range m.Env { + dAtA[i] = 0x2a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } return i, nil } @@ -208,24 +230,6 @@ func (m *PluginPrivilege) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func encodeFixed64Plugin(dAtA []byte, offset int, v uint64) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - dAtA[offset+4] = uint8(v >> 32) - dAtA[offset+5] = uint8(v >> 40) - dAtA[offset+6] = uint8(v >> 48) - dAtA[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Plugin(dAtA []byte, offset int, v uint32) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - return offset + 4 -} func encodeVarintPlugin(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) @@ -255,6 +259,12 @@ func (m *PluginSpec) Size() (n int) { if m.Disabled { n += 2 } + if len(m.Env) > 0 { + for _, s := range m.Env { + l = len(s) + n += 1 + l + sovPlugin(uint64(l)) + } + } return n } @@ -429,6 +439,35 @@ func (m *PluginSpec) Unmarshal(dAtA []byte) error { } } m.Disabled = bool(v != 0) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlugin + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPlugin + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Env = append(m.Env, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipPlugin(dAtA[iNdEx:]) @@ -695,18 +734,21 @@ var ( func init() { proto.RegisterFile("plugin.proto", fileDescriptorPlugin) } var fileDescriptorPlugin = []byte{ - // 196 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0xc8, 0x29, 0x4d, - 0xcf, 0xcc, 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x57, 0x6a, 0x63, 0xe4, 0xe2, 0x0a, 0x00, 0x0b, - 0x04, 0x17, 0xa4, 0x26, 0x0b, 0x09, 0x71, 0xb1, 0xe4, 0x25, 0xe6, 0xa6, 0x4a, 0x30, 0x2a, 0x30, - 0x6a, 0x70, 0x06, 0x81, 0xd9, 0x42, 0x62, 0x5c, 0x6c, 0x45, 0xa9, 0xb9, 0xf9, 0x25, 0xa9, 0x12, - 0x4c, 0x60, 0x51, 0x28, 0x4f, 0xc8, 0x80, 0x8b, 0xab, 0xa0, 0x28, 0xb3, 0x2c, 0x33, 0x27, 0x35, - 0x3d, 0xb5, 0x58, 0x82, 0x59, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x40, 0x0f, 0x62, 0x58, 0x00, 0x4c, - 0x22, 0x08, 0x49, 0x8d, 0x90, 0x14, 0x17, 0x47, 0x4a, 0x66, 0x71, 0x62, 0x52, 0x4e, 0x6a, 0x8a, - 0x04, 0x8b, 0x02, 0xa3, 0x06, 0x47, 0x10, 0x9c, 0xaf, 0x14, 0xcb, 0xc5, 0x8f, 0xa6, 0x15, 0xab, - 0x63, 0x14, 0xb8, 0xb8, 0x53, 0x52, 0x8b, 0x93, 0x8b, 0x32, 0x0b, 0x4a, 0x32, 0xf3, 0xf3, 0xa0, - 0x2e, 0x42, 0x16, 0x12, 0x12, 0xe1, 0x62, 0x2d, 0x4b, 0xcc, 0x29, 0x4d, 0x05, 0xbb, 0x88, 0x33, - 0x08, 0xc2, 0x71, 0xe2, 0x39, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, - 0x18, 0x93, 0xd8, 0xc0, 0x9e, 0x37, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xb8, 0x84, 0xad, 0x79, - 0x0c, 0x01, 0x00, 0x00, + // 256 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0x4d, 0x4b, 0xc3, 0x30, + 0x18, 0xc7, 0x89, 0xdd, 0xc6, 0xfa, 0x4c, 0x70, 0x04, 0x91, 0xe2, 0xa1, 0x94, 0x9d, 0x7a, 0x6a, + 0x45, 0x2f, 0x82, 0x37, 0x0f, 0x9e, 0x47, 0xbc, 0x09, 0x1e, 0xd2, 0xf6, 0xa1, 0x06, 0x9b, 0x17, + 0x92, 0xb4, 0xe2, 0x37, 0xf1, 0x23, 0x79, 0xf4, 0x23, 0x48, 0x3f, 0x89, 0x98, 0x75, 0x32, 0x64, + 0xa7, 0xff, 0x4b, 0xc2, 0x9f, 0x1f, 0x0f, 0x9c, 0x9a, 0xae, 0x6f, 0x85, 0x2a, 0x8c, 0xd5, 0x5e, + 0x6f, 0x3e, 0x08, 0xc0, 0x36, 0x14, 0x8f, 0x06, 0x6b, 0x4a, 0x61, 0xa6, 0xb8, 0xc4, 0x84, 0x64, + 0x24, 0x8f, 0x59, 0xf0, 0xf4, 0x02, 0x16, 0x16, 0xa5, 0xf6, 0x98, 0x9c, 0x84, 0x76, 0x4a, 0xf4, + 0x0a, 0xc0, 0x58, 0x31, 0x88, 0x0e, 0x5b, 0x74, 0x49, 0x94, 0x45, 0xf9, 0xea, 0x7a, 0x5d, 0xec, + 0xc6, 0xb6, 0xfb, 0x07, 0x76, 0xf0, 0x87, 0x5e, 0xc2, 0xb2, 0x11, 0x8e, 0x57, 0x1d, 0x36, 0xc9, + 0x2c, 0x23, 0xf9, 0x92, 0xfd, 0x65, 0xba, 0x86, 0x08, 0xd5, 0x90, 0xcc, 0xb3, 0x28, 0x8f, 0xd9, + 0xaf, 0xdd, 0x3c, 0xc3, 0xd9, 0xbf, 0xb1, 0xa3, 0x78, 0x19, 0xac, 0x1a, 0x74, 0xb5, 0x15, 0xc6, + 0x0b, 0xad, 0x26, 0xc6, 0xc3, 0x8a, 0x9e, 0xc3, 0x7c, 0xe0, 0x5d, 0x8f, 0x81, 0x31, 0x66, 0xbb, + 0x70, 0xff, 0xf0, 0x39, 0xa6, 0xe4, 0x6b, 0x4c, 0xc9, 0xf7, 0x98, 0x92, 0xa7, 0xdb, 0x56, 0xf8, + 0x97, 0xbe, 0x2a, 0x6a, 0x2d, 0xcb, 0x46, 0xd7, 0xaf, 0x68, 0xf7, 0xc2, 0x8d, 0x28, 0xfd, 0xbb, + 0x41, 0x57, 0xba, 0x37, 0x6e, 0x65, 0x69, 0x7b, 0xe5, 0x85, 0xc4, 0xbb, 0x49, 0xab, 0x45, 0x38, + 0xe4, 0xcd, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x99, 0xa8, 0xd9, 0x9b, 0x58, 0x01, 0x00, 0x00, } diff --git a/vendor/github.com/docker/docker/api/types/swarm/runtime/plugin.proto b/vendor/github.com/docker/docker/api/types/swarm/runtime/plugin.proto index 6d63b7783..9ef169046 100644 --- a/vendor/github.com/docker/docker/api/types/swarm/runtime/plugin.proto +++ b/vendor/github.com/docker/docker/api/types/swarm/runtime/plugin.proto @@ -9,6 +9,7 @@ message PluginSpec { string remote = 2; repeated PluginPrivilege privileges = 3; bool disabled = 4; + repeated string env = 5; } // PluginPrivilege describes a permission the user has to accept diff --git a/vendor/github.com/docker/docker/api/types/swarm/service.go b/vendor/github.com/docker/docker/api/types/swarm/service.go index abf192e75..6eb452d24 100644 --- a/vendor/github.com/docker/docker/api/types/swarm/service.go +++ b/vendor/github.com/docker/docker/api/types/swarm/service.go @@ -10,6 +10,17 @@ type Service struct { PreviousSpec *ServiceSpec `json:",omitempty"` Endpoint Endpoint `json:",omitempty"` UpdateStatus *UpdateStatus `json:",omitempty"` + + // ServiceStatus is an optional, extra field indicating the number of + // desired and running tasks. It is provided primarily as a shortcut to + // calculating these values client-side, which otherwise would require + // listing all tasks for a service, an operation that could be + // computation and network expensive. + ServiceStatus *ServiceStatus `json:",omitempty"` + + // JobStatus is the status of a Service which is in one of ReplicatedJob or + // GlobalJob modes. It is absent on Replicated and Global services. + JobStatus *JobStatus `json:",omitempty"` } // ServiceSpec represents the spec of a service. @@ -32,8 +43,10 @@ type ServiceSpec struct { // ServiceMode represents the mode of a service. type ServiceMode struct { - Replicated *ReplicatedService `json:",omitempty"` - Global *GlobalService `json:",omitempty"` + Replicated *ReplicatedService `json:",omitempty"` + Global *GlobalService `json:",omitempty"` + ReplicatedJob *ReplicatedJob `json:",omitempty"` + GlobalJob *GlobalJob `json:",omitempty"` } // UpdateState is the state of a service update. @@ -70,6 +83,32 @@ type ReplicatedService struct { // GlobalService is a kind of ServiceMode. type GlobalService struct{} +// ReplicatedJob is the a type of Service which executes a defined Tasks +// in parallel until the specified number of Tasks have succeeded. +type ReplicatedJob struct { + // MaxConcurrent indicates the maximum number of Tasks that should be + // executing simultaneously for this job at any given time. There may be + // fewer Tasks that MaxConcurrent executing simultaneously; for example, if + // there are fewer than MaxConcurrent tasks needed to reach + // TotalCompletions. + // + // If this field is empty, it will default to a max concurrency of 1. + MaxConcurrent *uint64 `json:",omitempty"` + + // TotalCompletions is the total number of Tasks desired to run to + // completion. + // + // If this field is empty, the value of MaxConcurrent will be used. + TotalCompletions *uint64 `json:",omitempty"` +} + +// GlobalJob is the type of a Service which executes a Task on every Node +// matching the Service's placement constraints. These tasks run to completion +// and then exit. +// +// This type is deliberately empty. +type GlobalJob struct{} + const ( // UpdateFailureActionPause PAUSE UpdateFailureActionPause = "pause" @@ -122,3 +161,42 @@ type UpdateConfig struct { // started, or the new task is started before the old task is shut down. Order string } + +// ServiceStatus represents the number of running tasks in a service and the +// number of tasks desired to be running. +type ServiceStatus struct { + // RunningTasks is the number of tasks for the service actually in the + // Running state + RunningTasks uint64 + + // DesiredTasks is the number of tasks desired to be running by the + // service. For replicated services, this is the replica count. For global + // services, this is computed by taking the number of tasks with desired + // state of not-Shutdown. + DesiredTasks uint64 + + // CompletedTasks is the number of tasks in the state Completed, if this + // service is in ReplicatedJob or GlobalJob mode. This field must be + // cross-referenced with the service type, because the default value of 0 + // may mean that a service is not in a job mode, or it may mean that the + // job has yet to complete any tasks. + CompletedTasks uint64 +} + +// JobStatus is the status of a job-type service. +type JobStatus struct { + // JobIteration is a value increased each time a Job is executed, + // successfully or otherwise. "Executed", in this case, means the job as a + // whole has been started, not that an individual Task has been launched. A + // job is "Executed" when its ServiceSpec is updated. JobIteration can be + // used to disambiguate Tasks belonging to different executions of a job. + // + // Though JobIteration will increase with each subsequent execution, it may + // not necessarily increase by 1, and so JobIteration should not be used to + // keep track of the number of times a job has been executed. + JobIteration Version + + // LastExecution is the time that the job was last executed, as observed by + // Swarm manager. + LastExecution time.Time `json:",omitempty"` +} diff --git a/vendor/github.com/docker/docker/api/types/swarm/task.go b/vendor/github.com/docker/docker/api/types/swarm/task.go index d5a57df5d..9f193df37 100644 --- a/vendor/github.com/docker/docker/api/types/swarm/task.go +++ b/vendor/github.com/docker/docker/api/types/swarm/task.go @@ -56,6 +56,12 @@ type Task struct { DesiredState TaskState `json:",omitempty"` NetworksAttachments []NetworkAttachment `json:",omitempty"` GenericResources []GenericResource `json:",omitempty"` + + // JobIteration is the JobIteration of the Service that this Task was + // spawned from, if the Service is a ReplicatedJob or GlobalJob. This is + // used to determine which Tasks belong to which run of the job. This field + // is absent if the Service mode is Replicated or Global. + JobIteration *Version `json:",omitempty"` } // TaskSpec represents the spec of a task. diff --git a/vendor/github.com/docker/docker/api/types/types.go b/vendor/github.com/docker/docker/api/types/types.go index a39ffcb7b..7486eab4d 100644 --- a/vendor/github.com/docker/docker/api/types/types.go +++ b/vendor/github.com/docker/docker/api/types/types.go @@ -39,6 +39,7 @@ type ImageInspect struct { Author string Config *container.Config Architecture string + Variant string `json:",omitempty"` Os string OsVersion string `json:",omitempty"` Size int64 @@ -153,7 +154,7 @@ type Info struct { Images int Driver string DriverStatus [][2]string - SystemStatus [][2]string + SystemStatus [][2]string `json:",omitempty"` // SystemStatus is only propagated by the Swarm standalone API Plugins PluginsInfo MemoryLimit bool SwapLimit bool @@ -177,6 +178,7 @@ type Info struct { NEventsListener int KernelVersion string OperatingSystem string + OSVersion string OSType string Architecture string IndexServerAddress string @@ -316,7 +318,7 @@ type ContainerState struct { } // ContainerNode stores information about the node that a container -// is running on. It's only available in Docker Swarm +// is running on. It's only used by the Docker Swarm standalone API type ContainerNode struct { ID string IPAddress string `json:"IP"` @@ -340,7 +342,7 @@ type ContainerJSONBase struct { HostnamePath string HostsPath string LogPath string - Node *ContainerNode `json:",omitempty"` + Node *ContainerNode `json:",omitempty"` // Node is only propagated by Docker Swarm standalone API Name string RestartCount int Driver string diff --git a/vendor/github.com/docker/docker/api/types/volume/volume_create.go b/vendor/github.com/docker/docker/api/types/volume/volume_create.go index 0c3772d3a..0d4f46a84 100644 --- a/vendor/github.com/docker/docker/api/types/volume/volume_create.go +++ b/vendor/github.com/docker/docker/api/types/volume/volume_create.go @@ -1,8 +1,7 @@ package volume // import "github.com/docker/docker/api/types/volume" // ---------------------------------------------------------------------------- -// DO NOT EDIT THIS FILE -// This file was generated by `swagger generate operation` +// Code generated by `swagger generate operation`. DO NOT EDIT. // // See hack/generate-swagger-api.sh // ---------------------------------------------------------------------------- diff --git a/vendor/github.com/docker/docker/api/types/volume/volume_list.go b/vendor/github.com/docker/docker/api/types/volume/volume_list.go index 45c3c1c9a..8e685d51c 100644 --- a/vendor/github.com/docker/docker/api/types/volume/volume_list.go +++ b/vendor/github.com/docker/docker/api/types/volume/volume_list.go @@ -1,8 +1,7 @@ package volume // import "github.com/docker/docker/api/types/volume" // ---------------------------------------------------------------------------- -// DO NOT EDIT THIS FILE -// This file was generated by `swagger generate operation` +// Code generated by `swagger generate operation`. DO NOT EDIT. // // See hack/generate-swagger-api.sh // ---------------------------------------------------------------------------- diff --git a/vendor/github.com/docker/docker/client/client.go b/vendor/github.com/docker/docker/client/client.go index b63d4d6d4..0649a69cc 100644 --- a/vendor/github.com/docker/docker/client/client.go +++ b/vendor/github.com/docker/docker/client/client.go @@ -252,7 +252,8 @@ func (cli *Client) DaemonHost() string { // HTTPClient returns a copy of the HTTP client bound to the server func (cli *Client) HTTPClient() *http.Client { - return &*cli.client + c := *cli.client + return &c } // ParseHostURL parses a url string, validates the string is a host url, and diff --git a/vendor/github.com/docker/docker/client/client_unix.go b/vendor/github.com/docker/docker/client/client_unix.go index 3d24470ba..23c2e1e34 100644 --- a/vendor/github.com/docker/docker/client/client_unix.go +++ b/vendor/github.com/docker/docker/client/client_unix.go @@ -1,4 +1,4 @@ -// +build linux freebsd openbsd darwin +// +build linux freebsd openbsd darwin solaris illumos package client // import "github.com/docker/docker/client" diff --git a/vendor/github.com/docker/docker/client/container_list.go b/vendor/github.com/docker/docker/client/container_list.go index 1e7a63a9c..a973de597 100644 --- a/vendor/github.com/docker/docker/client/container_list.go +++ b/vendor/github.com/docker/docker/client/container_list.go @@ -35,6 +35,7 @@ func (cli *Client) ContainerList(ctx context.Context, options types.ContainerLis } if options.Filters.Len() > 0 { + //nolint:staticcheck // ignore SA1019 for old code filterJSON, err := filters.ToParamWithVersion(cli.version, options.Filters) if err != nil { diff --git a/vendor/github.com/docker/docker/client/events.go b/vendor/github.com/docker/docker/client/events.go index 6e5653895..f0dc9d9e1 100644 --- a/vendor/github.com/docker/docker/client/events.go +++ b/vendor/github.com/docker/docker/client/events.go @@ -90,6 +90,7 @@ func buildEventsQueryParams(cliVersion string, options types.EventsOptions) (url } if options.Filters.Len() > 0 { + //nolint:staticcheck // ignore SA1019 for old code filterJSON, err := filters.ToParamWithVersion(cliVersion, options.Filters) if err != nil { return nil, err diff --git a/vendor/github.com/docker/docker/client/hijack.go b/vendor/github.com/docker/docker/client/hijack.go index e9c9a752f..e1dc49ef0 100644 --- a/vendor/github.com/docker/docker/client/hijack.go +++ b/vendor/github.com/docker/docker/client/hijack.go @@ -24,7 +24,7 @@ func (cli *Client) postHijacked(ctx context.Context, path string, query url.Valu } apiPath := cli.getAPIPath(ctx, path, query) - req, err := http.NewRequest("POST", apiPath, bodyEncoded) + req, err := http.NewRequest(http.MethodPost, apiPath, bodyEncoded) if err != nil { return types.HijackedResponse{}, err } @@ -40,7 +40,7 @@ func (cli *Client) postHijacked(ctx context.Context, path string, query url.Valu // DialHijack returns a hijacked connection with negotiated protocol proto. func (cli *Client) DialHijack(ctx context.Context, url, proto string, meta map[string][]string) (net.Conn, error) { - req, err := http.NewRequest("POST", url, nil) + req, err := http.NewRequest(http.MethodPost, url, nil) if err != nil { return nil, err } @@ -87,6 +87,8 @@ func (cli *Client) setupHijackConn(ctx context.Context, req *http.Request, proto // Server hijacks the connection, error 'connection closed' expected resp, err := clientconn.Do(req) + + //nolint:staticcheck // ignore SA1019 for connecting to old (pre go1.8) daemons if err != httputil.ErrPersistEOF { if err != nil { return nil, err diff --git a/vendor/github.com/docker/docker/client/image_import.go b/vendor/github.com/docker/docker/client/image_import.go index c2972ea95..d3336d410 100644 --- a/vendor/github.com/docker/docker/client/image_import.go +++ b/vendor/github.com/docker/docker/client/image_import.go @@ -14,7 +14,7 @@ import ( // It returns the JSON content in the response body. func (cli *Client) ImageImport(ctx context.Context, source types.ImageImportSource, ref string, options types.ImageImportOptions) (io.ReadCloser, error) { if ref != "" { - //Check if the given image name can be resolved + // Check if the given image name can be resolved if _, err := reference.ParseNormalizedNamed(ref); err != nil { return nil, err } diff --git a/vendor/github.com/docker/docker/client/image_list.go b/vendor/github.com/docker/docker/client/image_list.go index 4fa8c006b..a4d750509 100644 --- a/vendor/github.com/docker/docker/client/image_list.go +++ b/vendor/github.com/docker/docker/client/image_list.go @@ -24,6 +24,7 @@ func (cli *Client) ImageList(ctx context.Context, options types.ImageListOptions } } if optionFilters.Len() > 0 { + //nolint:staticcheck // ignore SA1019 for old code filterJSON, err := filters.ToParamWithVersion(cli.version, optionFilters) if err != nil { return images, err diff --git a/vendor/github.com/docker/docker/client/image_push.go b/vendor/github.com/docker/docker/client/image_push.go index 49d412ee3..845580d4a 100644 --- a/vendor/github.com/docker/docker/client/image_push.go +++ b/vendor/github.com/docker/docker/client/image_push.go @@ -25,15 +25,14 @@ func (cli *Client) ImagePush(ctx context.Context, image string, options types.Im return nil, errors.New("cannot push a digest reference") } - tag := "" name := reference.FamiliarName(ref) - - if nameTaggedRef, isNamedTagged := ref.(reference.NamedTagged); isNamedTagged { - tag = nameTaggedRef.Tag() - } - query := url.Values{} - query.Set("tag", tag) + if !options.All { + ref = reference.TagNameOnly(ref) + if tagged, ok := ref.(reference.Tagged); ok { + query.Set("tag", tagged.Tag()) + } + } resp, err := cli.tryImagePush(ctx, name, query, options.RegistryAuth) if errdefs.IsUnauthorized(err) && options.PrivilegeFunc != nil { diff --git a/vendor/github.com/docker/docker/client/network_list.go b/vendor/github.com/docker/docker/client/network_list.go index 7130c1364..ed2acb557 100644 --- a/vendor/github.com/docker/docker/client/network_list.go +++ b/vendor/github.com/docker/docker/client/network_list.go @@ -13,6 +13,7 @@ import ( func (cli *Client) NetworkList(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error) { query := url.Values{} if options.Filters.Len() > 0 { + //nolint:staticcheck // ignore SA1019 for old code filterJSON, err := filters.ToParamWithVersion(cli.version, options.Filters) if err != nil { return nil, err diff --git a/vendor/github.com/docker/docker/client/ping.go b/vendor/github.com/docker/docker/client/ping.go index 90f39ec14..a9af001ef 100644 --- a/vendor/github.com/docker/docker/client/ping.go +++ b/vendor/github.com/docker/docker/client/ping.go @@ -17,9 +17,9 @@ func (cli *Client) Ping(ctx context.Context) (types.Ping, error) { var ping types.Ping // Using cli.buildRequest() + cli.doRequest() instead of cli.sendRequest() - // because ping requests are used during API version negotiation, so we want + // because ping requests are used during API version negotiation, so we want // to hit the non-versioned /_ping endpoint, not /v1.xx/_ping - req, err := cli.buildRequest("HEAD", path.Join(cli.basePath, "/_ping"), nil, nil) + req, err := cli.buildRequest(http.MethodHead, path.Join(cli.basePath, "/_ping"), nil, nil) if err != nil { return ping, err } @@ -35,7 +35,7 @@ func (cli *Client) Ping(ctx context.Context) (types.Ping, error) { return ping, err } - req, err = cli.buildRequest("GET", path.Join(cli.basePath, "/_ping"), nil, nil) + req, err = cli.buildRequest(http.MethodGet, path.Join(cli.basePath, "/_ping"), nil, nil) if err != nil { return ping, err } diff --git a/vendor/github.com/docker/docker/client/plugin_list.go b/vendor/github.com/docker/docker/client/plugin_list.go index 8285cecd6..cf1935e2f 100644 --- a/vendor/github.com/docker/docker/client/plugin_list.go +++ b/vendor/github.com/docker/docker/client/plugin_list.go @@ -15,6 +15,7 @@ func (cli *Client) PluginList(ctx context.Context, filter filters.Args) (types.P query := url.Values{} if filter.Len() > 0 { + //nolint:staticcheck // ignore SA1019 for old code filterJSON, err := filters.ToParamWithVersion(cli.version, filter) if err != nil { return plugins, err diff --git a/vendor/github.com/docker/docker/client/request.go b/vendor/github.com/docker/docker/client/request.go index 3078335e2..ee15a46ed 100644 --- a/vendor/github.com/docker/docker/client/request.go +++ b/vendor/github.com/docker/docker/client/request.go @@ -29,12 +29,12 @@ type serverResponse struct { // head sends an http request to the docker API using the method HEAD. func (cli *Client) head(ctx context.Context, path string, query url.Values, headers map[string][]string) (serverResponse, error) { - return cli.sendRequest(ctx, "HEAD", path, query, nil, headers) + return cli.sendRequest(ctx, http.MethodHead, path, query, nil, headers) } // get sends an http request to the docker API using the method GET with a specific Go context. func (cli *Client) get(ctx context.Context, path string, query url.Values, headers map[string][]string) (serverResponse, error) { - return cli.sendRequest(ctx, "GET", path, query, nil, headers) + return cli.sendRequest(ctx, http.MethodGet, path, query, nil, headers) } // post sends an http request to the docker API using the method POST with a specific Go context. @@ -43,30 +43,21 @@ func (cli *Client) post(ctx context.Context, path string, query url.Values, obj if err != nil { return serverResponse{}, err } - return cli.sendRequest(ctx, "POST", path, query, body, headers) + return cli.sendRequest(ctx, http.MethodPost, path, query, body, headers) } func (cli *Client) postRaw(ctx context.Context, path string, query url.Values, body io.Reader, headers map[string][]string) (serverResponse, error) { - return cli.sendRequest(ctx, "POST", path, query, body, headers) -} - -// put sends an http request to the docker API using the method PUT. -func (cli *Client) put(ctx context.Context, path string, query url.Values, obj interface{}, headers map[string][]string) (serverResponse, error) { - body, headers, err := encodeBody(obj, headers) - if err != nil { - return serverResponse{}, err - } - return cli.sendRequest(ctx, "PUT", path, query, body, headers) + return cli.sendRequest(ctx, http.MethodPost, path, query, body, headers) } // putRaw sends an http request to the docker API using the method PUT. func (cli *Client) putRaw(ctx context.Context, path string, query url.Values, body io.Reader, headers map[string][]string) (serverResponse, error) { - return cli.sendRequest(ctx, "PUT", path, query, body, headers) + return cli.sendRequest(ctx, http.MethodPut, path, query, body, headers) } // delete sends an http request to the docker API using the method DELETE. func (cli *Client) delete(ctx context.Context, path string, query url.Values, headers map[string][]string) (serverResponse, error) { - return cli.sendRequest(ctx, "DELETE", path, query, nil, headers) + return cli.sendRequest(ctx, http.MethodDelete, path, query, nil, headers) } type headers map[string][]string @@ -88,7 +79,7 @@ func encodeBody(obj interface{}, headers headers) (io.Reader, headers, error) { } func (cli *Client) buildRequest(method, path string, body io.Reader, headers headers) (*http.Request, error) { - expectedPayload := (method == "POST" || method == "PUT") + expectedPayload := (method == http.MethodPost || method == http.MethodPut) if expectedPayload && body == nil { body = bytes.NewReader([]byte{}) } @@ -178,7 +169,13 @@ func (cli *Client) doRequest(ctx context.Context, req *http.Request) (serverResp // this is localised - for example in French the error would be // `open //./pipe/docker_engine: Le fichier spécifié est introuvable.` if strings.Contains(err.Error(), `open //./pipe/docker_engine`) { - err = errors.New(err.Error() + " In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.") + // Checks if client is running with elevated privileges + if f, elevatedErr := os.Open("\\\\.\\PHYSICALDRIVE0"); elevatedErr == nil { + err = errors.Wrap(err, "In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect.") + } else { + f.Close() + err = errors.Wrap(err, "This error may indicate that the docker daemon is not running.") + } } return serverResp, errors.Wrap(err, "error during connect") diff --git a/vendor/github.com/docker/docker/client/service_create.go b/vendor/github.com/docker/docker/client/service_create.go index 620fc6cff..56bfe55b7 100644 --- a/vendor/github.com/docker/docker/client/service_create.go +++ b/vendor/github.com/docker/docker/client/service_create.go @@ -9,7 +9,7 @@ import ( "github.com/docker/distribution/reference" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" - "github.com/opencontainers/go-digest" + digest "github.com/opencontainers/go-digest" "github.com/pkg/errors" ) diff --git a/vendor/github.com/docker/docker/client/service_list.go b/vendor/github.com/docker/docker/client/service_list.go index 64d35e715..f97ec75a5 100644 --- a/vendor/github.com/docker/docker/client/service_list.go +++ b/vendor/github.com/docker/docker/client/service_list.go @@ -23,6 +23,10 @@ func (cli *Client) ServiceList(ctx context.Context, options types.ServiceListOpt query.Set("filters", filterJSON) } + if options.Status { + query.Set("status", "true") + } + resp, err := cli.get(ctx, "/services", query, nil) defer ensureReaderClosed(resp) if err != nil { diff --git a/vendor/github.com/docker/docker/client/volume_list.go b/vendor/github.com/docker/docker/client/volume_list.go index 2380d5638..942498dde 100644 --- a/vendor/github.com/docker/docker/client/volume_list.go +++ b/vendor/github.com/docker/docker/client/volume_list.go @@ -15,6 +15,7 @@ func (cli *Client) VolumeList(ctx context.Context, filter filters.Args) (volumet query := url.Values{} if filter.Len() > 0 { + //nolint:staticcheck // ignore SA1019 for old code filterJSON, err := filters.ToParamWithVersion(cli.version, filter) if err != nil { return volumes, err diff --git a/vendor/github.com/docker/docker/errdefs/http_helpers.go b/vendor/github.com/docker/docker/errdefs/http_helpers.go index ac9bf6d33..07552f1cc 100644 --- a/vendor/github.com/docker/docker/errdefs/http_helpers.go +++ b/vendor/github.com/docker/docker/errdefs/http_helpers.go @@ -4,6 +4,7 @@ import ( "fmt" "net/http" + containerderrors "github.com/containerd/containerd/errdefs" "github.com/docker/distribution/registry/api/errcode" "github.com/sirupsen/logrus" "google.golang.org/grpc/codes" @@ -47,6 +48,10 @@ func GetHTTPErrorStatusCode(err error) int { if statusCode != http.StatusInternalServerError { return statusCode } + statusCode = statusCodeFromContainerdError(err) + if statusCode != http.StatusInternalServerError { + return statusCode + } statusCode = statusCodeFromDistributionError(err) if statusCode != http.StatusInternalServerError { return statusCode @@ -136,9 +141,6 @@ func statusCodeFromGRPCError(err error) int { case codes.Unavailable: // code 14 return http.StatusServiceUnavailable default: - if e, ok := err.(causer); ok { - return statusCodeFromGRPCError(e.Cause()) - } // codes.Canceled(1) // codes.Unknown(2) // codes.DeadlineExceeded(4) @@ -163,10 +165,27 @@ func statusCodeFromDistributionError(err error) int { } case errcode.ErrorCoder: return errs.ErrorCode().Descriptor().HTTPStatusCode - default: - if e, ok := err.(causer); ok { - return statusCodeFromDistributionError(e.Cause()) - } } return http.StatusInternalServerError } + +// statusCodeFromContainerdError returns status code for containerd errors when +// consumed directly (not through gRPC) +func statusCodeFromContainerdError(err error) int { + switch { + case containerderrors.IsInvalidArgument(err): + return http.StatusBadRequest + case containerderrors.IsNotFound(err): + return http.StatusNotFound + case containerderrors.IsAlreadyExists(err): + return http.StatusConflict + case containerderrors.IsFailedPrecondition(err): + return http.StatusPreconditionFailed + case containerderrors.IsUnavailable(err): + return http.StatusServiceUnavailable + case containerderrors.IsNotImplemented(err): + return http.StatusNotImplemented + default: + return http.StatusInternalServerError + } +} diff --git a/vendor/github.com/docker/docker/pkg/term/term_windows.go b/vendor/github.com/docker/docker/pkg/term/term_windows.go index a3c3db131..6e83b59e9 100644 --- a/vendor/github.com/docker/docker/pkg/term/term_windows.go +++ b/vendor/github.com/docker/docker/pkg/term/term_windows.go @@ -7,7 +7,7 @@ import ( "syscall" // used for STD_INPUT_HANDLE, STD_OUTPUT_HANDLE and STD_ERROR_HANDLE "github.com/Azure/go-ansiterm/winterm" - "github.com/docker/docker/pkg/term/windows" + windowsconsole "github.com/docker/docker/pkg/term/windows" ) // State holds the console mode for the terminal. diff --git a/vendor/github.com/docker/docker/pkg/term/windows/windows.go b/vendor/github.com/docker/docker/pkg/term/windows/windows.go index 3e5593ca6..7e8f265d4 100644 --- a/vendor/github.com/docker/docker/pkg/term/windows/windows.go +++ b/vendor/github.com/docker/docker/pkg/term/windows/windows.go @@ -1,3 +1,4 @@ +// +build windows // These files implement ANSI-aware input and output streams for use by the Docker Windows client. // When asked for the set of standard streams (e.g., stdin, stdout, stderr), the code will create // and return pseudo-streams that convert ANSI sequences to / from Windows Console API calls. @@ -9,7 +10,7 @@ import ( "os" "sync" - "github.com/Azure/go-ansiterm" + ansiterm "github.com/Azure/go-ansiterm" "github.com/sirupsen/logrus" ) diff --git a/vendor/github.com/koding/multiconfig/.gitignore b/vendor/github.com/exponent-io/jsonpath/.gitignore similarity index 97% rename from vendor/github.com/koding/multiconfig/.gitignore rename to vendor/github.com/exponent-io/jsonpath/.gitignore index 2824a98ab..daf913b1b 100644 --- a/vendor/github.com/koding/multiconfig/.gitignore +++ b/vendor/github.com/exponent-io/jsonpath/.gitignore @@ -21,5 +21,4 @@ _testmain.go *.exe *.test - -*~ +*.prof diff --git a/vendor/github.com/exponent-io/jsonpath/.travis.yml b/vendor/github.com/exponent-io/jsonpath/.travis.yml new file mode 100644 index 000000000..f4f458a41 --- /dev/null +++ b/vendor/github.com/exponent-io/jsonpath/.travis.yml @@ -0,0 +1,5 @@ +language: go + +go: + - 1.5 + - tip diff --git a/vendor/github.com/koding/multiconfig/LICENSE b/vendor/github.com/exponent-io/jsonpath/LICENSE similarity index 96% rename from vendor/github.com/koding/multiconfig/LICENSE rename to vendor/github.com/exponent-io/jsonpath/LICENSE index eeefdaabe..541977250 100644 --- a/vendor/github.com/koding/multiconfig/LICENSE +++ b/vendor/github.com/exponent-io/jsonpath/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014 Koding, Inc. +Copyright (c) 2015 Exponent Labs LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/github.com/exponent-io/jsonpath/README.md b/vendor/github.com/exponent-io/jsonpath/README.md new file mode 100644 index 000000000..382fb3138 --- /dev/null +++ b/vendor/github.com/exponent-io/jsonpath/README.md @@ -0,0 +1,66 @@ +[![GoDoc](https://godoc.org/github.com/exponent-io/jsonpath?status.svg)](https://godoc.org/github.com/exponent-io/jsonpath) +[![Build Status](https://travis-ci.org/exponent-io/jsonpath.svg?branch=master)](https://travis-ci.org/exponent-io/jsonpath) + +# jsonpath + +This package extends the [json.Decoder](https://golang.org/pkg/encoding/json/#Decoder) to support navigating a stream of JSON tokens. You should be able to use this extended Decoder places where a json.Decoder would have been used. + +This Decoder has the following enhancements... + * The [Scan](https://godoc.org/github.com/exponent-io/jsonpath/#Decoder.Scan) method supports scanning a JSON stream while extracting particular values along the way using [PathActions](https://godoc.org/github.com/exponent-io/jsonpath#PathActions). + * The [SeekTo](https://godoc.org/github.com/exponent-io/jsonpath#Decoder.SeekTo) method supports seeking forward in a JSON token stream to a particular path. + * The [Path](https://godoc.org/github.com/exponent-io/jsonpath#Decoder.Path) method returns the path of the most recently parsed token. + * The [Token](https://godoc.org/github.com/exponent-io/jsonpath#Decoder.Token) method has been modified to distinguish between strings that are object keys and strings that are values. Object key strings are returned as the [KeyString](https://godoc.org/github.com/exponent-io/jsonpath#KeyString) type rather than a native string. + +## Installation + + go get -u github.com/exponent-io/jsonpath + +## Example Usage + +#### SeekTo + +```go +import "github.com/exponent-io/jsonpath" + +var j = []byte(`[ + {"Space": "YCbCr", "Point": {"Y": 255, "Cb": 0, "Cr": -10}}, + {"Space": "RGB", "Point": {"R": 98, "G": 218, "B": 255}} +]`) + +w := json.NewDecoder(bytes.NewReader(j)) +var v interface{} + +w.SeekTo(1, "Point", "G") +w.Decode(&v) // v is 218 +``` + +#### Scan with PathActions + +```go +var j = []byte(`{"colors":[ + {"Space": "YCbCr", "Point": {"Y": 255, "Cb": 0, "Cr": -10, "A": 58}}, + {"Space": "RGB", "Point": {"R": 98, "G": 218, "B": 255, "A": 231}} +]}`) + +var actions PathActions + +// Extract the value at Point.A +actions.Add(func(d *Decoder) error { + var alpha int + err := d.Decode(&alpha) + fmt.Printf("Alpha: %v\n", alpha) + return err +}, "Point", "A") + +w := NewDecoder(bytes.NewReader(j)) +w.SeekTo("colors", 0) + +var ok = true +var err error +for ok { + ok, err = w.Scan(&actions) + if err != nil && err != io.EOF { + panic(err) + } +} +``` diff --git a/vendor/github.com/exponent-io/jsonpath/decoder.go b/vendor/github.com/exponent-io/jsonpath/decoder.go new file mode 100644 index 000000000..31de46c73 --- /dev/null +++ b/vendor/github.com/exponent-io/jsonpath/decoder.go @@ -0,0 +1,210 @@ +package jsonpath + +import ( + "encoding/json" + "io" +) + +// KeyString is returned from Decoder.Token to represent each key in a JSON object value. +type KeyString string + +// Decoder extends the Go runtime's encoding/json.Decoder to support navigating in a stream of JSON tokens. +type Decoder struct { + json.Decoder + + path JsonPath + context jsonContext +} + +// NewDecoder creates a new instance of the extended JSON Decoder. +func NewDecoder(r io.Reader) *Decoder { + return &Decoder{Decoder: *json.NewDecoder(r)} +} + +// SeekTo causes the Decoder to move forward to a given path in the JSON structure. +// +// The path argument must consist of strings or integers. Each string specifies an JSON object key, and +// each integer specifies an index into a JSON array. +// +// Consider the JSON structure +// +// { "a": [0,"s",12e4,{"b":0,"v":35} ] } +// +// SeekTo("a",3,"v") will move to the value referenced by the "a" key in the current object, +// followed by a move to the 4th value (index 3) in the array, followed by a move to the value at key "v". +// In this example, a subsequent call to the decoder's Decode() would unmarshal the value 35. +// +// SeekTo returns a boolean value indicating whether a match was found. +// +// Decoder is intended to be used with a stream of tokens. As a result it navigates forward only. +func (d *Decoder) SeekTo(path ...interface{}) (bool, error) { + + if len(path) == 0 { + return len(d.path) == 0, nil + } + last := len(path) - 1 + if i, ok := path[last].(int); ok { + path[last] = i - 1 + } + + for { + if d.path.Equal(path) { + return true, nil + } + _, err := d.Token() + if err == io.EOF { + return false, nil + } else if err != nil { + return false, err + } + } +} + +// Decode reads the next JSON-encoded value from its input and stores it in the value pointed to by v. This is +// equivalent to encoding/json.Decode(). +func (d *Decoder) Decode(v interface{}) error { + switch d.context { + case objValue: + d.context = objKey + break + case arrValue: + d.path.incTop() + break + } + return d.Decoder.Decode(v) +} + +// Path returns a slice of string and/or int values representing the path from the root of the JSON object to the +// position of the most-recently parsed token. +func (d *Decoder) Path() JsonPath { + p := make(JsonPath, len(d.path)) + copy(p, d.path) + return p +} + +// Token is equivalent to the Token() method on json.Decoder. The primary difference is that it distinguishes +// between strings that are keys and and strings that are values. String tokens that are object keys are returned as a +// KeyString rather than as a native string. +func (d *Decoder) Token() (json.Token, error) { + t, err := d.Decoder.Token() + if err != nil { + return t, err + } + + if t == nil { + switch d.context { + case objValue: + d.context = objKey + break + case arrValue: + d.path.incTop() + break + } + return t, err + } + + switch t := t.(type) { + case json.Delim: + switch t { + case json.Delim('{'): + if d.context == arrValue { + d.path.incTop() + } + d.path.push("") + d.context = objKey + break + case json.Delim('}'): + d.path.pop() + d.context = d.path.inferContext() + break + case json.Delim('['): + if d.context == arrValue { + d.path.incTop() + } + d.path.push(-1) + d.context = arrValue + break + case json.Delim(']'): + d.path.pop() + d.context = d.path.inferContext() + break + } + case float64, json.Number, bool: + switch d.context { + case objValue: + d.context = objKey + break + case arrValue: + d.path.incTop() + break + } + break + case string: + switch d.context { + case objKey: + d.path.nameTop(t) + d.context = objValue + return KeyString(t), err + case objValue: + d.context = objKey + case arrValue: + d.path.incTop() + } + break + } + + return t, err +} + +// Scan moves forward over the JSON stream consuming all the tokens at the current level (current object, current array) +// invoking each matching PathAction along the way. +// +// Scan returns true if there are more contiguous values to scan (for example in an array). +func (d *Decoder) Scan(ext *PathActions) (bool, error) { + + rootPath := d.Path() + + // If this is an array path, increment the root path in our local copy. + if rootPath.inferContext() == arrValue { + rootPath.incTop() + } + + for { + // advance the token position + _, err := d.Token() + if err != nil { + return false, err + } + + match: + var relPath JsonPath + + // capture the new JSON path + path := d.Path() + + if len(path) > len(rootPath) { + // capture the path relative to where the scan started + relPath = path[len(rootPath):] + } else { + // if the path is not longer than the root, then we are done with this scan + // return boolean flag indicating if there are more items to scan at the same level + return d.Decoder.More(), nil + } + + // match the relative path against the path actions + if node := ext.node.match(relPath); node != nil { + if node.action != nil { + // we have a match so execute the action + err = node.action(d) + if err != nil { + return d.Decoder.More(), err + } + // The action may have advanced the decoder. If we are in an array, advancing it further would + // skip tokens. So, if we are scanning an array, jump to the top without advancing the token. + if d.path.inferContext() == arrValue && d.Decoder.More() { + goto match + } + } + } + } +} diff --git a/vendor/github.com/exponent-io/jsonpath/path.go b/vendor/github.com/exponent-io/jsonpath/path.go new file mode 100644 index 000000000..d7db2ad33 --- /dev/null +++ b/vendor/github.com/exponent-io/jsonpath/path.go @@ -0,0 +1,67 @@ +// Extends the Go runtime's json.Decoder enabling navigation of a stream of json tokens. +package jsonpath + +import "fmt" + +type jsonContext int + +const ( + none jsonContext = iota + objKey + objValue + arrValue +) + +// AnyIndex can be used in a pattern to match any array index. +const AnyIndex = -2 + +// JsonPath is a slice of strings and/or integers. Each string specifies an JSON object key, and +// each integer specifies an index into a JSON array. +type JsonPath []interface{} + +func (p *JsonPath) push(n interface{}) { *p = append(*p, n) } +func (p *JsonPath) pop() { *p = (*p)[:len(*p)-1] } + +// increment the index at the top of the stack (must be an array index) +func (p *JsonPath) incTop() { (*p)[len(*p)-1] = (*p)[len(*p)-1].(int) + 1 } + +// name the key at the top of the stack (must be an object key) +func (p *JsonPath) nameTop(n string) { (*p)[len(*p)-1] = n } + +// infer the context from the item at the top of the stack +func (p *JsonPath) inferContext() jsonContext { + if len(*p) == 0 { + return none + } + t := (*p)[len(*p)-1] + switch t.(type) { + case string: + return objKey + case int: + return arrValue + default: + panic(fmt.Sprintf("Invalid stack type %T", t)) + } +} + +// Equal tests for equality between two JsonPath types. +func (p *JsonPath) Equal(o JsonPath) bool { + if len(*p) != len(o) { + return false + } + for i, v := range *p { + if v != o[i] { + return false + } + } + return true +} + +func (p *JsonPath) HasPrefix(o JsonPath) bool { + for i, v := range o { + if v != (*p)[i] { + return false + } + } + return true +} diff --git a/vendor/github.com/exponent-io/jsonpath/pathaction.go b/vendor/github.com/exponent-io/jsonpath/pathaction.go new file mode 100644 index 000000000..497ed686c --- /dev/null +++ b/vendor/github.com/exponent-io/jsonpath/pathaction.go @@ -0,0 +1,61 @@ +package jsonpath + +// pathNode is used to construct a trie of paths to be matched +type pathNode struct { + matchOn interface{} // string, or integer + childNodes []pathNode + action DecodeAction +} + +// match climbs the trie to find a node that matches the given JSON path. +func (n *pathNode) match(path JsonPath) *pathNode { + var node *pathNode = n + for _, ps := range path { + found := false + for i, n := range node.childNodes { + if n.matchOn == ps { + node = &node.childNodes[i] + found = true + break + } else if _, ok := ps.(int); ok && n.matchOn == AnyIndex { + node = &node.childNodes[i] + found = true + break + } + } + if !found { + return nil + } + } + return node +} + +// PathActions represents a collection of DecodeAction functions that should be called at certain path positions +// when scanning the JSON stream. PathActions can be created once and used many times in one or more JSON streams. +type PathActions struct { + node pathNode +} + +// DecodeAction handlers are called by the Decoder when scanning objects. See PathActions.Add for more detail. +type DecodeAction func(d *Decoder) error + +// Add specifies an action to call on the Decoder when the specified path is encountered. +func (je *PathActions) Add(action DecodeAction, path ...interface{}) { + + var node *pathNode = &je.node + for _, ps := range path { + found := false + for i, n := range node.childNodes { + if n.matchOn == ps { + node = &node.childNodes[i] + found = true + break + } + } + if !found { + node.childNodes = append(node.childNodes, pathNode{matchOn: ps}) + node = &node.childNodes[len(node.childNodes)-1] + } + } + node.action = action +} diff --git a/vendor/github.com/fatih/camelcase/.travis.yml b/vendor/github.com/google/btree/.travis.yml similarity index 59% rename from vendor/github.com/fatih/camelcase/.travis.yml rename to vendor/github.com/google/btree/.travis.yml index 3489e3871..4f2ee4d97 100644 --- a/vendor/github.com/fatih/camelcase/.travis.yml +++ b/vendor/github.com/google/btree/.travis.yml @@ -1,3 +1 @@ language: go -go: 1.x - diff --git a/vendor/github.com/golang/mock/LICENSE b/vendor/github.com/google/btree/LICENSE similarity index 100% rename from vendor/github.com/golang/mock/LICENSE rename to vendor/github.com/google/btree/LICENSE diff --git a/vendor/github.com/google/btree/README.md b/vendor/github.com/google/btree/README.md new file mode 100644 index 000000000..6062a4dac --- /dev/null +++ b/vendor/github.com/google/btree/README.md @@ -0,0 +1,12 @@ +# BTree implementation for Go + +![Travis CI Build Status](https://api.travis-ci.org/google/btree.svg?branch=master) + +This package provides an in-memory B-Tree implementation for Go, useful as +an ordered, mutable data structure. + +The API is based off of the wonderful +http://godoc.org/github.com/petar/GoLLRB/llrb, and is meant to allow btree to +act as a drop-in replacement for gollrb trees. + +See http://godoc.org/github.com/google/btree for documentation. diff --git a/vendor/github.com/google/btree/btree.go b/vendor/github.com/google/btree/btree.go new file mode 100644 index 000000000..6ff062f9b --- /dev/null +++ b/vendor/github.com/google/btree/btree.go @@ -0,0 +1,890 @@ +// Copyright 2014 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package btree implements in-memory B-Trees of arbitrary degree. +// +// btree implements an in-memory B-Tree for use as an ordered data structure. +// It is not meant for persistent storage solutions. +// +// It has a flatter structure than an equivalent red-black or other binary tree, +// which in some cases yields better memory usage and/or performance. +// See some discussion on the matter here: +// http://google-opensource.blogspot.com/2013/01/c-containers-that-save-memory-and-time.html +// Note, though, that this project is in no way related to the C++ B-Tree +// implementation written about there. +// +// Within this tree, each node contains a slice of items and a (possibly nil) +// slice of children. For basic numeric values or raw structs, this can cause +// efficiency differences when compared to equivalent C++ template code that +// stores values in arrays within the node: +// * Due to the overhead of storing values as interfaces (each +// value needs to be stored as the value itself, then 2 words for the +// interface pointing to that value and its type), resulting in higher +// memory use. +// * Since interfaces can point to values anywhere in memory, values are +// most likely not stored in contiguous blocks, resulting in a higher +// number of cache misses. +// These issues don't tend to matter, though, when working with strings or other +// heap-allocated structures, since C++-equivalent structures also must store +// pointers and also distribute their values across the heap. +// +// This implementation is designed to be a drop-in replacement to gollrb.LLRB +// trees, (http://github.com/petar/gollrb), an excellent and probably the most +// widely used ordered tree implementation in the Go ecosystem currently. +// Its functions, therefore, exactly mirror those of +// llrb.LLRB where possible. Unlike gollrb, though, we currently don't +// support storing multiple equivalent values. +package btree + +import ( + "fmt" + "io" + "sort" + "strings" + "sync" +) + +// Item represents a single object in the tree. +type Item interface { + // Less tests whether the current item is less than the given argument. + // + // This must provide a strict weak ordering. + // If !a.Less(b) && !b.Less(a), we treat this to mean a == b (i.e. we can only + // hold one of either a or b in the tree). + Less(than Item) bool +} + +const ( + DefaultFreeListSize = 32 +) + +var ( + nilItems = make(items, 16) + nilChildren = make(children, 16) +) + +// FreeList represents a free list of btree nodes. By default each +// BTree has its own FreeList, but multiple BTrees can share the same +// FreeList. +// Two Btrees using the same freelist are safe for concurrent write access. +type FreeList struct { + mu sync.Mutex + freelist []*node +} + +// NewFreeList creates a new free list. +// size is the maximum size of the returned free list. +func NewFreeList(size int) *FreeList { + return &FreeList{freelist: make([]*node, 0, size)} +} + +func (f *FreeList) newNode() (n *node) { + f.mu.Lock() + index := len(f.freelist) - 1 + if index < 0 { + f.mu.Unlock() + return new(node) + } + n = f.freelist[index] + f.freelist[index] = nil + f.freelist = f.freelist[:index] + f.mu.Unlock() + return +} + +// freeNode adds the given node to the list, returning true if it was added +// and false if it was discarded. +func (f *FreeList) freeNode(n *node) (out bool) { + f.mu.Lock() + if len(f.freelist) < cap(f.freelist) { + f.freelist = append(f.freelist, n) + out = true + } + f.mu.Unlock() + return +} + +// ItemIterator allows callers of Ascend* to iterate in-order over portions of +// the tree. When this function returns false, iteration will stop and the +// associated Ascend* function will immediately return. +type ItemIterator func(i Item) bool + +// New creates a new B-Tree with the given degree. +// +// New(2), for example, will create a 2-3-4 tree (each node contains 1-3 items +// and 2-4 children). +func New(degree int) *BTree { + return NewWithFreeList(degree, NewFreeList(DefaultFreeListSize)) +} + +// NewWithFreeList creates a new B-Tree that uses the given node free list. +func NewWithFreeList(degree int, f *FreeList) *BTree { + if degree <= 1 { + panic("bad degree") + } + return &BTree{ + degree: degree, + cow: ©OnWriteContext{freelist: f}, + } +} + +// items stores items in a node. +type items []Item + +// insertAt inserts a value into the given index, pushing all subsequent values +// forward. +func (s *items) insertAt(index int, item Item) { + *s = append(*s, nil) + if index < len(*s) { + copy((*s)[index+1:], (*s)[index:]) + } + (*s)[index] = item +} + +// removeAt removes a value at a given index, pulling all subsequent values +// back. +func (s *items) removeAt(index int) Item { + item := (*s)[index] + copy((*s)[index:], (*s)[index+1:]) + (*s)[len(*s)-1] = nil + *s = (*s)[:len(*s)-1] + return item +} + +// pop removes and returns the last element in the list. +func (s *items) pop() (out Item) { + index := len(*s) - 1 + out = (*s)[index] + (*s)[index] = nil + *s = (*s)[:index] + return +} + +// truncate truncates this instance at index so that it contains only the +// first index items. index must be less than or equal to length. +func (s *items) truncate(index int) { + var toClear items + *s, toClear = (*s)[:index], (*s)[index:] + for len(toClear) > 0 { + toClear = toClear[copy(toClear, nilItems):] + } +} + +// find returns the index where the given item should be inserted into this +// list. 'found' is true if the item already exists in the list at the given +// index. +func (s items) find(item Item) (index int, found bool) { + i := sort.Search(len(s), func(i int) bool { + return item.Less(s[i]) + }) + if i > 0 && !s[i-1].Less(item) { + return i - 1, true + } + return i, false +} + +// children stores child nodes in a node. +type children []*node + +// insertAt inserts a value into the given index, pushing all subsequent values +// forward. +func (s *children) insertAt(index int, n *node) { + *s = append(*s, nil) + if index < len(*s) { + copy((*s)[index+1:], (*s)[index:]) + } + (*s)[index] = n +} + +// removeAt removes a value at a given index, pulling all subsequent values +// back. +func (s *children) removeAt(index int) *node { + n := (*s)[index] + copy((*s)[index:], (*s)[index+1:]) + (*s)[len(*s)-1] = nil + *s = (*s)[:len(*s)-1] + return n +} + +// pop removes and returns the last element in the list. +func (s *children) pop() (out *node) { + index := len(*s) - 1 + out = (*s)[index] + (*s)[index] = nil + *s = (*s)[:index] + return +} + +// truncate truncates this instance at index so that it contains only the +// first index children. index must be less than or equal to length. +func (s *children) truncate(index int) { + var toClear children + *s, toClear = (*s)[:index], (*s)[index:] + for len(toClear) > 0 { + toClear = toClear[copy(toClear, nilChildren):] + } +} + +// node is an internal node in a tree. +// +// It must at all times maintain the invariant that either +// * len(children) == 0, len(items) unconstrained +// * len(children) == len(items) + 1 +type node struct { + items items + children children + cow *copyOnWriteContext +} + +func (n *node) mutableFor(cow *copyOnWriteContext) *node { + if n.cow == cow { + return n + } + out := cow.newNode() + if cap(out.items) >= len(n.items) { + out.items = out.items[:len(n.items)] + } else { + out.items = make(items, len(n.items), cap(n.items)) + } + copy(out.items, n.items) + // Copy children + if cap(out.children) >= len(n.children) { + out.children = out.children[:len(n.children)] + } else { + out.children = make(children, len(n.children), cap(n.children)) + } + copy(out.children, n.children) + return out +} + +func (n *node) mutableChild(i int) *node { + c := n.children[i].mutableFor(n.cow) + n.children[i] = c + return c +} + +// split splits the given node at the given index. The current node shrinks, +// and this function returns the item that existed at that index and a new node +// containing all items/children after it. +func (n *node) split(i int) (Item, *node) { + item := n.items[i] + next := n.cow.newNode() + next.items = append(next.items, n.items[i+1:]...) + n.items.truncate(i) + if len(n.children) > 0 { + next.children = append(next.children, n.children[i+1:]...) + n.children.truncate(i + 1) + } + return item, next +} + +// maybeSplitChild checks if a child should be split, and if so splits it. +// Returns whether or not a split occurred. +func (n *node) maybeSplitChild(i, maxItems int) bool { + if len(n.children[i].items) < maxItems { + return false + } + first := n.mutableChild(i) + item, second := first.split(maxItems / 2) + n.items.insertAt(i, item) + n.children.insertAt(i+1, second) + return true +} + +// insert inserts an item into the subtree rooted at this node, making sure +// no nodes in the subtree exceed maxItems items. Should an equivalent item be +// be found/replaced by insert, it will be returned. +func (n *node) insert(item Item, maxItems int) Item { + i, found := n.items.find(item) + if found { + out := n.items[i] + n.items[i] = item + return out + } + if len(n.children) == 0 { + n.items.insertAt(i, item) + return nil + } + if n.maybeSplitChild(i, maxItems) { + inTree := n.items[i] + switch { + case item.Less(inTree): + // no change, we want first split node + case inTree.Less(item): + i++ // we want second split node + default: + out := n.items[i] + n.items[i] = item + return out + } + } + return n.mutableChild(i).insert(item, maxItems) +} + +// get finds the given key in the subtree and returns it. +func (n *node) get(key Item) Item { + i, found := n.items.find(key) + if found { + return n.items[i] + } else if len(n.children) > 0 { + return n.children[i].get(key) + } + return nil +} + +// min returns the first item in the subtree. +func min(n *node) Item { + if n == nil { + return nil + } + for len(n.children) > 0 { + n = n.children[0] + } + if len(n.items) == 0 { + return nil + } + return n.items[0] +} + +// max returns the last item in the subtree. +func max(n *node) Item { + if n == nil { + return nil + } + for len(n.children) > 0 { + n = n.children[len(n.children)-1] + } + if len(n.items) == 0 { + return nil + } + return n.items[len(n.items)-1] +} + +// toRemove details what item to remove in a node.remove call. +type toRemove int + +const ( + removeItem toRemove = iota // removes the given item + removeMin // removes smallest item in the subtree + removeMax // removes largest item in the subtree +) + +// remove removes an item from the subtree rooted at this node. +func (n *node) remove(item Item, minItems int, typ toRemove) Item { + var i int + var found bool + switch typ { + case removeMax: + if len(n.children) == 0 { + return n.items.pop() + } + i = len(n.items) + case removeMin: + if len(n.children) == 0 { + return n.items.removeAt(0) + } + i = 0 + case removeItem: + i, found = n.items.find(item) + if len(n.children) == 0 { + if found { + return n.items.removeAt(i) + } + return nil + } + default: + panic("invalid type") + } + // If we get to here, we have children. + if len(n.children[i].items) <= minItems { + return n.growChildAndRemove(i, item, minItems, typ) + } + child := n.mutableChild(i) + // Either we had enough items to begin with, or we've done some + // merging/stealing, because we've got enough now and we're ready to return + // stuff. + if found { + // The item exists at index 'i', and the child we've selected can give us a + // predecessor, since if we've gotten here it's got > minItems items in it. + out := n.items[i] + // We use our special-case 'remove' call with typ=maxItem to pull the + // predecessor of item i (the rightmost leaf of our immediate left child) + // and set it into where we pulled the item from. + n.items[i] = child.remove(nil, minItems, removeMax) + return out + } + // Final recursive call. Once we're here, we know that the item isn't in this + // node and that the child is big enough to remove from. + return child.remove(item, minItems, typ) +} + +// growChildAndRemove grows child 'i' to make sure it's possible to remove an +// item from it while keeping it at minItems, then calls remove to actually +// remove it. +// +// Most documentation says we have to do two sets of special casing: +// 1) item is in this node +// 2) item is in child +// In both cases, we need to handle the two subcases: +// A) node has enough values that it can spare one +// B) node doesn't have enough values +// For the latter, we have to check: +// a) left sibling has node to spare +// b) right sibling has node to spare +// c) we must merge +// To simplify our code here, we handle cases #1 and #2 the same: +// If a node doesn't have enough items, we make sure it does (using a,b,c). +// We then simply redo our remove call, and the second time (regardless of +// whether we're in case 1 or 2), we'll have enough items and can guarantee +// that we hit case A. +func (n *node) growChildAndRemove(i int, item Item, minItems int, typ toRemove) Item { + if i > 0 && len(n.children[i-1].items) > minItems { + // Steal from left child + child := n.mutableChild(i) + stealFrom := n.mutableChild(i - 1) + stolenItem := stealFrom.items.pop() + child.items.insertAt(0, n.items[i-1]) + n.items[i-1] = stolenItem + if len(stealFrom.children) > 0 { + child.children.insertAt(0, stealFrom.children.pop()) + } + } else if i < len(n.items) && len(n.children[i+1].items) > minItems { + // steal from right child + child := n.mutableChild(i) + stealFrom := n.mutableChild(i + 1) + stolenItem := stealFrom.items.removeAt(0) + child.items = append(child.items, n.items[i]) + n.items[i] = stolenItem + if len(stealFrom.children) > 0 { + child.children = append(child.children, stealFrom.children.removeAt(0)) + } + } else { + if i >= len(n.items) { + i-- + } + child := n.mutableChild(i) + // merge with right child + mergeItem := n.items.removeAt(i) + mergeChild := n.children.removeAt(i + 1) + child.items = append(child.items, mergeItem) + child.items = append(child.items, mergeChild.items...) + child.children = append(child.children, mergeChild.children...) + n.cow.freeNode(mergeChild) + } + return n.remove(item, minItems, typ) +} + +type direction int + +const ( + descend = direction(-1) + ascend = direction(+1) +) + +// iterate provides a simple method for iterating over elements in the tree. +// +// When ascending, the 'start' should be less than 'stop' and when descending, +// the 'start' should be greater than 'stop'. Setting 'includeStart' to true +// will force the iterator to include the first item when it equals 'start', +// thus creating a "greaterOrEqual" or "lessThanEqual" rather than just a +// "greaterThan" or "lessThan" queries. +func (n *node) iterate(dir direction, start, stop Item, includeStart bool, hit bool, iter ItemIterator) (bool, bool) { + var ok, found bool + var index int + switch dir { + case ascend: + if start != nil { + index, _ = n.items.find(start) + } + for i := index; i < len(n.items); i++ { + if len(n.children) > 0 { + if hit, ok = n.children[i].iterate(dir, start, stop, includeStart, hit, iter); !ok { + return hit, false + } + } + if !includeStart && !hit && start != nil && !start.Less(n.items[i]) { + hit = true + continue + } + hit = true + if stop != nil && !n.items[i].Less(stop) { + return hit, false + } + if !iter(n.items[i]) { + return hit, false + } + } + if len(n.children) > 0 { + if hit, ok = n.children[len(n.children)-1].iterate(dir, start, stop, includeStart, hit, iter); !ok { + return hit, false + } + } + case descend: + if start != nil { + index, found = n.items.find(start) + if !found { + index = index - 1 + } + } else { + index = len(n.items) - 1 + } + for i := index; i >= 0; i-- { + if start != nil && !n.items[i].Less(start) { + if !includeStart || hit || start.Less(n.items[i]) { + continue + } + } + if len(n.children) > 0 { + if hit, ok = n.children[i+1].iterate(dir, start, stop, includeStart, hit, iter); !ok { + return hit, false + } + } + if stop != nil && !stop.Less(n.items[i]) { + return hit, false // continue + } + hit = true + if !iter(n.items[i]) { + return hit, false + } + } + if len(n.children) > 0 { + if hit, ok = n.children[0].iterate(dir, start, stop, includeStart, hit, iter); !ok { + return hit, false + } + } + } + return hit, true +} + +// Used for testing/debugging purposes. +func (n *node) print(w io.Writer, level int) { + fmt.Fprintf(w, "%sNODE:%v\n", strings.Repeat(" ", level), n.items) + for _, c := range n.children { + c.print(w, level+1) + } +} + +// BTree is an implementation of a B-Tree. +// +// BTree stores Item instances in an ordered structure, allowing easy insertion, +// removal, and iteration. +// +// Write operations are not safe for concurrent mutation by multiple +// goroutines, but Read operations are. +type BTree struct { + degree int + length int + root *node + cow *copyOnWriteContext +} + +// copyOnWriteContext pointers determine node ownership... a tree with a write +// context equivalent to a node's write context is allowed to modify that node. +// A tree whose write context does not match a node's is not allowed to modify +// it, and must create a new, writable copy (IE: it's a Clone). +// +// When doing any write operation, we maintain the invariant that the current +// node's context is equal to the context of the tree that requested the write. +// We do this by, before we descend into any node, creating a copy with the +// correct context if the contexts don't match. +// +// Since the node we're currently visiting on any write has the requesting +// tree's context, that node is modifiable in place. Children of that node may +// not share context, but before we descend into them, we'll make a mutable +// copy. +type copyOnWriteContext struct { + freelist *FreeList +} + +// Clone clones the btree, lazily. Clone should not be called concurrently, +// but the original tree (t) and the new tree (t2) can be used concurrently +// once the Clone call completes. +// +// The internal tree structure of b is marked read-only and shared between t and +// t2. Writes to both t and t2 use copy-on-write logic, creating new nodes +// whenever one of b's original nodes would have been modified. Read operations +// should have no performance degredation. Write operations for both t and t2 +// will initially experience minor slow-downs caused by additional allocs and +// copies due to the aforementioned copy-on-write logic, but should converge to +// the original performance characteristics of the original tree. +func (t *BTree) Clone() (t2 *BTree) { + // Create two entirely new copy-on-write contexts. + // This operation effectively creates three trees: + // the original, shared nodes (old b.cow) + // the new b.cow nodes + // the new out.cow nodes + cow1, cow2 := *t.cow, *t.cow + out := *t + t.cow = &cow1 + out.cow = &cow2 + return &out +} + +// maxItems returns the max number of items to allow per node. +func (t *BTree) maxItems() int { + return t.degree*2 - 1 +} + +// minItems returns the min number of items to allow per node (ignored for the +// root node). +func (t *BTree) minItems() int { + return t.degree - 1 +} + +func (c *copyOnWriteContext) newNode() (n *node) { + n = c.freelist.newNode() + n.cow = c + return +} + +type freeType int + +const ( + ftFreelistFull freeType = iota // node was freed (available for GC, not stored in freelist) + ftStored // node was stored in the freelist for later use + ftNotOwned // node was ignored by COW, since it's owned by another one +) + +// freeNode frees a node within a given COW context, if it's owned by that +// context. It returns what happened to the node (see freeType const +// documentation). +func (c *copyOnWriteContext) freeNode(n *node) freeType { + if n.cow == c { + // clear to allow GC + n.items.truncate(0) + n.children.truncate(0) + n.cow = nil + if c.freelist.freeNode(n) { + return ftStored + } else { + return ftFreelistFull + } + } else { + return ftNotOwned + } +} + +// ReplaceOrInsert adds the given item to the tree. If an item in the tree +// already equals the given one, it is removed from the tree and returned. +// Otherwise, nil is returned. +// +// nil cannot be added to the tree (will panic). +func (t *BTree) ReplaceOrInsert(item Item) Item { + if item == nil { + panic("nil item being added to BTree") + } + if t.root == nil { + t.root = t.cow.newNode() + t.root.items = append(t.root.items, item) + t.length++ + return nil + } else { + t.root = t.root.mutableFor(t.cow) + if len(t.root.items) >= t.maxItems() { + item2, second := t.root.split(t.maxItems() / 2) + oldroot := t.root + t.root = t.cow.newNode() + t.root.items = append(t.root.items, item2) + t.root.children = append(t.root.children, oldroot, second) + } + } + out := t.root.insert(item, t.maxItems()) + if out == nil { + t.length++ + } + return out +} + +// Delete removes an item equal to the passed in item from the tree, returning +// it. If no such item exists, returns nil. +func (t *BTree) Delete(item Item) Item { + return t.deleteItem(item, removeItem) +} + +// DeleteMin removes the smallest item in the tree and returns it. +// If no such item exists, returns nil. +func (t *BTree) DeleteMin() Item { + return t.deleteItem(nil, removeMin) +} + +// DeleteMax removes the largest item in the tree and returns it. +// If no such item exists, returns nil. +func (t *BTree) DeleteMax() Item { + return t.deleteItem(nil, removeMax) +} + +func (t *BTree) deleteItem(item Item, typ toRemove) Item { + if t.root == nil || len(t.root.items) == 0 { + return nil + } + t.root = t.root.mutableFor(t.cow) + out := t.root.remove(item, t.minItems(), typ) + if len(t.root.items) == 0 && len(t.root.children) > 0 { + oldroot := t.root + t.root = t.root.children[0] + t.cow.freeNode(oldroot) + } + if out != nil { + t.length-- + } + return out +} + +// AscendRange calls the iterator for every value in the tree within the range +// [greaterOrEqual, lessThan), until iterator returns false. +func (t *BTree) AscendRange(greaterOrEqual, lessThan Item, iterator ItemIterator) { + if t.root == nil { + return + } + t.root.iterate(ascend, greaterOrEqual, lessThan, true, false, iterator) +} + +// AscendLessThan calls the iterator for every value in the tree within the range +// [first, pivot), until iterator returns false. +func (t *BTree) AscendLessThan(pivot Item, iterator ItemIterator) { + if t.root == nil { + return + } + t.root.iterate(ascend, nil, pivot, false, false, iterator) +} + +// AscendGreaterOrEqual calls the iterator for every value in the tree within +// the range [pivot, last], until iterator returns false. +func (t *BTree) AscendGreaterOrEqual(pivot Item, iterator ItemIterator) { + if t.root == nil { + return + } + t.root.iterate(ascend, pivot, nil, true, false, iterator) +} + +// Ascend calls the iterator for every value in the tree within the range +// [first, last], until iterator returns false. +func (t *BTree) Ascend(iterator ItemIterator) { + if t.root == nil { + return + } + t.root.iterate(ascend, nil, nil, false, false, iterator) +} + +// DescendRange calls the iterator for every value in the tree within the range +// [lessOrEqual, greaterThan), until iterator returns false. +func (t *BTree) DescendRange(lessOrEqual, greaterThan Item, iterator ItemIterator) { + if t.root == nil { + return + } + t.root.iterate(descend, lessOrEqual, greaterThan, true, false, iterator) +} + +// DescendLessOrEqual calls the iterator for every value in the tree within the range +// [pivot, first], until iterator returns false. +func (t *BTree) DescendLessOrEqual(pivot Item, iterator ItemIterator) { + if t.root == nil { + return + } + t.root.iterate(descend, pivot, nil, true, false, iterator) +} + +// DescendGreaterThan calls the iterator for every value in the tree within +// the range (pivot, last], until iterator returns false. +func (t *BTree) DescendGreaterThan(pivot Item, iterator ItemIterator) { + if t.root == nil { + return + } + t.root.iterate(descend, nil, pivot, false, false, iterator) +} + +// Descend calls the iterator for every value in the tree within the range +// [last, first], until iterator returns false. +func (t *BTree) Descend(iterator ItemIterator) { + if t.root == nil { + return + } + t.root.iterate(descend, nil, nil, false, false, iterator) +} + +// Get looks for the key item in the tree, returning it. It returns nil if +// unable to find that item. +func (t *BTree) Get(key Item) Item { + if t.root == nil { + return nil + } + return t.root.get(key) +} + +// Min returns the smallest item in the tree, or nil if the tree is empty. +func (t *BTree) Min() Item { + return min(t.root) +} + +// Max returns the largest item in the tree, or nil if the tree is empty. +func (t *BTree) Max() Item { + return max(t.root) +} + +// Has returns true if the given key is in the tree. +func (t *BTree) Has(key Item) bool { + return t.Get(key) != nil +} + +// Len returns the number of items currently in the tree. +func (t *BTree) Len() int { + return t.length +} + +// Clear removes all items from the btree. If addNodesToFreelist is true, +// t's nodes are added to its freelist as part of this call, until the freelist +// is full. Otherwise, the root node is simply dereferenced and the subtree +// left to Go's normal GC processes. +// +// This can be much faster +// than calling Delete on all elements, because that requires finding/removing +// each element in the tree and updating the tree accordingly. It also is +// somewhat faster than creating a new tree to replace the old one, because +// nodes from the old tree are reclaimed into the freelist for use by the new +// one, instead of being lost to the garbage collector. +// +// This call takes: +// O(1): when addNodesToFreelist is false, this is a single operation. +// O(1): when the freelist is already full, it breaks out immediately +// O(freelist size): when the freelist is empty and the nodes are all owned +// by this tree, nodes are added to the freelist until full. +// O(tree size): when all nodes are owned by another tree, all nodes are +// iterated over looking for nodes to add to the freelist, and due to +// ownership, none are. +func (t *BTree) Clear(addNodesToFreelist bool) { + if t.root != nil && addNodesToFreelist { + t.root.reset(t.cow) + } + t.root, t.length = nil, 0 +} + +// reset returns a subtree to the freelist. It breaks out immediately if the +// freelist is full, since the only benefit of iterating is to fill that +// freelist up. Returns true if parent reset call should continue. +func (n *node) reset(c *copyOnWriteContext) bool { + for _, child := range n.children { + if !child.reset(c) { + return false + } + } + return c.freeNode(n) != ftFreelistFull +} + +// Int implements the Item interface for integers. +type Int int + +// Less returns true if int(a) < int(b). +func (a Int) Less(b Item) bool { + return a < b.(Int) +} diff --git a/vendor/github.com/gregjones/httpcache/.travis.yml b/vendor/github.com/gregjones/httpcache/.travis.yml new file mode 100644 index 000000000..b5ffbe03d --- /dev/null +++ b/vendor/github.com/gregjones/httpcache/.travis.yml @@ -0,0 +1,19 @@ +sudo: false +language: go +go: + - 1.6.x + - 1.7.x + - 1.8.x + - 1.9.x + - master +matrix: + allow_failures: + - go: master + fast_finish: true +install: + - # Do nothing. This is needed to prevent default install action "go get -t -v ./..." from happening here (we want it to happen inside script step). +script: + - go get -t -v ./... + - diff -u <(echo -n) <(gofmt -d .) + - go tool vet . + - go test -v -race ./... diff --git a/vendor/github.com/gregjones/httpcache/LICENSE.txt b/vendor/github.com/gregjones/httpcache/LICENSE.txt new file mode 100644 index 000000000..81316beb0 --- /dev/null +++ b/vendor/github.com/gregjones/httpcache/LICENSE.txt @@ -0,0 +1,7 @@ +Copyright © 2012 Greg Jones (greg.jones@gmail.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/vendor/github.com/gregjones/httpcache/README.md b/vendor/github.com/gregjones/httpcache/README.md new file mode 100644 index 000000000..09c9e7c17 --- /dev/null +++ b/vendor/github.com/gregjones/httpcache/README.md @@ -0,0 +1,25 @@ +httpcache +========= + +[![Build Status](https://travis-ci.org/gregjones/httpcache.svg?branch=master)](https://travis-ci.org/gregjones/httpcache) [![GoDoc](https://godoc.org/github.com/gregjones/httpcache?status.svg)](https://godoc.org/github.com/gregjones/httpcache) + +Package httpcache provides a http.RoundTripper implementation that works as a mostly [RFC 7234](https://tools.ietf.org/html/rfc7234) compliant cache for http responses. + +It is only suitable for use as a 'private' cache (i.e. for a web-browser or an API-client and not for a shared proxy). + +Cache Backends +-------------- + +- The built-in 'memory' cache stores responses in an in-memory map. +- [`github.com/gregjones/httpcache/diskcache`](https://github.com/gregjones/httpcache/tree/master/diskcache) provides a filesystem-backed cache using the [diskv](https://github.com/peterbourgon/diskv) library. +- [`github.com/gregjones/httpcache/memcache`](https://github.com/gregjones/httpcache/tree/master/memcache) provides memcache implementations, for both App Engine and 'normal' memcache servers. +- [`sourcegraph.com/sourcegraph/s3cache`](https://sourcegraph.com/github.com/sourcegraph/s3cache) uses Amazon S3 for storage. +- [`github.com/gregjones/httpcache/leveldbcache`](https://github.com/gregjones/httpcache/tree/master/leveldbcache) provides a filesystem-backed cache using [leveldb](https://github.com/syndtr/goleveldb/leveldb). +- [`github.com/die-net/lrucache`](https://github.com/die-net/lrucache) provides an in-memory cache that will evict least-recently used entries. +- [`github.com/die-net/lrucache/twotier`](https://github.com/die-net/lrucache/tree/master/twotier) allows caches to be combined, for example to use lrucache above with a persistent disk-cache. +- [`github.com/birkelund/boltdbcache`](https://github.com/birkelund/boltdbcache) provides a BoltDB implementation (based on the [bbolt](https://github.com/coreos/bbolt) fork). + +License +------- + +- [MIT License](LICENSE.txt) diff --git a/vendor/github.com/gregjones/httpcache/diskcache/diskcache.go b/vendor/github.com/gregjones/httpcache/diskcache/diskcache.go new file mode 100644 index 000000000..42e3129d8 --- /dev/null +++ b/vendor/github.com/gregjones/httpcache/diskcache/diskcache.go @@ -0,0 +1,61 @@ +// Package diskcache provides an implementation of httpcache.Cache that uses the diskv package +// to supplement an in-memory map with persistent storage +// +package diskcache + +import ( + "bytes" + "crypto/md5" + "encoding/hex" + "github.com/peterbourgon/diskv" + "io" +) + +// Cache is an implementation of httpcache.Cache that supplements the in-memory map with persistent storage +type Cache struct { + d *diskv.Diskv +} + +// Get returns the response corresponding to key if present +func (c *Cache) Get(key string) (resp []byte, ok bool) { + key = keyToFilename(key) + resp, err := c.d.Read(key) + if err != nil { + return []byte{}, false + } + return resp, true +} + +// Set saves a response to the cache as key +func (c *Cache) Set(key string, resp []byte) { + key = keyToFilename(key) + c.d.WriteStream(key, bytes.NewReader(resp), true) +} + +// Delete removes the response with key from the cache +func (c *Cache) Delete(key string) { + key = keyToFilename(key) + c.d.Erase(key) +} + +func keyToFilename(key string) string { + h := md5.New() + io.WriteString(h, key) + return hex.EncodeToString(h.Sum(nil)) +} + +// New returns a new Cache that will store files in basePath +func New(basePath string) *Cache { + return &Cache{ + d: diskv.New(diskv.Options{ + BasePath: basePath, + CacheSizeMax: 100 * 1024 * 1024, // 100MB + }), + } +} + +// NewWithDiskv returns a new Cache using the provided Diskv as underlying +// storage. +func NewWithDiskv(d *diskv.Diskv) *Cache { + return &Cache{d} +} diff --git a/vendor/github.com/gregjones/httpcache/httpcache.go b/vendor/github.com/gregjones/httpcache/httpcache.go new file mode 100644 index 000000000..f6a2ec4a5 --- /dev/null +++ b/vendor/github.com/gregjones/httpcache/httpcache.go @@ -0,0 +1,551 @@ +// Package httpcache provides a http.RoundTripper implementation that works as a +// mostly RFC-compliant cache for http responses. +// +// It is only suitable for use as a 'private' cache (i.e. for a web-browser or an API-client +// and not for a shared proxy). +// +package httpcache + +import ( + "bufio" + "bytes" + "errors" + "io" + "io/ioutil" + "net/http" + "net/http/httputil" + "strings" + "sync" + "time" +) + +const ( + stale = iota + fresh + transparent + // XFromCache is the header added to responses that are returned from the cache + XFromCache = "X-From-Cache" +) + +// A Cache interface is used by the Transport to store and retrieve responses. +type Cache interface { + // Get returns the []byte representation of a cached response and a bool + // set to true if the value isn't empty + Get(key string) (responseBytes []byte, ok bool) + // Set stores the []byte representation of a response against a key + Set(key string, responseBytes []byte) + // Delete removes the value associated with the key + Delete(key string) +} + +// cacheKey returns the cache key for req. +func cacheKey(req *http.Request) string { + if req.Method == http.MethodGet { + return req.URL.String() + } else { + return req.Method + " " + req.URL.String() + } +} + +// CachedResponse returns the cached http.Response for req if present, and nil +// otherwise. +func CachedResponse(c Cache, req *http.Request) (resp *http.Response, err error) { + cachedVal, ok := c.Get(cacheKey(req)) + if !ok { + return + } + + b := bytes.NewBuffer(cachedVal) + return http.ReadResponse(bufio.NewReader(b), req) +} + +// MemoryCache is an implemtation of Cache that stores responses in an in-memory map. +type MemoryCache struct { + mu sync.RWMutex + items map[string][]byte +} + +// Get returns the []byte representation of the response and true if present, false if not +func (c *MemoryCache) Get(key string) (resp []byte, ok bool) { + c.mu.RLock() + resp, ok = c.items[key] + c.mu.RUnlock() + return resp, ok +} + +// Set saves response resp to the cache with key +func (c *MemoryCache) Set(key string, resp []byte) { + c.mu.Lock() + c.items[key] = resp + c.mu.Unlock() +} + +// Delete removes key from the cache +func (c *MemoryCache) Delete(key string) { + c.mu.Lock() + delete(c.items, key) + c.mu.Unlock() +} + +// NewMemoryCache returns a new Cache that will store items in an in-memory map +func NewMemoryCache() *MemoryCache { + c := &MemoryCache{items: map[string][]byte{}} + return c +} + +// Transport is an implementation of http.RoundTripper that will return values from a cache +// where possible (avoiding a network request) and will additionally add validators (etag/if-modified-since) +// to repeated requests allowing servers to return 304 / Not Modified +type Transport struct { + // The RoundTripper interface actually used to make requests + // If nil, http.DefaultTransport is used + Transport http.RoundTripper + Cache Cache + // If true, responses returned from the cache will be given an extra header, X-From-Cache + MarkCachedResponses bool +} + +// NewTransport returns a new Transport with the +// provided Cache implementation and MarkCachedResponses set to true +func NewTransport(c Cache) *Transport { + return &Transport{Cache: c, MarkCachedResponses: true} +} + +// Client returns an *http.Client that caches responses. +func (t *Transport) Client() *http.Client { + return &http.Client{Transport: t} +} + +// varyMatches will return false unless all of the cached values for the headers listed in Vary +// match the new request +func varyMatches(cachedResp *http.Response, req *http.Request) bool { + for _, header := range headerAllCommaSepValues(cachedResp.Header, "vary") { + header = http.CanonicalHeaderKey(header) + if header != "" && req.Header.Get(header) != cachedResp.Header.Get("X-Varied-"+header) { + return false + } + } + return true +} + +// RoundTrip takes a Request and returns a Response +// +// If there is a fresh Response already in cache, then it will be returned without connecting to +// the server. +// +// If there is a stale Response, then any validators it contains will be set on the new request +// to give the server a chance to respond with NotModified. If this happens, then the cached Response +// will be returned. +func (t *Transport) RoundTrip(req *http.Request) (resp *http.Response, err error) { + cacheKey := cacheKey(req) + cacheable := (req.Method == "GET" || req.Method == "HEAD") && req.Header.Get("range") == "" + var cachedResp *http.Response + if cacheable { + cachedResp, err = CachedResponse(t.Cache, req) + } else { + // Need to invalidate an existing value + t.Cache.Delete(cacheKey) + } + + transport := t.Transport + if transport == nil { + transport = http.DefaultTransport + } + + if cacheable && cachedResp != nil && err == nil { + if t.MarkCachedResponses { + cachedResp.Header.Set(XFromCache, "1") + } + + if varyMatches(cachedResp, req) { + // Can only use cached value if the new request doesn't Vary significantly + freshness := getFreshness(cachedResp.Header, req.Header) + if freshness == fresh { + return cachedResp, nil + } + + if freshness == stale { + var req2 *http.Request + // Add validators if caller hasn't already done so + etag := cachedResp.Header.Get("etag") + if etag != "" && req.Header.Get("etag") == "" { + req2 = cloneRequest(req) + req2.Header.Set("if-none-match", etag) + } + lastModified := cachedResp.Header.Get("last-modified") + if lastModified != "" && req.Header.Get("last-modified") == "" { + if req2 == nil { + req2 = cloneRequest(req) + } + req2.Header.Set("if-modified-since", lastModified) + } + if req2 != nil { + req = req2 + } + } + } + + resp, err = transport.RoundTrip(req) + if err == nil && req.Method == "GET" && resp.StatusCode == http.StatusNotModified { + // Replace the 304 response with the one from cache, but update with some new headers + endToEndHeaders := getEndToEndHeaders(resp.Header) + for _, header := range endToEndHeaders { + cachedResp.Header[header] = resp.Header[header] + } + resp = cachedResp + } else if (err != nil || (cachedResp != nil && resp.StatusCode >= 500)) && + req.Method == "GET" && canStaleOnError(cachedResp.Header, req.Header) { + // In case of transport failure and stale-if-error activated, returns cached content + // when available + return cachedResp, nil + } else { + if err != nil || resp.StatusCode != http.StatusOK { + t.Cache.Delete(cacheKey) + } + if err != nil { + return nil, err + } + } + } else { + reqCacheControl := parseCacheControl(req.Header) + if _, ok := reqCacheControl["only-if-cached"]; ok { + resp = newGatewayTimeoutResponse(req) + } else { + resp, err = transport.RoundTrip(req) + if err != nil { + return nil, err + } + } + } + + if cacheable && canStore(parseCacheControl(req.Header), parseCacheControl(resp.Header)) { + for _, varyKey := range headerAllCommaSepValues(resp.Header, "vary") { + varyKey = http.CanonicalHeaderKey(varyKey) + fakeHeader := "X-Varied-" + varyKey + reqValue := req.Header.Get(varyKey) + if reqValue != "" { + resp.Header.Set(fakeHeader, reqValue) + } + } + switch req.Method { + case "GET": + // Delay caching until EOF is reached. + resp.Body = &cachingReadCloser{ + R: resp.Body, + OnEOF: func(r io.Reader) { + resp := *resp + resp.Body = ioutil.NopCloser(r) + respBytes, err := httputil.DumpResponse(&resp, true) + if err == nil { + t.Cache.Set(cacheKey, respBytes) + } + }, + } + default: + respBytes, err := httputil.DumpResponse(resp, true) + if err == nil { + t.Cache.Set(cacheKey, respBytes) + } + } + } else { + t.Cache.Delete(cacheKey) + } + return resp, nil +} + +// ErrNoDateHeader indicates that the HTTP headers contained no Date header. +var ErrNoDateHeader = errors.New("no Date header") + +// Date parses and returns the value of the Date header. +func Date(respHeaders http.Header) (date time.Time, err error) { + dateHeader := respHeaders.Get("date") + if dateHeader == "" { + err = ErrNoDateHeader + return + } + + return time.Parse(time.RFC1123, dateHeader) +} + +type realClock struct{} + +func (c *realClock) since(d time.Time) time.Duration { + return time.Since(d) +} + +type timer interface { + since(d time.Time) time.Duration +} + +var clock timer = &realClock{} + +// getFreshness will return one of fresh/stale/transparent based on the cache-control +// values of the request and the response +// +// fresh indicates the response can be returned +// stale indicates that the response needs validating before it is returned +// transparent indicates the response should not be used to fulfil the request +// +// Because this is only a private cache, 'public' and 'private' in cache-control aren't +// signficant. Similarly, smax-age isn't used. +func getFreshness(respHeaders, reqHeaders http.Header) (freshness int) { + respCacheControl := parseCacheControl(respHeaders) + reqCacheControl := parseCacheControl(reqHeaders) + if _, ok := reqCacheControl["no-cache"]; ok { + return transparent + } + if _, ok := respCacheControl["no-cache"]; ok { + return stale + } + if _, ok := reqCacheControl["only-if-cached"]; ok { + return fresh + } + + date, err := Date(respHeaders) + if err != nil { + return stale + } + currentAge := clock.since(date) + + var lifetime time.Duration + var zeroDuration time.Duration + + // If a response includes both an Expires header and a max-age directive, + // the max-age directive overrides the Expires header, even if the Expires header is more restrictive. + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err = time.ParseDuration(maxAge + "s") + if err != nil { + lifetime = zeroDuration + } + } else { + expiresHeader := respHeaders.Get("Expires") + if expiresHeader != "" { + expires, err := time.Parse(time.RFC1123, expiresHeader) + if err != nil { + lifetime = zeroDuration + } else { + lifetime = expires.Sub(date) + } + } + } + + if maxAge, ok := reqCacheControl["max-age"]; ok { + // the client is willing to accept a response whose age is no greater than the specified time in seconds + lifetime, err = time.ParseDuration(maxAge + "s") + if err != nil { + lifetime = zeroDuration + } + } + if minfresh, ok := reqCacheControl["min-fresh"]; ok { + // the client wants a response that will still be fresh for at least the specified number of seconds. + minfreshDuration, err := time.ParseDuration(minfresh + "s") + if err == nil { + currentAge = time.Duration(currentAge + minfreshDuration) + } + } + + if maxstale, ok := reqCacheControl["max-stale"]; ok { + // Indicates that the client is willing to accept a response that has exceeded its expiration time. + // If max-stale is assigned a value, then the client is willing to accept a response that has exceeded + // its expiration time by no more than the specified number of seconds. + // If no value is assigned to max-stale, then the client is willing to accept a stale response of any age. + // + // Responses served only because of a max-stale value are supposed to have a Warning header added to them, + // but that seems like a hassle, and is it actually useful? If so, then there needs to be a different + // return-value available here. + if maxstale == "" { + return fresh + } + maxstaleDuration, err := time.ParseDuration(maxstale + "s") + if err == nil { + currentAge = time.Duration(currentAge - maxstaleDuration) + } + } + + if lifetime > currentAge { + return fresh + } + + return stale +} + +// Returns true if either the request or the response includes the stale-if-error +// cache control extension: https://tools.ietf.org/html/rfc5861 +func canStaleOnError(respHeaders, reqHeaders http.Header) bool { + respCacheControl := parseCacheControl(respHeaders) + reqCacheControl := parseCacheControl(reqHeaders) + + var err error + lifetime := time.Duration(-1) + + if staleMaxAge, ok := respCacheControl["stale-if-error"]; ok { + if staleMaxAge != "" { + lifetime, err = time.ParseDuration(staleMaxAge + "s") + if err != nil { + return false + } + } else { + return true + } + } + if staleMaxAge, ok := reqCacheControl["stale-if-error"]; ok { + if staleMaxAge != "" { + lifetime, err = time.ParseDuration(staleMaxAge + "s") + if err != nil { + return false + } + } else { + return true + } + } + + if lifetime >= 0 { + date, err := Date(respHeaders) + if err != nil { + return false + } + currentAge := clock.since(date) + if lifetime > currentAge { + return true + } + } + + return false +} + +func getEndToEndHeaders(respHeaders http.Header) []string { + // These headers are always hop-by-hop + hopByHopHeaders := map[string]struct{}{ + "Connection": struct{}{}, + "Keep-Alive": struct{}{}, + "Proxy-Authenticate": struct{}{}, + "Proxy-Authorization": struct{}{}, + "Te": struct{}{}, + "Trailers": struct{}{}, + "Transfer-Encoding": struct{}{}, + "Upgrade": struct{}{}, + } + + for _, extra := range strings.Split(respHeaders.Get("connection"), ",") { + // any header listed in connection, if present, is also considered hop-by-hop + if strings.Trim(extra, " ") != "" { + hopByHopHeaders[http.CanonicalHeaderKey(extra)] = struct{}{} + } + } + endToEndHeaders := []string{} + for respHeader, _ := range respHeaders { + if _, ok := hopByHopHeaders[respHeader]; !ok { + endToEndHeaders = append(endToEndHeaders, respHeader) + } + } + return endToEndHeaders +} + +func canStore(reqCacheControl, respCacheControl cacheControl) (canStore bool) { + if _, ok := respCacheControl["no-store"]; ok { + return false + } + if _, ok := reqCacheControl["no-store"]; ok { + return false + } + return true +} + +func newGatewayTimeoutResponse(req *http.Request) *http.Response { + var braw bytes.Buffer + braw.WriteString("HTTP/1.1 504 Gateway Timeout\r\n\r\n") + resp, err := http.ReadResponse(bufio.NewReader(&braw), req) + if err != nil { + panic(err) + } + return resp +} + +// cloneRequest returns a clone of the provided *http.Request. +// The clone is a shallow copy of the struct and its Header map. +// (This function copyright goauth2 authors: https://code.google.com/p/goauth2) +func cloneRequest(r *http.Request) *http.Request { + // shallow copy of the struct + r2 := new(http.Request) + *r2 = *r + // deep copy of the Header + r2.Header = make(http.Header) + for k, s := range r.Header { + r2.Header[k] = s + } + return r2 +} + +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// headerAllCommaSepValues returns all comma-separated values (each +// with whitespace trimmed) for header name in headers. According to +// Section 4.2 of the HTTP/1.1 spec +// (http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2), +// values from multiple occurrences of a header should be concatenated, if +// the header's value is a comma-separated list. +func headerAllCommaSepValues(headers http.Header, name string) []string { + var vals []string + for _, val := range headers[http.CanonicalHeaderKey(name)] { + fields := strings.Split(val, ",") + for i, f := range fields { + fields[i] = strings.TrimSpace(f) + } + vals = append(vals, fields...) + } + return vals +} + +// cachingReadCloser is a wrapper around ReadCloser R that calls OnEOF +// handler with a full copy of the content read from R when EOF is +// reached. +type cachingReadCloser struct { + // Underlying ReadCloser. + R io.ReadCloser + // OnEOF is called with a copy of the content of R when EOF is reached. + OnEOF func(io.Reader) + + buf bytes.Buffer // buf stores a copy of the content of R. +} + +// Read reads the next len(p) bytes from R or until R is drained. The +// return value n is the number of bytes read. If R has no data to +// return, err is io.EOF and OnEOF is called with a full copy of what +// has been read so far. +func (r *cachingReadCloser) Read(p []byte) (n int, err error) { + n, err = r.R.Read(p) + r.buf.Write(p[:n]) + if err == io.EOF { + r.OnEOF(bytes.NewReader(r.buf.Bytes())) + } + return n, err +} + +func (r *cachingReadCloser) Close() error { + return r.R.Close() +} + +// NewMemoryCacheTransport returns a new Transport using the in-memory cache implementation +func NewMemoryCacheTransport() *Transport { + c := NewMemoryCache() + t := NewTransport(c) + return t +} diff --git a/vendor/github.com/jszwec/csvutil/.gitignore b/vendor/github.com/jszwec/csvutil/.gitignore new file mode 100644 index 000000000..87ba7fb8b --- /dev/null +++ b/vendor/github.com/jszwec/csvutil/.gitignore @@ -0,0 +1,89 @@ +# Created by https://www.gitignore.io/api/osx,go,windows,linux + +### OSX ### +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + + +### Go ### +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof + + +### Windows ### +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk + + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* diff --git a/vendor/github.com/jszwec/csvutil/LICENSE b/vendor/github.com/jszwec/csvutil/LICENSE new file mode 100644 index 000000000..308ea2b71 --- /dev/null +++ b/vendor/github.com/jszwec/csvutil/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Jacek Szwec + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/jszwec/csvutil/README.md b/vendor/github.com/jszwec/csvutil/README.md new file mode 100644 index 000000000..9120714ba --- /dev/null +++ b/vendor/github.com/jszwec/csvutil/README.md @@ -0,0 +1,668 @@ +csvutil [![PkgGoDev](https://pkg.go.dev/badge/github.com/jszwec/csvutil@v1.4.0?tab=doc)](https://pkg.go.dev/github.com/jszwec/csvutil?tab=doc) ![Go](https://github.com/jszwec/csvutil/workflows/Go/badge.svg) [![Go Report Card](https://goreportcard.com/badge/github.com/jszwec/csvutil)](https://goreportcard.com/report/github.com/jszwec/csvutil) [![codecov](https://codecov.io/gh/jszwec/csvutil/branch/master/graph/badge.svg)](https://codecov.io/gh/jszwec/csvutil) +================= + +

+ +

+ +Package csvutil provides fast, idiomatic, and dependency free mapping between CSV and Go (golang) values. + +This package is not a CSV parser, it is based on the [Reader](https://godoc.org/github.com/jszwec/csvutil#Reader) and [Writer](https://godoc.org/github.com/jszwec/csvutil#Writer) +interfaces which are implemented by eg. std Go (golang) [csv package](https://golang.org/pkg/encoding/csv). This gives a possibility +of choosing any other CSV writer or reader which may be more performant. + +Installation +------------ + + go get github.com/jszwec/csvutil + +Requirements +------------- + +* Go1.7+ + +Index +------ + +1. [Examples](#examples) + 1. [Unmarshal](#examples_unmarshal) + 2. [Marshal](#examples_marshal) + 3. [Unmarshal and metadata](#examples_unmarshal_and_metadata) + 4. [But my CSV file has no header...](#examples_but_my_csv_has_no_header) + 5. [Decoder.Map - data normalization](#examples_decoder_map) + 6. [Different separator/delimiter](#examples_different_separator) + 7. [Custom Types](#examples_custom_types) + 8. [Custom time.Time format](#examples_time_format) + 9. [Custom struct tags](#examples_struct_tags) + 10. [Slice and Map fields](#examples_slice_and_map_field) + 11. [Nested/Embedded structs](#examples_nested_structs) + 12. [Inline tag](#examples_inlined_structs) +2. [Performance](#performance) + 1. [Unmarshal](#performance_unmarshal) + 2. [Marshal](#performance_marshal) + +Example +-------- + +### Unmarshal + +Nice and easy Unmarshal is using the Go std [csv.Reader](https://golang.org/pkg/encoding/csv/#Reader) with its default options. Use [Decoder](https://godoc.org/github.com/jszwec/csvutil#Decoder) for streaming and more advanced use cases. + +```go + var csvInput = []byte(` +name,age,CreatedAt +jacek,26,2012-04-01T15:00:00Z +john,,0001-01-01T00:00:00Z`, + ) + + type User struct { + Name string `csv:"name"` + Age int `csv:"age,omitempty"` + CreatedAt time.Time + } + + var users []User + if err := csvutil.Unmarshal(csvInput, &users); err != nil { + fmt.Println("error:", err) + } + + for _, u := range users { + fmt.Printf("%+v\n", u) + } + + // Output: + // {Name:jacek Age:26 CreatedAt:2012-04-01 15:00:00 +0000 UTC} + // {Name:john Age:0 CreatedAt:0001-01-01 00:00:00 +0000 UTC} +``` + +### Marshal + +Marshal is using the Go std [csv.Writer](https://golang.org/pkg/encoding/csv/#Writer) with its default options. Use [Encoder](https://godoc.org/github.com/jszwec/csvutil#Encoder) for streaming or to use a different Writer. + +```go + type Address struct { + City string + Country string + } + + type User struct { + Name string + Address + Age int `csv:"age,omitempty"` + CreatedAt time.Time + } + + users := []User{ + { + Name: "John", + Address: Address{"Boston", "USA"}, + Age: 26, + CreatedAt: time.Date(2010, 6, 2, 12, 0, 0, 0, time.UTC), + }, + { + Name: "Alice", + Address: Address{"SF", "USA"}, + }, + } + + b, err := csvutil.Marshal(users) + if err != nil { + fmt.Println("error:", err) + } + fmt.Println(string(b)) + + // Output: + // Name,City,Country,age,CreatedAt + // John,Boston,USA,26,2010-06-02T12:00:00Z + // Alice,SF,USA,,0001-01-01T00:00:00Z +``` + +### Unmarshal and metadata + +It may happen that your CSV input will not always have the same header. In addition +to your base fields you may get extra metadata that you would still like to store. +[Decoder](https://godoc.org/github.com/jszwec/csvutil#Decoder) provides +[Unused](https://godoc.org/github.com/jszwec/csvutil#Decoder.Unused) method, which after each call to +[Decode](https://godoc.org/github.com/jszwec/csvutil#Decoder.Decode) can report which header indexes +were not used during decoding. Based on that, it is possible to handle and store all these extra values. + +```go + type User struct { + Name string `csv:"name"` + City string `csv:"city"` + Age int `csv:"age"` + OtherData map[string]string `csv:"-"` + } + + csvReader := csv.NewReader(strings.NewReader(` +name,age,city,zip +alice,25,la,90005 +bob,30,ny,10005`)) + + dec, err := csvutil.NewDecoder(csvReader) + if err != nil { + log.Fatal(err) + } + + header := dec.Header() + var users []User + for { + u := User{OtherData: make(map[string]string)} + + if err := dec.Decode(&u); err == io.EOF { + break + } else if err != nil { + log.Fatal(err) + } + + for _, i := range dec.Unused() { + u.OtherData[header[i]] = dec.Record()[i] + } + users = append(users, u) + } + + fmt.Println(users) + + // Output: + // [{alice la 25 map[zip:90005]} {bob ny 30 map[zip:10005]}] +``` + +### But my CSV file has no header... + +Some CSV files have no header, but if you know how it should look like, it is +possible to define a struct and generate it. All that is left to do, is to pass +it to a decoder. + +```go + type User struct { + ID int + Name string + Age int `csv:",omitempty"` + City string + } + + csvReader := csv.NewReader(strings.NewReader(` +1,John,27,la +2,Bob,,ny`)) + + // in real application this should be done once in init function. + userHeader, err := csvutil.Header(User{}, "csv") + if err != nil { + log.Fatal(err) + } + + dec, err := csvutil.NewDecoder(csvReader, userHeader...) + if err != nil { + log.Fatal(err) + } + + var users []User + for { + var u User + if err := dec.Decode(&u); err == io.EOF { + break + } else if err != nil { + log.Fatal(err) + } + users = append(users, u) + } + + fmt.Printf("%+v", users) + + // Output: + // [{ID:1 Name:John Age:27 City:la} {ID:2 Name:Bob Age:0 City:ny}] +``` + +### Decoder.Map - data normalization + +The Decoder's [Map](https://godoc.org/github.com/jszwec/csvutil#Decoder.Map) function is a powerful tool that can help clean up or normalize +the incoming data before the actual decoding takes place. + +Lets say we want to decode some floats and the csv input contains some NaN values, but these values are represented by the 'n/a' string. An attempt to decode 'n/a' into float will end up with error, because strconv.ParseFloat expects 'NaN'. Knowing that, we can implement a Map function that will normalize our 'n/a' string and turn it to 'NaN' only for float types. + +```go + dec, err := NewDecoder(r) + if err != nil { + log.Fatal(err) + } + + dec.Map = func(field, column string, v interface{}) string { + if _, ok := v.(float64); ok && field == "n/a" { + return "NaN" + } + return field + } +``` + +Now our float64 fields will be decoded properly into NaN. What about float32, float type aliases and other NaN formats? Look at the full example [here](https://gist.github.com/jszwec/2bb94f8f3612e0162eb16003701f727e). + +### Different separator/delimiter + +Some files may use different value separators, for example TSV files would use `\t`. The following examples show how to set up a Decoder and Encoder for such use case. + +#### Decoder: +```go + csvReader := csv.NewReader(r) + csvReader.Comma = '\t' + + dec, err := NewDecoder(csvReader) + if err != nil { + log.Fatal(err) + } + + var users []User + for { + var u User + if err := dec.Decode(&u); err == io.EOF { + break + } else if err != nil { + log.Fatal(err) + } + users = append(users, u) + } + +``` + +#### Encoder: +```go + var buf bytes.Buffer + + w := csv.NewWriter(&buf) + w.Comma = '\t' + enc := csvutil.NewEncoder(w) + + for _, u := range users { + if err := enc.Encode(u); err != nil { + log.Fatal(err) + } + } + + w.Flush() + if err := w.Error(); err != nil { + log.Fatal(err) + } +``` + +### Custom Types and Overrides + +There are multiple ways to customize or override your type's behavior. + +1. a type implements [csvutil.Marshaler](https://pkg.go.dev/github.com/jszwec/csvutil#Marshaler) and/or [csvutil.Unmarshaler](https://pkg.go.dev/github.com/jszwec/csvutil#Unmarshaler) +```go +type Foo int64 + +func (f Foo) MarshalCSV() ([]byte, error) { + return strconv.AppendInt(nil, int64(f), 16), nil +} + +func (f *Foo) UnmarshalCSV(data []byte) error { + i, err := strconv.ParseInt(string(data), 16, 64) + if err != nil { + return err + } + *f = Foo(i) + return nil +} +``` +2. a type implements [encoding.TextUnmarshaler](https://golang.org/pkg/encoding/#TextUnmarshaler) and/or [encoding.TextMarshaler](https://golang.org/pkg/encoding/#TextMarshaler) +```go +type Foo int64 + +func (f Foo) MarshalText() ([]byte, error) { + return strconv.AppendInt(nil, int64(f), 16), nil +} + +func (f *Foo) UnmarshalText(data []byte) error { + i, err := strconv.ParseInt(string(data), 16, 64) + if err != nil { + return err + } + *f = Foo(i) + return nil +} +``` +3. a type is registered using [Encoder.Register](https://pkg.go.dev/github.com/jszwec/csvutil#Encoder.Register) and/or [Decoder.Register](https://pkg.go.dev/github.com/jszwec/csvutil#Decoder.Register) +```go +type Foo int64 + +enc.Register(func(f Foo) ([]byte, error) { + return strconv.AppendInt(nil, int64(f), 16), nil +}) + +dec.Register(func(data []byte, f *Foo) error { + v, err := strconv.ParseInt(string(data), 16, 64) + if err != nil { + return err + } + *f = Foo(v) + return nil +}) +``` +4. a type implements an interface that was registered using [Encoder.Register](https://pkg.go.dev/github.com/jszwec/csvutil#Encoder.Register) and/or [Decoder.Register](https://pkg.go.dev/github.com/jszwec/csvutil#Decoder.Register) +```go +type Foo int64 + +func (f Foo) String() string { + return strconv.FormatInt(int64(f), 16) +} + +func (f *Foo) Scan(state fmt.ScanState, verb rune) error { + // too long; look here: https://github.com/jszwec/csvutil/blob/master/example_decoder_register_test.go#L19 +} + +enc.Register(func(s fmt.Stringer) ([]byte, error) { + return []byte(s.String()), nil +}) + +dec.Register(func(data []byte, s fmt.Scanner) error { + _, err := fmt.Sscan(string(data), s) + return err +}) +``` + +The order of precedence for both Encoder and Decoder is: +1. type is registered +2. type implements an interface that was registered +3. csvutil.{Un,M}arshaler +4. encoding.Text{Un,M}arshaler + +For more examples look [here](https://pkg.go.dev/github.com/jszwec/csvutil?readme=expanded#pkg-examples) + +### Custom time.Time format + +Type [time.Time](https://golang.org/pkg/time/#Time) can be used as is in the struct fields by both Decoder and Encoder +due to the fact that both have builtin support for [encoding.TextUnmarshaler](https://golang.org/pkg/encoding/#TextUnmarshaler) and [encoding.TextMarshaler](https://golang.org/pkg/encoding/#TextMarshaler). This means that by default +Time has a specific format; look at [MarshalText](https://golang.org/pkg/time/#Time.MarshalText) and [UnmarshalText](https://golang.org/pkg/time/#Time.UnmarshalText). There are two ways to override it, which one you choose depends on your use case: + +1. Via Register func (based on encoding/json) +```go +const format = "2006/01/02 15:04:05" + +marshalTime := func(t time.Time) ([]byte, error) { + return t.AppendFormat(nil, format), nil +} + +unmarshalTime := func(data []byte, t *time.Time) error { + tt, err := time.Parse(format, string(data)) + if err != nil { + return err + } + *t = tt + return nil +} + +enc := csvutil.NewEncoder(w) +enc.Register(marshalTime) + +dec, err := csvutil.NewDecoder(r) +if err != nil { + return err +} +dec.Register(unmarshalTime) +``` + +2. With custom type: +```go +type Time struct { + time.Time +} + +const format = "2006/01/02 15:04:05" + +func (t Time) MarshalCSV() ([]byte, error) { + var b [len(format)]byte + return t.AppendFormat(b[:0], format), nil +} + +func (t *Time) UnmarshalCSV(data []byte) error { + tt, err := time.Parse(format, string(data)) + if err != nil { + return err + } + *t = Time{Time: tt} + return nil +} +``` + +### Custom struct tags + +Like in other Go encoding packages struct field tags can be used to set +custom names or options. By default encoders and decoders are looking at `csv` tag. +However, this can be overriden by manually setting the Tag field. + +```go + type Foo struct { + Bar int `custom:"bar"` + } +``` + +```go + dec, err := csvutil.NewDecoder(r) + if err != nil { + log.Fatal(err) + } + dec.Tag = "custom" +``` + +```go + enc := csvutil.NewEncoder(w) + enc.Tag = "custom" +``` + +### Slice and Map fields + +There is no default encoding/decoding support for slice and map fields because there is no CSV spec for such values. +In such case, it is recommended to create a custom type alias and implement Marshaler and Unmarshaler interfaces. +Please note that slice and map aliases behave differently than aliases of other types - there is no need for type casting. + +```go + type Strings []string + + func (s Strings) MarshalCSV() ([]byte, error) { + return []byte(strings.Join(s, ",")), nil // strings.Join takes []string but it will also accept Strings + } + + type StringMap map[string]string + + func (sm StringMap) MarshalCSV() ([]byte, error) { + return []byte(fmt.Sprint(sm)), nil + } + + func main() { + b, err := csvutil.Marshal([]struct { + Strings Strings `csv:"strings"` + Map StringMap `csv:"map"` + }{ + {[]string{"a", "b"}, map[string]string{"a": "1"}}, // no type casting is required for slice and map aliases + {Strings{"c", "d"}, StringMap{"b": "1"}}, + }) + + if err != nil { + log.Fatal(err) + } + + fmt.Printf("%s\n", b) + + // Output: + // strings,map + // "a,b",map[a:1] + // "c,d",map[b:1] + } +``` + +### Nested/Embedded structs + +Both Encoder and Decoder support nested or embedded structs. + +Playground: https://play.golang.org/p/ZySjdVkovbf + +```go +package main + +import ( + "fmt" + + "github.com/jszwec/csvutil" +) + +type Address struct { + Street string `csv:"street"` + City string `csv:"city"` +} + +type User struct { + Name string `csv:"name"` + Address +} + +func main() { + users := []User{ + { + Name: "John", + Address: Address{ + Street: "Boylston", + City: "Boston", + }, + }, + } + + b, err := csvutil.Marshal(users) + if err != nil { + panic(err) + } + + fmt.Printf("%s\n", b) + + var out []User + if err := csvutil.Unmarshal(b, &out); err != nil { + panic(err) + } + + fmt.Printf("%+v\n", out) + + // Output: + // + // name,street,city + // John,Boylston,Boston + // + // [{Name:John Address:{Street:Boylston City:Boston}}] +} +``` + +### Inline tag + +Fields with inline tag behave similarly to embedded struct fields. However, +it gives a possibility to specify the prefix for all underlying fields. This +can be useful when one structure can define multiple CSV columns because they +are different from each other only by a certain prefix. Look at the example below. + +Playground: https://play.golang.org/p/jyEzeskSnj7 + +```go +package main + +import ( + "fmt" + + "github.com/jszwec/csvutil" +) + +func main() { + type Address struct { + Street string `csv:"street"` + City string `csv:"city"` + } + + type User struct { + Name string `csv:"name"` + Address Address `csv:",inline"` + HomeAddress Address `csv:"home_address_,inline"` + WorkAddress Address `csv:"work_address_,inline"` + Age int `csv:"age,omitempty"` + } + + users := []User{ + { + Name: "John", + Address: Address{"Washington", "Boston"}, + HomeAddress: Address{"Boylston", "Boston"}, + WorkAddress: Address{"River St", "Cambridge"}, + Age: 26, + }, + } + + b, err := csvutil.Marshal(users) + if err != nil { + fmt.Println("error:", err) + } + + fmt.Printf("%s\n", b) + + // Output: + // name,street,city,home_address_street,home_address_city,work_address_street,work_address_city,age + // John,Washington,Boston,Boylston,Boston,River St,Cambridge,26 +} +``` + +Performance +------------ + +csvutil provides the best encoding and decoding performance with small memory usage. + +### Unmarshal + +[benchmark code](https://gist.github.com/jszwec/e8515e741190454fa3494bcd3e1f100f) + +#### csvutil: +``` +BenchmarkUnmarshal/csvutil.Unmarshal/1_record-12 280696 4516 ns/op 7332 B/op 26 allocs/op +BenchmarkUnmarshal/csvutil.Unmarshal/10_records-12 95750 11517 ns/op 8356 B/op 35 allocs/op +BenchmarkUnmarshal/csvutil.Unmarshal/100_records-12 14997 83146 ns/op 18532 B/op 125 allocs/op +BenchmarkUnmarshal/csvutil.Unmarshal/1000_records-12 1485 750143 ns/op 121094 B/op 1025 allocs/op +BenchmarkUnmarshal/csvutil.Unmarshal/10000_records-12 154 7587205 ns/op 1136662 B/op 10025 allocs/op +BenchmarkUnmarshal/csvutil.Unmarshal/100000_records-12 14 76126616 ns/op 11808744 B/op 100025 allocs/op +``` + +#### gocsv: +``` +BenchmarkUnmarshal/gocsv.Unmarshal/1_record-12 141330 7499 ns/op 7795 B/op 97 allocs/op +BenchmarkUnmarshal/gocsv.Unmarshal/10_records-12 54252 21664 ns/op 13891 B/op 307 allocs/op +BenchmarkUnmarshal/gocsv.Unmarshal/100_records-12 6920 159662 ns/op 72644 B/op 2380 allocs/op +BenchmarkUnmarshal/gocsv.Unmarshal/1000_records-12 752 1556083 ns/op 650248 B/op 23083 allocs/op +BenchmarkUnmarshal/gocsv.Unmarshal/10000_records-12 72 17086623 ns/op 7017469 B/op 230092 allocs/op +BenchmarkUnmarshal/gocsv.Unmarshal/100000_records-12 7 163610749 ns/op 75004923 B/op 2300105 allocs/op +``` + +#### easycsv: +``` +BenchmarkUnmarshal/easycsv.ReadAll/1_record-12 101527 10662 ns/op 8855 B/op 81 allocs/op +BenchmarkUnmarshal/easycsv.ReadAll/10_records-12 23325 51437 ns/op 24072 B/op 391 allocs/op +BenchmarkUnmarshal/easycsv.ReadAll/100_records-12 2402 447296 ns/op 170538 B/op 3454 allocs/op +BenchmarkUnmarshal/easycsv.ReadAll/1000_records-12 272 4370854 ns/op 1595683 B/op 34057 allocs/op +BenchmarkUnmarshal/easycsv.ReadAll/10000_records-12 24 47502457 ns/op 18861808 B/op 340068 allocs/op +BenchmarkUnmarshal/easycsv.ReadAll/100000_records-12 3 468974170 ns/op 189427066 B/op 3400082 allocs/op +``` + +### Marshal + +[benchmark code](https://gist.github.com/jszwec/31980321e1852ebb5615a44ccf374f17) + +#### csvutil: +``` +BenchmarkMarshal/csvutil.Marshal/1_record-12 279558 4390 ns/op 9952 B/op 12 allocs/op +BenchmarkMarshal/csvutil.Marshal/10_records-12 82478 15608 ns/op 10800 B/op 21 allocs/op +BenchmarkMarshal/csvutil.Marshal/100_records-12 10275 117288 ns/op 28208 B/op 112 allocs/op +BenchmarkMarshal/csvutil.Marshal/1000_records-12 1075 1147473 ns/op 168508 B/op 1014 allocs/op +BenchmarkMarshal/csvutil.Marshal/10000_records-12 100 11985382 ns/op 1525973 B/op 10017 allocs/op +BenchmarkMarshal/csvutil.Marshal/100000_records-12 9 113640813 ns/op 22455873 B/op 100021 allocs/op +``` + +#### gocsv: +``` +BenchmarkMarshal/gocsv.Marshal/1_record-12 203052 6077 ns/op 5914 B/op 81 allocs/op +BenchmarkMarshal/gocsv.Marshal/10_records-12 50132 24585 ns/op 9284 B/op 360 allocs/op +BenchmarkMarshal/gocsv.Marshal/100_records-12 5480 212008 ns/op 51916 B/op 3151 allocs/op +BenchmarkMarshal/gocsv.Marshal/1000_records-12 514 2053919 ns/op 444506 B/op 31053 allocs/op +BenchmarkMarshal/gocsv.Marshal/10000_records-12 52 21066666 ns/op 4332377 B/op 310064 allocs/op +BenchmarkMarshal/gocsv.Marshal/100000_records-12 5 207408929 ns/op 51169419 B/op 3100077 allocs/op +``` diff --git a/vendor/github.com/jszwec/csvutil/_config.yml b/vendor/github.com/jszwec/csvutil/_config.yml new file mode 100644 index 000000000..f4b41887d --- /dev/null +++ b/vendor/github.com/jszwec/csvutil/_config.yml @@ -0,0 +1,2 @@ +theme: jekyll-theme-cayman +markdown: GFM diff --git a/vendor/github.com/jszwec/csvutil/cache.go b/vendor/github.com/jszwec/csvutil/cache.go new file mode 100644 index 000000000..7c5edd01d --- /dev/null +++ b/vendor/github.com/jszwec/csvutil/cache.go @@ -0,0 +1,178 @@ +package csvutil + +import ( + "reflect" + "sort" +) + +type field struct { + name string + baseType reflect.Type + typ reflect.Type + tag tag + index []int +} + +type fields []field + +func (fs fields) Len() int { return len(fs) } + +func (fs fields) Swap(i, j int) { fs[i], fs[j] = fs[j], fs[i] } + +func (fs fields) Less(i, j int) bool { + for k, n := range fs[i].index { + if n != fs[j].index[k] { + return n < fs[j].index[k] + } + } + return len(fs[i].index) < len(fs[j].index) +} + +type typeKey struct { + tag string + reflect.Type +} + +type fieldMap map[string]fields + +func (m fieldMap) insert(f field) { + fs, ok := m[f.name] + if !ok { + m[f.name] = append(fs, f) + return + } + + // insert only fields with the shortest path. + if len(fs[0].index) != len(f.index) { + return + } + + // fields that are tagged have priority. + if !f.tag.empty { + m[f.name] = append([]field{f}, fs...) + return + } + + m[f.name] = append(fs, f) +} + +func (m fieldMap) fields() fields { + out := make(fields, 0, len(m)) + for _, v := range m { + for i, f := range v { + if f.tag.empty != v[0].tag.empty { + v = v[:i] + break + } + } + if len(v) > 1 { + continue + } + out = append(out, v[0]) + } + sort.Sort(out) + return out +} + +func buildFields(k typeKey) fields { + type key struct { + reflect.Type + tag + } + + q := fields{{typ: k.Type}} + visited := make(map[key]struct{}) + fm := make(fieldMap) + + for len(q) > 0 { + f := q[0] + q = q[1:] + + key := key{f.typ, f.tag} + if _, ok := visited[key]; ok { + continue + } + visited[key] = struct{}{} + + depth := len(f.index) + + numField := f.typ.NumField() + for i := 0; i < numField; i++ { + sf := f.typ.Field(i) + + if sf.PkgPath != "" && !sf.Anonymous { + // unexported field + continue + } + + if sf.Anonymous { + t := sf.Type + if t.Kind() == reflect.Ptr { + t = t.Elem() + } + if sf.PkgPath != "" && t.Kind() != reflect.Struct { + // ignore embedded unexported non-struct fields. + continue + } + } + + tag := parseTag(k.tag, sf) + if tag.ignore { + continue + } + if f.tag.prefix != "" { + tag.prefix += f.tag.prefix + } + + ft := sf.Type + if ft.Kind() == reflect.Ptr { + ft = ft.Elem() + } + + newf := field{ + name: tag.prefix + tag.name, + baseType: sf.Type, + typ: ft, + tag: tag, + index: makeIndex(f.index, i), + } + + if sf.Anonymous && ft.Kind() == reflect.Struct && tag.empty { + q = append(q, newf) + continue + } + + if tag.inline && ft.Kind() == reflect.Struct { + q = append(q, newf) + continue + } + + fm.insert(newf) + + // look for duplicate nodes on the same level. Nodes won't be + // revisited, so write all fields for the current type now. + for _, v := range q { + if len(v.index) != depth { + break + } + if v.typ == f.typ && v.tag.prefix == tag.prefix { + // other nodes can have different path. + fm.insert(field{ + name: tag.prefix + tag.name, + baseType: sf.Type, + typ: ft, + tag: tag, + index: makeIndex(v.index, i), + }) + } + } + } + } + return fm.fields() +} + +func makeIndex(index []int, v int) []int { + out := make([]int, len(index), len(index)+1) + copy(out, index) + return append(out, v) +} diff --git a/vendor/github.com/jszwec/csvutil/cache_go17.go b/vendor/github.com/jszwec/csvutil/cache_go17.go new file mode 100644 index 000000000..1c79bb9b9 --- /dev/null +++ b/vendor/github.com/jszwec/csvutil/cache_go17.go @@ -0,0 +1,30 @@ +// +build !go1.9 + +package csvutil + +import ( + "sync" +) + +var fieldCache = struct { + mtx sync.RWMutex + m map[typeKey][]field +}{m: make(map[typeKey][]field)} + +func cachedFields(k typeKey) fields { + fieldCache.mtx.RLock() + fields, ok := fieldCache.m[k] + fieldCache.mtx.RUnlock() + + if ok { + return fields + } + + fields = buildFields(k) + + fieldCache.mtx.Lock() + fieldCache.m[k] = fields + fieldCache.mtx.Unlock() + + return fields +} diff --git a/vendor/github.com/jszwec/csvutil/cache_go19.go b/vendor/github.com/jszwec/csvutil/cache_go19.go new file mode 100644 index 000000000..81799f1d1 --- /dev/null +++ b/vendor/github.com/jszwec/csvutil/cache_go19.go @@ -0,0 +1,18 @@ +// +build go1.9 + +package csvutil + +import ( + "sync" +) + +var fieldCache sync.Map // map[typeKey][]field + +func cachedFields(k typeKey) fields { + if v, ok := fieldCache.Load(k); ok { + return v.(fields) + } + + v, _ := fieldCache.LoadOrStore(k, buildFields(k)) + return v.(fields) +} diff --git a/vendor/github.com/jszwec/csvutil/csvutil.go b/vendor/github.com/jszwec/csvutil/csvutil.go new file mode 100644 index 000000000..655105c04 --- /dev/null +++ b/vendor/github.com/jszwec/csvutil/csvutil.go @@ -0,0 +1,223 @@ +package csvutil + +import ( + "bytes" + "encoding/csv" + "io" + "reflect" +) + +const defaultTag = "csv" + +var ( + _bytes = reflect.TypeOf(([]byte)(nil)) + _error = reflect.TypeOf((*error)(nil)).Elem() +) + +// Unmarshal parses the CSV-encoded data and stores the result in the slice or +// the array pointed to by v. If v is nil or not a pointer to a struct slice or +// struct array, Unmarshal returns an InvalidUnmarshalError. +// +// Unmarshal uses the std encoding/csv.Reader for parsing and csvutil.Decoder +// for populating the struct elements in the provided slice. For exact decoding +// rules look at the Decoder's documentation. +// +// The first line in data is treated as a header. Decoder will use it to map +// csv columns to struct's fields. +// +// In case of success the provided slice will be reinitialized and its content +// fully replaced with decoded data. +func Unmarshal(data []byte, v interface{}) error { + val := reflect.ValueOf(v) + + if val.Kind() != reflect.Ptr || val.IsNil() { + return &InvalidUnmarshalError{Type: reflect.TypeOf(v)} + } + + switch val.Type().Elem().Kind() { + case reflect.Slice, reflect.Array: + default: + return &InvalidUnmarshalError{Type: val.Type()} + } + + typ := val.Type().Elem() + + if walkType(typ.Elem()).Kind() != reflect.Struct { + return &InvalidUnmarshalError{Type: val.Type()} + } + + dec, err := NewDecoder(newCSVReader(bytes.NewReader(data))) + if err == io.EOF { + return nil + } else if err != nil { + return err + } + + // for the array just call decodeArray directly; for slice values call the + // optimized code for better performance. + + if typ.Kind() == reflect.Array { + return dec.decodeArray(val.Elem()) + } + + c := countRecords(data) + slice := reflect.MakeSlice(typ, c, c) + + var i int + for ; ; i++ { + // just in case countRecords counts it wrong. + if i >= c && i >= slice.Len() { + slice = reflect.Append(slice, reflect.New(typ.Elem()).Elem()) + } + + if err := dec.Decode(slice.Index(i).Addr().Interface()); err == io.EOF { + break + } else if err != nil { + return err + } + } + + val.Elem().Set(slice.Slice3(0, i, i)) + return nil +} + +// Marshal returns the CSV encoding of slice or array v. If v is not a slice or +// elements are not structs then Marshal returns InvalidMarshalError. +// +// Marshal uses the std encoding/csv.Writer with its default settings for csv +// encoding. +// +// Marshal will always encode the CSV header even for the empty slice. +// +// For the exact encoding rules look at Encoder.Encode method. +func Marshal(v interface{}) ([]byte, error) { + val := walkValue(reflect.ValueOf(v)) + + if !val.IsValid() { + return nil, &InvalidMarshalError{} + } + + switch val.Kind() { + case reflect.Array, reflect.Slice: + default: + return nil, &InvalidMarshalError{Type: reflect.ValueOf(v).Type()} + } + + typ := walkType(val.Type().Elem()) + if typ.Kind() != reflect.Struct { + return nil, &InvalidMarshalError{Type: reflect.ValueOf(v).Type()} + } + + var buf bytes.Buffer + w := csv.NewWriter(&buf) + enc := NewEncoder(w) + + if err := enc.encodeHeader(typ); err != nil { + return nil, err + } + + if err := enc.encodeArray(val); err != nil { + return nil, err + } + + w.Flush() + if err := w.Error(); err != nil { + return nil, err + } + return buf.Bytes(), nil +} + +func countRecords(s []byte) (n int) { + var prev byte + inQuote := false + for { + if len(s) == 0 && prev != '"' { + return n + } + + i := bytes.IndexAny(s, "\n\"") + if i == -1 { + return n + 1 + } + + switch s[i] { + case '\n': + if !inQuote && (i > 0 || prev == '"') { + n++ + } + case '"': + inQuote = !inQuote + } + + prev = s[i] + s = s[i+1:] + } +} + +// Header scans the provided struct type and generates a CSV header for it. +// +// Field names are written in the same order as struct fields are defined. +// Embedded struct's fields are treated as if they were part of the outer struct. +// Fields that are embedded types and that are tagged are treated like any +// other field. +// +// Unexported fields and fields with tag "-" are ignored. +// +// Tagged fields have the priority over non tagged fields with the same name. +// +// Following the Go visibility rules if there are multiple fields with the same +// name (tagged or not tagged) on the same level and choice between them is +// ambiguous, then all these fields will be ignored. +// +// It is a good practice to call Header once for each type. The suitable place +// for calling it is init function. Look at Decoder.DecodingDataWithNoHeader +// example. +// +// If tag is left empty the default "csv" will be used. +// +// Header will return UnsupportedTypeError if the provided value is nil or is +// not a struct. +func Header(v interface{}, tag string) ([]string, error) { + typ, err := valueType(v) + if err != nil { + return nil, err + } + + if tag == "" { + tag = defaultTag + } + + fields := cachedFields(typeKey{tag, typ}) + h := make([]string, len(fields)) + for i, f := range fields { + h[i] = f.name + } + return h, nil +} + +func valueType(v interface{}) (reflect.Type, error) { + val := reflect.ValueOf(v) + if !val.IsValid() { + return nil, &UnsupportedTypeError{} + } + +loop: + for { + switch val.Kind() { + case reflect.Ptr, reflect.Interface: + el := val.Elem() + if !el.IsValid() { + break loop + } + val = el + default: + break loop + } + } + + typ := walkType(val.Type()) + if typ.Kind() != reflect.Struct { + return nil, &UnsupportedTypeError{Type: typ} + } + return typ, nil +} diff --git a/vendor/github.com/jszwec/csvutil/csvutil_go17.go b/vendor/github.com/jszwec/csvutil/csvutil_go17.go new file mode 100644 index 000000000..d19ef4e63 --- /dev/null +++ b/vendor/github.com/jszwec/csvutil/csvutil_go17.go @@ -0,0 +1,12 @@ +// +build !go1.9 + +package csvutil + +import ( + "encoding/csv" + "io" +) + +func newCSVReader(r io.Reader) *csv.Reader { + return csv.NewReader(r) +} diff --git a/vendor/github.com/jszwec/csvutil/csvutil_go19.go b/vendor/github.com/jszwec/csvutil/csvutil_go19.go new file mode 100644 index 000000000..2bfaa1ed5 --- /dev/null +++ b/vendor/github.com/jszwec/csvutil/csvutil_go19.go @@ -0,0 +1,14 @@ +// +build go1.9 + +package csvutil + +import ( + "encoding/csv" + "io" +) + +func newCSVReader(r io.Reader) *csv.Reader { + rr := csv.NewReader(r) + rr.ReuseRecord = true + return rr +} diff --git a/vendor/github.com/jszwec/csvutil/decode.go b/vendor/github.com/jszwec/csvutil/decode.go new file mode 100644 index 000000000..0f3f6ac2b --- /dev/null +++ b/vendor/github.com/jszwec/csvutil/decode.go @@ -0,0 +1,247 @@ +package csvutil + +import ( + "encoding" + "encoding/base64" + "reflect" + "strconv" +) + +var ( + textUnmarshaler = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem() + csvUnmarshaler = reflect.TypeOf((*Unmarshaler)(nil)).Elem() +) + +var intDecoders = map[int]decodeFunc{ + 8: decodeIntN(8), + 16: decodeIntN(16), + 32: decodeIntN(32), + 64: decodeIntN(64), +} + +var uintDecoders = map[int]decodeFunc{ + 8: decodeUintN(8), + 16: decodeUintN(16), + 32: decodeUintN(32), + 64: decodeUintN(64), +} + +var ( + decodeFloat32 = decodeFloatN(32) + decodeFloat64 = decodeFloatN(64) +) + +type decodeFunc func(s string, v reflect.Value) error + +func decodeFuncValue(f reflect.Value) decodeFunc { + isIface := f.Type().In(1).Kind() == reflect.Interface + + return func(s string, v reflect.Value) error { + if isIface && v.Type().Kind() == reflect.Interface && v.IsNil() { + return &UnmarshalTypeError{Value: s, Type: v.Type()} + } + + out := f.Call([]reflect.Value{ + reflect.ValueOf([]byte(s)), + v, + }) + err, _ := out[0].Interface().(error) + return err + } +} + +func decodeFuncValuePtr(f reflect.Value) decodeFunc { + return func(s string, v reflect.Value) error { + out := f.Call([]reflect.Value{ + reflect.ValueOf([]byte(s)), + v.Addr(), + }) + err, _ := out[0].Interface().(error) + return err + } +} + +func decodeString(s string, v reflect.Value) error { + v.SetString(s) + return nil +} + +func decodeIntN(bits int) decodeFunc { + return func(s string, v reflect.Value) error { + n, err := strconv.ParseInt(s, 10, bits) + if err != nil { + return &UnmarshalTypeError{Value: s, Type: v.Type()} + } + v.SetInt(n) + return nil + } +} + +func decodeUintN(bits int) decodeFunc { + return func(s string, v reflect.Value) error { + n, err := strconv.ParseUint(s, 10, bits) + if err != nil { + return &UnmarshalTypeError{Value: s, Type: v.Type()} + } + v.SetUint(n) + return nil + } +} + +func decodeFloatN(bits int) decodeFunc { + return func(s string, v reflect.Value) error { + n, err := strconv.ParseFloat(s, bits) + if err != nil { + return &UnmarshalTypeError{Value: s, Type: v.Type()} + } + v.SetFloat(n) + return nil + } +} + +func decodeBool(s string, v reflect.Value) error { + b, err := strconv.ParseBool(s) + if err != nil { + return &UnmarshalTypeError{Value: s, Type: v.Type()} + } + v.SetBool(b) + return nil +} + +func decodePtrTextUnmarshaler(s string, v reflect.Value) error { + return decodeTextUnmarshaler(s, v.Addr()) +} + +func decodeTextUnmarshaler(s string, v reflect.Value) error { + return v.Interface().(encoding.TextUnmarshaler).UnmarshalText([]byte(s)) +} + +func decodePtrFieldUnmarshaler(s string, v reflect.Value) error { + return decodeFieldUnmarshaler(s, v.Addr()) +} + +func decodeFieldUnmarshaler(s string, v reflect.Value) error { + return v.Interface().(Unmarshaler).UnmarshalCSV([]byte(s)) +} + +func decodePtr(typ reflect.Type, funcMap map[reflect.Type]reflect.Value, ifaceFuncs []reflect.Value) (decodeFunc, error) { + next, err := decodeFn(typ.Elem(), funcMap, ifaceFuncs) + if err != nil { + return nil, err + } + + return func(s string, v reflect.Value) error { + if v.IsNil() { + v.Set(reflect.New(v.Type().Elem())) + } + return next(s, v.Elem()) + }, nil +} + +func decodeInterface(funcMap map[reflect.Type]reflect.Value, ifaceFuncs []reflect.Value) decodeFunc { + return func(s string, v reflect.Value) error { + if v.NumMethod() != 0 { + return &UnmarshalTypeError{ + Value: s, + Type: v.Type(), + } + } + + if v.IsNil() { + v.Set(reflect.ValueOf(s)) + return nil + } + + el := walkValue(v) + if !el.CanSet() { + if el.IsValid() { + // we may get a value receiver unmarshalers or registered funcs + // underneath the interface in which case we should call + // Unmarshal/Registered func. + typ := el.Type() + if f, ok := funcMap[typ]; ok { + return decodeFuncValue(f)(s, el) + } + for _, f := range ifaceFuncs { + if typ.AssignableTo(f.Type().In(1)) { + return decodeFuncValue(f)(s, el) + } + } + if typ.Implements(csvUnmarshaler) { + return decodeFieldUnmarshaler(s, el) + } + if typ.Implements(textUnmarshaler) { + return decodeTextUnmarshaler(s, el) + } + } + v.Set(reflect.ValueOf(s)) + return nil + } + + fn, err := decodeFn(el.Type(), funcMap, ifaceFuncs) + if err != nil { + return err + } + return fn(s, el) + } +} + +func decodeBytes(s string, v reflect.Value) error { + b, err := base64.StdEncoding.DecodeString(s) + if err != nil { + return err + } + v.SetBytes(b) + return nil +} + +func decodeFn(typ reflect.Type, funcMap map[reflect.Type]reflect.Value, ifaceFuncs []reflect.Value) (decodeFunc, error) { + if f, ok := funcMap[typ]; ok { + return decodeFuncValue(f), nil + } + if f, ok := funcMap[reflect.PtrTo(typ)]; ok { + return decodeFuncValuePtr(f), nil + } + + for _, f := range ifaceFuncs { + argType := f.Type().In(1) + if typ.AssignableTo(argType) { + return decodeFuncValue(f), nil + } + if reflect.PtrTo(typ).AssignableTo(argType) { + return decodeFuncValuePtr(f), nil + } + } + + if reflect.PtrTo(typ).Implements(csvUnmarshaler) { + return decodePtrFieldUnmarshaler, nil + } + if reflect.PtrTo(typ).Implements(textUnmarshaler) { + return decodePtrTextUnmarshaler, nil + } + + switch typ.Kind() { + case reflect.Ptr: + return decodePtr(typ, funcMap, ifaceFuncs) + case reflect.Interface: + return decodeInterface(funcMap, ifaceFuncs), nil + case reflect.String: + return decodeString, nil + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return intDecoders[typ.Bits()], nil + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + return uintDecoders[typ.Bits()], nil + case reflect.Float32: + return decodeFloat32, nil + case reflect.Float64: + return decodeFloat64, nil + case reflect.Bool: + return decodeBool, nil + case reflect.Slice: + if typ.Elem().Kind() == reflect.Uint8 { + return decodeBytes, nil + } + } + + return nil, &UnsupportedTypeError{Type: typ} +} diff --git a/vendor/github.com/jszwec/csvutil/decoder.go b/vendor/github.com/jszwec/csvutil/decoder.go new file mode 100644 index 000000000..ab949dfda --- /dev/null +++ b/vendor/github.com/jszwec/csvutil/decoder.go @@ -0,0 +1,487 @@ +package csvutil + +import ( + "io" + "reflect" +) + +type decField struct { + columnIndex int + field + decodeFunc + zero interface{} +} + +// A Decoder reads and decodes string records into structs. +type Decoder struct { + // Tag defines which key in the struct field's tag to scan for names and + // options (Default: 'csv'). + Tag string + + // If true, Decoder will return a MissingColumnsError if it discovers + // that any of the columns are missing. This means that a CSV input + // will be required to contain all columns that were defined in the + // provided struct. + DisallowMissingColumns bool + + // If not nil, Map is a function that is called for each field in the csv + // record before decoding the data. It allows mapping certain string values + // for specific columns or types to a known format. Decoder calls Map with + // the current column name (taken from header) and a zero non-pointer value + // of a type to which it is going to decode data into. Implementations + // should use type assertions to recognize the type. + // + // The good example of use case for Map is if NaN values are represented by + // eg 'n/a' string, implementing a specific Map function for all floats + // could map 'n/a' back into 'NaN' to allow successful decoding. + // + // Use Map with caution. If the requirements of column or type are not met + // Map should return 'field', since it is the original value that was + // read from the csv input, this would indicate no change. + // + // If struct field is an interface v will be of type string, unless the + // struct field contains a settable pointer value - then v will be a zero + // value of that type. + // + // Map must be set before the first call to Decode and not changed after it. + Map func(field, col string, v interface{}) string + + r Reader + typeKey typeKey + hmap map[string]int + header []string + record []string + cache []decField + unused []int + funcMap map[reflect.Type]reflect.Value + ifaceFuncs []reflect.Value +} + +// NewDecoder returns a new decoder that reads from r. +// +// Decoder will match struct fields according to the given header. +// +// If header is empty NewDecoder will read one line and treat it as a header. +// +// Records coming from r must be of the same length as the header. +// +// NewDecoder may return io.EOF if there is no data in r and no header was +// provided by the caller. +func NewDecoder(r Reader, header ...string) (dec *Decoder, err error) { + if len(header) == 0 { + header, err = r.Read() + if err != nil { + return nil, err + } + } + + h := make([]string, len(header)) + copy(h, header) + header = h + + m := make(map[string]int, len(header)) + for i, h := range header { + m[h] = i + } + + return &Decoder{ + r: r, + header: header, + hmap: m, + unused: make([]int, 0, len(header)), + }, nil +} + +// Decode reads the next string record or records from its input and stores it +// in the value pointed to by v which must be a pointer to a struct, struct slice +// or struct array. +// +// Decode matches all exported struct fields based on the header. Struct fields +// can be adjusted by using tags. +// +// The "omitempty" option specifies that the field should be omitted from +// the decoding if record's field is an empty string. +// +// Examples of struct field tags and their meanings: +// // Decode matches this field with "myName" header column. +// Field int `csv:"myName"` +// +// // Decode matches this field with "Field" header column. +// Field int +// +// // Decode matches this field with "myName" header column and decoding is not +// // called if record's field is an empty string. +// Field int `csv:"myName,omitempty"` +// +// // Decode matches this field with "Field" header column and decoding is not +// // called if record's field is an empty string. +// Field int `csv:",omitempty"` +// +// // Decode ignores this field. +// Field int `csv:"-"` +// +// // Decode treats this field exactly as if it was an embedded field and +// // matches header columns that start with "my_prefix_" to all fields of this +// // type. +// Field Struct `csv:"my_prefix_,inline"` +// +// // Decode treats this field exactly as if it was an embedded field. +// Field Struct `csv:",inline"` +// +// By default decode looks for "csv" tag, but this can be changed by setting +// Decoder.Tag field. +// +// To Decode into a custom type v must implement csvutil.Unmarshaler or +// encoding.TextUnmarshaler. +// +// Anonymous struct fields with tags are treated like normal fields and they +// must implement csvutil.Unmarshaler or encoding.TextUnmarshaler unless inline +// tag is specified. +// +// Anonymous struct fields without tags are populated just as if they were +// part of the main struct. However, fields in the main struct have bigger +// priority and they are populated first. If main struct and anonymous struct +// field have the same fields, the main struct's fields will be populated. +// +// Fields of type []byte expect the data to be base64 encoded strings. +// +// Float fields are decoded to NaN if a string value is 'NaN'. This check +// is case insensitive. +// +// Interface fields are decoded to strings unless they contain settable pointer +// value. +// +// Pointer fields are decoded to nil if a string value is empty. +// +// If v is a slice, Decode resets it and reads the input until EOF, storing all +// decoded values in the given slice. Decode returns nil on EOF. +// +// If v is an array, Decode reads the input until EOF or until it decodes all +// corresponding array elements. If the input contains less elements than the +// array, the additional Go array elements are set to zero values. Decode +// returns nil on EOF unless there were no records decoded. +// +// Fields with inline tags that have a non-empty prefix must not be cyclic +// structures. Passing such values to Decode will result in an infinite loop. +func (d *Decoder) Decode(v interface{}) (err error) { + val := reflect.ValueOf(v) + if val.Kind() != reflect.Ptr || val.IsNil() { + return &InvalidDecodeError{Type: reflect.TypeOf(v)} + } + + elem := indirect(val.Elem()) + switch elem.Kind() { + case reflect.Struct: + return d.decodeStruct(elem) + case reflect.Slice: + return d.decodeSlice(elem) + case reflect.Array: + return d.decodeArray(elem) + case reflect.Interface, reflect.Invalid: + elem = walkValue(elem) + if elem.Kind() != reflect.Invalid { + return &InvalidDecodeError{Type: elem.Type()} + } + return &InvalidDecodeError{Type: val.Type()} + default: + return &InvalidDecodeError{Type: reflect.PtrTo(elem.Type())} + } +} + +// Record returns the most recently read record. The slice is valid until the +// next call to Decode. +func (d *Decoder) Record() []string { + return d.record +} + +// Header returns the first line that came from the reader, or returns the +// defined header by the caller. +func (d *Decoder) Header() []string { + header := make([]string, len(d.header)) + copy(header, d.header) + return header +} + +// Unused returns a list of column indexes that were not used during decoding +// due to lack of matching struct field. +func (d *Decoder) Unused() []int { + if len(d.unused) == 0 { + return nil + } + + indices := make([]int, len(d.unused)) + copy(indices, d.unused) + return indices +} + +// Register registers a custom decoding function for a concrete type or interface. +// The argument f must be of type: +// func([]byte, T) error +// +// T must be a concrete type such as *time.Time, or interface that has at least one +// method. +// +// During decoding, fields are matched by the concrete type first. If match is not +// found then Decoder looks if field implements any of the registered interfaces +// in order they were registered. +// +// Register panics if: +// - f does not match the right signature +// - f is an empty interface +// - f was already registered +// +// Register is based on the encoding/json proposal: +// https://github.com/golang/go/issues/5901. +func (d *Decoder) Register(f interface{}) { + v := reflect.ValueOf(f) + typ := v.Type() + + if typ.Kind() != reflect.Func || + typ.NumIn() != 2 || typ.NumOut() != 1 || + typ.In(0) != _bytes || typ.Out(0) != _error { + panic("csvutil: func must be of type func([]byte, T) error") + } + + argType := typ.In(1) + + if argType.Kind() == reflect.Interface && argType.NumMethod() == 0 { + panic("csvutil: func argument type must not be an empty interface") + } + + if d.funcMap == nil { + d.funcMap = make(map[reflect.Type]reflect.Value) + } + + if _, ok := d.funcMap[argType]; ok { + panic("csvutil: func " + typ.String() + " already registered") + } + + d.funcMap[argType] = v + + if argType.Kind() == reflect.Interface { + d.ifaceFuncs = append(d.ifaceFuncs, v) + } +} + +func (d *Decoder) decodeSlice(slice reflect.Value) error { + typ := slice.Type().Elem() + if walkType(typ).Kind() != reflect.Struct { + return &InvalidDecodeError{Type: reflect.PtrTo(slice.Type())} + } + + slice.SetLen(0) + + var c int + for ; ; c++ { + v := reflect.New(typ) + + err := d.decodeStruct(indirect(v)) + if err == io.EOF { + if c == 0 { + return io.EOF + } + break + } + + // we want to ensure that we append this element to the slice even if it + // was partially decoded due to error. This is how JSON pkg does it. + slice.Set(reflect.Append(slice, v.Elem())) + if err != nil { + return err + } + } + + slice.Set(slice.Slice3(0, c, c)) + return nil +} + +func (d *Decoder) decodeArray(v reflect.Value) error { + if walkType(v.Type().Elem()).Kind() != reflect.Struct { + return &InvalidDecodeError{Type: reflect.PtrTo(v.Type())} + } + + l := v.Len() + + var i int + for ; i < l; i++ { + if err := d.decodeStruct(indirect(v.Index(i))); err == io.EOF { + if i == 0 { + return io.EOF + } + break + } else if err != nil { + return err + } + } + + zero := reflect.Zero(v.Type().Elem()) + for i := i; i < l; i++ { + v.Index(i).Set(zero) + } + return nil +} + +func (d *Decoder) decodeStruct(v reflect.Value) (err error) { + d.record, err = d.r.Read() + if err != nil { + return err + } + + if len(d.record) != len(d.header) { + return ErrFieldCount + } + + return d.unmarshal(d.record, v) +} + +func (d *Decoder) unmarshal(record []string, v reflect.Value) error { + fields, err := d.fields(typeKey{d.tag(), v.Type()}) + if err != nil { + return err + } + +fieldLoop: + for _, f := range fields { + isBlank := record[f.columnIndex] == "" + if f.tag.omitEmpty && isBlank { + continue + } + + fv := v + for n, i := range f.index { + fv = fv.Field(i) + if fv.Kind() == reflect.Ptr { + if fv.IsNil() { + if isBlank && n == len(f.index)-1 { // ensure we are on the leaf. + continue fieldLoop + } + // this can happen if a field is an unexported embedded + // pointer type. In Go prior to 1.10 it was possible to + // set such value because of a bug in the reflect package + // https://github.com/golang/go/issues/21353 + if !fv.CanSet() { + return errPtrUnexportedStruct(fv.Type()) + } + fv.Set(reflect.New(fv.Type().Elem())) + } + + if isBlank && n == len(f.index)-1 { // ensure we are on the leaf. + fv.Set(reflect.Zero(fv.Type())) + continue fieldLoop + } + + if n != len(f.index)-1 { + fv = fv.Elem() // walk pointer until we are on the the leaf. + } + } + } + + s := record[f.columnIndex] + if d.Map != nil && f.zero != nil { + zero := f.zero + if fv := walkPtr(fv); fv.Kind() == reflect.Interface && !fv.IsNil() { + if v := walkValue(fv); v.CanSet() { + zero = reflect.Zero(v.Type()).Interface() + } + } + s = d.Map(s, d.header[f.columnIndex], zero) + } + + if err := f.decodeFunc(s, fv); err != nil { + return err + } + } + return nil +} + +func (d *Decoder) fields(k typeKey) ([]decField, error) { + if k == d.typeKey { + return d.cache, nil + } + + var ( + fields = cachedFields(k) + decFields = make([]decField, 0, len(fields)) + used = make([]bool, len(d.header)) + missingCols []string + ) + for _, f := range fields { + i, ok := d.hmap[f.name] + if !ok { + if d.DisallowMissingColumns { + missingCols = append(missingCols, f.name) + } + continue + } + + fn, err := decodeFn(f.baseType, d.funcMap, d.ifaceFuncs) + if err != nil { + return nil, err + } + + df := decField{ + columnIndex: i, + field: f, + decodeFunc: fn, + } + + if d.Map != nil { + switch f.typ.Kind() { + case reflect.Interface: + df.zero = "" // interface values are decoded to strings + default: + df.zero = reflect.Zero(walkType(f.typ)).Interface() + } + } + + decFields = append(decFields, df) + used[i] = true + } + + if len(missingCols) > 0 { + return nil, &MissingColumnsError{ + Columns: missingCols, + } + } + + d.unused = d.unused[:0] + for i, b := range used { + if !b { + d.unused = append(d.unused, i) + } + } + + d.cache, d.typeKey = decFields, k + return d.cache, nil +} + +func (d *Decoder) tag() string { + if d.Tag == "" { + return defaultTag + } + return d.Tag +} + +func indirect(v reflect.Value) reflect.Value { + for { + switch v.Kind() { + case reflect.Interface: + if v.IsNil() { + return v + } + e := v.Elem() + if e.Kind() == reflect.Ptr && !e.IsNil() { + v = e + continue + } + return v + case reflect.Ptr: + if v.IsNil() { + v.Set(reflect.New(v.Type().Elem())) + } + v = v.Elem() + default: + return v + } + } +} diff --git a/vendor/github.com/jszwec/csvutil/doc.go b/vendor/github.com/jszwec/csvutil/doc.go new file mode 100644 index 000000000..5cc26748c --- /dev/null +++ b/vendor/github.com/jszwec/csvutil/doc.go @@ -0,0 +1,6 @@ +// Package csvutil provides fast and idiomatic mapping between CSV and Go values. +// +// This package does not provide a CSV parser itself, it is based on the Reader and Writer +// interfaces which are implemented by eg. std csv package. This gives a possibility +// of choosing any other CSV writer or reader which may be more performant. +package csvutil diff --git a/vendor/github.com/jszwec/csvutil/encode.go b/vendor/github.com/jszwec/csvutil/encode.go new file mode 100644 index 000000000..ce5a18134 --- /dev/null +++ b/vendor/github.com/jszwec/csvutil/encode.go @@ -0,0 +1,245 @@ +package csvutil + +import ( + "encoding" + "encoding/base64" + "reflect" + "strconv" +) + +var ( + textMarshaler = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem() + csvMarshaler = reflect.TypeOf((*Marshaler)(nil)).Elem() +) + +var ( + encodeFloat32 = encodeFloatN(32) + encodeFloat64 = encodeFloatN(64) +) + +type encodeFunc func(buf []byte, v reflect.Value, omitempty bool) ([]byte, error) + +func encodeFuncValue(fn reflect.Value) encodeFunc { + return func(buf []byte, v reflect.Value, omitempty bool) ([]byte, error) { + out := fn.Call([]reflect.Value{v}) + err, _ := out[1].Interface().(error) + if err != nil { + return nil, err + } + return append(buf, out[0].Bytes()...), nil + } +} + +func encodeFuncValuePtr(fn reflect.Value) encodeFunc { + return func(buf []byte, v reflect.Value, omitempty bool) ([]byte, error) { + if !v.CanAddr() { + fallback, err := encodeFn(v.Type(), false, nil, nil) + if err != nil { + return nil, err + } + return fallback(buf, v, omitempty) + } + + out := fn.Call([]reflect.Value{v.Addr()}) + err, _ := out[1].Interface().(error) + if err != nil { + return nil, err + } + return append(buf, out[0].Bytes()...), nil + } +} + +func encodeString(buf []byte, v reflect.Value, omitempty bool) ([]byte, error) { + return append(buf, v.String()...), nil +} + +func encodeInt(buf []byte, v reflect.Value, omitempty bool) ([]byte, error) { + n := v.Int() + if n == 0 && omitempty { + return buf, nil + } + return strconv.AppendInt(buf, n, 10), nil +} + +func encodeUint(buf []byte, v reflect.Value, omitempty bool) ([]byte, error) { + n := v.Uint() + if n == 0 && omitempty { + return buf, nil + } + return strconv.AppendUint(buf, n, 10), nil +} + +func encodeFloatN(bits int) encodeFunc { + return func(buf []byte, v reflect.Value, omitempty bool) ([]byte, error) { + f := v.Float() + if f == 0 && omitempty { + return buf, nil + } + return strconv.AppendFloat(buf, f, 'G', -1, bits), nil + } +} + +func encodeBool(buf []byte, v reflect.Value, omitempty bool) ([]byte, error) { + t := v.Bool() + if !t && omitempty { + return buf, nil + } + return strconv.AppendBool(buf, t), nil +} + +func encodeInterface(funcMap map[reflect.Type]reflect.Value, funcs []reflect.Value) encodeFunc { + return func(buf []byte, v reflect.Value, omitempty bool) ([]byte, error) { + if !v.IsValid() || v.IsNil() || !v.Elem().IsValid() { + return buf, nil + } + + v = v.Elem() + canAddr := v.Kind() == reflect.Ptr + + switch v.Kind() { + case reflect.Ptr, reflect.Interface: + if v.IsNil() { + return buf, nil + } + default: + } + + enc, err := encodeFn(v.Type(), canAddr, funcMap, funcs) + if err != nil { + return nil, err + } + return enc(buf, v, omitempty) + } +} + +func encodePtrMarshaler(buf []byte, v reflect.Value, omitempty bool) ([]byte, error) { + if v.CanAddr() { + return encodeMarshaler(buf, v.Addr(), omitempty) + } + + fallback, err := encodeFn(v.Type(), false, nil, nil) + if err != nil { + return nil, err + } + return fallback(buf, v, omitempty) +} + +func encodeTextMarshaler(buf []byte, v reflect.Value, _ bool) ([]byte, error) { + if v.Kind() == reflect.Ptr && v.IsNil() { + return buf, nil + } + + b, err := v.Interface().(encoding.TextMarshaler).MarshalText() + if err != nil { + return nil, &MarshalerError{Type: v.Type(), MarshalerType: "MarshalText", Err: err} + } + return append(buf, b...), nil +} + +func encodePtrTextMarshaler(buf []byte, v reflect.Value, omitempty bool) ([]byte, error) { + if v.CanAddr() { + return encodeTextMarshaler(buf, v.Addr(), omitempty) + } + + fallback, err := encodeFn(v.Type(), false, nil, nil) + if err != nil { + return nil, err + } + return fallback(buf, v, omitempty) +} + +func encodeMarshaler(buf []byte, v reflect.Value, _ bool) ([]byte, error) { + if v.Kind() == reflect.Ptr && v.IsNil() { + return buf, nil + } + + b, err := v.Interface().(Marshaler).MarshalCSV() + if err != nil { + return nil, &MarshalerError{Type: v.Type(), MarshalerType: "MarshalCSV", Err: err} + } + return append(buf, b...), nil +} + +func encodePtr(typ reflect.Type, canAddr bool, funcMap map[reflect.Type]reflect.Value, funcs []reflect.Value) (encodeFunc, error) { + next, err := encodeFn(typ.Elem(), canAddr, funcMap, funcs) + if err != nil { + return nil, err + } + return func(buf []byte, v reflect.Value, omitempty bool) ([]byte, error) { + if v.IsNil() { + return buf, nil + } + return next(buf, v.Elem(), omitempty) + }, nil +} + +func encodeBytes(buf []byte, v reflect.Value, _ bool) ([]byte, error) { + data := v.Bytes() + + l := len(buf) + buf = append(buf, make([]byte, base64.StdEncoding.EncodedLen(len(data)))...) + base64.StdEncoding.Encode(buf[l:], data) + return buf, nil +} + +func encodeFn(typ reflect.Type, canAddr bool, funcMap map[reflect.Type]reflect.Value, funcs []reflect.Value) (encodeFunc, error) { + if v, ok := funcMap[typ]; ok { + return encodeFuncValue(v), nil + } + + if v, ok := funcMap[reflect.PtrTo(typ)]; ok && canAddr { + return encodeFuncValuePtr(v), nil + } + + for _, v := range funcs { + argType := v.Type().In(0) + if typ.AssignableTo(argType) { + return encodeFuncValue(v), nil + } + + if canAddr && reflect.PtrTo(typ).AssignableTo(argType) { + return encodeFuncValuePtr(v), nil + } + } + + if typ.Implements(csvMarshaler) { + return encodeMarshaler, nil + } + + if canAddr && reflect.PtrTo(typ).Implements(csvMarshaler) { + return encodePtrMarshaler, nil + } + + if typ.Implements(textMarshaler) { + return encodeTextMarshaler, nil + } + + if canAddr && reflect.PtrTo(typ).Implements(textMarshaler) { + return encodePtrTextMarshaler, nil + } + + switch typ.Kind() { + case reflect.String: + return encodeString, nil + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return encodeInt, nil + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + return encodeUint, nil + case reflect.Float32: + return encodeFloat32, nil + case reflect.Float64: + return encodeFloat64, nil + case reflect.Bool: + return encodeBool, nil + case reflect.Interface: + return encodeInterface(funcMap, funcs), nil + case reflect.Ptr: + return encodePtr(typ, canAddr, funcMap, funcs) + case reflect.Slice: + if typ.Elem().Kind() == reflect.Uint8 { + return encodeBytes, nil + } + } + + return nil, &UnsupportedTypeError{Type: typ} +} diff --git a/vendor/github.com/jszwec/csvutil/encoder.go b/vendor/github.com/jszwec/csvutil/encoder.go new file mode 100644 index 000000000..74034fa2c --- /dev/null +++ b/vendor/github.com/jszwec/csvutil/encoder.go @@ -0,0 +1,356 @@ +package csvutil + +import ( + "reflect" +) + +const defaultBufSize = 4096 + +type encField struct { + field + encodeFunc +} + +type encCache struct { + fields []encField + buf []byte + index []int + record []string +} + +func newEncCache(k typeKey, funcMap map[reflect.Type]reflect.Value, funcs []reflect.Value) (_ *encCache, err error) { + fields := cachedFields(k) + encFields := make([]encField, len(fields)) + + for i, f := range fields { + fn, err := encodeFn(f.baseType, true, funcMap, funcs) + if err != nil { + return nil, err + } + + encFields[i] = encField{ + field: f, + encodeFunc: fn, + } + } + return &encCache{ + fields: encFields, + buf: make([]byte, 0, defaultBufSize), + index: make([]int, len(encFields)), + record: make([]string, len(encFields)), + }, nil +} + +// Encoder writes structs CSV representations to the output stream. +type Encoder struct { + // Tag defines which key in the struct field's tag to scan for names and + // options (Default: 'csv'). + Tag string + + // If AutoHeader is true, a struct header is encoded during the first call + // to Encode automatically (Default: true). + AutoHeader bool + + w Writer + c *encCache + noHeader bool + typeKey typeKey + funcMap map[reflect.Type]reflect.Value + ifaceFuncs []reflect.Value +} + +// NewEncoder returns a new encoder that writes to w. +func NewEncoder(w Writer) *Encoder { + return &Encoder{ + w: w, + noHeader: true, + AutoHeader: true, + } +} + +// Register registers a custom encoding function for a concrete type or interface. +// The argument f must be of type: +// func(T) ([]byte, error) +// +// T must be a concrete type such as Foo or *Foo, or interface that has at +// least one method. +// +// During encoding, fields are matched by the concrete type first. If match is not +// found then Encoder looks if field implements any of the registered interfaces +// in order they were registered. +// +// Register panics if: +// - f does not match the right signature +// - f is an empty interface +// - f was already registered +// +// Register is based on the encoding/json proposal: +// https://github.com/golang/go/issues/5901. +func (e *Encoder) Register(f interface{}) { + v := reflect.ValueOf(f) + typ := v.Type() + + if typ.Kind() != reflect.Func || + typ.NumIn() != 1 || typ.NumOut() != 2 || + typ.Out(0) != _bytes || typ.Out(1) != _error { + panic("csvutil: func must be of type func(T) ([]byte, error)") + } + + argType := typ.In(0) + + if argType.Kind() == reflect.Interface && argType.NumMethod() == 0 { + panic("csvutil: func argument type must not be an empty interface") + } + + if e.funcMap == nil { + e.funcMap = make(map[reflect.Type]reflect.Value) + } + + if _, ok := e.funcMap[argType]; ok { + panic("csvutil: func " + typ.String() + " already registered") + } + + e.funcMap[argType] = v + + if argType.Kind() == reflect.Interface { + e.ifaceFuncs = append(e.ifaceFuncs, v) + } +} + +// Encode writes the CSV encoding of v to the output stream. The provided +// argument v must be a struct, struct slice or struct array. +// +// Only the exported fields will be encoded. +// +// First call to Encode will write a header unless EncodeHeader was called first +// or AutoHeader is false. Header names can be customized by using tags +// ('csv' by default), otherwise original Field names are used. +// +// Header and fields are written in the same order as struct fields are defined. +// Embedded struct's fields are treated as if they were part of the outer struct. +// Fields that are embedded types and that are tagged are treated like any +// other field, but they have to implement Marshaler or encoding.TextMarshaler +// interfaces. +// +// Marshaler interface has the priority over encoding.TextMarshaler. +// +// Tagged fields have the priority over non tagged fields with the same name. +// +// Following the Go visibility rules if there are multiple fields with the same +// name (tagged or not tagged) on the same level and choice between them is +// ambiguous, then all these fields will be ignored. +// +// Nil values will be encoded as empty strings. Same will happen if 'omitempty' +// tag is set, and the value is a default value like 0, false or nil interface. +// +// Bool types are encoded as 'true' or 'false'. +// +// Float types are encoded using strconv.FormatFloat with precision -1 and 'G' +// format. NaN values are encoded as 'NaN' string. +// +// Fields of type []byte are being encoded as base64-encoded strings. +// +// Fields can be excluded from encoding by using '-' tag option. +// +// Examples of struct tags: +// +// // Field appears as 'myName' header in CSV encoding. +// Field int `csv:"myName"` +// +// // Field appears as 'Field' header in CSV encoding. +// Field int +// +// // Field appears as 'myName' header in CSV encoding and is an empty string +// // if Field is 0. +// Field int `csv:"myName,omitempty"` +// +// // Field appears as 'Field' header in CSV encoding and is an empty string +// // if Field is 0. +// Field int `csv:",omitempty"` +// +// // Encode ignores this field. +// Field int `csv:"-"` +// +// // Encode treats this field exactly as if it was an embedded field and adds +// // "my_prefix_" to each field's name. +// Field Struct `csv:"my_prefix_,inline"` +// +// // Encode treats this field exactly as if it was an embedded field. +// Field Struct `csv:",inline"` +// +// Fields with inline tags that have a non-empty prefix must not be cyclic +// structures. Passing such values to Encode will result in an infinite loop. +// +// Encode doesn't flush data. The caller is responsible for calling Flush() if +// the used Writer supports it. +func (e *Encoder) Encode(v interface{}) error { + return e.encode(reflect.ValueOf(v)) +} + +// EncodeHeader writes the CSV header of the provided struct value to the output +// stream. The provided argument v must be a struct value. +// +// The first Encode method call will not write header if EncodeHeader was called +// before it. This method can be called in cases when a data set could be +// empty, but header is desired. +// +// EncodeHeader is like Header function, but it works with the Encoder and writes +// directly to the output stream. Look at Header documentation for the exact +// header encoding rules. +func (e *Encoder) EncodeHeader(v interface{}) error { + typ, err := valueType(v) + if err != nil { + return err + } + return e.encodeHeader(typ) +} + +func (e *Encoder) encode(v reflect.Value) error { + val := walkValue(v) + + if !val.IsValid() { + return &InvalidEncodeError{} + } + + switch val.Kind() { + case reflect.Struct: + return e.encodeStruct(val) + case reflect.Array, reflect.Slice: + if walkType(val.Type().Elem()).Kind() != reflect.Struct { + return &InvalidEncodeError{v.Type()} + } + return e.encodeArray(val) + default: + return &InvalidEncodeError{v.Type()} + } +} + +func (e *Encoder) encodeStruct(v reflect.Value) error { + if e.AutoHeader && e.noHeader { + if err := e.encodeHeader(v.Type()); err != nil { + return err + } + } + return e.marshal(v) +} + +func (e *Encoder) encodeArray(v reflect.Value) error { + l := v.Len() + for i := 0; i < l; i++ { + if err := e.encodeStruct(walkValue(v.Index(i))); err != nil { + return err + } + } + return nil +} + +func (e *Encoder) encodeHeader(typ reflect.Type) error { + fields, _, _, record, err := e.cache(typ) + if err != nil { + return err + } + + for i, f := range fields { + record[i] = f.name + } + + if err := e.w.Write(record); err != nil { + return err + } + + e.noHeader = false + return nil +} + +func (e *Encoder) marshal(v reflect.Value) error { + fields, buf, index, record, err := e.cache(v.Type()) + if err != nil { + return err + } + + for i, f := range fields { + v := walkIndex(v, f.index) + + omitempty := f.tag.omitEmpty + if v.Kind() == reflect.Ptr || v.Kind() == reflect.Interface { + // We should disable omitempty for pointer and interface values, + // because if it's nil we will automatically encode it as an empty + // string. However, the initialized pointer should not be affected, + // even if it's a default value. + omitempty = false + } + + if !v.IsValid() { + index[i] = 0 + continue + } + + b, err := f.encodeFunc(buf, v, omitempty) + if err != nil { + return err + } + index[i], buf = len(b)-len(buf), b + } + + out := string(buf) + for i, n := range index { + record[i], out = out[:n], out[n:] + } + e.c.buf = buf[:0] + + return e.w.Write(record) +} + +func (e *Encoder) tag() string { + if e.Tag == "" { + return defaultTag + } + return e.Tag +} + +func (e *Encoder) cache(typ reflect.Type) ([]encField, []byte, []int, []string, error) { + if k := (typeKey{e.tag(), typ}); k != e.typeKey { + c, err := newEncCache(k, e.funcMap, e.ifaceFuncs) + if err != nil { + return nil, nil, nil, nil, err + } + e.c, e.typeKey = c, k + } + return e.c.fields, e.c.buf[:0], e.c.index, e.c.record, nil +} + +func walkIndex(v reflect.Value, index []int) reflect.Value { + for _, i := range index { + v = walkPtr(v) + if !v.IsValid() { + return reflect.Value{} + } + v = v.Field(i) + } + return v +} + +func walkPtr(v reflect.Value) reflect.Value { + for v.Kind() == reflect.Ptr { + v = v.Elem() + } + return v +} + +func walkValue(v reflect.Value) reflect.Value { + for { + switch v.Kind() { + case reflect.Ptr, reflect.Interface: + v = v.Elem() + default: + return v + } + } +} + +func walkType(typ reflect.Type) reflect.Type { + for typ.Kind() == reflect.Ptr { + typ = typ.Elem() + } + return typ +} diff --git a/vendor/github.com/jszwec/csvutil/error.go b/vendor/github.com/jszwec/csvutil/error.go new file mode 100644 index 000000000..7e2b45228 --- /dev/null +++ b/vendor/github.com/jszwec/csvutil/error.go @@ -0,0 +1,156 @@ +package csvutil + +import ( + "bytes" + "errors" + "fmt" + "reflect" + "strconv" +) + +// ErrFieldCount is returned when header's length doesn't match the length of +// the read record. +var ErrFieldCount = errors.New("wrong number of fields in record") + +// An UnmarshalTypeError describes a string value that was not appropriate for +// a value of a specific Go type. +type UnmarshalTypeError struct { + Value string // string value + Type reflect.Type // type of Go value it could not be assigned to +} + +func (e *UnmarshalTypeError) Error() string { + return "csvutil: cannot unmarshal " + strconv.Quote(e.Value) + " into Go value of type " + e.Type.String() +} + +// An UnsupportedTypeError is returned when attempting to encode or decode +// a value of an unsupported type. +type UnsupportedTypeError struct { + Type reflect.Type +} + +func (e *UnsupportedTypeError) Error() string { + if e.Type == nil { + return "csvutil: unsupported type: nil" + } + return "csvutil: unsupported type: " + e.Type.String() +} + +// An InvalidDecodeError describes an invalid argument passed to Decode. +// (The argument to Decode must be a non-nil struct pointer) +type InvalidDecodeError struct { + Type reflect.Type +} + +func (e *InvalidDecodeError) Error() string { + if e.Type == nil { + return "csvutil: Decode(nil)" + } + + if e.Type.Kind() != reflect.Ptr { + return "csvutil: Decode(non-pointer " + e.Type.String() + ")" + } + + typ := walkType(e.Type) + switch typ.Kind() { + case reflect.Struct: + case reflect.Slice, reflect.Array: + if typ.Elem().Kind() != reflect.Struct { + return "csvutil: Decode(invalid type " + e.Type.String() + ")" + } + default: + return "csvutil: Decode(invalid type " + e.Type.String() + ")" + } + + return "csvutil: Decode(nil " + e.Type.String() + ")" +} + +// An InvalidUnmarshalError describes an invalid argument passed to Unmarshal. +// (The argument to Unmarshal must be a non-nil slice of structs pointer) +type InvalidUnmarshalError struct { + Type reflect.Type +} + +func (e *InvalidUnmarshalError) Error() string { + if e.Type == nil { + return "csvutil: Unmarshal(nil)" + } + + if e.Type.Kind() != reflect.Ptr { + return "csvutil: Unmarshal(non-pointer " + e.Type.String() + ")" + } + + return "csvutil: Unmarshal(invalid type " + e.Type.String() + ")" +} + +// InvalidEncodeError is returned by Encode when the provided value was invalid. +type InvalidEncodeError struct { + Type reflect.Type +} + +func (e *InvalidEncodeError) Error() string { + if e.Type == nil { + return "csvutil: Encode(nil)" + } + return "csvutil: Encode(" + e.Type.String() + ")" +} + +// InvalidMarshalError is returned by Marshal when the provided value was invalid. +type InvalidMarshalError struct { + Type reflect.Type +} + +func (e *InvalidMarshalError) Error() string { + if e.Type == nil { + return "csvutil: Marshal(nil)" + } + + if walkType(e.Type).Kind() == reflect.Slice { + return "csvutil: Marshal(non struct slice " + e.Type.String() + ")" + } + + if walkType(e.Type).Kind() == reflect.Array { + return "csvutil: Marshal(non struct array " + e.Type.String() + ")" + } + + return "csvutil: Marshal(invalid type " + e.Type.String() + ")" +} + +// MarshalerError is returned by Encoder when MarshalCSV or MarshalText returned +// an error. +type MarshalerError struct { + Type reflect.Type + MarshalerType string + Err error +} + +func (e *MarshalerError) Error() string { + return "csvutil: error calling " + e.MarshalerType + " for type " + e.Type.String() + ": " + e.Err.Error() +} + +// Unwrap implements Unwrap interface for errors package in Go1.13+. +func (e *MarshalerError) Unwrap() error { + return e.Err +} + +func errPtrUnexportedStruct(typ reflect.Type) error { + return fmt.Errorf("csvutil: cannot decode into a pointer to unexported struct: %s", typ) +} + +// MissingColumnsError is returned by Decoder only when DisallowMissingColumns +// option was set to true. It contains a list of all missing columns. +type MissingColumnsError struct { + Columns []string +} + +func (e *MissingColumnsError) Error() string { + var b bytes.Buffer + b.WriteString("csvutil: missing columns: ") + for i, c := range e.Columns { + if i > 0 { + b.WriteString(", ") + } + fmt.Fprintf(&b, "%q", c) + } + return b.String() +} diff --git a/vendor/github.com/jszwec/csvutil/go.mod b/vendor/github.com/jszwec/csvutil/go.mod new file mode 100644 index 000000000..68349b451 --- /dev/null +++ b/vendor/github.com/jszwec/csvutil/go.mod @@ -0,0 +1,3 @@ +module github.com/jszwec/csvutil + +go 1.13 diff --git a/vendor/github.com/jszwec/csvutil/interface.go b/vendor/github.com/jszwec/csvutil/interface.go new file mode 100644 index 000000000..b0b45aa05 --- /dev/null +++ b/vendor/github.com/jszwec/csvutil/interface.go @@ -0,0 +1,29 @@ +package csvutil + +// Reader provides the interface for reading a single CSV record. +// +// If there is no data left to be read, Read returns (nil, io.EOF). +// +// It is implemented by csv.Reader. +type Reader interface { + Read() ([]string, error) +} + +// Writer provides the interface for writing a single CSV record. +// +// It is implemented by csv.Writer. +type Writer interface { + Write([]string) error +} + +// Unmarshaler is the interface implemented by types that can unmarshal +// a single record's field description of themselves. +type Unmarshaler interface { + UnmarshalCSV([]byte) error +} + +// Marshaler is the interface implemented by types that can marshal themselves +// into valid string. +type Marshaler interface { + MarshalCSV() ([]byte, error) +} diff --git a/vendor/github.com/jszwec/csvutil/tag.go b/vendor/github.com/jszwec/csvutil/tag.go new file mode 100644 index 000000000..3c32e9732 --- /dev/null +++ b/vendor/github.com/jszwec/csvutil/tag.go @@ -0,0 +1,47 @@ +package csvutil + +import ( + "reflect" + "strings" +) + +type tag struct { + name string + prefix string + empty bool + omitEmpty bool + ignore bool + inline bool +} + +func parseTag(tagname string, field reflect.StructField) (t tag) { + tags := strings.Split(field.Tag.Get(tagname), ",") + if len(tags) == 1 && tags[0] == "" { + t.name = field.Name + t.empty = true + return + } + + switch tags[0] { + case "-": + t.ignore = true + return + case "": + t.name = field.Name + default: + t.name = tags[0] + } + + for _, tagOpt := range tags[1:] { + switch tagOpt { + case "omitempty": + t.omitEmpty = true + case "inline": + if walkType(field.Type).Kind() == reflect.Struct { + t.inline = true + t.prefix = tags[0] + } + } + } + return +} diff --git a/vendor/github.com/mitchellh/go-wordwrap/LICENSE.md b/vendor/github.com/mitchellh/go-wordwrap/LICENSE.md new file mode 100644 index 000000000..229851590 --- /dev/null +++ b/vendor/github.com/mitchellh/go-wordwrap/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Mitchell Hashimoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/github.com/mitchellh/go-wordwrap/README.md b/vendor/github.com/mitchellh/go-wordwrap/README.md new file mode 100644 index 000000000..60ae31170 --- /dev/null +++ b/vendor/github.com/mitchellh/go-wordwrap/README.md @@ -0,0 +1,39 @@ +# go-wordwrap + +`go-wordwrap` (Golang package: `wordwrap`) is a package for Go that +automatically wraps words into multiple lines. The primary use case for this +is in formatting CLI output, but of course word wrapping is a generally useful +thing to do. + +## Installation and Usage + +Install using `go get github.com/mitchellh/go-wordwrap`. + +Full documentation is available at +http://godoc.org/github.com/mitchellh/go-wordwrap + +Below is an example of its usage ignoring errors: + +```go +wrapped := wordwrap.WrapString("foo bar baz", 3) +fmt.Println(wrapped) +``` + +Would output: + +``` +foo +bar +baz +``` + +## Word Wrap Algorithm + +This library doesn't use any clever algorithm for word wrapping. The wrapping +is actually very naive: whenever there is whitespace or an explicit linebreak. +The goal of this library is for word wrapping CLI output, so the input is +typically pretty well controlled human language. Because of this, the naive +approach typically works just fine. + +In the future, we'd like to make the algorithm more advanced. We would do +so without breaking the API. diff --git a/vendor/github.com/mitchellh/go-wordwrap/go.mod b/vendor/github.com/mitchellh/go-wordwrap/go.mod new file mode 100644 index 000000000..2ae411b20 --- /dev/null +++ b/vendor/github.com/mitchellh/go-wordwrap/go.mod @@ -0,0 +1 @@ +module github.com/mitchellh/go-wordwrap diff --git a/vendor/github.com/mitchellh/go-wordwrap/wordwrap.go b/vendor/github.com/mitchellh/go-wordwrap/wordwrap.go new file mode 100644 index 000000000..ac67205bc --- /dev/null +++ b/vendor/github.com/mitchellh/go-wordwrap/wordwrap.go @@ -0,0 +1,73 @@ +package wordwrap + +import ( + "bytes" + "unicode" +) + +// WrapString wraps the given string within lim width in characters. +// +// Wrapping is currently naive and only happens at white-space. A future +// version of the library will implement smarter wrapping. This means that +// pathological cases can dramatically reach past the limit, such as a very +// long word. +func WrapString(s string, lim uint) string { + // Initialize a buffer with a slightly larger size to account for breaks + init := make([]byte, 0, len(s)) + buf := bytes.NewBuffer(init) + + var current uint + var wordBuf, spaceBuf bytes.Buffer + + for _, char := range s { + if char == '\n' { + if wordBuf.Len() == 0 { + if current+uint(spaceBuf.Len()) > lim { + current = 0 + } else { + current += uint(spaceBuf.Len()) + spaceBuf.WriteTo(buf) + } + spaceBuf.Reset() + } else { + current += uint(spaceBuf.Len() + wordBuf.Len()) + spaceBuf.WriteTo(buf) + spaceBuf.Reset() + wordBuf.WriteTo(buf) + wordBuf.Reset() + } + buf.WriteRune(char) + current = 0 + } else if unicode.IsSpace(char) { + if spaceBuf.Len() == 0 || wordBuf.Len() > 0 { + current += uint(spaceBuf.Len() + wordBuf.Len()) + spaceBuf.WriteTo(buf) + spaceBuf.Reset() + wordBuf.WriteTo(buf) + wordBuf.Reset() + } + + spaceBuf.WriteRune(char) + } else { + + wordBuf.WriteRune(char) + + if current+uint(spaceBuf.Len()+wordBuf.Len()) > lim && uint(wordBuf.Len()) < lim { + buf.WriteRune('\n') + current = 0 + spaceBuf.Reset() + } + } + } + + if wordBuf.Len() == 0 { + if current+uint(spaceBuf.Len()) <= lim { + spaceBuf.WriteTo(buf) + } + } else { + spaceBuf.WriteTo(buf) + wordBuf.WriteTo(buf) + } + + return buf.String() +} diff --git a/vendor/github.com/opencontainers/go-digest/.mailmap b/vendor/github.com/opencontainers/go-digest/.mailmap index ba611cb21..eaf8b2f9e 100644 --- a/vendor/github.com/opencontainers/go-digest/.mailmap +++ b/vendor/github.com/opencontainers/go-digest/.mailmap @@ -1 +1,4 @@ +Aaron Lehmann +Derek McGowan Stephen J Day +Haibing Zhou diff --git a/vendor/github.com/opencontainers/go-digest/.pullapprove.yml b/vendor/github.com/opencontainers/go-digest/.pullapprove.yml index 45fa4b9ec..b6165f83c 100644 --- a/vendor/github.com/opencontainers/go-digest/.pullapprove.yml +++ b/vendor/github.com/opencontainers/go-digest/.pullapprove.yml @@ -1,12 +1,28 @@ -approve_by_comment: true -approve_regex: '^(Approved|lgtm|LGTM|:shipit:|:star:|:\+1:|:ship:)' -reject_regex: ^Rejected -reset_on_push: true -author_approval: ignored -signed_off_by: - required: true -reviewers: - teams: - - go-digest-maintainers - name: default +version: 2 + +requirements: + signed_off_by: + required: true + +always_pending: + title_regex: '^WIP' + explanation: 'Work in progress...' + +group_defaults: required: 2 + approve_by_comment: + enabled: true + approve_regex: '^LGTM' + reject_regex: '^Rejected' + reset_on_push: + enabled: true + author_approval: + ignored: true + conditions: + branches: + - master + +groups: + go-digest: + teams: + - go-digest-maintainers diff --git a/vendor/github.com/opencontainers/go-digest/.travis.yml b/vendor/github.com/opencontainers/go-digest/.travis.yml index 7ea4ed1d2..5775f885c 100644 --- a/vendor/github.com/opencontainers/go-digest/.travis.yml +++ b/vendor/github.com/opencontainers/go-digest/.travis.yml @@ -1,4 +1,5 @@ language: go go: - - 1.7 + - 1.12.x + - 1.13.x - master diff --git a/vendor/github.com/opencontainers/go-digest/LICENSE b/vendor/github.com/opencontainers/go-digest/LICENSE new file mode 100644 index 000000000..3ac8ab648 --- /dev/null +++ b/vendor/github.com/opencontainers/go-digest/LICENSE @@ -0,0 +1,192 @@ + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2019, 2020 OCI Contributors + Copyright 2016 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/opencontainers/go-digest/MAINTAINERS b/vendor/github.com/opencontainers/go-digest/MAINTAINERS index 42a29795d..843b1b206 100644 --- a/vendor/github.com/opencontainers/go-digest/MAINTAINERS +++ b/vendor/github.com/opencontainers/go-digest/MAINTAINERS @@ -1,9 +1,5 @@ -Aaron Lehmann (@aaronlehmann) -Brandon Philips (@philips) -Brendan Burns (@brendandburns) Derek McGowan (@dmcgowan) -Jason Bouzane (@jbouzane) -John Starks (@jstarks) -Jonathan Boulle (@jonboulle) -Stephen Day (@stevvooe) -Vincent Batts (@vbatts) +Stephen Day (@stevvooe) +Vincent Batts (@vbatts) +Akihiro Suda (@AkihiroSuda) +Sebastiaan van Stijn (@thaJeztah) diff --git a/vendor/github.com/opencontainers/go-digest/README.md b/vendor/github.com/opencontainers/go-digest/README.md index 0f5a04092..a11287207 100644 --- a/vendor/github.com/opencontainers/go-digest/README.md +++ b/vendor/github.com/opencontainers/go-digest/README.md @@ -8,20 +8,16 @@ Please see the [godoc](https://godoc.org/github.com/opencontainers/go-digest) fo # What is a digest? -A digest is just a hash. +A digest is just a [hash](https://en.wikipedia.org/wiki/Hash_function). -The most common use case for a digest is to create a content -identifier for use in [Content Addressable Storage](https://en.wikipedia.org/wiki/Content-addressable_storage) -systems: +The most common use case for a digest is to create a content identifier for use in [Content Addressable Storage](https://en.wikipedia.org/wiki/Content-addressable_storage) systems: ```go id := digest.FromBytes([]byte("my content")) ``` -In the example above, the id can be used to uniquely identify -the byte slice "my content". This allows two disparate applications -to agree on a verifiable identifier without having to trust one -another. +In the example above, the id can be used to uniquely identify the byte slice "my content". +This allows two disparate applications to agree on a verifiable identifier without having to trust one another. An identifying digest can be verified, as follows: @@ -31,8 +27,7 @@ if id != digest.FromBytes([]byte("my content")) { } ``` -A `Verifier` type can be used to handle cases where an `io.Reader` -makes more sense: +A `Verifier` type can be used to handle cases where an `io.Reader` makes more sense: ```go rd := getContent() @@ -44,33 +39,28 @@ if !verifier.Verified() { } ``` -Using [Merkle DAGs](https://en.wikipedia.org/wiki/Merkle_tree), this -can power a rich, safe, content distribution system. +Using [Merkle DAGs](https://en.wikipedia.org/wiki/Merkle_tree), this can power a rich, safe, content distribution system. # Usage -While the [godoc](https://godoc.org/github.com/opencontainers/go-digest) is -considered the best resource, a few important items need to be called -out when using this package. +While the [godoc](https://godoc.org/github.com/opencontainers/go-digest) is considered the best resource, a few important items need to be called out when using this package. -1. Make sure to import the hash implementations into your application - or the package will panic. You should have something like the - following in the main (or other entrypoint) of your application: +1. Make sure to import the hash implementations into your application or the package will panic. + You should have something like the following in the main (or other entrypoint) of your application: ```go import ( _ "crypto/sha256" - _ "crypto/sha512" + _ "crypto/sha512" ) ``` This may seem inconvenient but it allows you replace the hash implementations with others, such as https://github.com/stevvooe/resumable. -2. Even though `digest.Digest` may be assemable as a string, _always_ - verify your input with `digest.Parse` or use `Digest.Validate` - when accepting untrusted input. While there are measures to - avoid common problems, this will ensure you have valid digests - in the rest of your application. +2. Even though `digest.Digest` may be assemblable as a string, _always_ verify your input with `digest.Parse` or use `Digest.Validate` when accepting untrusted input. + While there are measures to avoid common problems, this will ensure you have valid digests in the rest of your application. + +3. While alternative encodings of hash values (digests) are possible (for example, base64), this package deals exclusively with hex-encoded digests. # Stability @@ -80,25 +70,27 @@ As always, before using a package export, read the [godoc](https://godoc.org/git # Contributing -This package is considered fairly complete. It has been in production -in thousands (millions?) of deployments and is fairly battle-hardened. -New additions will be met with skepticism. If you think there is a -missing feature, please file a bug clearly describing the problem and -the alternatives you tried before submitting a PR. +This package is considered fairly complete. +It has been in production in thousands (millions?) of deployments and is fairly battle-hardened. +New additions will be met with skepticism. +If you think there is a missing feature, please file a bug clearly describing the problem and the alternatives you tried before submitting a PR. -# Reporting security issues +## Code of Conduct -Please DO NOT file a public issue, instead send your report privately to -security@opencontainers.org. +Participation in the OpenContainers community is governed by [OpenContainer's Code of Conduct][code-of-conduct]. -The maintainers take security seriously. If you discover a security issue, -please bring it to their attention right away! +## Security -If you are reporting a security issue, do not create an issue or file a pull -request on GitHub. Instead, disclose the issue responsibly by sending an email -to security@opencontainers.org (which is inhabited only by the maintainers of -the various OCI projects). +If you find an issue, please follow the [security][security] protocol to report it. # Copyright and license -Copyright © 2016 Docker, Inc. All rights reserved, except as follows. Code is released under the [Apache 2.0 license](LICENSE.code). This `README.md` file and the [`CONTRIBUTING.md`](CONTRIBUTING.md) file are licensed under the Creative Commons Attribution 4.0 International License under the terms and conditions set forth in the file [`LICENSE.docs`](LICENSE.docs). You may obtain a duplicate copy of the same license, titled CC BY-SA 4.0, at http://creativecommons.org/licenses/by-sa/4.0/. +Copyright © 2019, 2020 OCI Contributors +Copyright © 2016 Docker, Inc. +All rights reserved, except as follows. +Code is released under the [Apache 2.0 license](LICENSE). +This `README.md` file and the [`CONTRIBUTING.md`](CONTRIBUTING.md) file are licensed under the Creative Commons Attribution 4.0 International License under the terms and conditions set forth in the file [`LICENSE.docs`](LICENSE.docs). +You may obtain a duplicate copy of the same license, titled CC BY-SA 4.0, at http://creativecommons.org/licenses/by-sa/4.0/. + +[security]: https://github.com/opencontainers/org/blob/master/security +[code-of-conduct]: https://github.com/opencontainers/org/blob/master/CODE_OF_CONDUCT.md diff --git a/vendor/github.com/opencontainers/go-digest/algorithm.go b/vendor/github.com/opencontainers/go-digest/algorithm.go index 8813bd26f..490951dc3 100644 --- a/vendor/github.com/opencontainers/go-digest/algorithm.go +++ b/vendor/github.com/opencontainers/go-digest/algorithm.go @@ -1,3 +1,4 @@ +// Copyright 2019, 2020 OCI Contributors // Copyright 2017 Docker, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/vendor/github.com/opencontainers/go-digest/digest.go b/vendor/github.com/opencontainers/go-digest/digest.go index ad398cba2..518b5e715 100644 --- a/vendor/github.com/opencontainers/go-digest/digest.go +++ b/vendor/github.com/opencontainers/go-digest/digest.go @@ -1,3 +1,4 @@ +// Copyright 2019, 2020 OCI Contributors // Copyright 2017 Docker, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/vendor/github.com/opencontainers/go-digest/digester.go b/vendor/github.com/opencontainers/go-digest/digester.go index 36fa2728e..ede907757 100644 --- a/vendor/github.com/opencontainers/go-digest/digester.go +++ b/vendor/github.com/opencontainers/go-digest/digester.go @@ -1,3 +1,4 @@ +// Copyright 2019, 2020 OCI Contributors // Copyright 2017 Docker, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/vendor/github.com/opencontainers/go-digest/doc.go b/vendor/github.com/opencontainers/go-digest/doc.go index 491ea1ef1..83d3a936c 100644 --- a/vendor/github.com/opencontainers/go-digest/doc.go +++ b/vendor/github.com/opencontainers/go-digest/doc.go @@ -1,3 +1,4 @@ +// Copyright 2019, 2020 OCI Contributors // Copyright 2017 Docker, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -29,8 +30,13 @@ // // sha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc // -// In this case, the string "sha256" is the algorithm and the hex bytes are -// the "digest". +// The "algorithm" portion defines both the hashing algorithm used to calculate +// the digest and the encoding of the resulting digest, which defaults to "hex" +// if not otherwise specified. Currently, all supported algorithms have their +// digests encoded in hex strings. +// +// In the example above, the string "sha256" is the algorithm and the hex bytes +// are the "digest". // // Because the Digest type is simply a string, once a valid Digest is // obtained, comparisons are cheap, quick and simple to express with the diff --git a/vendor/github.com/opencontainers/go-digest/go.mod b/vendor/github.com/opencontainers/go-digest/go.mod new file mode 100644 index 000000000..cf5d7b1d2 --- /dev/null +++ b/vendor/github.com/opencontainers/go-digest/go.mod @@ -0,0 +1,3 @@ +module github.com/opencontainers/go-digest + +go 1.13 diff --git a/vendor/github.com/opencontainers/go-digest/verifiers.go b/vendor/github.com/opencontainers/go-digest/verifiers.go index 32125e918..afef506f4 100644 --- a/vendor/github.com/opencontainers/go-digest/verifiers.go +++ b/vendor/github.com/opencontainers/go-digest/verifiers.go @@ -1,3 +1,4 @@ +// Copyright 2019, 2020 OCI Contributors // Copyright 2017 Docker, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/vendor/github.com/peterbourgon/diskv/LICENSE b/vendor/github.com/peterbourgon/diskv/LICENSE new file mode 100644 index 000000000..41ce7f16e --- /dev/null +++ b/vendor/github.com/peterbourgon/diskv/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2011-2012 Peter Bourgon + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/github.com/peterbourgon/diskv/README.md b/vendor/github.com/peterbourgon/diskv/README.md new file mode 100644 index 000000000..3474739ed --- /dev/null +++ b/vendor/github.com/peterbourgon/diskv/README.md @@ -0,0 +1,141 @@ +# What is diskv? + +Diskv (disk-vee) is a simple, persistent key-value store written in the Go +language. It starts with an incredibly simple API for storing arbitrary data on +a filesystem by key, and builds several layers of performance-enhancing +abstraction on top. The end result is a conceptually simple, but highly +performant, disk-backed storage system. + +[![Build Status][1]][2] + +[1]: https://drone.io/github.com/peterbourgon/diskv/status.png +[2]: https://drone.io/github.com/peterbourgon/diskv/latest + + +# Installing + +Install [Go 1][3], either [from source][4] or [with a prepackaged binary][5]. +Then, + +```bash +$ go get github.com/peterbourgon/diskv +``` + +[3]: http://golang.org +[4]: http://golang.org/doc/install/source +[5]: http://golang.org/doc/install + + +# Usage + +```go +package main + +import ( + "fmt" + "github.com/peterbourgon/diskv" +) + +func main() { + // Simplest transform function: put all the data files into the base dir. + flatTransform := func(s string) []string { return []string{} } + + // Initialize a new diskv store, rooted at "my-data-dir", with a 1MB cache. + d := diskv.New(diskv.Options{ + BasePath: "my-data-dir", + Transform: flatTransform, + CacheSizeMax: 1024 * 1024, + }) + + // Write three bytes to the key "alpha". + key := "alpha" + d.Write(key, []byte{'1', '2', '3'}) + + // Read the value back out of the store. + value, _ := d.Read(key) + fmt.Printf("%v\n", value) + + // Erase the key+value from the store (and the disk). + d.Erase(key) +} +``` + +More complex examples can be found in the "examples" subdirectory. + + +# Theory + +## Basic idea + +At its core, diskv is a map of a key (`string`) to arbitrary data (`[]byte`). +The data is written to a single file on disk, with the same name as the key. +The key determines where that file will be stored, via a user-provided +`TransformFunc`, which takes a key and returns a slice (`[]string`) +corresponding to a path list where the key file will be stored. The simplest +TransformFunc, + +```go +func SimpleTransform (key string) []string { + return []string{} +} +``` + +will place all keys in the same, base directory. The design is inspired by +[Redis diskstore][6]; a TransformFunc which emulates the default diskstore +behavior is available in the content-addressable-storage example. + +[6]: http://groups.google.com/group/redis-db/browse_thread/thread/d444bc786689bde9?pli=1 + +**Note** that your TransformFunc should ensure that one valid key doesn't +transform to a subset of another valid key. That is, it shouldn't be possible +to construct valid keys that resolve to directory names. As a concrete example, +if your TransformFunc splits on every 3 characters, then + +```go +d.Write("abcabc", val) // OK: written to /abc/abc/abcabc +d.Write("abc", val) // Error: attempted write to /abc/abc, but it's a directory +``` + +This will be addressed in an upcoming version of diskv. + +Probably the most important design principle behind diskv is that your data is +always flatly available on the disk. diskv will never do anything that would +prevent you from accessing, copying, backing up, or otherwise interacting with +your data via common UNIX commandline tools. + +## Adding a cache + +An in-memory caching layer is provided by combining the BasicStore +functionality with a simple map structure, and keeping it up-to-date as +appropriate. Since the map structure in Go is not threadsafe, it's combined +with a RWMutex to provide safe concurrent access. + +## Adding order + +diskv is a key-value store and therefore inherently unordered. An ordering +system can be injected into the store by passing something which satisfies the +diskv.Index interface. (A default implementation, using Google's +[btree][7] package, is provided.) Basically, diskv keeps an ordered (by a +user-provided Less function) index of the keys, which can be queried. + +[7]: https://github.com/google/btree + +## Adding compression + +Something which implements the diskv.Compression interface may be passed +during store creation, so that all Writes and Reads are filtered through +a compression/decompression pipeline. Several default implementations, +using stdlib compression algorithms, are provided. Note that data is cached +compressed; the cost of decompression is borne with each Read. + +## Streaming + +diskv also now provides ReadStream and WriteStream methods, to allow very large +data to be handled efficiently. + + +# Future plans + + * Needs plenty of robust testing: huge datasets, etc... + * More thorough benchmarking + * Your suggestions for use-cases I haven't thought of diff --git a/vendor/github.com/peterbourgon/diskv/compression.go b/vendor/github.com/peterbourgon/diskv/compression.go new file mode 100644 index 000000000..5192b0273 --- /dev/null +++ b/vendor/github.com/peterbourgon/diskv/compression.go @@ -0,0 +1,64 @@ +package diskv + +import ( + "compress/flate" + "compress/gzip" + "compress/zlib" + "io" +) + +// Compression is an interface that Diskv uses to implement compression of +// data. Writer takes a destination io.Writer and returns a WriteCloser that +// compresses all data written through it. Reader takes a source io.Reader and +// returns a ReadCloser that decompresses all data read through it. You may +// define these methods on your own type, or use one of the NewCompression +// helpers. +type Compression interface { + Writer(dst io.Writer) (io.WriteCloser, error) + Reader(src io.Reader) (io.ReadCloser, error) +} + +// NewGzipCompression returns a Gzip-based Compression. +func NewGzipCompression() Compression { + return NewGzipCompressionLevel(flate.DefaultCompression) +} + +// NewGzipCompressionLevel returns a Gzip-based Compression with the given level. +func NewGzipCompressionLevel(level int) Compression { + return &genericCompression{ + wf: func(w io.Writer) (io.WriteCloser, error) { return gzip.NewWriterLevel(w, level) }, + rf: func(r io.Reader) (io.ReadCloser, error) { return gzip.NewReader(r) }, + } +} + +// NewZlibCompression returns a Zlib-based Compression. +func NewZlibCompression() Compression { + return NewZlibCompressionLevel(flate.DefaultCompression) +} + +// NewZlibCompressionLevel returns a Zlib-based Compression with the given level. +func NewZlibCompressionLevel(level int) Compression { + return NewZlibCompressionLevelDict(level, nil) +} + +// NewZlibCompressionLevelDict returns a Zlib-based Compression with the given +// level, based on the given dictionary. +func NewZlibCompressionLevelDict(level int, dict []byte) Compression { + return &genericCompression{ + func(w io.Writer) (io.WriteCloser, error) { return zlib.NewWriterLevelDict(w, level, dict) }, + func(r io.Reader) (io.ReadCloser, error) { return zlib.NewReaderDict(r, dict) }, + } +} + +type genericCompression struct { + wf func(w io.Writer) (io.WriteCloser, error) + rf func(r io.Reader) (io.ReadCloser, error) +} + +func (g *genericCompression) Writer(dst io.Writer) (io.WriteCloser, error) { + return g.wf(dst) +} + +func (g *genericCompression) Reader(src io.Reader) (io.ReadCloser, error) { + return g.rf(src) +} diff --git a/vendor/github.com/peterbourgon/diskv/diskv.go b/vendor/github.com/peterbourgon/diskv/diskv.go new file mode 100644 index 000000000..524dc0a6e --- /dev/null +++ b/vendor/github.com/peterbourgon/diskv/diskv.go @@ -0,0 +1,624 @@ +// Diskv (disk-vee) is a simple, persistent, key-value store. +// It stores all data flatly on the filesystem. + +package diskv + +import ( + "bytes" + "errors" + "fmt" + "io" + "io/ioutil" + "os" + "path/filepath" + "strings" + "sync" + "syscall" +) + +const ( + defaultBasePath = "diskv" + defaultFilePerm os.FileMode = 0666 + defaultPathPerm os.FileMode = 0777 +) + +var ( + defaultTransform = func(s string) []string { return []string{} } + errCanceled = errors.New("canceled") + errEmptyKey = errors.New("empty key") + errBadKey = errors.New("bad key") + errImportDirectory = errors.New("can't import a directory") +) + +// TransformFunction transforms a key into a slice of strings, with each +// element in the slice representing a directory in the file path where the +// key's entry will eventually be stored. +// +// For example, if TransformFunc transforms "abcdef" to ["ab", "cde", "f"], +// the final location of the data file will be /ab/cde/f/abcdef +type TransformFunction func(s string) []string + +// Options define a set of properties that dictate Diskv behavior. +// All values are optional. +type Options struct { + BasePath string + Transform TransformFunction + CacheSizeMax uint64 // bytes + PathPerm os.FileMode + FilePerm os.FileMode + // If TempDir is set, it will enable filesystem atomic writes by + // writing temporary files to that location before being moved + // to BasePath. + // Note that TempDir MUST be on the same device/partition as + // BasePath. + TempDir string + + Index Index + IndexLess LessFunction + + Compression Compression +} + +// Diskv implements the Diskv interface. You shouldn't construct Diskv +// structures directly; instead, use the New constructor. +type Diskv struct { + Options + mu sync.RWMutex + cache map[string][]byte + cacheSize uint64 +} + +// New returns an initialized Diskv structure, ready to use. +// If the path identified by baseDir already contains data, +// it will be accessible, but not yet cached. +func New(o Options) *Diskv { + if o.BasePath == "" { + o.BasePath = defaultBasePath + } + if o.Transform == nil { + o.Transform = defaultTransform + } + if o.PathPerm == 0 { + o.PathPerm = defaultPathPerm + } + if o.FilePerm == 0 { + o.FilePerm = defaultFilePerm + } + + d := &Diskv{ + Options: o, + cache: map[string][]byte{}, + cacheSize: 0, + } + + if d.Index != nil && d.IndexLess != nil { + d.Index.Initialize(d.IndexLess, d.Keys(nil)) + } + + return d +} + +// Write synchronously writes the key-value pair to disk, making it immediately +// available for reads. Write relies on the filesystem to perform an eventual +// sync to physical media. If you need stronger guarantees, see WriteStream. +func (d *Diskv) Write(key string, val []byte) error { + return d.WriteStream(key, bytes.NewBuffer(val), false) +} + +// WriteStream writes the data represented by the io.Reader to the disk, under +// the provided key. If sync is true, WriteStream performs an explicit sync on +// the file as soon as it's written. +// +// bytes.Buffer provides io.Reader semantics for basic data types. +func (d *Diskv) WriteStream(key string, r io.Reader, sync bool) error { + if len(key) <= 0 { + return errEmptyKey + } + + d.mu.Lock() + defer d.mu.Unlock() + + return d.writeStreamWithLock(key, r, sync) +} + +// createKeyFileWithLock either creates the key file directly, or +// creates a temporary file in TempDir if it is set. +func (d *Diskv) createKeyFileWithLock(key string) (*os.File, error) { + if d.TempDir != "" { + if err := os.MkdirAll(d.TempDir, d.PathPerm); err != nil { + return nil, fmt.Errorf("temp mkdir: %s", err) + } + f, err := ioutil.TempFile(d.TempDir, "") + if err != nil { + return nil, fmt.Errorf("temp file: %s", err) + } + + if err := f.Chmod(d.FilePerm); err != nil { + f.Close() // error deliberately ignored + os.Remove(f.Name()) // error deliberately ignored + return nil, fmt.Errorf("chmod: %s", err) + } + return f, nil + } + + mode := os.O_WRONLY | os.O_CREATE | os.O_TRUNC // overwrite if exists + f, err := os.OpenFile(d.completeFilename(key), mode, d.FilePerm) + if err != nil { + return nil, fmt.Errorf("open file: %s", err) + } + return f, nil +} + +// writeStream does no input validation checking. +func (d *Diskv) writeStreamWithLock(key string, r io.Reader, sync bool) error { + if err := d.ensurePathWithLock(key); err != nil { + return fmt.Errorf("ensure path: %s", err) + } + + f, err := d.createKeyFileWithLock(key) + if err != nil { + return fmt.Errorf("create key file: %s", err) + } + + wc := io.WriteCloser(&nopWriteCloser{f}) + if d.Compression != nil { + wc, err = d.Compression.Writer(f) + if err != nil { + f.Close() // error deliberately ignored + os.Remove(f.Name()) // error deliberately ignored + return fmt.Errorf("compression writer: %s", err) + } + } + + if _, err := io.Copy(wc, r); err != nil { + f.Close() // error deliberately ignored + os.Remove(f.Name()) // error deliberately ignored + return fmt.Errorf("i/o copy: %s", err) + } + + if err := wc.Close(); err != nil { + f.Close() // error deliberately ignored + os.Remove(f.Name()) // error deliberately ignored + return fmt.Errorf("compression close: %s", err) + } + + if sync { + if err := f.Sync(); err != nil { + f.Close() // error deliberately ignored + os.Remove(f.Name()) // error deliberately ignored + return fmt.Errorf("file sync: %s", err) + } + } + + if err := f.Close(); err != nil { + return fmt.Errorf("file close: %s", err) + } + + if f.Name() != d.completeFilename(key) { + if err := os.Rename(f.Name(), d.completeFilename(key)); err != nil { + os.Remove(f.Name()) // error deliberately ignored + return fmt.Errorf("rename: %s", err) + } + } + + if d.Index != nil { + d.Index.Insert(key) + } + + d.bustCacheWithLock(key) // cache only on read + + return nil +} + +// Import imports the source file into diskv under the destination key. If the +// destination key already exists, it's overwritten. If move is true, the +// source file is removed after a successful import. +func (d *Diskv) Import(srcFilename, dstKey string, move bool) (err error) { + if dstKey == "" { + return errEmptyKey + } + + if fi, err := os.Stat(srcFilename); err != nil { + return err + } else if fi.IsDir() { + return errImportDirectory + } + + d.mu.Lock() + defer d.mu.Unlock() + + if err := d.ensurePathWithLock(dstKey); err != nil { + return fmt.Errorf("ensure path: %s", err) + } + + if move { + if err := syscall.Rename(srcFilename, d.completeFilename(dstKey)); err == nil { + d.bustCacheWithLock(dstKey) + return nil + } else if err != syscall.EXDEV { + // If it failed due to being on a different device, fall back to copying + return err + } + } + + f, err := os.Open(srcFilename) + if err != nil { + return err + } + defer f.Close() + err = d.writeStreamWithLock(dstKey, f, false) + if err == nil && move { + err = os.Remove(srcFilename) + } + return err +} + +// Read reads the key and returns the value. +// If the key is available in the cache, Read won't touch the disk. +// If the key is not in the cache, Read will have the side-effect of +// lazily caching the value. +func (d *Diskv) Read(key string) ([]byte, error) { + rc, err := d.ReadStream(key, false) + if err != nil { + return []byte{}, err + } + defer rc.Close() + return ioutil.ReadAll(rc) +} + +// ReadStream reads the key and returns the value (data) as an io.ReadCloser. +// If the value is cached from a previous read, and direct is false, +// ReadStream will use the cached value. Otherwise, it will return a handle to +// the file on disk, and cache the data on read. +// +// If direct is true, ReadStream will lazily delete any cached value for the +// key, and return a direct handle to the file on disk. +// +// If compression is enabled, ReadStream taps into the io.Reader stream prior +// to decompression, and caches the compressed data. +func (d *Diskv) ReadStream(key string, direct bool) (io.ReadCloser, error) { + d.mu.RLock() + defer d.mu.RUnlock() + + if val, ok := d.cache[key]; ok { + if !direct { + buf := bytes.NewBuffer(val) + if d.Compression != nil { + return d.Compression.Reader(buf) + } + return ioutil.NopCloser(buf), nil + } + + go func() { + d.mu.Lock() + defer d.mu.Unlock() + d.uncacheWithLock(key, uint64(len(val))) + }() + } + + return d.readWithRLock(key) +} + +// read ignores the cache, and returns an io.ReadCloser representing the +// decompressed data for the given key, streamed from the disk. Clients should +// acquire a read lock on the Diskv and check the cache themselves before +// calling read. +func (d *Diskv) readWithRLock(key string) (io.ReadCloser, error) { + filename := d.completeFilename(key) + + fi, err := os.Stat(filename) + if err != nil { + return nil, err + } + if fi.IsDir() { + return nil, os.ErrNotExist + } + + f, err := os.Open(filename) + if err != nil { + return nil, err + } + + var r io.Reader + if d.CacheSizeMax > 0 { + r = newSiphon(f, d, key) + } else { + r = &closingReader{f} + } + + var rc = io.ReadCloser(ioutil.NopCloser(r)) + if d.Compression != nil { + rc, err = d.Compression.Reader(r) + if err != nil { + return nil, err + } + } + + return rc, nil +} + +// closingReader provides a Reader that automatically closes the +// embedded ReadCloser when it reaches EOF +type closingReader struct { + rc io.ReadCloser +} + +func (cr closingReader) Read(p []byte) (int, error) { + n, err := cr.rc.Read(p) + if err == io.EOF { + if closeErr := cr.rc.Close(); closeErr != nil { + return n, closeErr // close must succeed for Read to succeed + } + } + return n, err +} + +// siphon is like a TeeReader: it copies all data read through it to an +// internal buffer, and moves that buffer to the cache at EOF. +type siphon struct { + f *os.File + d *Diskv + key string + buf *bytes.Buffer +} + +// newSiphon constructs a siphoning reader that represents the passed file. +// When a successful series of reads ends in an EOF, the siphon will write +// the buffered data to Diskv's cache under the given key. +func newSiphon(f *os.File, d *Diskv, key string) io.Reader { + return &siphon{ + f: f, + d: d, + key: key, + buf: &bytes.Buffer{}, + } +} + +// Read implements the io.Reader interface for siphon. +func (s *siphon) Read(p []byte) (int, error) { + n, err := s.f.Read(p) + + if err == nil { + return s.buf.Write(p[0:n]) // Write must succeed for Read to succeed + } + + if err == io.EOF { + s.d.cacheWithoutLock(s.key, s.buf.Bytes()) // cache may fail + if closeErr := s.f.Close(); closeErr != nil { + return n, closeErr // close must succeed for Read to succeed + } + return n, err + } + + return n, err +} + +// Erase synchronously erases the given key from the disk and the cache. +func (d *Diskv) Erase(key string) error { + d.mu.Lock() + defer d.mu.Unlock() + + d.bustCacheWithLock(key) + + // erase from index + if d.Index != nil { + d.Index.Delete(key) + } + + // erase from disk + filename := d.completeFilename(key) + if s, err := os.Stat(filename); err == nil { + if s.IsDir() { + return errBadKey + } + if err = os.Remove(filename); err != nil { + return err + } + } else { + // Return err as-is so caller can do os.IsNotExist(err). + return err + } + + // clean up and return + d.pruneDirsWithLock(key) + return nil +} + +// EraseAll will delete all of the data from the store, both in the cache and on +// the disk. Note that EraseAll doesn't distinguish diskv-related data from non- +// diskv-related data. Care should be taken to always specify a diskv base +// directory that is exclusively for diskv data. +func (d *Diskv) EraseAll() error { + d.mu.Lock() + defer d.mu.Unlock() + d.cache = make(map[string][]byte) + d.cacheSize = 0 + if d.TempDir != "" { + os.RemoveAll(d.TempDir) // errors ignored + } + return os.RemoveAll(d.BasePath) +} + +// Has returns true if the given key exists. +func (d *Diskv) Has(key string) bool { + d.mu.Lock() + defer d.mu.Unlock() + + if _, ok := d.cache[key]; ok { + return true + } + + filename := d.completeFilename(key) + s, err := os.Stat(filename) + if err != nil { + return false + } + if s.IsDir() { + return false + } + + return true +} + +// Keys returns a channel that will yield every key accessible by the store, +// in undefined order. If a cancel channel is provided, closing it will +// terminate and close the keys channel. +func (d *Diskv) Keys(cancel <-chan struct{}) <-chan string { + return d.KeysPrefix("", cancel) +} + +// KeysPrefix returns a channel that will yield every key accessible by the +// store with the given prefix, in undefined order. If a cancel channel is +// provided, closing it will terminate and close the keys channel. If the +// provided prefix is the empty string, all keys will be yielded. +func (d *Diskv) KeysPrefix(prefix string, cancel <-chan struct{}) <-chan string { + var prepath string + if prefix == "" { + prepath = d.BasePath + } else { + prepath = d.pathFor(prefix) + } + c := make(chan string) + go func() { + filepath.Walk(prepath, walker(c, prefix, cancel)) + close(c) + }() + return c +} + +// walker returns a function which satisfies the filepath.WalkFunc interface. +// It sends every non-directory file entry down the channel c. +func walker(c chan<- string, prefix string, cancel <-chan struct{}) filepath.WalkFunc { + return func(path string, info os.FileInfo, err error) error { + if err != nil { + return err + } + + if info.IsDir() || !strings.HasPrefix(info.Name(), prefix) { + return nil // "pass" + } + + select { + case c <- info.Name(): + case <-cancel: + return errCanceled + } + + return nil + } +} + +// pathFor returns the absolute path for location on the filesystem where the +// data for the given key will be stored. +func (d *Diskv) pathFor(key string) string { + return filepath.Join(d.BasePath, filepath.Join(d.Transform(key)...)) +} + +// ensurePathWithLock is a helper function that generates all necessary +// directories on the filesystem for the given key. +func (d *Diskv) ensurePathWithLock(key string) error { + return os.MkdirAll(d.pathFor(key), d.PathPerm) +} + +// completeFilename returns the absolute path to the file for the given key. +func (d *Diskv) completeFilename(key string) string { + return filepath.Join(d.pathFor(key), key) +} + +// cacheWithLock attempts to cache the given key-value pair in the store's +// cache. It can fail if the value is larger than the cache's maximum size. +func (d *Diskv) cacheWithLock(key string, val []byte) error { + valueSize := uint64(len(val)) + if err := d.ensureCacheSpaceWithLock(valueSize); err != nil { + return fmt.Errorf("%s; not caching", err) + } + + // be very strict about memory guarantees + if (d.cacheSize + valueSize) > d.CacheSizeMax { + panic(fmt.Sprintf("failed to make room for value (%d/%d)", valueSize, d.CacheSizeMax)) + } + + d.cache[key] = val + d.cacheSize += valueSize + return nil +} + +// cacheWithoutLock acquires the store's (write) mutex and calls cacheWithLock. +func (d *Diskv) cacheWithoutLock(key string, val []byte) error { + d.mu.Lock() + defer d.mu.Unlock() + return d.cacheWithLock(key, val) +} + +func (d *Diskv) bustCacheWithLock(key string) { + if val, ok := d.cache[key]; ok { + d.uncacheWithLock(key, uint64(len(val))) + } +} + +func (d *Diskv) uncacheWithLock(key string, sz uint64) { + d.cacheSize -= sz + delete(d.cache, key) +} + +// pruneDirsWithLock deletes empty directories in the path walk leading to the +// key k. Typically this function is called after an Erase is made. +func (d *Diskv) pruneDirsWithLock(key string) error { + pathlist := d.Transform(key) + for i := range pathlist { + dir := filepath.Join(d.BasePath, filepath.Join(pathlist[:len(pathlist)-i]...)) + + // thanks to Steven Blenkinsop for this snippet + switch fi, err := os.Stat(dir); true { + case err != nil: + return err + case !fi.IsDir(): + panic(fmt.Sprintf("corrupt dirstate at %s", dir)) + } + + nlinks, err := filepath.Glob(filepath.Join(dir, "*")) + if err != nil { + return err + } else if len(nlinks) > 0 { + return nil // has subdirs -- do not prune + } + if err = os.Remove(dir); err != nil { + return err + } + } + + return nil +} + +// ensureCacheSpaceWithLock deletes entries from the cache in arbitrary order +// until the cache has at least valueSize bytes available. +func (d *Diskv) ensureCacheSpaceWithLock(valueSize uint64) error { + if valueSize > d.CacheSizeMax { + return fmt.Errorf("value size (%d bytes) too large for cache (%d bytes)", valueSize, d.CacheSizeMax) + } + + safe := func() bool { return (d.cacheSize + valueSize) <= d.CacheSizeMax } + + for key, val := range d.cache { + if safe() { + break + } + + d.uncacheWithLock(key, uint64(len(val))) + } + + if !safe() { + panic(fmt.Sprintf("%d bytes still won't fit in the cache! (max %d bytes)", valueSize, d.CacheSizeMax)) + } + + return nil +} + +// nopWriteCloser wraps an io.Writer and provides a no-op Close method to +// satisfy the io.WriteCloser interface. +type nopWriteCloser struct { + io.Writer +} + +func (wc *nopWriteCloser) Write(p []byte) (int, error) { return wc.Writer.Write(p) } +func (wc *nopWriteCloser) Close() error { return nil } diff --git a/vendor/github.com/peterbourgon/diskv/index.go b/vendor/github.com/peterbourgon/diskv/index.go new file mode 100644 index 000000000..96fee5152 --- /dev/null +++ b/vendor/github.com/peterbourgon/diskv/index.go @@ -0,0 +1,115 @@ +package diskv + +import ( + "sync" + + "github.com/google/btree" +) + +// Index is a generic interface for things that can +// provide an ordered list of keys. +type Index interface { + Initialize(less LessFunction, keys <-chan string) + Insert(key string) + Delete(key string) + Keys(from string, n int) []string +} + +// LessFunction is used to initialize an Index of keys in a specific order. +type LessFunction func(string, string) bool + +// btreeString is a custom data type that satisfies the BTree Less interface, +// making the strings it wraps sortable by the BTree package. +type btreeString struct { + s string + l LessFunction +} + +// Less satisfies the BTree.Less interface using the btreeString's LessFunction. +func (s btreeString) Less(i btree.Item) bool { + return s.l(s.s, i.(btreeString).s) +} + +// BTreeIndex is an implementation of the Index interface using google/btree. +type BTreeIndex struct { + sync.RWMutex + LessFunction + *btree.BTree +} + +// Initialize populates the BTree tree with data from the keys channel, +// according to the passed less function. It's destructive to the BTreeIndex. +func (i *BTreeIndex) Initialize(less LessFunction, keys <-chan string) { + i.Lock() + defer i.Unlock() + i.LessFunction = less + i.BTree = rebuild(less, keys) +} + +// Insert inserts the given key (only) into the BTree tree. +func (i *BTreeIndex) Insert(key string) { + i.Lock() + defer i.Unlock() + if i.BTree == nil || i.LessFunction == nil { + panic("uninitialized index") + } + i.BTree.ReplaceOrInsert(btreeString{s: key, l: i.LessFunction}) +} + +// Delete removes the given key (only) from the BTree tree. +func (i *BTreeIndex) Delete(key string) { + i.Lock() + defer i.Unlock() + if i.BTree == nil || i.LessFunction == nil { + panic("uninitialized index") + } + i.BTree.Delete(btreeString{s: key, l: i.LessFunction}) +} + +// Keys yields a maximum of n keys in order. If the passed 'from' key is empty, +// Keys will return the first n keys. If the passed 'from' key is non-empty, the +// first key in the returned slice will be the key that immediately follows the +// passed key, in key order. +func (i *BTreeIndex) Keys(from string, n int) []string { + i.RLock() + defer i.RUnlock() + + if i.BTree == nil || i.LessFunction == nil { + panic("uninitialized index") + } + + if i.BTree.Len() <= 0 { + return []string{} + } + + btreeFrom := btreeString{s: from, l: i.LessFunction} + skipFirst := true + if len(from) <= 0 || !i.BTree.Has(btreeFrom) { + // no such key, so fabricate an always-smallest item + btreeFrom = btreeString{s: "", l: func(string, string) bool { return true }} + skipFirst = false + } + + keys := []string{} + iterator := func(i btree.Item) bool { + keys = append(keys, i.(btreeString).s) + return len(keys) < n + } + i.BTree.AscendGreaterOrEqual(btreeFrom, iterator) + + if skipFirst && len(keys) > 0 { + keys = keys[1:] + } + + return keys +} + +// rebuildIndex does the work of regenerating the index +// with the given keys. +func rebuild(less LessFunction, keys <-chan string) *btree.BTree { + tree := btree.New(2) + for key := range keys { + tree.ReplaceOrInsert(btreeString{s: key, l: less}) + } + return tree +} diff --git a/vendor/github.com/russross/blackfriday/.gitignore b/vendor/github.com/russross/blackfriday/.gitignore new file mode 100644 index 000000000..75623dccc --- /dev/null +++ b/vendor/github.com/russross/blackfriday/.gitignore @@ -0,0 +1,8 @@ +*.out +*.swp +*.8 +*.6 +_obj +_test* +markdown +tags diff --git a/vendor/github.com/russross/blackfriday/.travis.yml b/vendor/github.com/russross/blackfriday/.travis.yml new file mode 100644 index 000000000..2f3351d7a --- /dev/null +++ b/vendor/github.com/russross/blackfriday/.travis.yml @@ -0,0 +1,17 @@ +sudo: false +language: go +go: + - "1.9.x" + - "1.10.x" + - tip +matrix: + fast_finish: true + allow_failures: + - go: tip +install: + - # Do nothing. This is needed to prevent default install action "go get -t -v ./..." from happening here (we want it to happen inside script step). +script: + - go get -t -v ./... + - diff -u <(echo -n) <(gofmt -d -s .) + - go tool vet . + - go test -v -race ./... diff --git a/vendor/github.com/russross/blackfriday/LICENSE.txt b/vendor/github.com/russross/blackfriday/LICENSE.txt new file mode 100644 index 000000000..2885af360 --- /dev/null +++ b/vendor/github.com/russross/blackfriday/LICENSE.txt @@ -0,0 +1,29 @@ +Blackfriday is distributed under the Simplified BSD License: + +> Copyright © 2011 Russ Ross +> All rights reserved. +> +> Redistribution and use in source and binary forms, with or without +> modification, are permitted provided that the following conditions +> are met: +> +> 1. Redistributions of source code must retain the above copyright +> notice, this list of conditions and the following disclaimer. +> +> 2. Redistributions in binary form must reproduce the above +> copyright notice, this list of conditions and the following +> disclaimer in the documentation and/or other materials provided with +> the distribution. +> +> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +> "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +> LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +> FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +> COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +> INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +> BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +> LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +> LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +> ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +> POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/russross/blackfriday/README.md b/vendor/github.com/russross/blackfriday/README.md new file mode 100644 index 000000000..3c62e1375 --- /dev/null +++ b/vendor/github.com/russross/blackfriday/README.md @@ -0,0 +1,369 @@ +Blackfriday +[![Build Status][BuildSVG]][BuildURL] +[![Godoc][GodocV2SVG]][GodocV2URL] +=========== + +Blackfriday is a [Markdown][1] processor implemented in [Go][2]. It +is paranoid about its input (so you can safely feed it user-supplied +data), it is fast, it supports common extensions (tables, smart +punctuation substitutions, etc.), and it is safe for all utf-8 +(unicode) input. + +HTML output is currently supported, along with Smartypants +extensions. + +It started as a translation from C of [Sundown][3]. + + +Installation +------------ + +Blackfriday is compatible with any modern Go release. With Go and git installed: + + go get -u gopkg.in/russross/blackfriday.v2 + +will download, compile, and install the package into your `$GOPATH` directory +hierarchy. + + +Versions +-------- + +Currently maintained and recommended version of Blackfriday is `v2`. It's being +developed on its own branch: https://github.com/russross/blackfriday/tree/v2 and the +documentation is available at +https://godoc.org/gopkg.in/russross/blackfriday.v2. + +It is `go get`-able via [gopkg.in][6] at `gopkg.in/russross/blackfriday.v2`, +but we highly recommend using package management tool like [dep][7] or +[Glide][8] and make use of semantic versioning. With package management you +should import `github.com/russross/blackfriday` and specify that you're using +version 2.0.0. + +Version 2 offers a number of improvements over v1: + +* Cleaned up API +* A separate call to [`Parse`][4], which produces an abstract syntax tree for + the document +* Latest bug fixes +* Flexibility to easily add your own rendering extensions + +Potential drawbacks: + +* Our benchmarks show v2 to be slightly slower than v1. Currently in the + ballpark of around 15%. +* API breakage. If you can't afford modifying your code to adhere to the new API + and don't care too much about the new features, v2 is probably not for you. +* Several bug fixes are trailing behind and still need to be forward-ported to + v2. See issue [#348](https://github.com/russross/blackfriday/issues/348) for + tracking. + +If you are still interested in the legacy `v1`, you can import it from +`github.com/russross/blackfriday`. Documentation for the legacy v1 can be found +here: https://godoc.org/github.com/russross/blackfriday + +### Known issue with `dep` + +There is a known problem with using Blackfriday v1 _transitively_ and `dep`. +Currently `dep` prioritizes semver versions over anything else, and picks the +latest one, plus it does not apply a `[[constraint]]` specifier to transitively +pulled in packages. So if you're using something that uses Blackfriday v1, but +that something does not use `dep` yet, you will get Blackfriday v2 pulled in and +your first dependency will fail to build. + +There are couple of fixes for it, documented here: +https://github.com/golang/dep/blob/master/docs/FAQ.md#how-do-i-constrain-a-transitive-dependencys-version + +Meanwhile, `dep` team is working on a more general solution to the constraints +on transitive dependencies problem: https://github.com/golang/dep/issues/1124. + + +Usage +----- + +### v1 + +For basic usage, it is as simple as getting your input into a byte +slice and calling: + + output := blackfriday.MarkdownBasic(input) + +This renders it with no extensions enabled. To get a more useful +feature set, use this instead: + + output := blackfriday.MarkdownCommon(input) + +### v2 + +For the most sensible markdown processing, it is as simple as getting your input +into a byte slice and calling: + +```go +output := blackfriday.Run(input) +``` + +Your input will be parsed and the output rendered with a set of most popular +extensions enabled. If you want the most basic feature set, corresponding with +the bare Markdown specification, use: + +```go +output := blackfriday.Run(input, blackfriday.WithNoExtensions()) +``` + +### Sanitize untrusted content + +Blackfriday itself does nothing to protect against malicious content. If you are +dealing with user-supplied markdown, we recommend running Blackfriday's output +through HTML sanitizer such as [Bluemonday][5]. + +Here's an example of simple usage of Blackfriday together with Bluemonday: + +```go +import ( + "github.com/microcosm-cc/bluemonday" + "gopkg.in/russross/blackfriday.v2" +) + +// ... +unsafe := blackfriday.Run(input) +html := bluemonday.UGCPolicy().SanitizeBytes(unsafe) +``` + +### Custom options, v1 + +If you want to customize the set of options, first get a renderer +(currently only the HTML output engine), then use it to +call the more general `Markdown` function. For examples, see the +implementations of `MarkdownBasic` and `MarkdownCommon` in +`markdown.go`. + +### Custom options, v2 + +If you want to customize the set of options, use `blackfriday.WithExtensions`, +`blackfriday.WithRenderer` and `blackfriday.WithRefOverride`. + +### `blackfriday-tool` + +You can also check out `blackfriday-tool` for a more complete example +of how to use it. Download and install it using: + + go get github.com/russross/blackfriday-tool + +This is a simple command-line tool that allows you to process a +markdown file using a standalone program. You can also browse the +source directly on github if you are just looking for some example +code: + +* + +Note that if you have not already done so, installing +`blackfriday-tool` will be sufficient to download and install +blackfriday in addition to the tool itself. The tool binary will be +installed in `$GOPATH/bin`. This is a statically-linked binary that +can be copied to wherever you need it without worrying about +dependencies and library versions. + +### Sanitized anchor names + +Blackfriday includes an algorithm for creating sanitized anchor names +corresponding to a given input text. This algorithm is used to create +anchors for headings when `EXTENSION_AUTO_HEADER_IDS` is enabled. The +algorithm has a specification, so that other packages can create +compatible anchor names and links to those anchors. + +The specification is located at https://godoc.org/github.com/russross/blackfriday#hdr-Sanitized_Anchor_Names. + +[`SanitizedAnchorName`](https://godoc.org/github.com/russross/blackfriday#SanitizedAnchorName) exposes this functionality, and can be used to +create compatible links to the anchor names generated by blackfriday. +This algorithm is also implemented in a small standalone package at +[`github.com/shurcooL/sanitized_anchor_name`](https://godoc.org/github.com/shurcooL/sanitized_anchor_name). It can be useful for clients +that want a small package and don't need full functionality of blackfriday. + + +Features +-------- + +All features of Sundown are supported, including: + +* **Compatibility**. The Markdown v1.0.3 test suite passes with + the `--tidy` option. Without `--tidy`, the differences are + mostly in whitespace and entity escaping, where blackfriday is + more consistent and cleaner. + +* **Common extensions**, including table support, fenced code + blocks, autolinks, strikethroughs, non-strict emphasis, etc. + +* **Safety**. Blackfriday is paranoid when parsing, making it safe + to feed untrusted user input without fear of bad things + happening. The test suite stress tests this and there are no + known inputs that make it crash. If you find one, please let me + know and send me the input that does it. + + NOTE: "safety" in this context means *runtime safety only*. In order to + protect yourself against JavaScript injection in untrusted content, see + [this example](https://github.com/russross/blackfriday#sanitize-untrusted-content). + +* **Fast processing**. It is fast enough to render on-demand in + most web applications without having to cache the output. + +* **Thread safety**. You can run multiple parsers in different + goroutines without ill effect. There is no dependence on global + shared state. + +* **Minimal dependencies**. Blackfriday only depends on standard + library packages in Go. The source code is pretty + self-contained, so it is easy to add to any project, including + Google App Engine projects. + +* **Standards compliant**. Output successfully validates using the + W3C validation tool for HTML 4.01 and XHTML 1.0 Transitional. + + +Extensions +---------- + +In addition to the standard markdown syntax, this package +implements the following extensions: + +* **Intra-word emphasis supression**. The `_` character is + commonly used inside words when discussing code, so having + markdown interpret it as an emphasis command is usually the + wrong thing. Blackfriday lets you treat all emphasis markers as + normal characters when they occur inside a word. + +* **Tables**. Tables can be created by drawing them in the input + using a simple syntax: + + ``` + Name | Age + --------|------ + Bob | 27 + Alice | 23 + ``` + +* **Fenced code blocks**. In addition to the normal 4-space + indentation to mark code blocks, you can explicitly mark them + and supply a language (to make syntax highlighting simple). Just + mark it like this: + + ``` go + func getTrue() bool { + return true + } + ``` + + You can use 3 or more backticks to mark the beginning of the + block, and the same number to mark the end of the block. + + To preserve classes of fenced code blocks while using the bluemonday + HTML sanitizer, use the following policy: + + ``` go + p := bluemonday.UGCPolicy() + p.AllowAttrs("class").Matching(regexp.MustCompile("^language-[a-zA-Z0-9]+$")).OnElements("code") + html := p.SanitizeBytes(unsafe) + ``` + +* **Definition lists**. A simple definition list is made of a single-line + term followed by a colon and the definition for that term. + + Cat + : Fluffy animal everyone likes + + Internet + : Vector of transmission for pictures of cats + + Terms must be separated from the previous definition by a blank line. + +* **Footnotes**. A marker in the text that will become a superscript number; + a footnote definition that will be placed in a list of footnotes at the + end of the document. A footnote looks like this: + + This is a footnote.[^1] + + [^1]: the footnote text. + +* **Autolinking**. Blackfriday can find URLs that have not been + explicitly marked as links and turn them into links. + +* **Strikethrough**. Use two tildes (`~~`) to mark text that + should be crossed out. + +* **Hard line breaks**. With this extension enabled (it is off by + default in the `MarkdownBasic` and `MarkdownCommon` convenience + functions), newlines in the input translate into line breaks in + the output. + +* **Smart quotes**. Smartypants-style punctuation substitution is + supported, turning normal double- and single-quote marks into + curly quotes, etc. + +* **LaTeX-style dash parsing** is an additional option, where `--` + is translated into `–`, and `---` is translated into + `—`. This differs from most smartypants processors, which + turn a single hyphen into an ndash and a double hyphen into an + mdash. + +* **Smart fractions**, where anything that looks like a fraction + is translated into suitable HTML (instead of just a few special + cases like most smartypant processors). For example, `4/5` + becomes `45`, which renders as + 45. + + +Other renderers +--------------- + +Blackfriday is structured to allow alternative rendering engines. Here +are a few of note: + +* [github_flavored_markdown](https://godoc.org/github.com/shurcooL/github_flavored_markdown): + provides a GitHub Flavored Markdown renderer with fenced code block + highlighting, clickable heading anchor links. + + It's not customizable, and its goal is to produce HTML output + equivalent to the [GitHub Markdown API endpoint](https://developer.github.com/v3/markdown/#render-a-markdown-document-in-raw-mode), + except the rendering is performed locally. + +* [markdownfmt](https://github.com/shurcooL/markdownfmt): like gofmt, + but for markdown. + +* [LaTeX output](https://bitbucket.org/ambrevar/blackfriday-latex): + renders output as LaTeX. + +* [bfchroma](https://github.com/Depado/bfchroma/): provides convenience + integration with the [Chroma](https://github.com/alecthomas/chroma) code + highlighting library. bfchroma is only compatible with v2 of Blackfriday and + provides a drop-in renderer ready to use with Blackfriday, as well as + options and means for further customization. + + +TODO +---- + +* More unit testing +* Improve Unicode support. It does not understand all Unicode + rules (about what constitutes a letter, a punctuation symbol, + etc.), so it may fail to detect word boundaries correctly in + some instances. It is safe on all UTF-8 input. + + +License +------- + +[Blackfriday is distributed under the Simplified BSD License](LICENSE.txt) + + + [1]: https://daringfireball.net/projects/markdown/ "Markdown" + [2]: https://golang.org/ "Go Language" + [3]: https://github.com/vmg/sundown "Sundown" + [4]: https://godoc.org/gopkg.in/russross/blackfriday.v2#Parse "Parse func" + [5]: https://github.com/microcosm-cc/bluemonday "Bluemonday" + [6]: https://labix.org/gopkg.in "gopkg.in" + [7]: https://github.com/golang/dep/ "dep" + [8]: https://github.com/Masterminds/glide "Glide" + + [BuildSVG]: https://travis-ci.org/russross/blackfriday.svg?branch=master + [BuildURL]: https://travis-ci.org/russross/blackfriday + [GodocV2SVG]: https://godoc.org/gopkg.in/russross/blackfriday.v2?status.svg + [GodocV2URL]: https://godoc.org/gopkg.in/russross/blackfriday.v2 diff --git a/vendor/github.com/russross/blackfriday/block.go b/vendor/github.com/russross/blackfriday/block.go new file mode 100644 index 000000000..45c21a6c2 --- /dev/null +++ b/vendor/github.com/russross/blackfriday/block.go @@ -0,0 +1,1474 @@ +// +// Blackfriday Markdown Processor +// Available at http://github.com/russross/blackfriday +// +// Copyright © 2011 Russ Ross . +// Distributed under the Simplified BSD License. +// See README.md for details. +// + +// +// Functions to parse block-level elements. +// + +package blackfriday + +import ( + "bytes" + "strings" + "unicode" +) + +// Parse block-level data. +// Note: this function and many that it calls assume that +// the input buffer ends with a newline. +func (p *parser) block(out *bytes.Buffer, data []byte) { + if len(data) == 0 || data[len(data)-1] != '\n' { + panic("block input is missing terminating newline") + } + + // this is called recursively: enforce a maximum depth + if p.nesting >= p.maxNesting { + return + } + p.nesting++ + + // parse out one block-level construct at a time + for len(data) > 0 { + // prefixed header: + // + // # Header 1 + // ## Header 2 + // ... + // ###### Header 6 + if p.isPrefixHeader(data) { + data = data[p.prefixHeader(out, data):] + continue + } + + // block of preformatted HTML: + // + //
+ // ... + //
+ if data[0] == '<' { + if i := p.html(out, data, true); i > 0 { + data = data[i:] + continue + } + } + + // title block + // + // % stuff + // % more stuff + // % even more stuff + if p.flags&EXTENSION_TITLEBLOCK != 0 { + if data[0] == '%' { + if i := p.titleBlock(out, data, true); i > 0 { + data = data[i:] + continue + } + } + } + + // blank lines. note: returns the # of bytes to skip + if i := p.isEmpty(data); i > 0 { + data = data[i:] + continue + } + + // indented code block: + // + // func max(a, b int) int { + // if a > b { + // return a + // } + // return b + // } + if p.codePrefix(data) > 0 { + data = data[p.code(out, data):] + continue + } + + // fenced code block: + // + // ``` go info string here + // func fact(n int) int { + // if n <= 1 { + // return n + // } + // return n * fact(n-1) + // } + // ``` + if p.flags&EXTENSION_FENCED_CODE != 0 { + if i := p.fencedCodeBlock(out, data, true); i > 0 { + data = data[i:] + continue + } + } + + // horizontal rule: + // + // ------ + // or + // ****** + // or + // ______ + if p.isHRule(data) { + p.r.HRule(out) + var i int + for i = 0; data[i] != '\n'; i++ { + } + data = data[i:] + continue + } + + // block quote: + // + // > A big quote I found somewhere + // > on the web + if p.quotePrefix(data) > 0 { + data = data[p.quote(out, data):] + continue + } + + // table: + // + // Name | Age | Phone + // ------|-----|--------- + // Bob | 31 | 555-1234 + // Alice | 27 | 555-4321 + if p.flags&EXTENSION_TABLES != 0 { + if i := p.table(out, data); i > 0 { + data = data[i:] + continue + } + } + + // an itemized/unordered list: + // + // * Item 1 + // * Item 2 + // + // also works with + or - + if p.uliPrefix(data) > 0 { + data = data[p.list(out, data, 0):] + continue + } + + // a numbered/ordered list: + // + // 1. Item 1 + // 2. Item 2 + if p.oliPrefix(data) > 0 { + data = data[p.list(out, data, LIST_TYPE_ORDERED):] + continue + } + + // definition lists: + // + // Term 1 + // : Definition a + // : Definition b + // + // Term 2 + // : Definition c + if p.flags&EXTENSION_DEFINITION_LISTS != 0 { + if p.dliPrefix(data) > 0 { + data = data[p.list(out, data, LIST_TYPE_DEFINITION):] + continue + } + } + + // anything else must look like a normal paragraph + // note: this finds underlined headers, too + data = data[p.paragraph(out, data):] + } + + p.nesting-- +} + +func (p *parser) isPrefixHeader(data []byte) bool { + if data[0] != '#' { + return false + } + + if p.flags&EXTENSION_SPACE_HEADERS != 0 { + level := 0 + for level < 6 && data[level] == '#' { + level++ + } + if data[level] != ' ' { + return false + } + } + return true +} + +func (p *parser) prefixHeader(out *bytes.Buffer, data []byte) int { + level := 0 + for level < 6 && data[level] == '#' { + level++ + } + i := skipChar(data, level, ' ') + end := skipUntilChar(data, i, '\n') + skip := end + id := "" + if p.flags&EXTENSION_HEADER_IDS != 0 { + j, k := 0, 0 + // find start/end of header id + for j = i; j < end-1 && (data[j] != '{' || data[j+1] != '#'); j++ { + } + for k = j + 1; k < end && data[k] != '}'; k++ { + } + // extract header id iff found + if j < end && k < end { + id = string(data[j+2 : k]) + end = j + skip = k + 1 + for end > 0 && data[end-1] == ' ' { + end-- + } + } + } + for end > 0 && data[end-1] == '#' { + if isBackslashEscaped(data, end-1) { + break + } + end-- + } + for end > 0 && data[end-1] == ' ' { + end-- + } + if end > i { + if id == "" && p.flags&EXTENSION_AUTO_HEADER_IDS != 0 { + id = SanitizedAnchorName(string(data[i:end])) + } + work := func() bool { + p.inline(out, data[i:end]) + return true + } + p.r.Header(out, work, level, id) + } + return skip +} + +func (p *parser) isUnderlinedHeader(data []byte) int { + // test of level 1 header + if data[0] == '=' { + i := skipChar(data, 1, '=') + i = skipChar(data, i, ' ') + if data[i] == '\n' { + return 1 + } else { + return 0 + } + } + + // test of level 2 header + if data[0] == '-' { + i := skipChar(data, 1, '-') + i = skipChar(data, i, ' ') + if data[i] == '\n' { + return 2 + } else { + return 0 + } + } + + return 0 +} + +func (p *parser) titleBlock(out *bytes.Buffer, data []byte, doRender bool) int { + if data[0] != '%' { + return 0 + } + splitData := bytes.Split(data, []byte("\n")) + var i int + for idx, b := range splitData { + if !bytes.HasPrefix(b, []byte("%")) { + i = idx // - 1 + break + } + } + + data = bytes.Join(splitData[0:i], []byte("\n")) + p.r.TitleBlock(out, data) + + return len(data) +} + +func (p *parser) html(out *bytes.Buffer, data []byte, doRender bool) int { + var i, j int + + // identify the opening tag + if data[0] != '<' { + return 0 + } + curtag, tagfound := p.htmlFindTag(data[1:]) + + // handle special cases + if !tagfound { + // check for an HTML comment + if size := p.htmlComment(out, data, doRender); size > 0 { + return size + } + + // check for an
tag + if size := p.htmlHr(out, data, doRender); size > 0 { + return size + } + + // check for HTML CDATA + if size := p.htmlCDATA(out, data, doRender); size > 0 { + return size + } + + // no special case recognized + return 0 + } + + // look for an unindented matching closing tag + // followed by a blank line + found := false + /* + closetag := []byte("\n") + j = len(curtag) + 1 + for !found { + // scan for a closing tag at the beginning of a line + if skip := bytes.Index(data[j:], closetag); skip >= 0 { + j += skip + len(closetag) + } else { + break + } + + // see if it is the only thing on the line + if skip := p.isEmpty(data[j:]); skip > 0 { + // see if it is followed by a blank line/eof + j += skip + if j >= len(data) { + found = true + i = j + } else { + if skip := p.isEmpty(data[j:]); skip > 0 { + j += skip + found = true + i = j + } + } + } + } + */ + + // if not found, try a second pass looking for indented match + // but not if tag is "ins" or "del" (following original Markdown.pl) + if !found && curtag != "ins" && curtag != "del" { + i = 1 + for i < len(data) { + i++ + for i < len(data) && !(data[i-1] == '<' && data[i] == '/') { + i++ + } + + if i+2+len(curtag) >= len(data) { + break + } + + j = p.htmlFindEnd(curtag, data[i-1:]) + + if j > 0 { + i += j - 1 + found = true + break + } + } + } + + if !found { + return 0 + } + + // the end of the block has been found + if doRender { + // trim newlines + end := i + for end > 0 && data[end-1] == '\n' { + end-- + } + p.r.BlockHtml(out, data[:end]) + } + + return i +} + +func (p *parser) renderHTMLBlock(out *bytes.Buffer, data []byte, start int, doRender bool) int { + // html block needs to end with a blank line + if i := p.isEmpty(data[start:]); i > 0 { + size := start + i + if doRender { + // trim trailing newlines + end := size + for end > 0 && data[end-1] == '\n' { + end-- + } + p.r.BlockHtml(out, data[:end]) + } + return size + } + return 0 +} + +// HTML comment, lax form +func (p *parser) htmlComment(out *bytes.Buffer, data []byte, doRender bool) int { + i := p.inlineHTMLComment(out, data) + return p.renderHTMLBlock(out, data, i, doRender) +} + +// HTML CDATA section +func (p *parser) htmlCDATA(out *bytes.Buffer, data []byte, doRender bool) int { + const cdataTag = "') { + i++ + } + i++ + // no end-of-comment marker + if i >= len(data) { + return 0 + } + return p.renderHTMLBlock(out, data, i, doRender) +} + +// HR, which is the only self-closing block tag considered +func (p *parser) htmlHr(out *bytes.Buffer, data []byte, doRender bool) int { + if data[0] != '<' || (data[1] != 'h' && data[1] != 'H') || (data[2] != 'r' && data[2] != 'R') { + return 0 + } + if data[3] != ' ' && data[3] != '/' && data[3] != '>' { + // not an
tag after all; at least not a valid one + return 0 + } + + i := 3 + for data[i] != '>' && data[i] != '\n' { + i++ + } + + if data[i] == '>' { + return p.renderHTMLBlock(out, data, i+1, doRender) + } + + return 0 +} + +func (p *parser) htmlFindTag(data []byte) (string, bool) { + i := 0 + for isalnum(data[i]) { + i++ + } + key := string(data[:i]) + if _, ok := blockTags[key]; ok { + return key, true + } + return "", false +} + +func (p *parser) htmlFindEnd(tag string, data []byte) int { + // assume data[0] == '<' && data[1] == '/' already tested + + // check if tag is a match + closetag := []byte("") + if !bytes.HasPrefix(data, closetag) { + return 0 + } + i := len(closetag) + + // check that the rest of the line is blank + skip := 0 + if skip = p.isEmpty(data[i:]); skip == 0 { + return 0 + } + i += skip + skip = 0 + + if i >= len(data) { + return i + } + + if p.flags&EXTENSION_LAX_HTML_BLOCKS != 0 { + return i + } + if skip = p.isEmpty(data[i:]); skip == 0 { + // following line must be blank + return 0 + } + + return i + skip +} + +func (*parser) isEmpty(data []byte) int { + // it is okay to call isEmpty on an empty buffer + if len(data) == 0 { + return 0 + } + + var i int + for i = 0; i < len(data) && data[i] != '\n'; i++ { + if data[i] != ' ' && data[i] != '\t' { + return 0 + } + } + return i + 1 +} + +func (*parser) isHRule(data []byte) bool { + i := 0 + + // skip up to three spaces + for i < 3 && data[i] == ' ' { + i++ + } + + // look at the hrule char + if data[i] != '*' && data[i] != '-' && data[i] != '_' { + return false + } + c := data[i] + + // the whole line must be the char or whitespace + n := 0 + for data[i] != '\n' { + switch { + case data[i] == c: + n++ + case data[i] != ' ': + return false + } + i++ + } + + return n >= 3 +} + +// isFenceLine checks if there's a fence line (e.g., ``` or ``` go) at the beginning of data, +// and returns the end index if so, or 0 otherwise. It also returns the marker found. +// If syntax is not nil, it gets set to the syntax specified in the fence line. +// A final newline is mandatory to recognize the fence line, unless newlineOptional is true. +func isFenceLine(data []byte, info *string, oldmarker string, newlineOptional bool) (end int, marker string) { + i, size := 0, 0 + + // skip up to three spaces + for i < len(data) && i < 3 && data[i] == ' ' { + i++ + } + + // check for the marker characters: ~ or ` + if i >= len(data) { + return 0, "" + } + if data[i] != '~' && data[i] != '`' { + return 0, "" + } + + c := data[i] + + // the whole line must be the same char or whitespace + for i < len(data) && data[i] == c { + size++ + i++ + } + + // the marker char must occur at least 3 times + if size < 3 { + return 0, "" + } + marker = string(data[i-size : i]) + + // if this is the end marker, it must match the beginning marker + if oldmarker != "" && marker != oldmarker { + return 0, "" + } + + // TODO(shurcooL): It's probably a good idea to simplify the 2 code paths here + // into one, always get the info string, and discard it if the caller doesn't care. + if info != nil { + infoLength := 0 + i = skipChar(data, i, ' ') + + if i >= len(data) { + if newlineOptional && i == len(data) { + return i, marker + } + return 0, "" + } + + infoStart := i + + if data[i] == '{' { + i++ + infoStart++ + + for i < len(data) && data[i] != '}' && data[i] != '\n' { + infoLength++ + i++ + } + + if i >= len(data) || data[i] != '}' { + return 0, "" + } + + // strip all whitespace at the beginning and the end + // of the {} block + for infoLength > 0 && isspace(data[infoStart]) { + infoStart++ + infoLength-- + } + + for infoLength > 0 && isspace(data[infoStart+infoLength-1]) { + infoLength-- + } + + i++ + } else { + for i < len(data) && !isverticalspace(data[i]) { + infoLength++ + i++ + } + } + + *info = strings.TrimSpace(string(data[infoStart : infoStart+infoLength])) + } + + i = skipChar(data, i, ' ') + if i >= len(data) || data[i] != '\n' { + if newlineOptional && i == len(data) { + return i, marker + } + return 0, "" + } + + return i + 1, marker // Take newline into account. +} + +// fencedCodeBlock returns the end index if data contains a fenced code block at the beginning, +// or 0 otherwise. It writes to out if doRender is true, otherwise it has no side effects. +// If doRender is true, a final newline is mandatory to recognize the fenced code block. +func (p *parser) fencedCodeBlock(out *bytes.Buffer, data []byte, doRender bool) int { + var infoString string + beg, marker := isFenceLine(data, &infoString, "", false) + if beg == 0 || beg >= len(data) { + return 0 + } + + var work bytes.Buffer + + for { + // safe to assume beg < len(data) + + // check for the end of the code block + newlineOptional := !doRender + fenceEnd, _ := isFenceLine(data[beg:], nil, marker, newlineOptional) + if fenceEnd != 0 { + beg += fenceEnd + break + } + + // copy the current line + end := skipUntilChar(data, beg, '\n') + 1 + + // did we reach the end of the buffer without a closing marker? + if end >= len(data) { + return 0 + } + + // verbatim copy to the working buffer + if doRender { + work.Write(data[beg:end]) + } + beg = end + } + + if doRender { + p.r.BlockCode(out, work.Bytes(), infoString) + } + + return beg +} + +func (p *parser) table(out *bytes.Buffer, data []byte) int { + var header bytes.Buffer + i, columns := p.tableHeader(&header, data) + if i == 0 { + return 0 + } + + var body bytes.Buffer + + for i < len(data) { + pipes, rowStart := 0, i + for ; data[i] != '\n'; i++ { + if data[i] == '|' { + pipes++ + } + } + + if pipes == 0 { + i = rowStart + break + } + + // include the newline in data sent to tableRow + i++ + p.tableRow(&body, data[rowStart:i], columns, false) + } + + p.r.Table(out, header.Bytes(), body.Bytes(), columns) + + return i +} + +// check if the specified position is preceded by an odd number of backslashes +func isBackslashEscaped(data []byte, i int) bool { + backslashes := 0 + for i-backslashes-1 >= 0 && data[i-backslashes-1] == '\\' { + backslashes++ + } + return backslashes&1 == 1 +} + +func (p *parser) tableHeader(out *bytes.Buffer, data []byte) (size int, columns []int) { + i := 0 + colCount := 1 + for i = 0; data[i] != '\n'; i++ { + if data[i] == '|' && !isBackslashEscaped(data, i) { + colCount++ + } + } + + // doesn't look like a table header + if colCount == 1 { + return + } + + // include the newline in the data sent to tableRow + header := data[:i+1] + + // column count ignores pipes at beginning or end of line + if data[0] == '|' { + colCount-- + } + if i > 2 && data[i-1] == '|' && !isBackslashEscaped(data, i-1) { + colCount-- + } + + columns = make([]int, colCount) + + // move on to the header underline + i++ + if i >= len(data) { + return + } + + if data[i] == '|' && !isBackslashEscaped(data, i) { + i++ + } + i = skipChar(data, i, ' ') + + // each column header is of form: / *:?-+:? *|/ with # dashes + # colons >= 3 + // and trailing | optional on last column + col := 0 + for data[i] != '\n' { + dashes := 0 + + if data[i] == ':' { + i++ + columns[col] |= TABLE_ALIGNMENT_LEFT + dashes++ + } + for data[i] == '-' { + i++ + dashes++ + } + if data[i] == ':' { + i++ + columns[col] |= TABLE_ALIGNMENT_RIGHT + dashes++ + } + for data[i] == ' ' { + i++ + } + + // end of column test is messy + switch { + case dashes < 3: + // not a valid column + return + + case data[i] == '|' && !isBackslashEscaped(data, i): + // marker found, now skip past trailing whitespace + col++ + i++ + for data[i] == ' ' { + i++ + } + + // trailing junk found after last column + if col >= colCount && data[i] != '\n' { + return + } + + case (data[i] != '|' || isBackslashEscaped(data, i)) && col+1 < colCount: + // something else found where marker was required + return + + case data[i] == '\n': + // marker is optional for the last column + col++ + + default: + // trailing junk found after last column + return + } + } + if col != colCount { + return + } + + p.tableRow(out, header, columns, true) + size = i + 1 + return +} + +func (p *parser) tableRow(out *bytes.Buffer, data []byte, columns []int, header bool) { + i, col := 0, 0 + var rowWork bytes.Buffer + + if data[i] == '|' && !isBackslashEscaped(data, i) { + i++ + } + + for col = 0; col < len(columns) && i < len(data); col++ { + for data[i] == ' ' { + i++ + } + + cellStart := i + + for (data[i] != '|' || isBackslashEscaped(data, i)) && data[i] != '\n' { + i++ + } + + cellEnd := i + + // skip the end-of-cell marker, possibly taking us past end of buffer + i++ + + for cellEnd > cellStart && data[cellEnd-1] == ' ' { + cellEnd-- + } + + var cellWork bytes.Buffer + p.inline(&cellWork, data[cellStart:cellEnd]) + + if header { + p.r.TableHeaderCell(&rowWork, cellWork.Bytes(), columns[col]) + } else { + p.r.TableCell(&rowWork, cellWork.Bytes(), columns[col]) + } + } + + // pad it out with empty columns to get the right number + for ; col < len(columns); col++ { + if header { + p.r.TableHeaderCell(&rowWork, nil, columns[col]) + } else { + p.r.TableCell(&rowWork, nil, columns[col]) + } + } + + // silently ignore rows with too many cells + + p.r.TableRow(out, rowWork.Bytes()) +} + +// returns blockquote prefix length +func (p *parser) quotePrefix(data []byte) int { + i := 0 + for i < 3 && data[i] == ' ' { + i++ + } + if data[i] == '>' { + if data[i+1] == ' ' { + return i + 2 + } + return i + 1 + } + return 0 +} + +// blockquote ends with at least one blank line +// followed by something without a blockquote prefix +func (p *parser) terminateBlockquote(data []byte, beg, end int) bool { + if p.isEmpty(data[beg:]) <= 0 { + return false + } + if end >= len(data) { + return true + } + return p.quotePrefix(data[end:]) == 0 && p.isEmpty(data[end:]) == 0 +} + +// parse a blockquote fragment +func (p *parser) quote(out *bytes.Buffer, data []byte) int { + var raw bytes.Buffer + beg, end := 0, 0 + for beg < len(data) { + end = beg + // Step over whole lines, collecting them. While doing that, check for + // fenced code and if one's found, incorporate it altogether, + // irregardless of any contents inside it + for data[end] != '\n' { + if p.flags&EXTENSION_FENCED_CODE != 0 { + if i := p.fencedCodeBlock(out, data[end:], false); i > 0 { + // -1 to compensate for the extra end++ after the loop: + end += i - 1 + break + } + } + end++ + } + end++ + + if pre := p.quotePrefix(data[beg:]); pre > 0 { + // skip the prefix + beg += pre + } else if p.terminateBlockquote(data, beg, end) { + break + } + + // this line is part of the blockquote + raw.Write(data[beg:end]) + beg = end + } + + var cooked bytes.Buffer + p.block(&cooked, raw.Bytes()) + p.r.BlockQuote(out, cooked.Bytes()) + return end +} + +// returns prefix length for block code +func (p *parser) codePrefix(data []byte) int { + if data[0] == ' ' && data[1] == ' ' && data[2] == ' ' && data[3] == ' ' { + return 4 + } + return 0 +} + +func (p *parser) code(out *bytes.Buffer, data []byte) int { + var work bytes.Buffer + + i := 0 + for i < len(data) { + beg := i + for data[i] != '\n' { + i++ + } + i++ + + blankline := p.isEmpty(data[beg:i]) > 0 + if pre := p.codePrefix(data[beg:i]); pre > 0 { + beg += pre + } else if !blankline { + // non-empty, non-prefixed line breaks the pre + i = beg + break + } + + // verbatim copy to the working buffeu + if blankline { + work.WriteByte('\n') + } else { + work.Write(data[beg:i]) + } + } + + // trim all the \n off the end of work + workbytes := work.Bytes() + eol := len(workbytes) + for eol > 0 && workbytes[eol-1] == '\n' { + eol-- + } + if eol != len(workbytes) { + work.Truncate(eol) + } + + work.WriteByte('\n') + + p.r.BlockCode(out, work.Bytes(), "") + + return i +} + +// returns unordered list item prefix +func (p *parser) uliPrefix(data []byte) int { + i := 0 + + // start with up to 3 spaces + for i < 3 && data[i] == ' ' { + i++ + } + + // need a *, +, or - followed by a space + if (data[i] != '*' && data[i] != '+' && data[i] != '-') || + data[i+1] != ' ' { + return 0 + } + return i + 2 +} + +// returns ordered list item prefix +func (p *parser) oliPrefix(data []byte) int { + i := 0 + + // start with up to 3 spaces + for i < 3 && data[i] == ' ' { + i++ + } + + // count the digits + start := i + for data[i] >= '0' && data[i] <= '9' { + i++ + } + + // we need >= 1 digits followed by a dot and a space + if start == i || data[i] != '.' || data[i+1] != ' ' { + return 0 + } + return i + 2 +} + +// returns definition list item prefix +func (p *parser) dliPrefix(data []byte) int { + i := 0 + + // need a : followed by a spaces + if data[i] != ':' || data[i+1] != ' ' { + return 0 + } + for data[i] == ' ' { + i++ + } + return i + 2 +} + +// parse ordered or unordered list block +func (p *parser) list(out *bytes.Buffer, data []byte, flags int) int { + i := 0 + flags |= LIST_ITEM_BEGINNING_OF_LIST + work := func() bool { + for i < len(data) { + skip := p.listItem(out, data[i:], &flags) + i += skip + + if skip == 0 || flags&LIST_ITEM_END_OF_LIST != 0 { + break + } + flags &= ^LIST_ITEM_BEGINNING_OF_LIST + } + return true + } + + p.r.List(out, work, flags) + return i +} + +// Parse a single list item. +// Assumes initial prefix is already removed if this is a sublist. +func (p *parser) listItem(out *bytes.Buffer, data []byte, flags *int) int { + // keep track of the indentation of the first line + itemIndent := 0 + for itemIndent < 3 && data[itemIndent] == ' ' { + itemIndent++ + } + + i := p.uliPrefix(data) + if i == 0 { + i = p.oliPrefix(data) + } + if i == 0 { + i = p.dliPrefix(data) + // reset definition term flag + if i > 0 { + *flags &= ^LIST_TYPE_TERM + } + } + if i == 0 { + // if in defnition list, set term flag and continue + if *flags&LIST_TYPE_DEFINITION != 0 { + *flags |= LIST_TYPE_TERM + } else { + return 0 + } + } + + // skip leading whitespace on first line + for data[i] == ' ' { + i++ + } + + // find the end of the line + line := i + for i > 0 && data[i-1] != '\n' { + i++ + } + + // get working buffer + var raw bytes.Buffer + + // put the first line into the working buffer + raw.Write(data[line:i]) + line = i + + // process the following lines + containsBlankLine := false + sublist := 0 + codeBlockMarker := "" + +gatherlines: + for line < len(data) { + i++ + + // find the end of this line + for data[i-1] != '\n' { + i++ + } + + // if it is an empty line, guess that it is part of this item + // and move on to the next line + if p.isEmpty(data[line:i]) > 0 { + containsBlankLine = true + raw.Write(data[line:i]) + line = i + continue + } + + // calculate the indentation + indent := 0 + for indent < 4 && line+indent < i && data[line+indent] == ' ' { + indent++ + } + + chunk := data[line+indent : i] + + if p.flags&EXTENSION_FENCED_CODE != 0 { + // determine if in or out of codeblock + // if in codeblock, ignore normal list processing + _, marker := isFenceLine(chunk, nil, codeBlockMarker, false) + if marker != "" { + if codeBlockMarker == "" { + // start of codeblock + codeBlockMarker = marker + } else { + // end of codeblock. + *flags |= LIST_ITEM_CONTAINS_BLOCK + codeBlockMarker = "" + } + } + // we are in a codeblock, write line, and continue + if codeBlockMarker != "" || marker != "" { + raw.Write(data[line+indent : i]) + line = i + continue gatherlines + } + } + + // evaluate how this line fits in + switch { + // is this a nested list item? + case (p.uliPrefix(chunk) > 0 && !p.isHRule(chunk)) || + p.oliPrefix(chunk) > 0 || + p.dliPrefix(chunk) > 0: + + if containsBlankLine { + // end the list if the type changed after a blank line + if indent <= itemIndent && + ((*flags&LIST_TYPE_ORDERED != 0 && p.uliPrefix(chunk) > 0) || + (*flags&LIST_TYPE_ORDERED == 0 && p.oliPrefix(chunk) > 0)) { + + *flags |= LIST_ITEM_END_OF_LIST + break gatherlines + } + *flags |= LIST_ITEM_CONTAINS_BLOCK + } + + // to be a nested list, it must be indented more + // if not, it is the next item in the same list + if indent <= itemIndent { + break gatherlines + } + + // is this the first item in the nested list? + if sublist == 0 { + sublist = raw.Len() + } + + // is this a nested prefix header? + case p.isPrefixHeader(chunk): + // if the header is not indented, it is not nested in the list + // and thus ends the list + if containsBlankLine && indent < 4 { + *flags |= LIST_ITEM_END_OF_LIST + break gatherlines + } + *flags |= LIST_ITEM_CONTAINS_BLOCK + + // anything following an empty line is only part + // of this item if it is indented 4 spaces + // (regardless of the indentation of the beginning of the item) + case containsBlankLine && indent < 4: + if *flags&LIST_TYPE_DEFINITION != 0 && i < len(data)-1 { + // is the next item still a part of this list? + next := i + for data[next] != '\n' { + next++ + } + for next < len(data)-1 && data[next] == '\n' { + next++ + } + if i < len(data)-1 && data[i] != ':' && data[next] != ':' { + *flags |= LIST_ITEM_END_OF_LIST + } + } else { + *flags |= LIST_ITEM_END_OF_LIST + } + break gatherlines + + // a blank line means this should be parsed as a block + case containsBlankLine: + *flags |= LIST_ITEM_CONTAINS_BLOCK + } + + containsBlankLine = false + + // add the line into the working buffer without prefix + raw.Write(data[line+indent : i]) + + line = i + } + + // If reached end of data, the Renderer.ListItem call we're going to make below + // is definitely the last in the list. + if line >= len(data) { + *flags |= LIST_ITEM_END_OF_LIST + } + + rawBytes := raw.Bytes() + + // render the contents of the list item + var cooked bytes.Buffer + if *flags&LIST_ITEM_CONTAINS_BLOCK != 0 && *flags&LIST_TYPE_TERM == 0 { + // intermediate render of block item, except for definition term + if sublist > 0 { + p.block(&cooked, rawBytes[:sublist]) + p.block(&cooked, rawBytes[sublist:]) + } else { + p.block(&cooked, rawBytes) + } + } else { + // intermediate render of inline item + if sublist > 0 { + p.inline(&cooked, rawBytes[:sublist]) + p.block(&cooked, rawBytes[sublist:]) + } else { + p.inline(&cooked, rawBytes) + } + } + + // render the actual list item + cookedBytes := cooked.Bytes() + parsedEnd := len(cookedBytes) + + // strip trailing newlines + for parsedEnd > 0 && cookedBytes[parsedEnd-1] == '\n' { + parsedEnd-- + } + p.r.ListItem(out, cookedBytes[:parsedEnd], *flags) + + return line +} + +// render a single paragraph that has already been parsed out +func (p *parser) renderParagraph(out *bytes.Buffer, data []byte) { + if len(data) == 0 { + return + } + + // trim leading spaces + beg := 0 + for data[beg] == ' ' { + beg++ + } + + // trim trailing newline + end := len(data) - 1 + + // trim trailing spaces + for end > beg && data[end-1] == ' ' { + end-- + } + + work := func() bool { + p.inline(out, data[beg:end]) + return true + } + p.r.Paragraph(out, work) +} + +func (p *parser) paragraph(out *bytes.Buffer, data []byte) int { + // prev: index of 1st char of previous line + // line: index of 1st char of current line + // i: index of cursor/end of current line + var prev, line, i int + + // keep going until we find something to mark the end of the paragraph + for i < len(data) { + // mark the beginning of the current line + prev = line + current := data[i:] + line = i + + // did we find a blank line marking the end of the paragraph? + if n := p.isEmpty(current); n > 0 { + // did this blank line followed by a definition list item? + if p.flags&EXTENSION_DEFINITION_LISTS != 0 { + if i < len(data)-1 && data[i+1] == ':' { + return p.list(out, data[prev:], LIST_TYPE_DEFINITION) + } + } + + p.renderParagraph(out, data[:i]) + return i + n + } + + // an underline under some text marks a header, so our paragraph ended on prev line + if i > 0 { + if level := p.isUnderlinedHeader(current); level > 0 { + // render the paragraph + p.renderParagraph(out, data[:prev]) + + // ignore leading and trailing whitespace + eol := i - 1 + for prev < eol && data[prev] == ' ' { + prev++ + } + for eol > prev && data[eol-1] == ' ' { + eol-- + } + + // render the header + // this ugly double closure avoids forcing variables onto the heap + work := func(o *bytes.Buffer, pp *parser, d []byte) func() bool { + return func() bool { + pp.inline(o, d) + return true + } + }(out, p, data[prev:eol]) + + id := "" + if p.flags&EXTENSION_AUTO_HEADER_IDS != 0 { + id = SanitizedAnchorName(string(data[prev:eol])) + } + + p.r.Header(out, work, level, id) + + // find the end of the underline + for data[i] != '\n' { + i++ + } + return i + } + } + + // if the next line starts a block of HTML, then the paragraph ends here + if p.flags&EXTENSION_LAX_HTML_BLOCKS != 0 { + if data[i] == '<' && p.html(out, current, false) > 0 { + // rewind to before the HTML block + p.renderParagraph(out, data[:i]) + return i + } + } + + // if there's a prefixed header or a horizontal rule after this, paragraph is over + if p.isPrefixHeader(current) || p.isHRule(current) { + p.renderParagraph(out, data[:i]) + return i + } + + // if there's a fenced code block, paragraph is over + if p.flags&EXTENSION_FENCED_CODE != 0 { + if p.fencedCodeBlock(out, current, false) > 0 { + p.renderParagraph(out, data[:i]) + return i + } + } + + // if there's a definition list item, prev line is a definition term + if p.flags&EXTENSION_DEFINITION_LISTS != 0 { + if p.dliPrefix(current) != 0 { + return p.list(out, data[prev:], LIST_TYPE_DEFINITION) + } + } + + // if there's a list after this, paragraph is over + if p.flags&EXTENSION_NO_EMPTY_LINE_BEFORE_BLOCK != 0 { + if p.uliPrefix(current) != 0 || + p.oliPrefix(current) != 0 || + p.quotePrefix(current) != 0 || + p.codePrefix(current) != 0 { + p.renderParagraph(out, data[:i]) + return i + } + } + + // otherwise, scan to the beginning of the next line + for data[i] != '\n' { + i++ + } + i++ + } + + p.renderParagraph(out, data[:i]) + return i +} + +// SanitizedAnchorName returns a sanitized anchor name for the given text. +// +// It implements the algorithm specified in the package comment. +func SanitizedAnchorName(text string) string { + var anchorName []rune + futureDash := false + for _, r := range text { + switch { + case unicode.IsLetter(r) || unicode.IsNumber(r): + if futureDash && len(anchorName) > 0 { + anchorName = append(anchorName, '-') + } + futureDash = false + anchorName = append(anchorName, unicode.ToLower(r)) + default: + futureDash = true + } + } + return string(anchorName) +} diff --git a/vendor/github.com/russross/blackfriday/doc.go b/vendor/github.com/russross/blackfriday/doc.go new file mode 100644 index 000000000..9656c42a1 --- /dev/null +++ b/vendor/github.com/russross/blackfriday/doc.go @@ -0,0 +1,32 @@ +// Package blackfriday is a Markdown processor. +// +// It translates plain text with simple formatting rules into HTML or LaTeX. +// +// Sanitized Anchor Names +// +// Blackfriday includes an algorithm for creating sanitized anchor names +// corresponding to a given input text. This algorithm is used to create +// anchors for headings when EXTENSION_AUTO_HEADER_IDS is enabled. The +// algorithm is specified below, so that other packages can create +// compatible anchor names and links to those anchors. +// +// The algorithm iterates over the input text, interpreted as UTF-8, +// one Unicode code point (rune) at a time. All runes that are letters (category L) +// or numbers (category N) are considered valid characters. They are mapped to +// lower case, and included in the output. All other runes are considered +// invalid characters. Invalid characters that preceed the first valid character, +// as well as invalid character that follow the last valid character +// are dropped completely. All other sequences of invalid characters +// between two valid characters are replaced with a single dash character '-'. +// +// SanitizedAnchorName exposes this functionality, and can be used to +// create compatible links to the anchor names generated by blackfriday. +// This algorithm is also implemented in a small standalone package at +// github.com/shurcooL/sanitized_anchor_name. It can be useful for clients +// that want a small package and don't need full functionality of blackfriday. +package blackfriday + +// NOTE: Keep Sanitized Anchor Name algorithm in sync with package +// github.com/shurcooL/sanitized_anchor_name. +// Otherwise, users of sanitized_anchor_name will get anchor names +// that are incompatible with those generated by blackfriday. diff --git a/vendor/github.com/russross/blackfriday/go.mod b/vendor/github.com/russross/blackfriday/go.mod new file mode 100644 index 000000000..b05561a06 --- /dev/null +++ b/vendor/github.com/russross/blackfriday/go.mod @@ -0,0 +1 @@ +module github.com/russross/blackfriday diff --git a/vendor/github.com/russross/blackfriday/html.go b/vendor/github.com/russross/blackfriday/html.go new file mode 100644 index 000000000..e0a6c69c9 --- /dev/null +++ b/vendor/github.com/russross/blackfriday/html.go @@ -0,0 +1,938 @@ +// +// Blackfriday Markdown Processor +// Available at http://github.com/russross/blackfriday +// +// Copyright © 2011 Russ Ross . +// Distributed under the Simplified BSD License. +// See README.md for details. +// + +// +// +// HTML rendering backend +// +// + +package blackfriday + +import ( + "bytes" + "fmt" + "regexp" + "strconv" + "strings" +) + +// Html renderer configuration options. +const ( + HTML_SKIP_HTML = 1 << iota // skip preformatted HTML blocks + HTML_SKIP_STYLE // skip embedded - - -This is preheader text. Some clients will show this text as a preview. - - - - - - - - - - - -` -) diff --git a/vendor/openpitrix.io/openpitrix/pkg/constants/frontgate.go b/vendor/openpitrix.io/openpitrix/pkg/constants/frontgate.go deleted file mode 100644 index 8449cb942..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/constants/frontgate.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2018 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package constants - -// can use this id for internal test -const FrontgateVersionId = "appv-ABCDEFGHIJKLMNOPQRST" -const FrontgateAppId = "app-ABCDEFGHIJKLMNOPQRST" - -const FrontgateDefaultConf = ` -{ - "app_id": "app-ABCDEFGHIJKLMNOPQRST", - "version_id": "appv-ABCDEFGHIJKLMNOPQRST", - "name": "frontgate", - "description": "OpenPitrix built-in frontgate service", - "subnet": "", - "nodes": [{ - "container": { - "type": "docker", - "image": "openpitrix/openpitrix:metadata" - }, - "count": 3, - "cpu": 1, - "memory": 1024 - }] -} -` diff --git a/vendor/openpitrix.io/openpitrix/pkg/constants/notify_message.go b/vendor/openpitrix.io/openpitrix/pkg/constants/notify_message.go deleted file mode 100644 index 0e5c817a1..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/constants/notify_message.go +++ /dev/null @@ -1,708 +0,0 @@ -// Copyright 2018 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package constants - -import ( - "bytes" - "fmt" - "text/template" -) - -const ( - en = "en" - zhCN = "zh_cn" - defaultLocale = zhCN -) - -const EmailNotifyName = "email" - -type EmailNotifyContent struct { - Content string -} - -type NotifyMessage struct { - en string - zhCN string -} - -type NotifyTitle struct { - NotifyMessage -} - -type NotifyContent struct { - NotifyMessage -} - -func (n *NotifyMessage) GetMessage(locale string, params ...interface{}) string { - switch locale { - case en: - return fmt.Sprintf(n.en, params...) - case zhCN: - return fmt.Sprintf(n.zhCN, params...) - default: - return fmt.Sprintf(n.zhCN, params...) - } -} - -func (n *NotifyTitle) GetDefaultMessage(params ...interface{}) string { - return n.GetMessage(defaultLocale, params...) -} - -func (n *NotifyContent) GetDefaultMessage(params ...interface{}) string { - t, _ := template.New(EmailNotifyName).Parse(EmailNotifyTemplate) - - b := bytes.NewBuffer([]byte{}) - emailContent := &EmailNotifyContent{ - Content: n.GetMessage(defaultLocale, params...), - } - - t.Execute(b, emailContent) - return b.String() -} - -var ( - AdminInviteIsvNotifyTitle = NotifyTitle{ - NotifyMessage: NotifyMessage{ - zhCN: "【%s】邀请您成为平台服务商", - }, - } - AdminInviteIsvNotifyContent = NotifyContent{ - NotifyMessage: NotifyMessage{ - zhCN: ` - %s -

-

%s 您好

-

- %s邀请您入驻应用市场「%s」,成为优质服务商,为平台用户提供企业解决方案、产品和集成服务,共享快速收益。 -

- -

- 接受邀请 -

- -

- 如果按钮无法点击,请直接访问以下链接: -

- -

- %s -

- -

- 用户名:%s -

- -

- 密码:%s -

- -

- 首次登陆后请修改密码。 -

-
-

- * 此为系统邮件请勿回复 -

-`, - }, - } - - AdminInviteUserNotifyTitle = NotifyTitle{ - NotifyMessage: NotifyMessage{ - zhCN: "【%s】邀请您成为平台用户", - }, - } - AdminInviteUserNotifyContent = NotifyContent{ - NotifyMessage: NotifyMessage{ - zhCN: ` - %s -

-

Hi, %s

-

- %s邀请你加入「%s」,成为平台正式用户。 -

- -

- 接受邀请 -

- -

- 如果按钮无法点击,请直接访问以下链接: -

- -

- %s -

- -

- 用户名:%s -

- -

- 密码:%s -

-
-

- * 此为系统邮件请勿回复 -

-`, - }, - } - - IsvInviteMemberNotifyTitle = NotifyTitle{ - NotifyMessage: NotifyMessage{ - zhCN: "【%s】邀请您加入 %s 平台", - }, - } - IsvInviteMemberNotifyContent = NotifyContent{ - NotifyMessage: NotifyMessage{ - zhCN: ` - %s -

-

%s 您好

-

- %s邀请您加入「%s」平台协同工作。 -

- -

- 接受邀请 -

- -

- 如果按钮无法点击,请直接访问以下链接: -

- -

- %s -

- -

- 用户名:%s -

- -

- 密码:%s -

- -

- 首次登陆后请修改密码。 -

-
-

- * 此为系统邮件请勿回复 -

- -`, - }, - } - - SubmitVendorNotifyAdminTitle = NotifyTitle{ - NotifyMessage: NotifyMessage{ - zhCN: "【%s】%s 应用服务商资质申请", - }, - } - SubmitVendorNotifyAdminContent = NotifyContent{ - NotifyMessage: NotifyMessage{ - zhCN: ` - %s -

-

%s 您好

-

- 收到 %s 应用服务商资质申请,请尽快完成审核。 -

- -

- 审核 -

- -

- 如果按钮无法点击,请直接访问以下链接: -

- -

- %s -

- - -
-

- * 此为系统邮件请勿回复 -

- -`, - }, - } - - SubmitVendorNotifyIsvTitle = NotifyTitle{ - NotifyMessage: NotifyMessage{ - zhCN: "【%s】已收到您的应用服务商资质申请", - }, - } - SubmitVendorNotifyIsvContent = NotifyContent{ - NotifyMessage: NotifyMessage{ - zhCN: ` - %s -

-

%s 您好

-

- 已收到您的应用服务商资质申请,我们会在3个工作日内完成审核,请您耐心等待。 -

- -

- 查看申请 -

- -

- 如果按钮无法点击,请直接访问以下链接: -

- -

- %s -

- -
-

- * 此为系统邮件请勿回复 -

- - -`, - }, - } - - PassVendorNotifyTitle = NotifyTitle{ - NotifyMessage: NotifyMessage{ - zhCN: "【%s】您的 %s 应用服务商资质申请已通过", - }, - } - PassVendorNotifyContent = NotifyContent{ - NotifyMessage: NotifyMessage{ - zhCN: ` - %s -

-

%s 您好

-

- 恭喜您,应用服务商资质申请通过审核,正式成为 %s 应用服务商。 -

- -

- 查看详情 -

- -

- 如果按钮无法点击,请直接访问以下链接: -

- -

- %s -

- - -
-

- * 此为系统邮件请勿回复 -

-`, - }, - } - - RejectVendorNotifyTitle = NotifyTitle{ - NotifyMessage: NotifyMessage{ - zhCN: "【%s】已拒绝您的 %s 应用服务商资质申请", - }, - } - RejectVendorNotifyContent = NotifyContent{ - NotifyMessage: NotifyMessage{ - zhCN: ` - %s -

-

%s 您好

-

- 您提交的 %s 应用服务商资质申请信息有误,请核对相关内容,完善申请后重新提交。 -

- -

- 查看详情 -

- -

- 如果按钮无法点击,请直接访问以下链接: -

- -

- %s -

- - -
-

- * 此为系统邮件请勿回复 -

-`, - }, - } - - SubmitAppVersionNotifyReviewerTitle = NotifyTitle{ - NotifyMessage: NotifyMessage{ - zhCN: "【%s】%s 应用 %s 版本审核申请", - }, - } - SubmitAppVersionNotifyReviewerContent = NotifyContent{ - NotifyMessage: NotifyMessage{ - zhCN: ` - %s -

-

%s 您好

-

- 收到 %s 应用 %s 版本审核申请,请尽快完成审核。 -

- -

- 查看详情 -

- -

- 如果按钮无法点击,请直接访问以下链接: -

- -

- %s -

- - -
-

- * 此为系统邮件请勿回复 -

-`, - }, - } - - SubmitAppVersionNotifySubmitterTitle = NotifyTitle{ - NotifyMessage: NotifyMessage{ - zhCN: "【%s】已收到您的 %s 应用 %s 版本审核申请", - }, - } - SubmitAppVersionNotifySubmitterContent = NotifyContent{ - NotifyMessage: NotifyMessage{ - zhCN: ` - %s -

-

%s 您好

-

- 已收到您的 %s 应用 %s 版本审核申请,请您耐心等待。 -

- -

- 查看详情 -

- -

- 如果按钮无法点击,请直接访问以下链接: -

- -

- %s -

- - -
-

- * 此为系统邮件请勿回复 -

-`, - }, - } - - PassAppVersionInfoNotifyTitle = NotifyTitle{ - NotifyMessage: NotifyMessage{ - zhCN: "【%s】%s 应用 %s 版本通过应用信息审核", - }, - } - PassAppVersionInfoNotifyContent = NotifyContent{ - NotifyMessage: NotifyMessage{ - zhCN: ` - %s -

-

%s 您好

-

- 恭喜您,%s 应用 %s 版本已通过应用信息审核,等待平台商务审核。 -

- -

- 查看详情 -

- -

- 如果按钮无法点击,请直接访问以下链接: -

- -

- %s -

- - -
-

- * 此为系统邮件请勿回复 -

- -`, - }, - } - - PassAppVersionBusinessNotifyTitle = NotifyTitle{ - NotifyMessage: NotifyMessage{ - zhCN: "【%s】%s 应用 %s 版本通过平台商务审核", - }, - } - PassAppVersionBusinessNotifyContent = NotifyContent{ - NotifyMessage: NotifyMessage{ - zhCN: ` - %s -

-

%s 您好

-

- 恭喜您,%s 应用 %s 版本已通过平台商务审核,等待平台技术审核。 -

- -

- 查看详情 -

- -

- 如果按钮无法点击,请直接访问以下链接: -

- -

- %s -

- - -
-

- * 此为系统邮件请勿回复 -

-`, - }, - } - - PassAppVersionTechnicalNotifyTitle = NotifyTitle{ - NotifyMessage: NotifyMessage{ - zhCN: "【%s】%s 应用 %s 版本通过平台技术审核", - }, - } - PassAppVersionTechnicalNotifyContent = NotifyContent{ - NotifyMessage: NotifyMessage{ - zhCN: ` - %s -

-

%s 您好

-

- 恭喜您,%s 应用 %s 版本已通过平台技术审核,请尽快完成应用版本上架。 -

- -

- 查看详情 -

- -

- 如果按钮无法点击,请直接访问以下链接: -

- -

- %s -

- - -
-

- * 此为系统邮件请勿回复 -

-`, - }, - } - - RejectAppVersionInfoNotifyTitle = NotifyTitle{ - NotifyMessage: NotifyMessage{ - zhCN: "【%s】%s 应用 %s 版本未通过应用信息审核", - }, - } - RejectAppVersionInfoNotifyContent = NotifyContent{ - NotifyMessage: NotifyMessage{ - zhCN: ` - %s -

-

%s 您好

-

- 您提交的 %s 应用 %s 版本未通过应用信息审核,请核对相关内容,完善后重新提交。 -

- -

- 查看详情 -

- -

- 如果按钮无法点击,请直接访问以下链接: -

- -

- %s -

- - -
-

- * 此为系统邮件请勿回复 -

-`, - }, - } - - RejectAppVersionBusinessNotifyTitle = NotifyTitle{ - NotifyMessage: NotifyMessage{ - zhCN: "【%s】%s 应用 %s 版本未通过平台商务审核", - }, - } - RejectAppVersionBusinessNotifyContent = NotifyContent{ - NotifyMessage: NotifyMessage{ - zhCN: ` - %s -

-

%s 您好

-

- 您提交的 %s 应用 %s 版本未通过平台商务审核,请核对相关内容,完善后重新提交。 -

- -

- 查看详情 -

- -

- 如果按钮无法点击,请直接访问以下链接: -

- -

- %s -

- - -
-

- * 此为系统邮件请勿回复 -

-`, - }, - } - - RejectAppVersionTechnicalNotifyTitle = NotifyTitle{ - NotifyMessage: NotifyMessage{ - zhCN: "【%s】%s 应用 %s 版本未通过平台技术审核", - }, - } - RejectAppVersionTechnicalNotifyContent = NotifyContent{ - NotifyMessage: NotifyMessage{ - zhCN: ` - %s -

-

%s 您好

-

- 您提交的 %s 应用 %s 版本未通过平台技术审核,请核对相关内容,完善后重新提交。 -

- -

- 查看详情 -

- -

- 如果按钮无法点击,请直接访问以下链接: -

- -

- %s -

- - -
-

- * 此为系统邮件请勿回复 -

- -`, - }, - } - - ReleaseAppVersionNotifyTitle = NotifyTitle{ - NotifyMessage: NotifyMessage{ - zhCN: "【%s】%s 应用 %s 版本已上架", - }, - } - ReleaseAppVersionNotifyContent = NotifyContent{ - NotifyMessage: NotifyMessage{ - zhCN: ` - %s -

-

%s 您好

-

- %s 应用 %s 版本已上架到应用市场。 -

- -

- 查看详情 -

- -

- 如果按钮无法点击,请直接访问以下链接: -

- -

- %s -

- - -
-

- * 此为系统邮件请勿回复 -

-`, - }, - } - - SuspendAppVersionNotifyTitle = NotifyTitle{ - NotifyMessage: NotifyMessage{ - zhCN: "【%s】%s 应用 %s 版本已下架", - }, - } - SuspendAppVersionNotifyContent = NotifyContent{ - NotifyMessage: NotifyMessage{ - zhCN: ` - %s -

-

%s 您好

-

- %s 应用 %s 版本已从应用市场下架。 -

- -

- 查看详情 -

- -

- 如果按钮无法点击,请直接访问以下链接: -

- -

- %s -

- - -
-

- * 此为系统邮件请勿回复 -

-`, - }, - } -) diff --git a/vendor/openpitrix.io/openpitrix/pkg/constants/table.go b/vendor/openpitrix.io/openpitrix/pkg/constants/table.go deleted file mode 100644 index ba84be682..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/constants/table.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2018 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package constants - -const ( - TableApp = "app" - TableAppVersion = "app_version" - TableCategory = "category" - TableCategoryResource = "category_resource" - TableCluster = "cluster" - TableClusterCommon = "cluster_common" - TableClusterLink = "cluster_link" - TableClusterLoadbalancer = "cluster_loadbalancer" - TableClusterNode = "cluster_node" - TableClusterRole = "cluster_role" - TableJob = "job" - TableKeyPair = "key_pair" - TableNodeKeyPair = "node_key_pair" - TableRepo = "repo" - TableRepoEvent = "repo_event" - TableRepoLabel = "repo_label" - TableRepoProvider = "repo_provider" - TableRepoSelector = "repo_selector" - TableRuntime = "runtime" - TableRuntimeCredential = "runtime_credential" - TableTask = "task" - TableAttachment = "attachment" - - TableUser = "user" - TableGroupMember = "group_member" - TableUserPasswordReset = "user_password_reset" - TableGroup = "group" - TableUserClient = "user_client" - TableToken = "token" - - TableMarket = "market" - TableMarketUser = "market_user" - - TableAppVersionAudit = "app_version_audit" - TableAppVersionReview = "app_version_review" - TableVendorVerifyInfo = "vendor_verify_info" -) diff --git a/vendor/openpitrix.io/openpitrix/pkg/constants/user.go b/vendor/openpitrix.io/openpitrix/pkg/constants/user.go deleted file mode 100644 index 690d51a1e..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/constants/user.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2018 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package constants - -const UserSystem = "system" - -var InternalUsers = []string{ - UserSystem, -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/db/Dockerfile b/vendor/openpitrix.io/openpitrix/pkg/db/Dockerfile deleted file mode 100644 index 8992068fc..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/db/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright 2017 The OpenPitrix Authors. All rights reserved. -# Use of this source code is governed by a Apache license -# that can be found in the LICENSE file. - -FROM openpitrix/flyway:alpine - -USER root -RUN apk add --no-cache mysql-client - -COPY ./schema /flyway/sql -COPY ./ddl /flyway/sql/ddl -COPY ./scripts /flyway/sql/ddl diff --git a/vendor/openpitrix.io/openpitrix/pkg/db/condition.go b/vendor/openpitrix.io/openpitrix/pkg/db/condition.go deleted file mode 100644 index 5a96367ca..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/db/condition.go +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright 2017 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package db - -import ( - "strings" - - "github.com/gocraft/dbr" -) - -const ( - placeholder = "?" -) - -type EqCondition struct { - dbr.Builder - Column string - Value interface{} -} - -// Copy From vendor/github.com/gocraft/dbr/condition.go:36 -func buildCmp(d dbr.Dialect, buf dbr.Buffer, pred string, column string, value interface{}) error { - buf.WriteString(d.QuoteIdent(column)) - buf.WriteString(" ") - buf.WriteString(pred) - buf.WriteString(" ") - buf.WriteString(placeholder) - - buf.WriteValue(value) - return nil -} - -// And creates AND from a list of conditions -func And(cond ...dbr.Builder) dbr.Builder { - return dbr.And(cond...) -} - -// Or creates OR from a list of conditions -func Or(cond ...dbr.Builder) dbr.Builder { - return dbr.Or(cond...) -} - -func escape(str string) string { - return strings.Map(func(r rune) rune { - switch r { - case '%', '\'', '^', '[', ']', '!', '_': - return ' ' - } - return r - }, str) -} - -func Like(column string, value string) dbr.Builder { - value = "%" + strings.TrimSpace(escape(value)) + "%" - return dbr.BuildFunc(func(d dbr.Dialect, buf dbr.Buffer) error { - return buildCmp(d, buf, "LIKE", column, value) - }) -} - -func Prefix(column string, value string) dbr.Builder { - value = strings.TrimSpace(escape(value)) + "%" - return dbr.BuildFunc(func(d dbr.Dialect, buf dbr.Buffer) error { - return buildCmp(d, buf, "LIKE", column, value) - }) -} - -// Eq is `=`. -// When value is nil, it will be translated to `IS NULL`. -// When value is a slice, it will be translated to `IN`. -// Otherwise it will be translated to `=`. -func Eq(column string, value interface{}) dbr.Builder { - return &EqCondition{ - Builder: dbr.Eq(column, value), - Column: column, - Value: value, - } -} - -// Neq is `!=`. -// When value is nil, it will be translated to `IS NOT NULL`. -// When value is a slice, it will be translated to `NOT IN`. -// Otherwise it will be translated to `!=`. -func Neq(column string, value interface{}) dbr.Builder { - return dbr.Neq(column, value) -} - -// Gt is `>`. -func Gt(column string, value interface{}) dbr.Builder { - return dbr.Gt(column, value) -} - -// Gte is '>='. -func Gte(column string, value interface{}) dbr.Builder { - return dbr.Gte(column, value) -} - -// Lt is '<'. -func Lt(column string, value interface{}) dbr.Builder { - return dbr.Lt(column, value) -} - -// Lte is `<=`. -func Lte(column string, value interface{}) dbr.Builder { - return dbr.Lte(column, value) -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/db/connection.go b/vendor/openpitrix.io/openpitrix/pkg/db/connection.go deleted file mode 100644 index a7e53fda1..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/db/connection.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2017 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package db - -import ( - "context" - "sync" - "time" - - "github.com/gocraft/dbr" - - "openpitrix.io/openpitrix/pkg/config" - "openpitrix.io/openpitrix/pkg/logger" -) - -type key int - -var dbMap = sync.Map{} -var dbKey key - -type Database struct { - Conn *dbr.Connection -} - -func OpenDatabase(cfg config.MysqlConfig) (*Database, error) { - // https://github.com/go-sql-driver/mysql/issues/9 - conn, err := dbr.Open("mysql", cfg.GetUrl()+"?parseTime=1&multiStatements=1&charset=utf8mb4&collation=utf8mb4_unicode_ci", nil) - if err != nil { - return nil, err - } - conn.SetMaxIdleConns(100) - conn.SetMaxOpenConns(100) - conn.SetConnMaxLifetime(10 * time.Second) - - db := &Database{ - Conn: conn, - } - dbMap.Store(cfg, db) - return db, nil -} - -func NewContext(ctx context.Context, cfg config.MysqlConfig) context.Context { - return context.WithValue(ctx, dbKey, cfg) -} - -func FromContext(ctx context.Context) (*Database, bool) { - cfg := ctx.Value(dbKey).(config.MysqlConfig) - var err error - db, ok := dbMap.Load(cfg) - if !ok { - db, err = OpenDatabase(cfg) - if err != nil { - logger.Critical(ctx, "Failed to open database: %+v", err) - return nil, false - } - } - return db.(*Database), true -} - -func (db *Database) New(ctx context.Context) *Conn { - actualDb, ok := FromContext(ctx) - var conn *dbr.Connection - if ok || db == nil { - conn = actualDb.Conn - } else { - conn = db.Conn - } - return &Conn{ - Session: conn.NewSession(&EventReceiver{ctx}), - ctx: ctx, - } -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/db/db.go b/vendor/openpitrix.io/openpitrix/pkg/db/db.go deleted file mode 100644 index 412d52cf2..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/db/db.go +++ /dev/null @@ -1,278 +0,0 @@ -package db - -import ( - "context" - "database/sql" - "fmt" - - _ "github.com/go-sql-driver/mysql" - "github.com/gocraft/dbr" -) - -const ( - DefaultSelectLimit = 200 -) - -func GetLimit(n uint64) uint64 { - if n < 0 { - n = 0 - } - if n > DefaultSelectLimit { - n = DefaultSelectLimit - } - return n -} - -func GetOffset(n uint64) uint64 { - if n < 0 { - n = 0 - } - return n -} - -type InsertHook func(query *InsertQuery) -type UpdateHook func(query *UpdateQuery) -type DeleteHook func(query *DeleteQuery) - -type SelectQuery struct { - *dbr.SelectBuilder - ctx context.Context - JoinCount int // for join filter -} - -type InsertQuery struct { - *dbr.InsertBuilder - ctx context.Context - Hook InsertHook -} - -type DeleteQuery struct { - *dbr.DeleteBuilder - ctx context.Context - Hook DeleteHook -} - -type UpdateQuery struct { - *dbr.UpdateBuilder - ctx context.Context - Hook UpdateHook -} - -type Conn struct { - *dbr.Session - ctx context.Context - InsertHook InsertHook - UpdateHook UpdateHook - DeleteHook DeleteHook -} - -// SelectQuery -// Example: Select().From().Where().Limit().Offset().OrderDir().Load() -// Select().From().Where().Limit().Offset().OrderDir().LoadOne() -// Select().From().Where().Count() -// SelectAll().From().Where().Limit().Offset().OrderDir().Load() -// SelectAll().From().Where().Limit().Offset().OrderDir().LoadOne() -// SelectAll().From().Where().Count() - -func (conn *Conn) Select(columns ...string) *SelectQuery { - return &SelectQuery{conn.Session.Select(columns...), conn.ctx, 0} -} - -func (conn *Conn) SelectBySql(query string, value ...interface{}) *SelectQuery { - return &SelectQuery{conn.Session.SelectBySql(query, value...), conn.ctx, 0} -} - -func (conn *Conn) SelectAll(columns ...string) *SelectQuery { - return &SelectQuery{conn.Session.Select("*"), conn.ctx, 0} -} - -func (b *SelectQuery) Join(table, on interface{}) *SelectQuery { - b.SelectBuilder.Join(table, on) - return b -} -func (b *SelectQuery) RightJoin(table, on interface{}) *SelectQuery { - b.SelectBuilder.RightJoin(table, on) - return b -} -func (b *SelectQuery) LeftJoin(table, on interface{}) *SelectQuery { - b.SelectBuilder.LeftJoin(table, on) - return b -} - -func (b *SelectQuery) JoinAs(table string, alias string, on interface{}) *SelectQuery { - b.SelectBuilder.Join(dbr.I(table).As(alias), on) - return b -} - -func (b *SelectQuery) From(table string) *SelectQuery { - b.SelectBuilder.From(table) - return b -} - -func (b *SelectQuery) Where(query interface{}, value ...interface{}) *SelectQuery { - b.SelectBuilder.Where(query, value...) - return b -} - -func (b *SelectQuery) GroupBy(col ...string) *SelectQuery { - b.SelectBuilder.GroupBy(col...) - return b -} - -func (b *SelectQuery) Distinct() *SelectQuery { - b.SelectBuilder.Distinct() - return b -} - -func (b *SelectQuery) Limit(n uint64) *SelectQuery { - n = GetLimit(n) - b.SelectBuilder.Limit(n) - return b -} - -func (b *SelectQuery) Offset(n uint64) *SelectQuery { - n = GetOffset(n) - b.SelectBuilder.Offset(n) - return b -} - -func (b *SelectQuery) OrderDir(col string, isAsc bool) *SelectQuery { - b.SelectBuilder.OrderDir(col, isAsc) - return b -} - -func (b *SelectQuery) Load(value interface{}) (int, error) { - return b.SelectBuilder.LoadContext(b.ctx, value) -} - -func (b *SelectQuery) LoadOne(value interface{}) error { - return b.SelectBuilder.LoadOneContext(b.ctx, value) -} - -func getColumns(dbrColumns []interface{}) string { - for _, column := range dbrColumns { - if c, ok := column.(string); ok { - return c - } - } - return "*" -} - -func (b *SelectQuery) Count() (count uint32, err error) { - // cache SelectStmt - selectStmt := b.SelectBuilder - - limit := selectStmt.LimitCount - offset := selectStmt.OffsetCount - column := selectStmt.Column - isDistinct := selectStmt.IsDistinct - order := selectStmt.Order - - b.LimitCount = -1 - b.OffsetCount = -1 - b.Column = []interface{}{"COUNT(*)"} - b.Order = []dbr.Builder{} - - if isDistinct { - b.Column = []interface{}{fmt.Sprintf("COUNT(DISTINCT %s)", getColumns(column))} - b.IsDistinct = false - } - - err = b.LoadOne(&count) - // fallback SelectStmt - selectStmt.LimitCount = limit - selectStmt.OffsetCount = offset - selectStmt.Column = column - selectStmt.IsDistinct = isDistinct - selectStmt.Order = order - b.SelectBuilder = selectStmt - return -} - -// InsertQuery -// Example: InsertInto().Columns().Record().Exec() - -func (conn *Conn) InsertInto(table string) *InsertQuery { - return &InsertQuery{conn.Session.InsertInto(table), conn.ctx, conn.InsertHook} -} - -func (b *InsertQuery) Exec() (sql.Result, error) { - result, err := b.InsertBuilder.ExecContext(b.ctx) - if b.Hook != nil && err == nil { - defer b.Hook(b) - } - return result, err -} - -func (b *InsertQuery) Columns(columns ...string) *InsertQuery { - b.InsertBuilder.Columns(columns...) - return b -} - -func (b *InsertQuery) Record(structValue interface{}) *InsertQuery { - if len(b.Column) == 0 { - b.Columns(GetColumnsFromStruct(structValue)...) - } - b.InsertBuilder.Record(structValue) - return b -} - -// DeleteQuery -// Example: DeleteFrom().Where().Limit().Exec() - -func (conn *Conn) DeleteFrom(table string) *DeleteQuery { - return &DeleteQuery{conn.Session.DeleteFrom(table), conn.ctx, conn.DeleteHook} -} - -func (b *DeleteQuery) Where(query interface{}, value ...interface{}) *DeleteQuery { - b.DeleteBuilder.Where(query, value...) - return b -} - -func (b *DeleteQuery) Limit(n uint64) *DeleteQuery { - b.DeleteBuilder.Limit(n) - return b -} - -func (b *DeleteQuery) Exec() (sql.Result, error) { - result, err := b.DeleteBuilder.ExecContext(b.ctx) - if b.Hook != nil && err == nil { - defer b.Hook(b) - } - return result, err -} - -// UpdateQuery -// Example: Update().Set().Where().Exec() - -func (conn *Conn) Update(table string) *UpdateQuery { - return &UpdateQuery{conn.Session.Update(table), conn.ctx, conn.UpdateHook} -} - -func (b *UpdateQuery) Exec() (sql.Result, error) { - result, err := b.UpdateBuilder.ExecContext(b.ctx) - if b.Hook != nil && err == nil { - defer b.Hook(b) - } - return result, err -} - -func (b *UpdateQuery) Set(column string, value interface{}) *UpdateQuery { - b.UpdateBuilder.Set(column, value) - return b -} - -func (b *UpdateQuery) SetMap(m map[string]interface{}) *UpdateQuery { - b.UpdateBuilder.SetMap(m) - return b -} - -func (b *UpdateQuery) Where(query interface{}, value ...interface{}) *UpdateQuery { - b.UpdateBuilder.Where(query, value...) - return b -} - -func (b *UpdateQuery) Limit(n uint64) *UpdateQuery { - b.UpdateBuilder.Limit(n) - return b -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/db/errors.go b/vendor/openpitrix.io/openpitrix/pkg/db/errors.go deleted file mode 100644 index 69202a341..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/db/errors.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2018 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package db - -import ( - "github.com/gocraft/dbr" -) - -// package errors -var ( - ErrNotFound = dbr.ErrNotFound - ErrNotSupported = dbr.ErrNotSupported - ErrTableNotSpecified = dbr.ErrTableNotSpecified - ErrColumnNotSpecified = dbr.ErrColumnNotSpecified - ErrInvalidPointer = dbr.ErrInvalidPointer - ErrPlaceholderCount = dbr.ErrPlaceholderCount - ErrInvalidSliceLength = dbr.ErrInvalidSliceLength - ErrCantConvertToTime = dbr.ErrCantConvertToTime - ErrInvalidTimestring = dbr.ErrInvalidTimestring -) diff --git a/vendor/openpitrix.io/openpitrix/pkg/db/event.go b/vendor/openpitrix.io/openpitrix/pkg/db/event.go deleted file mode 100644 index 676dc0977..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/db/event.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2017 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package db - -import ( - "context" - - "openpitrix.io/openpitrix/pkg/logger" -) - -// EventReceiver is a sentinel EventReceiver; use it if the caller doesn't supply one -type EventReceiver struct { - ctx context.Context -} - -// Event receives a simple notification when various events occur -func (n *EventReceiver) Event(eventName string) { - -} - -// EventKv receives a notification when various events occur along with -// optional key/value data -func (n *EventReceiver) EventKv(eventName string, kvs map[string]string) { -} - -// EventErr receives a notification of an error if one occurs -func (n *EventReceiver) EventErr(eventName string, err error) error { - return err -} - -// EventErrKv receives a notification of an error if one occurs along with -// optional key/value data -func (n *EventReceiver) EventErrKv(eventName string, err error, kvs map[string]string) error { - logger.Error(n.ctx, "%+v", err) - logger.Error(n.ctx, "%s: %+v", eventName, kvs) - return err -} - -// Timing receives the time an event took to happen -func (n *EventReceiver) Timing(eventName string, nanoseconds int64) { - -} - -// TimingKv receives the time an event took to happen along with optional key/value data -func (n *EventReceiver) TimingKv(eventName string, nanoseconds int64, kvs map[string]string) { - logger.Debug(n.ctx, "%s spend %.2fms: %+v", eventName, float32(nanoseconds)/1000000, kvs) -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/db/util.go b/vendor/openpitrix.io/openpitrix/pkg/db/util.go deleted file mode 100644 index 82f2fb061..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/db/util.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2018 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package db - -import ( - "github.com/fatih/structs" - - "openpitrix.io/openpitrix/pkg/util/stringutil" -) - -func GetColumnsFromStruct(s interface{}) []string { - names := structs.Names(s) - for i, name := range names { - names[i] = stringutil.CamelCaseToUnderscore(name) - } - return names -} - -func GetColumnsFromStructWithPrefix(prefix string, s interface{}) []string { - names := structs.Names(s) - for i, name := range names { - names[i] = WithPrefix(prefix, stringutil.CamelCaseToUnderscore(name)) - } - return names -} - -func WithPrefix(prefix, str string) string { - return prefix + "." + str -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/gerr/codes.go b/vendor/openpitrix.io/openpitrix/pkg/gerr/codes.go deleted file mode 100644 index dbac1516a..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/gerr/codes.go +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright 2018 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package gerr - -import "google.golang.org/grpc/codes" - -const ( - // OK is returned on success. - OK = codes.OK - - // Canceled indicates the operation was canceled (typically by the caller). - Canceled = codes.Canceled - - // Unknown error. An example of where this error may be returned is - // if a Status value received from another address space belongs to - // an error-space that is not known in this address space. Also - // errors raised by APIs that do not return enough error information - // may be converted to this error. - Unknown = codes.Unknown - - // InvalidArgument indicates client specified an invalid argument. - // Note that this differs from FailedPrecondition. It indicates arguments - // that are problematic regardless of the state of the system - // (e.g., a malformed file name). - InvalidArgument = codes.InvalidArgument - - // DeadlineExceeded means operation expired before completion. - // For operations that change the state of the system, this error may be - // returned even if the operation has completed successfully. For - // example, a successful response from a server could have been delayed - // long enough for the deadline to expire. - DeadlineExceeded = codes.DeadlineExceeded - - // NotFound means some requested entity (e.g., file or directory) was - // not found. - NotFound = codes.NotFound - - // AlreadyExists means an attempt to create an entity failed because one - // already exists. - AlreadyExists = codes.AlreadyExists - - // PermissionDenied indicates the caller does not have permission to - // execute the specified operation. It must not be used for rejections - // caused by exhausting some resource (use ResourceExhausted - // instead for those errors). It must not be - // used if the caller cannot be identified (use Unauthenticated - // instead for those errors). - PermissionDenied = codes.PermissionDenied - - // ResourceExhausted indicates some resource has been exhausted, perhaps - // a per-user quota, or perhaps the entire file system is out of space. - ResourceExhausted = codes.ResourceExhausted - - // FailedPrecondition indicates operation was rejected because the - // system is not in a state required for the operation's execution. - // For example, directory to be deleted may be non-empty, an rmdir - // operation is applied to a non-directory, etc. - // - // A litmus test that may help a service implementor in deciding - // between FailedPrecondition, Aborted, and Unavailable: - // (a) Use Unavailable if the client can retry just the failing call. - // (b) Use Aborted if the client should retry at a higher-level - // (e.g., restarting a read-modify-write sequence). - // (c) Use FailedPrecondition if the client should not retry until - // the system state has been explicitly fixed. E.g., if an "rmdir" - // fails because the directory is non-empty, FailedPrecondition - // should be returned since the client should not retry unless - // they have first fixed up the directory by deleting files from it. - // (d) Use FailedPrecondition if the client performs conditional - // REST Get/Update/Delete on a resource and the resource on the - // server does not match the condition. E.g., conflicting - // read-modify-write on the same resource. - FailedPrecondition = codes.FailedPrecondition - - // Aborted indicates the operation was aborted, typically due to a - // concurrency issue like sequencer check failures, transaction aborts, - // etc. - // - // See litmus test above for deciding between FailedPrecondition, - // Aborted, and Unavailable. - Aborted = codes.Aborted - - // OutOfRange means operation was attempted past the valid range. - // E.g., seeking or reading past end of file. - // - // Unlike InvalidArgument, this error indicates a problem that may - // be fixed if the system state changes. For example, a 32-bit file - // system will generate InvalidArgument if asked to read at an - // offset that is not in the range [0,2^32-1], but it will generate - // OutOfRange if asked to read from an offset past the current - // file size. - // - // There is a fair bit of overlap between FailedPrecondition and - // OutOfRange. We recommend using OutOfRange (the more specific - // error) when it applies so that callers who are iterating through - // a space can easily look for an OutOfRange error to detect when - // they are done. - OutOfRange = codes.OutOfRange - - // Unimplemented indicates operation is not implemented or not - // supported/enabled in this service. - Unimplemented = codes.Unimplemented - - // Internal errors. Means some invariants expected by underlying - // system has been broken. If you see one of these errors, - // something is very broken. - Internal = codes.Internal - - // Unavailable indicates the service is currently unavailable. - // This is a most likely a transient condition and may be corrected - // by retrying with a backoff. - // - // See litmus test above for deciding between FailedPrecondition, - // Aborted, and Unavailable. - Unavailable = codes.Unavailable - - // DataLoss indicates unrecoverable data loss or corruption. - DataLoss = codes.DataLoss - - // Unauthenticated indicates the request does not have valid - // authentication credentials for the operation. - Unauthenticated = codes.Unauthenticated -) diff --git a/vendor/openpitrix.io/openpitrix/pkg/gerr/error.go b/vendor/openpitrix.io/openpitrix/pkg/gerr/error.go deleted file mode 100644 index 623efbdc6..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/gerr/error.go +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2018 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package gerr - -import ( - "context" - "fmt" - - "github.com/pkg/errors" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - "openpitrix.io/openpitrix/pkg/logger" - - "openpitrix.io/openpitrix/pkg/pb" - "openpitrix.io/openpitrix/pkg/util/ctxutil" -) - -const En = "en" -const ZhCN = "zh_cn" -const DefaultLocale = En - -func newStatus(ctx context.Context, code codes.Code, err error, errMsg ErrorMessage, a ...interface{}) *status.Status { - locale := ctxutil.GetLocale(ctx) - if len(locale) == 0 { - locale = DefaultLocale - } - - s := status.New(code, errMsg.Message(locale, err, a...)) - - errorDetail := &pb.ErrorDetail{ErrorName: errMsg.Name} - if err != nil { - errorDetail.Cause = fmt.Sprintf("%+v", err) - } - logger.NewLogger().WithDepth(5).Error(ctx, "err: %+v, errMsg: %s", err, errMsg.Message(locale, err, a...)) - - sd, e := s.WithDetails(errorDetail) - if e == nil { - return sd - } else { - logger.NewLogger().WithDepth(5).Error(ctx, "%+v", errors.WithStack(e)) - } - return s -} - -func ClearErrorCause(err error) error { - if e, ok := status.FromError(err); ok { - details := e.Details() - if len(details) > 0 { - detail := details[0] - if d, ok := detail.(*pb.ErrorDetail); ok { - d.Cause = "" - // clear detail - proto := e.Proto() - proto.Details = proto.Details[:0] - e = status.FromProto(proto) - e, _ := e.WithDetails(d) - return e.Err() - } - } - } - return err -} - -type GRPCError interface { - error - GRPCStatus() *status.Status -} - -func New(ctx context.Context, code codes.Code, errMsg ErrorMessage, a ...interface{}) GRPCError { - return newStatus(ctx, code, nil, errMsg, a...).Err().(GRPCError) -} - -func NewWithDetail(ctx context.Context, code codes.Code, err error, errMsg ErrorMessage, a ...interface{}) GRPCError { - return newStatus(ctx, code, err, errMsg, a...).Err().(GRPCError) -} - -func IsGRPCError(err error) bool { - if e, ok := err.(GRPCError); ok && e != nil { - return true - } - return false -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/gerr/message.go b/vendor/openpitrix.io/openpitrix/pkg/gerr/message.go deleted file mode 100644 index 13e0d4ccf..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/gerr/message.go +++ /dev/null @@ -1,495 +0,0 @@ -// Copyright 2018 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package gerr - -import "fmt" - -type ErrorMessage struct { - Name string - en string - zhCN string -} - -func (em ErrorMessage) Message(locale string, err error, a ...interface{}) string { - format := "" - switch locale { - case En: - format = em.en - case ZhCN: - if len(em.zhCN) > 0 { - format = em.zhCN - } else { - format = em.en - } - } - if err != nil { - return fmt.Sprintf("%s: %s", fmt.Sprintf(format, a...), err.Error()) - } else { - return fmt.Sprintf(format, a...) - } -} - -var ( - ErrorPermissionDenied = ErrorMessage{ - Name: "permission_denied", - en: "permission denied", - zhCN: "没有权限", - } - ErrorAuthFailure = ErrorMessage{ - Name: "auth_failure", - en: "auth failure", - zhCN: "认证失败", - } - ErrorAccessTokenExpired = ErrorMessage{ - Name: "access_token_expired", - en: "access token expired", - zhCN: "访问令牌已过期", - } - ErrorRefreshTokenExpired = ErrorMessage{ - Name: "refresh_token_expired", - en: "refresh token expired", - zhCN: "刷新令牌已过期", - } - ErrorEmailPasswordNotMatched = ErrorMessage{ - Name: "email_password_not_matched", - en: "email and password does not match", - zhCN: "邮箱和密码不匹配", - } - ErrorPasswordIncorrect = ErrorMessage{ - Name: "password_incorrect", - en: "password incorrect", - zhCN: "密码不正确", - } - ErrorRuntimeCredentialExists = ErrorMessage{ - Name: "runtime_credential_exists", - en: "runtime credential exists", - zhCN: "环境授权信息已存在", - } - ErrorUnsupportedRuntimeProvider = ErrorMessage{ - Name: "unsupported_runtime_provider", - en: "unsupported runtime provider [%s]", - zhCN: "不支持云环境服务商[%s]", - } - ErrorRuntimeExists = ErrorMessage{ - Name: "runtime_exists", - en: "runtime exists", - zhCN: "环境已存在", - } - ErrorEmailExists = ErrorMessage{ - Name: "email_exists", - en: "email [%s] exists", - zhCN: "邮箱[%s]已存在", - } - ErrorEmailNotExists = ErrorMessage{ - Name: "email_not_exists", - en: "email [%s] not exists", - zhCN: "邮箱[%s]不存在", - } - ErrorCreateResourcesFailed = ErrorMessage{ - Name: "create_resources_failed", - en: "create resources failed", - zhCN: "创建资源失败", - } - ErrorCreateResourceFailed = ErrorMessage{ - Name: "create_resource_failed", - en: "create resource [%s] failed", - zhCN: "创建资源[%s]失败", - } - ErrorDeleteResourcesFailed = ErrorMessage{ - Name: "delete_resources_failed", - en: "delete resources failed", - zhCN: "删除资源失败", - } - ErrorDeleteResourceFailed = ErrorMessage{ - Name: "delete_resource_failed", - en: "delete resource [%s] failed", - zhCN: "删除资源[%s]失败", - } - ErrorDeleteFrontgateWithClustersFailed = ErrorMessage{ - Name: "delete_frontgate_with_clusters_failed", - en: "delete frontgate [%s] with clusters [%s] failed", - zhCN: "删除代理[%s]失败,仍有[%s]依赖", - } - ErrorUpgradeResourceFailed = ErrorMessage{ - Name: "upgrade_resource_failed", - en: "upgrade resource [%s] failed", - zhCN: "升级资源[%s]失败", - } - ErrorRollbackResourceFailed = ErrorMessage{ - Name: "rollback_resource_failed", - en: "rollback resource [%s] failed", - zhCN: "回滚资源[%s]失败", - } - ErrorResizeResourceFailed = ErrorMessage{ - Name: "resize_resource_failed", - en: "resize resource [%s] failed", - zhCN: "调整资源[%s]失败", - } - ErrorAddResourceNodeFailed = ErrorMessage{ - Name: "add_resource_node_failed", - en: "add resource [%s] node failed", - zhCN: "为资源[%s]增加节点失败", - } - ErrorDeleteResourceNodeFailed = ErrorMessage{ - Name: "delete_resource_node_failed", - en: "delete resource [%s] node failed", - zhCN: "删除资源[%s]的节点失败", - } - ErrorUpdateResourceEnvFailed = ErrorMessage{ - Name: "update_resource_env_failed", - en: "update resource [%s] env failed", - zhCN: "更新资源[%s]环境变量失败", - } - ErrorUpdateResourceFailed = ErrorMessage{ - Name: "update_resource_failed", - en: "update resource [%s] failed", - zhCN: "更新资源[%s]失败", - } - ErrorStopResourceFailed = ErrorMessage{ - Name: "stop_resource_failed", - en: "stop resource [%s] failed", - zhCN: "暂停资源[%s]失败", - } - ErrorStartResourceFailed = ErrorMessage{ - Name: "start_resource_failed", - en: "start resource [%s] failed", - zhCN: "启动资源[%s]失败", - } - ErrorRecoverResourceFailed = ErrorMessage{ - Name: "recover_resource_failed", - en: "recover resource [%s] failed", - zhCN: "回复资源[%s]失败", - } - ErrorCeaseResourceFailed = ErrorMessage{ - Name: "cease_resource_failed", - en: "cease resource [%s] failed", - zhCN: "释放资源[%s]失败", - } - ErrorRetryTaskFailed = ErrorMessage{ - Name: "retry_task_failed", - en: "retry task [%s] failed", - zhCN: "重试任务[%s]失败", - } - ErrorDescribeResourcesFailed = ErrorMessage{ - Name: "describe_resources_failed", - en: "describe resources failed", - zhCN: "获取资源失败", - } - ErrorDescribeResourceFailed = ErrorMessage{ - Name: "describe_resource_failed", - en: "describe resource [%s] failed", - zhCN: "获取资源[%s]失败", - } - ErrorModifyResourcesFailed = ErrorMessage{ - Name: "modify_resources_failed", - en: "modify resources failed", - zhCN: "修改资源失败", - } - ErrorModifyResourceFailed = ErrorMessage{ - Name: "modify_resource_failed", - en: "modify resource [%s] failed", - zhCN: "修改资源[%s]失败", - } - ErrorResourceNotFound = ErrorMessage{ - Name: "resource_not_found", - en: "resource [%s] not found", - zhCN: "没有找到资源[%s]", - } - ErrorResourceRoleNotFound = ErrorMessage{ - Name: "resource_role_not_found", - en: "resource [%s] role [%s] not found", - zhCN: "没有找到资源[%s]对应的角色[%s]", - } - ErrorSubnetNotFound = ErrorMessage{ - Name: "subnet_not_found", - en: "subnet [%s] not found or vpc not bind eip", - zhCN: "没有找到子网[%s]或者VPC没有绑定公网IP", - } - ErrorThereAreNoAvailableSubnet = ErrorMessage{ - Name: "there_are_no_available_subnet", - en: "there are no available subnet", - zhCN: "没有可用的子网", - } - ErrorProviderNotFound = ErrorMessage{ - Name: "provider_not_found", - en: "provider [%s] not found", - zhCN: "云服务商[%s]不存在", - } - ErrorInternalError = ErrorMessage{ - Name: "internal_error", - en: "internal error", - zhCN: "内部错误", - } - ErrorMissingParameter = ErrorMessage{ - Name: "missing_parameter", - en: "missing parameter [%s]", - zhCN: "缺少参数[%s]", - } - ErrorValidateFailed = ErrorMessage{ - Name: "validate_failed", - en: "validate failed", - zhCN: "校验失败", - } - ErrorParameterParseFailed = ErrorMessage{ - Name: "parameter_parse_failed", - en: "parameter [%s] parse failed", - zhCN: "参数[%s]解析失败", - } - ErrorResourceAlreadyDeleted = ErrorMessage{ - Name: "resource_already_deleted", - en: "resource [%s] has already been deleted", - zhCN: "资源[%s]已被删除", - } - ErrorResourceNotInStatus = ErrorMessage{ - Name: "resource_not_in_status", - en: "resource [%s] is not in status [%s]", - zhCN: "资源[%s]不处于[%s]状态", - } - ErrorResourceTransitionStatus = ErrorMessage{ - Name: "resource_transition_status", - en: "resource [%s] is [%s]", - zhCN: "资源[%s]处于[%s]状态", - } - ErrorIllegalParameterLength = ErrorMessage{ - Name: "illegal_parameter_length", - en: "illegal parameter [%s] length", - zhCN: "参数[%s]的长度非法", - } - ErrorParameterShouldNotBeEmpty = ErrorMessage{ - Name: "parameter_should_not_be_empty", - en: "parameter [%s] should not be empty", - zhCN: "参数[%s]不应该为空", - } - ErrorUnsupportedParameterValue = ErrorMessage{ - Name: "unsupported_parameter_value", - en: "unsupported parameter [%s] value [%s]", - zhCN: "参数[%s]不支持值[%s]", - } - ErrorIllegalUrlFormat = ErrorMessage{ - Name: "illegal_url_format", - en: "illegal URL format [%s]", - zhCN: "非法的URL格式[%s]", - } - ErrorConflictRepoName = ErrorMessage{ - Name: "conflict_repo_name", - en: "conflict repo name [%s]", - zhCN: "仓库名称[%s]已存在", - } - ErrorResourceQuotaNotEnough = ErrorMessage{ - Name: "resource_quota_not_enough", - en: "resource quota not enough: %s", - zhCN: "资源配额不足: %s", - } - ErrorHelmReleaseExists = ErrorMessage{ - Name: "helm_release_exists", - en: "helm release [%s] already exists", - zhCN: "", - } - ErrorUnsupportedApiVersion = ErrorMessage{ - Name: "unsupported_api_version", - en: "unsupported api version [%s]", - zhCN: "不支持的API版本 [%s]", - } - ErrorCannotDeleteDefaultCategory = ErrorMessage{ - Name: "cannot_delete_default_category", - en: "cannot delete default category", - zhCN: "无法删除默认的分类", - } - ErrorAttachKeyPairsFailed = ErrorMessage{ - Name: "attach_key_pairs_failed", - en: "attach key pairs failed", - zhCN: "绑定key pair失败", - } - ErrorDetachKeyPairsFailed = ErrorMessage{ - Name: "detach_key_pairs_failed", - en: "detach key pairs failed", - zhCN: "解除key pair失败", - } - ErrorAppVersionIncorrectStatus = ErrorMessage{ - Name: "app_version_incorrect_status", - en: "app version [%s] has incorrect status [%s], cannot execute the current action", - zhCN: "应用版本[%s]状态为[%s], 无法执行此操作", - } - ErrorAppVersionInReview = ErrorMessage{ - Name: "app_version_in_review", - en: "app version is under review, app cannot be modified", - zhCN: "应用版本审核中, 应用无法修改", - } - ErrorLoadPackageFailed = ErrorMessage{ - Name: "load_package_failed", - en: "load package failed, reason: [%s]", - zhCN: "载入配置包失败, 原因: [%s]", - } - ErrorCannotChangeAppName = ErrorMessage{ - Name: "cannot_change_app_name", - en: "cannot change app name", - zhCN: "无法修改应用名称", - } - ErrorAppNameExists = ErrorMessage{ - Name: "app_name_exists", - en: "app name [%s] exists", - zhCN: "应用名称[%s]已存在", - } - ErrorAppVersionExists = ErrorMessage{ - Name: "app_version_exists", - en: "app version [%s:%s] exists", - zhCN: "应用版本[%s:%s]已存在", - } - ErrorCompanyNameExists = ErrorMessage{ - Name: "company_name_exists", - en: "company name [%s] exists", - zhCN: "公司名称[%s]已存在", - } - ErrorCannotAccessRepo = ErrorMessage{ - Name: "cannot_access_repo", - en: "cannot access repo", - zhCN: "仓库无法访问", - } - ErrorCannotWriteRepo = ErrorMessage{ - Name: "cannot_write_repo", - en: "cannot write repo [%s]", - zhCN: "仓库[%s]无法写入", - } - ErrorCannotDeleteInternalRepo = ErrorMessage{ - Name: "cannot_delete_internal_repo", - en: "cannot delete internal repo [%s]", - zhCN: "无法删除内置仓库[%s]", - } - ErrorResourceAccessDenied = ErrorMessage{ - Name: "error_resource_access_denied", - en: "access denied for resource [%s]", - zhCN: "拒绝访问资源[%s]", - } - ErrorExistsNoDeleteVersions = ErrorMessage{ - Name: "exists_no_delete_versions", - en: "app [%s] had some versions not deleted", - zhCN: "应用[%s]还有未删除的版本", - } - ErrorTillerNotServe = ErrorMessage{ - Name: "tiller_not_serve", - en: "tiller not serve in namespace [%s]", - zhCN: "tiller 在命名空间[%s]下未正常服务", - } - ErrorNamespaceUnavailable = ErrorMessage{ - Name: "namespace_unavailable", - en: "namespace [%s] unavailable", - zhCN: "命名空间[%s]不可用", - } - ErrorNamespaceNotMatchWithRegex = ErrorMessage{ - Name: "namespace_not_match_with_regex", - en: "namespace [%s] not match with regex [%s]", - zhCN: "命名空间[%s]命名不合法, 需要满足[%s]", - } - ErrorCredentialIllegal = ErrorMessage{ - Name: "credential_illegal", - en: "credential [%s] illegal", - zhCN: "credential [%s]不合法", - } - ErrorNamespaceExists = ErrorMessage{ - Name: "namespace exists", - en: "namespace [%s] exists", - zhCN: "命名空间[%s]已存在", - } - ErrorPackageParseFailed = ErrorMessage{ - Name: "package_parse_failed", - en: "package parse failed", - zhCN: "配置包解析失败", - } - ErrorAppNameConflictWithPackage = ErrorMessage{ - Name: "app_name_conflict_with_package", - en: "app name conflict with package", - zhCN: "应用名称与配置包内信息冲突", - } - ErrorImageDecodeFailed = ErrorMessage{ - Name: "image_decode_failed", - en: "image decode failed", - zhCN: "图片解码失败", - } - ErrorIllegalEmailFormat = ErrorMessage{ - Name: "illegal_email_format", - en: "illegal Email format [%s]", - zhCN: "非法的Email格式[%s]", - } - ErrorIllegalPhoneNumFormat = ErrorMessage{ - Name: "illegal_phone_num_format", - en: "illegal phone number format [%s]", - zhCN: "非法的电话号码格式[%s]", - } - ErrorIllegalBankAccountNumberFormat = ErrorMessage{ - Name: "illegal_bankAccountNumber_format", - en: "illegal BankAccountNumber format [%s]", - zhCN: "非法的银行账号格式[%s]", - } - ErrorGroupHadMembers = ErrorMessage{ - Name: "group_had_members", - en: "group had members", - zhCN: "组内还有成员", - } - ErrorSetNotificationConfig = ErrorMessage{ - Name: "error_set_notification_config", - en: "set notification config failed", - zhCN: "设置通知服务配置失败", - } - ErrorSetServiceConfig = ErrorMessage{ - Name: "error_set_service_config", - en: "set service config failed", - zhCN: "设置服务配置失败", - } - ErrorGetNotificationConfig = ErrorMessage{ - Name: "error_get_notification_config", - en: "get notification config failed", - zhCN: "查看通知服务配置失败", - } - ErrorCannotDeleteUsers = ErrorMessage{ - Name: "error_cannot_delete_users", - en: "cannot delete users", - zhCN: "无法删除用户", - } - ErrorCannotDeleteGroups = ErrorMessage{ - Name: "error_cannot_delete_groups", - en: "cannot delete groups", - zhCN: "无法删除用户组", - } - ErrorGroupNotFound = ErrorMessage{ - Name: "error_group_not_found", - en: "group [%s] not found", - zhCN: "没有找到用户组[%s]", - } - ErrorGroupAccessDenied = ErrorMessage{ - Name: "error_group_access_denied", - en: "access denied for group [%s]", - zhCN: "拒绝访问用户组[%s]", - } - ErrorUserNotFound = ErrorMessage{ - Name: "error_user_not_found", - en: "user [%s] not found", - zhCN: "没有找到用户[%s]", - } - ErrorUserAccessDenied = ErrorMessage{ - Name: "error_user_access_denied", - en: "access denied for user [%s]", - zhCN: "拒绝访问用户[%s]", - } - ErrorCannotJoinGroup = ErrorMessage{ - Name: "error_cannot_join_group", - en: "cannot join group", - zhCN: "无法加入用户组", - } - ErrorCannotLeaveGroup = ErrorMessage{ - Name: "error_cannot_leave_group", - en: "cannot leave group", - zhCN: "无法离开用户组", - } - ErrorCannotCreateUserWithRole = ErrorMessage{ - Name: "error_cannot_create_user_with_role", - en: "cannot create user with role [%s]", - zhCN: "无法创建[%s]角色的用户", - } - ErrorValidateEmailService = ErrorMessage{ - Name: "error_validate_email_service", - en: "validate email service failed", - zhCN: "验证邮件服务配置失败", - } -) diff --git a/vendor/openpitrix.io/openpitrix/pkg/logger/logger.go b/vendor/openpitrix.io/openpitrix/pkg/logger/logger.go deleted file mode 100644 index 06b742af0..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/logger/logger.go +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright 2018 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package logger - -import ( - "context" - "fmt" - "io" - "os" - "runtime" - "strings" - "sync/atomic" - "time" - - "openpitrix.io/openpitrix/pkg/util/ctxutil" -) - -type Level uint32 - -const ( - CriticalLevel Level = iota - ErrorLevel - WarnLevel - InfoLevel - DebugLevel -) - -func (level Level) String() string { - switch level { - case DebugLevel: - return "debug" - case InfoLevel: - return "info" - case WarnLevel: - return "warning" - case ErrorLevel: - return "error" - case CriticalLevel: - return "critical" - } - - return "unknown" -} - -func StringToLevel(level string) Level { - switch level { - case "critical": - return CriticalLevel - case "error": - return ErrorLevel - case "warn", "warning": - return WarnLevel - case "debug": - return DebugLevel - case "info": - return InfoLevel - } - return InfoLevel -} - -var logger = NewLogger().WithDepth(4) - -func Info(ctx context.Context, format string, v ...interface{}) { - logger.Info(ctx, format, v...) -} - -func Debug(ctx context.Context, format string, v ...interface{}) { - logger.Debug(ctx, format, v...) -} - -func Warn(ctx context.Context, format string, v ...interface{}) { - logger.Warn(ctx, format, v...) -} - -func Error(ctx context.Context, format string, v ...interface{}) { - logger.Error(ctx, format, v...) -} - -func Critical(ctx context.Context, format string, v ...interface{}) { - logger.Critical(ctx, format, v...) -} - -func SetOutput(output io.Writer) { - logger.SetOutput(output) -} - -var globalLogLevel = InfoLevel - -func SetLevelByString(level string) { - logger.SetLevelByString(level) - globalLogLevel = StringToLevel(level) -} - -func NewLogger() *Logger { - return &Logger{ - Level: globalLogLevel, - output: os.Stdout, - depth: 3, - } -} - -type Logger struct { - Level Level - output io.Writer - hideCallstack bool - depth int -} - -func (logger *Logger) level() Level { - return Level(atomic.LoadUint32((*uint32)(&logger.Level))) -} - -func (logger *Logger) SetLevel(level Level) { - atomic.StoreUint32((*uint32)(&logger.Level), uint32(level)) -} - -func (logger *Logger) SetLevelByString(level string) { - logger.SetLevel(StringToLevel(level)) -} - -var replacer = strings.NewReplacer("\r", "\\r", "\n", "\\n") - -func (logger *Logger) formatOutput(ctx context.Context, level Level, output string) string { - now := time.Now().Format("2006-01-02 15:04:05.99999") - messageId := ctxutil.GetMessageId(ctx) - requestId := ctxutil.GetRequestId(ctx) - - output = replacer.Replace(output) - - var suffix string - if len(requestId) > 0 { - messageId = append(messageId, requestId) - } - if len(messageId) > 0 { - suffix = fmt.Sprintf("(%s)", strings.Join(messageId, "|")) - } - if logger.hideCallstack { - return fmt.Sprintf("%-25s -%s- %s%s", - now, strings.ToUpper(level.String()), output, suffix) - } else { - _, file, line, ok := runtime.Caller(logger.depth) - if !ok { - file = "???" - line = 0 - } - // short file name - for i := len(file) - 1; i > 0; i-- { - if file[i] == '/' { - file = file[i+1:] - break - } - } - // 2018-03-27 02:08:44.93894 -INFO- Api service start http://openpitrix-api-gateway:9100 (main.go:44) - return fmt.Sprintf("%-25s -%s- %s (%s:%d)%s", - now, strings.ToUpper(level.String()), output, file, line, suffix) - } -} - -func (logger *Logger) logf(ctx context.Context, level Level, format string, args ...interface{}) { - if logger.level() < level { - return - } - fmt.Fprintln(logger.output, logger.formatOutput(ctx, level, fmt.Sprintf(format, args...))) -} - -func (logger *Logger) Debug(ctx context.Context, format string, args ...interface{}) { - logger.logf(ctx, DebugLevel, format, args...) -} - -func (logger *Logger) Info(ctx context.Context, format string, args ...interface{}) { - logger.logf(ctx, InfoLevel, format, args...) -} - -func (logger *Logger) Warn(ctx context.Context, format string, args ...interface{}) { - logger.logf(ctx, WarnLevel, format, args...) -} - -func (logger *Logger) Error(ctx context.Context, format string, args ...interface{}) { - logger.logf(ctx, ErrorLevel, format, args...) -} - -func (logger *Logger) Critical(ctx context.Context, format string, args ...interface{}) { - logger.logf(ctx, CriticalLevel, format, args...) -} - -func (logger *Logger) SetOutput(output io.Writer) *Logger { - logger.output = output - return logger -} - -func (logger *Logger) HideCallstack() *Logger { - logger.hideCallstack = true - return logger -} - -func (logger *Logger) WithDepth(depth int) *Logger { - logger.depth = depth - return logger -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/manager/checker.go b/vendor/openpitrix.io/openpitrix/pkg/manager/checker.go deleted file mode 100644 index aca71b65c..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/manager/checker.go +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright 2018 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package manager - -import ( - "context" - - "github.com/fatih/structs" - "github.com/golang/protobuf/ptypes/wrappers" - - "openpitrix.io/openpitrix/pkg/gerr" - "openpitrix.io/openpitrix/pkg/util/stringutil" -) - -type checker struct { - ctx context.Context - req Request - required []string - stringChosen map[string][]string -} - -func NewChecker(ctx context.Context, req Request) *checker { - return &checker{ - ctx: ctx, - req: req, - required: []string{}, - stringChosen: make(map[string][]string), - } -} - -func (c *checker) Required(params ...string) *checker { - c.required = append(c.required, params...) - return c -} - -func (c *checker) checkRequired(param string, value interface{}) error { - if len(c.required) > 0 && stringutil.StringIn(param, c.required) { - switch v := value.(type) { - case string: - if v == "" { - return gerr.New(c.ctx, gerr.InvalidArgument, gerr.ErrorMissingParameter, param) - } - case *wrappers.StringValue: - if v == nil || v.GetValue() == "" { - return gerr.New(c.ctx, gerr.InvalidArgument, gerr.ErrorMissingParameter, param) - } - case *wrappers.BytesValue: - if v == nil || len(v.GetValue()) == 0 { - return gerr.New(c.ctx, gerr.InvalidArgument, gerr.ErrorMissingParameter, param) - } - case []byte: - if len(v) == 0 { - return gerr.New(c.ctx, gerr.InvalidArgument, gerr.ErrorMissingParameter, param) - } - case []string: - var values []string - for _, v := range v { - if v != "" { - values = append(values, v) - } - } - if len(values) == 0 { - return gerr.New(c.ctx, gerr.InvalidArgument, gerr.ErrorMissingParameter, param) - } - } - } - return nil -} - -func (c *checker) StringChosen(param string, chosen []string) *checker { - if exist, ok := c.stringChosen[param]; ok { - c.stringChosen[param] = append(exist, chosen...) - } else { - c.stringChosen[param] = chosen - } - return c -} - -func (c *checker) checkStringChosen(param string, value interface{}) error { - if len(c.stringChosen) > 0 { - if chosen, ok := c.stringChosen[param]; ok { - switch v := value.(type) { - case string: - if !stringutil.StringIn(v, chosen) { - return gerr.New(c.ctx, gerr.InvalidArgument, gerr.ErrorUnsupportedParameterValue, param, v) - } - case *wrappers.StringValue: - if v != nil { - if !stringutil.StringIn(v.GetValue(), chosen) { - return gerr.New(c.ctx, gerr.InvalidArgument, gerr.ErrorUnsupportedParameterValue, param, v.GetValue()) - } - } - case []string: - for _, s := range v { - if !stringutil.StringIn(s, chosen) { - return gerr.New(c.ctx, gerr.InvalidArgument, gerr.ErrorUnsupportedParameterValue, param, s) - } - } - } - } - } - return nil -} - -func (c *checker) chainChecker(param string, value interface{}, checks ...func(string, interface{}) error) error { - var err error - for _, c := range checks { - err = c(param, value) - if err != nil { - return err - } - } - return nil -} - -func (c *checker) Exec() error { - for _, field := range structs.Fields(c.req) { - param := getFieldName(field) - value := field.Value() - - err := c.chainChecker(param, value, - c.checkRequired, - c.checkStringChosen, - ) - if err != nil { - return err - } - } - return nil -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/manager/common.go b/vendor/openpitrix.io/openpitrix/pkg/manager/common.go deleted file mode 100644 index 4d9f39df6..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/manager/common.go +++ /dev/null @@ -1,273 +0,0 @@ -// Copyright 2018 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package manager - -import ( - "context" - "fmt" - "reflect" - "strings" - "time" - - "github.com/fatih/structs" - "github.com/gocraft/dbr" - "github.com/golang/protobuf/ptypes/timestamp" - "github.com/golang/protobuf/ptypes/wrappers" - - "openpitrix.io/openpitrix/pkg/constants" - "openpitrix.io/openpitrix/pkg/db" - "openpitrix.io/openpitrix/pkg/logger" - "openpitrix.io/openpitrix/pkg/util/ctxutil" - "openpitrix.io/openpitrix/pkg/util/pbutil" - "openpitrix.io/openpitrix/pkg/util/reflectutil" - "openpitrix.io/openpitrix/pkg/util/stringutil" -) - -type Request interface { - Reset() - String() string - ProtoMessage() - Descriptor() ([]byte, []int) -} -type RequestWithSortKey interface { - Request - GetSortKey() *wrappers.StringValue -} -type RequestWithReverse interface { - RequestWithSortKey - GetReverse() *wrappers.BoolValue -} -type RequestWithOwner interface { - Request - GetOwner() []string -} - -const ( - TagName = "json" - SearchWordColumnName = "search_word" -) - -func getSearchFilter(tableName string, value interface{}, exclude ...string) dbr.Builder { - if v, ok := value.(string); ok { - var ops []dbr.Builder - for _, column := range constants.SearchColumns[tableName] { - if stringutil.StringIn(column, exclude) { - continue - } - // if column suffix is _id, must exact match - if strings.HasSuffix(column, "_id") { - ops = append(ops, db.Eq(column, v)) - } else { - ops = append(ops, db.Like(column, v)) - } - } - if len(ops) == 0 { - return nil - } - return db.Or(ops...) - } else if value != nil { - logger.Warn(nil, "search_word [%+v] is not string", value) - } - return nil -} - -func getReqValue(param interface{}) interface{} { - switch value := param.(type) { - case string: - if value == "" { - return nil - } - return value - case *wrappers.StringValue: - if value == nil { - return nil - } - return value.GetValue() - case *wrappers.Int32Value: - if value == nil { - return nil - } - return value.GetValue() - case []string: - var values []string - for _, v := range value { - if v != "" { - values = append(values, v) - } - } - if len(values) == 0 { - return nil - } - return values - } - return nil -} - -func BuildFilterConditions(req Request, tableName string, exclude ...string) dbr.Builder { - return buildFilterConditions(false, req, tableName, exclude...) -} - -func GetDisplayColumns(displayColumns []string, wholeColumns []string) []string { - if displayColumns == nil { - return wholeColumns - } else if len(displayColumns) == 0 { - return nil - } else { - var newDisplayColumns []string - for _, column := range displayColumns { - if stringutil.StringIn(column, wholeColumns) { - newDisplayColumns = append(newDisplayColumns, column) - } - } - return newDisplayColumns - } -} - -func BuildFilterConditionsWithPrefix(req Request, tableName string, exclude ...string) dbr.Builder { - return buildFilterConditions(true, req, tableName, exclude...) -} - -func getFieldName(field *structs.Field) string { - tag := field.Tag(TagName) - t := strings.Split(tag, ",") - if len(t) == 0 { - return "-" - } - return t[0] -} - -func buildFilterConditions(withPrefix bool, req Request, tableName string, exclude ...string) dbr.Builder { - var conditions []dbr.Builder - for _, field := range structs.Fields(req) { - column := getFieldName(field) - param := field.Value() - indexedColumns, ok := constants.IndexedColumns[tableName] - if ok && stringutil.StringIn(column, indexedColumns) { - value := getReqValue(param) - if value != nil { - key := column - if withPrefix { - key = tableName + "." + key - } - conditions = append(conditions, db.Eq(key, value)) - } - } - // TODO: search column - if column == SearchWordColumnName && stringutil.StringIn(tableName, constants.SearchWordColumnTable) { - value := getReqValue(param) - condition := getSearchFilter(tableName, value, exclude...) - if condition != nil { - conditions = append(conditions, condition) - } - } - } - if len(conditions) == 0 { - return nil - } - return db.And(conditions...) -} - -func BuildUpdateAttributes(req Request, columns ...string) map[string]interface{} { - attributes := make(map[string]interface{}) - for _, field := range structs.Fields(req) { - column := getFieldName(field) - f := field.Value() - v := reflect.ValueOf(f) - if !stringutil.StringIn(column, columns) { - continue - } - if !reflectutil.ValueIsNil(v) { - switch v := f.(type) { - case *wrappers.StringValue: - attributes[column] = v.GetValue() - case *wrappers.BoolValue: - attributes[column] = v.GetValue() - case *wrappers.Int32Value: - attributes[column] = v.GetValue() - case *wrappers.UInt32Value: - attributes[column] = v.GetValue() - case *timestamp.Timestamp: - attributes[column] = pbutil.GetTime(v) - case string, bool, int32, uint32, time.Time: - attributes[column] = v - - default: - attributes[column] = v - } - } - } - return attributes -} - -func AddQueryOrderDirWithPrefix(query *db.SelectQuery, req Request, defaultColumn, tableName string) *db.SelectQuery { - return addQueryOrderDir(query, req, defaultColumn, tableName) -} - -func AddQueryOrderDir(query *db.SelectQuery, req Request, defaultColumn string) *db.SelectQuery { - return addQueryOrderDir(query, req, defaultColumn, "") -} - -func addQueryOrderDir(query *db.SelectQuery, req Request, defaultColumn string, tableName string) *db.SelectQuery { - isAsc := false - if r, ok := req.(RequestWithReverse); ok { - reverse := r.GetReverse() - if reverse != nil { - isAsc = !reverse.GetValue() - } - } - if r, ok := req.(RequestWithSortKey); ok { - s := r.GetSortKey() - if s != nil { - defaultColumn = s.GetValue() - } - } - if !stringutil.StringIn(defaultColumn, constants.Fields) { - defaultColumn = constants.ColumnCreateTime - } - if len(tableName) > 0 { - defaultColumn = tableName + "." + defaultColumn - } - query = query.OrderDir(defaultColumn, isAsc) - return query -} - -func AddQueryJoinWithMap(query *db.SelectQuery, table, joinTable, primaryKey, keyField, valueField string, filterMap map[string][]string) *db.SelectQuery { - var whereCondition []dbr.Builder - for key, values := range filterMap { - aliasTableName := fmt.Sprintf("table_label_%d", query.JoinCount) - onCondition := fmt.Sprintf("%s.%s = %s.%s", aliasTableName, primaryKey, table, primaryKey) - query = query.Join(dbr.I(joinTable).As(aliasTableName), onCondition) - whereCondition = append(whereCondition, db.And(db.Eq(aliasTableName+"."+keyField, key), db.Eq(aliasTableName+"."+valueField, values))) - query.JoinCount++ - } - if len(whereCondition) > 0 { - query = query.Where(db.And(whereCondition...)) - } - return query -} - -func BuildPermissionFilter(ctx context.Context) dbr.Builder { - s := ctxutil.GetSender(ctx) - if s == nil { - return nil - } - ops := []dbr.Builder{ - db.Prefix(constants.ColumnOwnerPath, string(s.GetAccessPath())), - db.Eq(constants.ColumnOwner, s.UserId), - } - return db.Or(ops...) -} - -func BuildPermissionFilterWithPrefix(ctx context.Context, prefix string) dbr.Builder { - s := ctxutil.GetSender(ctx) - if s == nil { - return nil - } - ops := []dbr.Builder{ - db.Prefix(prefix+"."+constants.ColumnOwnerPath, string(s.GetAccessPath())), - db.Eq(prefix+"."+constants.ColumnOwner, s.UserId), - } - return db.Or(ops...) -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/manager/grpc_client.go b/vendor/openpitrix.io/openpitrix/pkg/manager/grpc_client.go deleted file mode 100644 index 5b4a50f10..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/manager/grpc_client.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2018 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package manager - -import ( - "context" - "crypto/tls" - "fmt" - "sync" - "time" - - "google.golang.org/grpc" - "google.golang.org/grpc/credentials" - "google.golang.org/grpc/keepalive" -) - -var ClientOptions = []grpc.DialOption{ - grpc.WithInsecure(), - grpc.WithKeepaliveParams(keepalive.ClientParameters{ - Time: 30 * time.Second, - Timeout: 10 * time.Second, - PermitWithoutStream: true, - }), -} - -var clientCache sync.Map - -func NewClient(host string, port int) (*grpc.ClientConn, error) { - endpoint := fmt.Sprintf("%s:%d", host, port) - if conn, ok := clientCache.Load(endpoint); ok { - return conn.(*grpc.ClientConn), nil - } - ctx := context.Background() - conn, err := grpc.DialContext(ctx, endpoint, ClientOptions...) - if err != nil { - return nil, err - } - //clientCache.Store(endpoint, conn) - return conn, nil -} - -func NewTLSClient(host string, port int, tlsConfig *tls.Config) (*grpc.ClientConn, error) { - endpoint := fmt.Sprintf("%s:%d", host, port) - if conn, ok := clientCache.Load(endpoint); ok { - return conn.(*grpc.ClientConn), nil - } - creds := credentials.NewTLS(tlsConfig) - tlsClientOptions := []grpc.DialOption{ - grpc.WithTransportCredentials(creds), - grpc.WithKeepaliveParams(keepalive.ClientParameters{ - Time: 30 * time.Second, - Timeout: 10 * time.Second, - PermitWithoutStream: true, - }), - } - conn, err := grpc.Dial(endpoint, tlsClientOptions...) - if err != nil { - return nil, err - } - clientCache.Store(endpoint, conn) - return conn, nil -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/manager/grpc_server.go b/vendor/openpitrix.io/openpitrix/pkg/manager/grpc_server.go deleted file mode 100644 index 7b6b44a57..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/manager/grpc_server.go +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright 2018 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package manager - -import ( - "context" - "fmt" - "net" - "runtime/debug" - "strings" - "time" - - "github.com/golang/protobuf/jsonpb" - "github.com/golang/protobuf/proto" - grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" - grpc_recovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery" - grpc_validator "github.com/grpc-ecosystem/go-grpc-middleware/validator" - "github.com/pkg/errors" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/keepalive" - "google.golang.org/grpc/reflection" - "google.golang.org/grpc/status" - - "openpitrix.io/openpitrix/pkg/config" - "openpitrix.io/openpitrix/pkg/db" - "openpitrix.io/openpitrix/pkg/gerr" - "openpitrix.io/openpitrix/pkg/logger" - "openpitrix.io/openpitrix/pkg/util/ctxutil" - "openpitrix.io/openpitrix/pkg/version" -) - -type checkerT func(ctx context.Context, req interface{}) error -type builderT func(ctx context.Context, req interface{}) interface{} - -var ( - defaultChecker checkerT - defaultBuilder builderT -) - -type GrpcServer struct { - ServiceName string - Port int - showErrorCause bool - checker checkerT - builder builderT - mysqlConfig config.MysqlConfig -} - -type RegisterCallback func(*grpc.Server) - -func NewGrpcServer(serviceName string, port int) *GrpcServer { - return &GrpcServer{ - ServiceName: serviceName, - Port: port, - showErrorCause: false, - checker: defaultChecker, - builder: defaultBuilder, - } -} - -func (g *GrpcServer) ShowErrorCause(b bool) *GrpcServer { - g.showErrorCause = b - return g -} - -func (g *GrpcServer) WithChecker(c checkerT) *GrpcServer { - g.checker = c - return g -} - -func (g *GrpcServer) WithBuilder(b builderT) *GrpcServer { - g.builder = b - return g -} - -func (g *GrpcServer) WithMysqlConfig(cfg config.MysqlConfig) *GrpcServer { - g.mysqlConfig = cfg - return g -} - -func (g *GrpcServer) Serve(callback RegisterCallback, opt ...grpc.ServerOption) { - version.PrintVersionInfo(func(s string, i ...interface{}) { - logger.Info(nil, s, i) - }) - logger.Info(nil, "Service [%s] start listen at port [%d]", g.ServiceName, g.Port) - lis, err := net.Listen("tcp", fmt.Sprintf(":%d", g.Port)) - if err != nil { - err = errors.WithStack(err) - logger.Critical(nil, "failed to listen: %+v", err) - } - - builtinOptions := []grpc.ServerOption{ - grpc.KeepaliveEnforcementPolicy(keepalive.EnforcementPolicy{ - MinTime: 10 * time.Second, - PermitWithoutStream: true, - }), - grpc_middleware.WithUnaryServerChain( - grpc_validator.UnaryServerInterceptor(), - g.unaryServerLogInterceptor(), - func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) { - ctx = db.NewContext(ctx, g.mysqlConfig) - - if g.checker != nil { - err = g.checker(ctx, req) - if err != nil { - return - } - } - - return handler(ctx, req) - }, - func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) { - if g.builder != nil { - req = g.builder(ctx, req) - } - return handler(ctx, req) - }, - grpc_recovery.UnaryServerInterceptor( - grpc_recovery.WithRecoveryHandler(func(p interface{}) error { - logger.Critical(nil, "GRPC server recovery with error: %+v", p) - logger.Critical(nil, string(debug.Stack())) - if e, ok := p.(error); ok { - return gerr.NewWithDetail(nil, gerr.Internal, e, gerr.ErrorInternalError) - } - return gerr.New(nil, gerr.Internal, gerr.ErrorInternalError) - }), - ), - ), - grpc_middleware.WithStreamServerChain( - grpc_recovery.StreamServerInterceptor( - grpc_recovery.WithRecoveryHandler(func(p interface{}) error { - logger.Critical(nil, "GRPC server recovery with error: %+v", p) - logger.Critical(nil, string(debug.Stack())) - if e, ok := p.(error); ok { - return gerr.NewWithDetail(nil, gerr.Internal, e, gerr.ErrorInternalError) - } - return gerr.New(nil, gerr.Internal, gerr.ErrorInternalError) - }), - ), - ), - } - - grpcServer := grpc.NewServer(append(opt, builtinOptions...)...) - reflection.Register(grpcServer) - callback(grpcServer) - - if err = grpcServer.Serve(lis); err != nil { - err = errors.WithStack(err) - logger.Critical(nil, "%+v", err) - } -} - -var ( - jsonPbMarshaller = &jsonpb.Marshaler{ - OrigName: true, - } -) - -func (g *GrpcServer) unaryServerLogInterceptor() grpc.UnaryServerInterceptor { - showErrorCause := g.showErrorCause - - return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { - var err error - s := ctxutil.GetSender(ctx) - requestId := ctxutil.GetRequestId(ctx) - ctx = ctxutil.SetRequestId(ctx, requestId) - ctx = ctxutil.ContextWithSender(ctx, s) - locale := ctxutil.GetLocale(ctx) - ctx = ctxutil.SetLocale(ctx, locale) - - method := strings.Split(info.FullMethod, "/") - action := method[len(method)-1] - if p, ok := req.(proto.Message); ok { - if content, err := jsonPbMarshaller.MarshalToString(p); err != nil { - logger.Error(ctx, "Failed to marshal proto message to string [%s] [%+v] [%+v]", action, s, err) - } else { - logger.Info(ctx, "Request received [%s] [%+v] [%s]", action, s, content) - } - } - start := time.Now() - - resp, err := handler(ctx, req) - - elapsed := time.Since(start) - logger.Info(ctx, "Handled request [%s] [%+v] exec_time is [%s]", action, s, elapsed) - if e, ok := status.FromError(err); ok { - if e.Code() != codes.OK { - logger.Debug(ctx, "Response is error: %s, %s", e.Code().String(), e.Message()) - if !showErrorCause { - err = gerr.ClearErrorCause(err) - } - } - } - return resp, err - } -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/0.pb.go b/vendor/openpitrix.io/openpitrix/pkg/pb/0.pb.go deleted file mode 100644 index 36f2e000e..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/0.pb.go +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: 0.proto - -package pb - -import ( - fmt "fmt" - math "math" - - proto "github.com/golang/protobuf/proto" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -func init() { proto.RegisterFile("0.proto", fileDescriptor_b5d39afb3b422e60) } - -var fileDescriptor_b5d39afb3b422e60 = []byte{ - // 312 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xcd, 0x4a, 0x33, 0x31, - 0x14, 0x86, 0xbf, 0x09, 0x7c, 0x3f, 0x04, 0x3e, 0x29, 0x03, 0x6e, 0xba, 0x3a, 0xb8, 0x29, 0x68, - 0x3b, 0xd3, 0x56, 0x10, 0xe9, 0xae, 0x05, 0xdb, 0x8a, 0x48, 0x8b, 0x3f, 0x08, 0xdd, 0x25, 0x33, - 0xc7, 0x4e, 0xea, 0x34, 0x27, 0x24, 0x99, 0xb6, 0xf6, 0x06, 0xdc, 0xbb, 0xf7, 0x0e, 0x04, 0x77, - 0x2e, 0xbd, 0x36, 0x71, 0x2a, 0x48, 0xd1, 0x5d, 0xf2, 0x70, 0x9e, 0xf3, 0xbe, 0x1c, 0xfe, 0xb7, - 0x19, 0x19, 0x4b, 0x9e, 0x42, 0x4e, 0x06, 0xb5, 0x51, 0xde, 0xaa, 0x55, 0xb5, 0x5e, 0xa2, 0xa4, - 0x31, 0x45, 0xdd, 0x70, 0x4b, 0x31, 0x9d, 0xa2, 0x8d, 0xc9, 0x78, 0x45, 0xda, 0xc5, 0x42, 0x6b, - 0xf2, 0xa2, 0x7c, 0x6f, 0xcc, 0xde, 0x1b, 0x7b, 0xec, 0xbe, 0xb2, 0x70, 0xc8, 0xc3, 0x91, 0x41, - 0x3d, 0x2e, 0x57, 0xc0, 0xd8, 0xd2, 0x0c, 0x13, 0xbf, 0x77, 0xf0, 0x13, 0x0d, 0x77, 0x33, 0xef, - 0x8d, 0xeb, 0xc4, 0xf1, 0x57, 0x68, 0xa4, 0xa8, 0xfd, 0xbb, 0x19, 0x35, 0xa3, 0xd6, 0x3e, 0x0b, - 0x58, 0xbb, 0x22, 0x8c, 0xc9, 0x55, 0x52, 0x06, 0xc5, 0x33, 0x47, 0xba, 0xf3, 0x8d, 0x4c, 0x5e, - 0x02, 0xfe, 0x1c, 0x70, 0xde, 0x43, 0x61, 0xd1, 0x76, 0x0b, 0x9f, 0x85, 0x4f, 0xc1, 0x3f, 0x16, - 0x3e, 0x04, 0x57, 0x19, 0xc2, 0xc7, 0x9f, 0xac, 0x5a, 0x97, 0xf3, 0x90, 0xa1, 0x48, 0xd1, 0xc2, - 0xbc, 0x70, 0x1e, 0x24, 0x82, 0x43, 0x0f, 0x9e, 0x60, 0x63, 0xc2, 0x2d, 0xe5, 0x39, 0x2d, 0x31, - 0x05, 0x79, 0x0f, 0x02, 0x9c, 0x11, 0x09, 0x82, 0xd0, 0x29, 0x08, 0xf0, 0x74, 0x87, 0x3a, 0x82, - 0x3e, 0x59, 0xc0, 0x95, 0x98, 0x9b, 0x1c, 0xeb, 0x50, 0xfb, 0xb4, 0x16, 0xc3, 0x6b, 0x21, 0x55, - 0xef, 0xe4, 0xf4, 0x4c, 0x1d, 0xeb, 0xd6, 0x45, 0xba, 0xb8, 0x19, 0xcd, 0x06, 0xfd, 0x22, 0x1f, - 0x5c, 0x9e, 0x1f, 0xad, 0x0b, 0x2d, 0x6b, 0x51, 0xf5, 0xff, 0x76, 0x09, 0x26, 0x2b, 0x7c, 0x67, - 0xab, 0xef, 0xaf, 0x09, 0x33, 0x52, 0xfe, 0x29, 0xef, 0x78, 0xf8, 0x1e, 0x00, 0x00, 0xff, 0xff, - 0x7e, 0x40, 0x21, 0xbf, 0x8c, 0x01, 0x00, 0x00, -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/account.pb.go b/vendor/openpitrix.io/openpitrix/pkg/pb/account.pb.go deleted file mode 100644 index 3c7779a49..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/account.pb.go +++ /dev/null @@ -1,5269 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: account.proto - -package pb - -import ( - context "context" - fmt "fmt" - math "math" - - proto "github.com/golang/protobuf/proto" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type User struct { - // user id, user belong to different group and role, has different permissions - UserId *wrappers.StringValue `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - // user name - Username *wrappers.StringValue `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` - // user email - Email *wrappers.StringValue `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` - // user phone number - PhoneNumber *wrappers.StringValue `protobuf:"bytes,4,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` - // user description - Description *wrappers.StringValue `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - // user status eg.[active|deleted] - Status *wrappers.StringValue `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"` - // the time when user create - CreateTime *timestamp.Timestamp `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // the time when user update - UpdateTime *timestamp.Timestamp `protobuf:"bytes,8,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` - // record changed time of status - StatusTime *timestamp.Timestamp `protobuf:"bytes,9,opt,name=status_time,json=statusTime,proto3" json:"status_time,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *User) Reset() { *m = User{} } -func (m *User) String() string { return proto.CompactTextString(m) } -func (*User) ProtoMessage() {} -func (*User) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{0} -} - -func (m *User) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_User.Unmarshal(m, b) -} -func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_User.Marshal(b, m, deterministic) -} -func (m *User) XXX_Merge(src proto.Message) { - xxx_messageInfo_User.Merge(m, src) -} -func (m *User) XXX_Size() int { - return xxx_messageInfo_User.Size(m) -} -func (m *User) XXX_DiscardUnknown() { - xxx_messageInfo_User.DiscardUnknown(m) -} - -var xxx_messageInfo_User proto.InternalMessageInfo - -func (m *User) GetUserId() *wrappers.StringValue { - if m != nil { - return m.UserId - } - return nil -} - -func (m *User) GetUsername() *wrappers.StringValue { - if m != nil { - return m.Username - } - return nil -} - -func (m *User) GetEmail() *wrappers.StringValue { - if m != nil { - return m.Email - } - return nil -} - -func (m *User) GetPhoneNumber() *wrappers.StringValue { - if m != nil { - return m.PhoneNumber - } - return nil -} - -func (m *User) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *User) GetStatus() *wrappers.StringValue { - if m != nil { - return m.Status - } - return nil -} - -func (m *User) GetCreateTime() *timestamp.Timestamp { - if m != nil { - return m.CreateTime - } - return nil -} - -func (m *User) GetUpdateTime() *timestamp.Timestamp { - if m != nil { - return m.UpdateTime - } - return nil -} - -func (m *User) GetStatusTime() *timestamp.Timestamp { - if m != nil { - return m.StatusTime - } - return nil -} - -type UserDetail struct { - // user info - User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` - // list of user's role - RoleSet []*Role `protobuf:"bytes,2,rep,name=role_set,json=roleSet,proto3" json:"role_set,omitempty"` - // list of user's group - GroupSet []*Group `protobuf:"bytes,3,rep,name=group_set,json=groupSet,proto3" json:"group_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UserDetail) Reset() { *m = UserDetail{} } -func (m *UserDetail) String() string { return proto.CompactTextString(m) } -func (*UserDetail) ProtoMessage() {} -func (*UserDetail) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{1} -} - -func (m *UserDetail) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UserDetail.Unmarshal(m, b) -} -func (m *UserDetail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UserDetail.Marshal(b, m, deterministic) -} -func (m *UserDetail) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserDetail.Merge(m, src) -} -func (m *UserDetail) XXX_Size() int { - return xxx_messageInfo_UserDetail.Size(m) -} -func (m *UserDetail) XXX_DiscardUnknown() { - xxx_messageInfo_UserDetail.DiscardUnknown(m) -} - -var xxx_messageInfo_UserDetail proto.InternalMessageInfo - -func (m *UserDetail) GetUser() *User { - if m != nil { - return m.User - } - return nil -} - -func (m *UserDetail) GetRoleSet() []*Role { - if m != nil { - return m.RoleSet - } - return nil -} - -func (m *UserDetail) GetGroupSet() []*Group { - if m != nil { - return m.GroupSet - } - return nil -} - -type Group struct { - // parent group id - ParentGroupId *wrappers.StringValue `protobuf:"bytes,1,opt,name=parent_group_id,json=parentGroupId,proto3" json:"parent_group_id,omitempty"` - // group id - GroupId *wrappers.StringValue `protobuf:"bytes,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // group path, a concat string gid-xxx.gid-xxx.gid... - GroupPath *wrappers.StringValue `protobuf:"bytes,3,opt,name=group_path,json=groupPath,proto3" json:"group_path,omitempty"` - // group name - Name *wrappers.StringValue `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` - // group status eg.[active|deleted] - Status *wrappers.StringValue `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` - // group description - Description *wrappers.StringValue `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` - // the time when user create - CreateTime *timestamp.Timestamp `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // the time when group update - UpdateTime *timestamp.Timestamp `protobuf:"bytes,8,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` - // record group status changed time - StatusTime *timestamp.Timestamp `protobuf:"bytes,9,opt,name=status_time,json=statusTime,proto3" json:"status_time,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Group) Reset() { *m = Group{} } -func (m *Group) String() string { return proto.CompactTextString(m) } -func (*Group) ProtoMessage() {} -func (*Group) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{2} -} - -func (m *Group) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Group.Unmarshal(m, b) -} -func (m *Group) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Group.Marshal(b, m, deterministic) -} -func (m *Group) XXX_Merge(src proto.Message) { - xxx_messageInfo_Group.Merge(m, src) -} -func (m *Group) XXX_Size() int { - return xxx_messageInfo_Group.Size(m) -} -func (m *Group) XXX_DiscardUnknown() { - xxx_messageInfo_Group.DiscardUnknown(m) -} - -var xxx_messageInfo_Group proto.InternalMessageInfo - -func (m *Group) GetParentGroupId() *wrappers.StringValue { - if m != nil { - return m.ParentGroupId - } - return nil -} - -func (m *Group) GetGroupId() *wrappers.StringValue { - if m != nil { - return m.GroupId - } - return nil -} - -func (m *Group) GetGroupPath() *wrappers.StringValue { - if m != nil { - return m.GroupPath - } - return nil -} - -func (m *Group) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *Group) GetStatus() *wrappers.StringValue { - if m != nil { - return m.Status - } - return nil -} - -func (m *Group) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *Group) GetCreateTime() *timestamp.Timestamp { - if m != nil { - return m.CreateTime - } - return nil -} - -func (m *Group) GetUpdateTime() *timestamp.Timestamp { - if m != nil { - return m.UpdateTime - } - return nil -} - -func (m *Group) GetStatusTime() *timestamp.Timestamp { - if m != nil { - return m.StatusTime - } - return nil -} - -type GroupDetail struct { - // group base info - Group *Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` - // users in group - UserSet []*User `protobuf:"bytes,2,rep,name=user_set,json=userSet,proto3" json:"user_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GroupDetail) Reset() { *m = GroupDetail{} } -func (m *GroupDetail) String() string { return proto.CompactTextString(m) } -func (*GroupDetail) ProtoMessage() {} -func (*GroupDetail) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{3} -} - -func (m *GroupDetail) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GroupDetail.Unmarshal(m, b) -} -func (m *GroupDetail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GroupDetail.Marshal(b, m, deterministic) -} -func (m *GroupDetail) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupDetail.Merge(m, src) -} -func (m *GroupDetail) XXX_Size() int { - return xxx_messageInfo_GroupDetail.Size(m) -} -func (m *GroupDetail) XXX_DiscardUnknown() { - xxx_messageInfo_GroupDetail.DiscardUnknown(m) -} - -var xxx_messageInfo_GroupDetail proto.InternalMessageInfo - -func (m *GroupDetail) GetGroup() *Group { - if m != nil { - return m.Group - } - return nil -} - -func (m *GroupDetail) GetUserSet() []*User { - if m != nil { - return m.UserSet - } - return nil -} - -type DescribeUsersRequest struct { - // query key, support these fields(user_id, email, phone_number, status) - SearchWord *wrappers.StringValue `protobuf:"bytes,1,opt,name=search_word,json=searchWord,proto3" json:"search_word,omitempty"` - // sort key, order by sort_key, default create_time - SortKey *wrappers.StringValue `protobuf:"bytes,2,opt,name=sort_key,json=sortKey,proto3" json:"sort_key,omitempty"` - // value = 0 sort ASC, value = 1 sort DESC - Reverse *wrappers.BoolValue `protobuf:"bytes,3,opt,name=reverse,proto3" json:"reverse,omitempty"` - // data limit, default 20, max 200 - Limit uint32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` - // data offset, default 0 - Offset uint32 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` - // use root group ids to get all group ids - RootGroupId []string `protobuf:"bytes,6,rep,name=root_group_id,json=rootGroupId,proto3" json:"root_group_id,omitempty"` - // group ids - GroupId []string `protobuf:"bytes,7,rep,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // user ids - UserId []string `protobuf:"bytes,8,rep,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - // status eg.[active|deleted] - Status []string `protobuf:"bytes,9,rep,name=status,proto3" json:"status,omitempty"` - // role ids - RoleId []string `protobuf:"bytes,10,rep,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` - // username - Username []string `protobuf:"bytes,11,rep,name=username,proto3" json:"username,omitempty"` - // email, eg.op@yunify.com - Email []string `protobuf:"bytes,12,rep,name=email,proto3" json:"email,omitempty"` - // phone number, string of 11 digital - PhoneNumber []string `protobuf:"bytes,13,rep,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeUsersRequest) Reset() { *m = DescribeUsersRequest{} } -func (m *DescribeUsersRequest) String() string { return proto.CompactTextString(m) } -func (*DescribeUsersRequest) ProtoMessage() {} -func (*DescribeUsersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{4} -} - -func (m *DescribeUsersRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeUsersRequest.Unmarshal(m, b) -} -func (m *DescribeUsersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeUsersRequest.Marshal(b, m, deterministic) -} -func (m *DescribeUsersRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeUsersRequest.Merge(m, src) -} -func (m *DescribeUsersRequest) XXX_Size() int { - return xxx_messageInfo_DescribeUsersRequest.Size(m) -} -func (m *DescribeUsersRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeUsersRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeUsersRequest proto.InternalMessageInfo - -func (m *DescribeUsersRequest) GetSearchWord() *wrappers.StringValue { - if m != nil { - return m.SearchWord - } - return nil -} - -func (m *DescribeUsersRequest) GetSortKey() *wrappers.StringValue { - if m != nil { - return m.SortKey - } - return nil -} - -func (m *DescribeUsersRequest) GetReverse() *wrappers.BoolValue { - if m != nil { - return m.Reverse - } - return nil -} - -func (m *DescribeUsersRequest) GetLimit() uint32 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *DescribeUsersRequest) GetOffset() uint32 { - if m != nil { - return m.Offset - } - return 0 -} - -func (m *DescribeUsersRequest) GetRootGroupId() []string { - if m != nil { - return m.RootGroupId - } - return nil -} - -func (m *DescribeUsersRequest) GetGroupId() []string { - if m != nil { - return m.GroupId - } - return nil -} - -func (m *DescribeUsersRequest) GetUserId() []string { - if m != nil { - return m.UserId - } - return nil -} - -func (m *DescribeUsersRequest) GetStatus() []string { - if m != nil { - return m.Status - } - return nil -} - -func (m *DescribeUsersRequest) GetRoleId() []string { - if m != nil { - return m.RoleId - } - return nil -} - -func (m *DescribeUsersRequest) GetUsername() []string { - if m != nil { - return m.Username - } - return nil -} - -func (m *DescribeUsersRequest) GetEmail() []string { - if m != nil { - return m.Email - } - return nil -} - -func (m *DescribeUsersRequest) GetPhoneNumber() []string { - if m != nil { - return m.PhoneNumber - } - return nil -} - -type DescribeUsersResponse struct { - // total count of qualified user - TotalCount uint32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - // list of user - UserSet []*User `protobuf:"bytes,2,rep,name=user_set,json=userSet,proto3" json:"user_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeUsersResponse) Reset() { *m = DescribeUsersResponse{} } -func (m *DescribeUsersResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeUsersResponse) ProtoMessage() {} -func (*DescribeUsersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{5} -} - -func (m *DescribeUsersResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeUsersResponse.Unmarshal(m, b) -} -func (m *DescribeUsersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeUsersResponse.Marshal(b, m, deterministic) -} -func (m *DescribeUsersResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeUsersResponse.Merge(m, src) -} -func (m *DescribeUsersResponse) XXX_Size() int { - return xxx_messageInfo_DescribeUsersResponse.Size(m) -} -func (m *DescribeUsersResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeUsersResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeUsersResponse proto.InternalMessageInfo - -func (m *DescribeUsersResponse) GetTotalCount() uint32 { - if m != nil { - return m.TotalCount - } - return 0 -} - -func (m *DescribeUsersResponse) GetUserSet() []*User { - if m != nil { - return m.UserSet - } - return nil -} - -type DescribeUsersDetailResponse struct { - // total count of qualified user - TotalCount uint32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - // list of user with detail info - UserDetailSet []*UserDetail `protobuf:"bytes,2,rep,name=user_detail_set,json=userDetailSet,proto3" json:"user_detail_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeUsersDetailResponse) Reset() { *m = DescribeUsersDetailResponse{} } -func (m *DescribeUsersDetailResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeUsersDetailResponse) ProtoMessage() {} -func (*DescribeUsersDetailResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{6} -} - -func (m *DescribeUsersDetailResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeUsersDetailResponse.Unmarshal(m, b) -} -func (m *DescribeUsersDetailResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeUsersDetailResponse.Marshal(b, m, deterministic) -} -func (m *DescribeUsersDetailResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeUsersDetailResponse.Merge(m, src) -} -func (m *DescribeUsersDetailResponse) XXX_Size() int { - return xxx_messageInfo_DescribeUsersDetailResponse.Size(m) -} -func (m *DescribeUsersDetailResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeUsersDetailResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeUsersDetailResponse proto.InternalMessageInfo - -func (m *DescribeUsersDetailResponse) GetTotalCount() uint32 { - if m != nil { - return m.TotalCount - } - return 0 -} - -func (m *DescribeUsersDetailResponse) GetUserDetailSet() []*UserDetail { - if m != nil { - return m.UserDetailSet - } - return nil -} - -type ModifyUserRequest struct { - // required, id of user to be modify - UserId *wrappers.StringValue `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - // user email, eg.op@yunify.com - Email *wrappers.StringValue `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` - // user name - Username *wrappers.StringValue `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` - // user description - Description *wrappers.StringValue `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - // user password - Password *wrappers.StringValue `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"` - // user phone number, string of 11 digital - PhoneNumber *wrappers.StringValue `protobuf:"bytes,6,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyUserRequest) Reset() { *m = ModifyUserRequest{} } -func (m *ModifyUserRequest) String() string { return proto.CompactTextString(m) } -func (*ModifyUserRequest) ProtoMessage() {} -func (*ModifyUserRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{7} -} - -func (m *ModifyUserRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyUserRequest.Unmarshal(m, b) -} -func (m *ModifyUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyUserRequest.Marshal(b, m, deterministic) -} -func (m *ModifyUserRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyUserRequest.Merge(m, src) -} -func (m *ModifyUserRequest) XXX_Size() int { - return xxx_messageInfo_ModifyUserRequest.Size(m) -} -func (m *ModifyUserRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyUserRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyUserRequest proto.InternalMessageInfo - -func (m *ModifyUserRequest) GetUserId() *wrappers.StringValue { - if m != nil { - return m.UserId - } - return nil -} - -func (m *ModifyUserRequest) GetEmail() *wrappers.StringValue { - if m != nil { - return m.Email - } - return nil -} - -func (m *ModifyUserRequest) GetUsername() *wrappers.StringValue { - if m != nil { - return m.Username - } - return nil -} - -func (m *ModifyUserRequest) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *ModifyUserRequest) GetPassword() *wrappers.StringValue { - if m != nil { - return m.Password - } - return nil -} - -func (m *ModifyUserRequest) GetPhoneNumber() *wrappers.StringValue { - if m != nil { - return m.PhoneNumber - } - return nil -} - -type ModifyUserResponse struct { - // id of user modified - UserId *wrappers.StringValue `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyUserResponse) Reset() { *m = ModifyUserResponse{} } -func (m *ModifyUserResponse) String() string { return proto.CompactTextString(m) } -func (*ModifyUserResponse) ProtoMessage() {} -func (*ModifyUserResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{8} -} - -func (m *ModifyUserResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyUserResponse.Unmarshal(m, b) -} -func (m *ModifyUserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyUserResponse.Marshal(b, m, deterministic) -} -func (m *ModifyUserResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyUserResponse.Merge(m, src) -} -func (m *ModifyUserResponse) XXX_Size() int { - return xxx_messageInfo_ModifyUserResponse.Size(m) -} -func (m *ModifyUserResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyUserResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyUserResponse proto.InternalMessageInfo - -func (m *ModifyUserResponse) GetUserId() *wrappers.StringValue { - if m != nil { - return m.UserId - } - return nil -} - -type DeleteUsersRequest struct { - // required, ids of user to delete - UserId []string `protobuf:"bytes,1,rep,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteUsersRequest) Reset() { *m = DeleteUsersRequest{} } -func (m *DeleteUsersRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteUsersRequest) ProtoMessage() {} -func (*DeleteUsersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{9} -} - -func (m *DeleteUsersRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteUsersRequest.Unmarshal(m, b) -} -func (m *DeleteUsersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteUsersRequest.Marshal(b, m, deterministic) -} -func (m *DeleteUsersRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteUsersRequest.Merge(m, src) -} -func (m *DeleteUsersRequest) XXX_Size() int { - return xxx_messageInfo_DeleteUsersRequest.Size(m) -} -func (m *DeleteUsersRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteUsersRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteUsersRequest proto.InternalMessageInfo - -func (m *DeleteUsersRequest) GetUserId() []string { - if m != nil { - return m.UserId - } - return nil -} - -type DeleteUsersResponse struct { - // ids of deleted user - UserId []string `protobuf:"bytes,1,rep,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteUsersResponse) Reset() { *m = DeleteUsersResponse{} } -func (m *DeleteUsersResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteUsersResponse) ProtoMessage() {} -func (*DeleteUsersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{10} -} - -func (m *DeleteUsersResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteUsersResponse.Unmarshal(m, b) -} -func (m *DeleteUsersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteUsersResponse.Marshal(b, m, deterministic) -} -func (m *DeleteUsersResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteUsersResponse.Merge(m, src) -} -func (m *DeleteUsersResponse) XXX_Size() int { - return xxx_messageInfo_DeleteUsersResponse.Size(m) -} -func (m *DeleteUsersResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteUsersResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteUsersResponse proto.InternalMessageInfo - -func (m *DeleteUsersResponse) GetUserId() []string { - if m != nil { - return m.UserId - } - return nil -} - -type CreatePasswordResetRequest struct { - // required, id of user to create reset password action - UserId *wrappers.StringValue `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - // required, user password - Password *wrappers.StringValue `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreatePasswordResetRequest) Reset() { *m = CreatePasswordResetRequest{} } -func (m *CreatePasswordResetRequest) String() string { return proto.CompactTextString(m) } -func (*CreatePasswordResetRequest) ProtoMessage() {} -func (*CreatePasswordResetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{11} -} - -func (m *CreatePasswordResetRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreatePasswordResetRequest.Unmarshal(m, b) -} -func (m *CreatePasswordResetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreatePasswordResetRequest.Marshal(b, m, deterministic) -} -func (m *CreatePasswordResetRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreatePasswordResetRequest.Merge(m, src) -} -func (m *CreatePasswordResetRequest) XXX_Size() int { - return xxx_messageInfo_CreatePasswordResetRequest.Size(m) -} -func (m *CreatePasswordResetRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreatePasswordResetRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CreatePasswordResetRequest proto.InternalMessageInfo - -func (m *CreatePasswordResetRequest) GetUserId() *wrappers.StringValue { - if m != nil { - return m.UserId - } - return nil -} - -func (m *CreatePasswordResetRequest) GetPassword() *wrappers.StringValue { - if m != nil { - return m.Password - } - return nil -} - -type CreatePasswordResetResponse struct { - // id of user that reset password - UserId *wrappers.StringValue `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - // reset id, used to change password - ResetId *wrappers.StringValue `protobuf:"bytes,2,opt,name=reset_id,json=resetId,proto3" json:"reset_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreatePasswordResetResponse) Reset() { *m = CreatePasswordResetResponse{} } -func (m *CreatePasswordResetResponse) String() string { return proto.CompactTextString(m) } -func (*CreatePasswordResetResponse) ProtoMessage() {} -func (*CreatePasswordResetResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{12} -} - -func (m *CreatePasswordResetResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreatePasswordResetResponse.Unmarshal(m, b) -} -func (m *CreatePasswordResetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreatePasswordResetResponse.Marshal(b, m, deterministic) -} -func (m *CreatePasswordResetResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreatePasswordResetResponse.Merge(m, src) -} -func (m *CreatePasswordResetResponse) XXX_Size() int { - return xxx_messageInfo_CreatePasswordResetResponse.Size(m) -} -func (m *CreatePasswordResetResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CreatePasswordResetResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CreatePasswordResetResponse proto.InternalMessageInfo - -func (m *CreatePasswordResetResponse) GetUserId() *wrappers.StringValue { - if m != nil { - return m.UserId - } - return nil -} - -func (m *CreatePasswordResetResponse) GetResetId() *wrappers.StringValue { - if m != nil { - return m.ResetId - } - return nil -} - -type ChangePasswordRequest struct { - // required, new password for reset - NewPassword *wrappers.StringValue `protobuf:"bytes,1,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"` - // required, reset id - ResetId *wrappers.StringValue `protobuf:"bytes,2,opt,name=reset_id,json=resetId,proto3" json:"reset_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ChangePasswordRequest) Reset() { *m = ChangePasswordRequest{} } -func (m *ChangePasswordRequest) String() string { return proto.CompactTextString(m) } -func (*ChangePasswordRequest) ProtoMessage() {} -func (*ChangePasswordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{13} -} - -func (m *ChangePasswordRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ChangePasswordRequest.Unmarshal(m, b) -} -func (m *ChangePasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ChangePasswordRequest.Marshal(b, m, deterministic) -} -func (m *ChangePasswordRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChangePasswordRequest.Merge(m, src) -} -func (m *ChangePasswordRequest) XXX_Size() int { - return xxx_messageInfo_ChangePasswordRequest.Size(m) -} -func (m *ChangePasswordRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ChangePasswordRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ChangePasswordRequest proto.InternalMessageInfo - -func (m *ChangePasswordRequest) GetNewPassword() *wrappers.StringValue { - if m != nil { - return m.NewPassword - } - return nil -} - -func (m *ChangePasswordRequest) GetResetId() *wrappers.StringValue { - if m != nil { - return m.ResetId - } - return nil -} - -type ChangePasswordResponse struct { - // id of user that changed password - UserId *wrappers.StringValue `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ChangePasswordResponse) Reset() { *m = ChangePasswordResponse{} } -func (m *ChangePasswordResponse) String() string { return proto.CompactTextString(m) } -func (*ChangePasswordResponse) ProtoMessage() {} -func (*ChangePasswordResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{14} -} - -func (m *ChangePasswordResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ChangePasswordResponse.Unmarshal(m, b) -} -func (m *ChangePasswordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ChangePasswordResponse.Marshal(b, m, deterministic) -} -func (m *ChangePasswordResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChangePasswordResponse.Merge(m, src) -} -func (m *ChangePasswordResponse) XXX_Size() int { - return xxx_messageInfo_ChangePasswordResponse.Size(m) -} -func (m *ChangePasswordResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ChangePasswordResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ChangePasswordResponse proto.InternalMessageInfo - -func (m *ChangePasswordResponse) GetUserId() *wrappers.StringValue { - if m != nil { - return m.UserId - } - return nil -} - -type GetPasswordResetRequest struct { - // required, reset id - ResetId string `protobuf:"bytes,1,opt,name=reset_id,json=resetId,proto3" json:"reset_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetPasswordResetRequest) Reset() { *m = GetPasswordResetRequest{} } -func (m *GetPasswordResetRequest) String() string { return proto.CompactTextString(m) } -func (*GetPasswordResetRequest) ProtoMessage() {} -func (*GetPasswordResetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{15} -} - -func (m *GetPasswordResetRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetPasswordResetRequest.Unmarshal(m, b) -} -func (m *GetPasswordResetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetPasswordResetRequest.Marshal(b, m, deterministic) -} -func (m *GetPasswordResetRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetPasswordResetRequest.Merge(m, src) -} -func (m *GetPasswordResetRequest) XXX_Size() int { - return xxx_messageInfo_GetPasswordResetRequest.Size(m) -} -func (m *GetPasswordResetRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetPasswordResetRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetPasswordResetRequest proto.InternalMessageInfo - -func (m *GetPasswordResetRequest) GetResetId() string { - if m != nil { - return m.ResetId - } - return "" -} - -type GetPasswordResetResponse struct { - // reset id - ResetId string `protobuf:"bytes,1,opt,name=reset_id,json=resetId,proto3" json:"reset_id,omitempty"` - // id of user changed password - UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetPasswordResetResponse) Reset() { *m = GetPasswordResetResponse{} } -func (m *GetPasswordResetResponse) String() string { return proto.CompactTextString(m) } -func (*GetPasswordResetResponse) ProtoMessage() {} -func (*GetPasswordResetResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{16} -} - -func (m *GetPasswordResetResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetPasswordResetResponse.Unmarshal(m, b) -} -func (m *GetPasswordResetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetPasswordResetResponse.Marshal(b, m, deterministic) -} -func (m *GetPasswordResetResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetPasswordResetResponse.Merge(m, src) -} -func (m *GetPasswordResetResponse) XXX_Size() int { - return xxx_messageInfo_GetPasswordResetResponse.Size(m) -} -func (m *GetPasswordResetResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetPasswordResetResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetPasswordResetResponse proto.InternalMessageInfo - -func (m *GetPasswordResetResponse) GetResetId() string { - if m != nil { - return m.ResetId - } - return "" -} - -func (m *GetPasswordResetResponse) GetUserId() string { - if m != nil { - return m.UserId - } - return "" -} - -type CreateUserRequest struct { - // required, user email - Email *wrappers.StringValue `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` - // user phone number - PhoneNumber *wrappers.StringValue `protobuf:"bytes,2,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` - // required, user password - Password *wrappers.StringValue `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` - // required, user role_id - RoleId *wrappers.StringValue `protobuf:"bytes,4,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` - // user description - Description *wrappers.StringValue `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateUserRequest) Reset() { *m = CreateUserRequest{} } -func (m *CreateUserRequest) String() string { return proto.CompactTextString(m) } -func (*CreateUserRequest) ProtoMessage() {} -func (*CreateUserRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{17} -} - -func (m *CreateUserRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateUserRequest.Unmarshal(m, b) -} -func (m *CreateUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateUserRequest.Marshal(b, m, deterministic) -} -func (m *CreateUserRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateUserRequest.Merge(m, src) -} -func (m *CreateUserRequest) XXX_Size() int { - return xxx_messageInfo_CreateUserRequest.Size(m) -} -func (m *CreateUserRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateUserRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateUserRequest proto.InternalMessageInfo - -func (m *CreateUserRequest) GetEmail() *wrappers.StringValue { - if m != nil { - return m.Email - } - return nil -} - -func (m *CreateUserRequest) GetPhoneNumber() *wrappers.StringValue { - if m != nil { - return m.PhoneNumber - } - return nil -} - -func (m *CreateUserRequest) GetPassword() *wrappers.StringValue { - if m != nil { - return m.Password - } - return nil -} - -func (m *CreateUserRequest) GetRoleId() *wrappers.StringValue { - if m != nil { - return m.RoleId - } - return nil -} - -func (m *CreateUserRequest) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -type CreateUserResponse struct { - // id of user created - UserId *wrappers.StringValue `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateUserResponse) Reset() { *m = CreateUserResponse{} } -func (m *CreateUserResponse) String() string { return proto.CompactTextString(m) } -func (*CreateUserResponse) ProtoMessage() {} -func (*CreateUserResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{18} -} - -func (m *CreateUserResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateUserResponse.Unmarshal(m, b) -} -func (m *CreateUserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateUserResponse.Marshal(b, m, deterministic) -} -func (m *CreateUserResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateUserResponse.Merge(m, src) -} -func (m *CreateUserResponse) XXX_Size() int { - return xxx_messageInfo_CreateUserResponse.Size(m) -} -func (m *CreateUserResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CreateUserResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateUserResponse proto.InternalMessageInfo - -func (m *CreateUserResponse) GetUserId() *wrappers.StringValue { - if m != nil { - return m.UserId - } - return nil -} - -type ValidateUserPasswordRequest struct { - // required, user email - Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` - // required, user password - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ValidateUserPasswordRequest) Reset() { *m = ValidateUserPasswordRequest{} } -func (m *ValidateUserPasswordRequest) String() string { return proto.CompactTextString(m) } -func (*ValidateUserPasswordRequest) ProtoMessage() {} -func (*ValidateUserPasswordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{19} -} - -func (m *ValidateUserPasswordRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ValidateUserPasswordRequest.Unmarshal(m, b) -} -func (m *ValidateUserPasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ValidateUserPasswordRequest.Marshal(b, m, deterministic) -} -func (m *ValidateUserPasswordRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidateUserPasswordRequest.Merge(m, src) -} -func (m *ValidateUserPasswordRequest) XXX_Size() int { - return xxx_messageInfo_ValidateUserPasswordRequest.Size(m) -} -func (m *ValidateUserPasswordRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ValidateUserPasswordRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidateUserPasswordRequest proto.InternalMessageInfo - -func (m *ValidateUserPasswordRequest) GetEmail() string { - if m != nil { - return m.Email - } - return "" -} - -func (m *ValidateUserPasswordRequest) GetPassword() string { - if m != nil { - return m.Password - } - return "" -} - -type ValidateUserPasswordResponse struct { - // validate password ok or not - Validated bool `protobuf:"varint,1,opt,name=validated,proto3" json:"validated,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ValidateUserPasswordResponse) Reset() { *m = ValidateUserPasswordResponse{} } -func (m *ValidateUserPasswordResponse) String() string { return proto.CompactTextString(m) } -func (*ValidateUserPasswordResponse) ProtoMessage() {} -func (*ValidateUserPasswordResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{20} -} - -func (m *ValidateUserPasswordResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ValidateUserPasswordResponse.Unmarshal(m, b) -} -func (m *ValidateUserPasswordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ValidateUserPasswordResponse.Marshal(b, m, deterministic) -} -func (m *ValidateUserPasswordResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidateUserPasswordResponse.Merge(m, src) -} -func (m *ValidateUserPasswordResponse) XXX_Size() int { - return xxx_messageInfo_ValidateUserPasswordResponse.Size(m) -} -func (m *ValidateUserPasswordResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ValidateUserPasswordResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidateUserPasswordResponse proto.InternalMessageInfo - -func (m *ValidateUserPasswordResponse) GetValidated() bool { - if m != nil { - return m.Validated - } - return false -} - -type CreateGroupRequest struct { - // required, parent group id - ParentGroupId *wrappers.StringValue `protobuf:"bytes,1,opt,name=parent_group_id,json=parentGroupId,proto3" json:"parent_group_id,omitempty"` - // required, group name - Name *wrappers.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // group description - Description *wrappers.StringValue `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateGroupRequest) Reset() { *m = CreateGroupRequest{} } -func (m *CreateGroupRequest) String() string { return proto.CompactTextString(m) } -func (*CreateGroupRequest) ProtoMessage() {} -func (*CreateGroupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{21} -} - -func (m *CreateGroupRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateGroupRequest.Unmarshal(m, b) -} -func (m *CreateGroupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateGroupRequest.Marshal(b, m, deterministic) -} -func (m *CreateGroupRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateGroupRequest.Merge(m, src) -} -func (m *CreateGroupRequest) XXX_Size() int { - return xxx_messageInfo_CreateGroupRequest.Size(m) -} -func (m *CreateGroupRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateGroupRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateGroupRequest proto.InternalMessageInfo - -func (m *CreateGroupRequest) GetParentGroupId() *wrappers.StringValue { - if m != nil { - return m.ParentGroupId - } - return nil -} - -func (m *CreateGroupRequest) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *CreateGroupRequest) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -type CreateGroupResponse struct { - // id of group created - GroupId *wrappers.StringValue `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateGroupResponse) Reset() { *m = CreateGroupResponse{} } -func (m *CreateGroupResponse) String() string { return proto.CompactTextString(m) } -func (*CreateGroupResponse) ProtoMessage() {} -func (*CreateGroupResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{22} -} - -func (m *CreateGroupResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateGroupResponse.Unmarshal(m, b) -} -func (m *CreateGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateGroupResponse.Marshal(b, m, deterministic) -} -func (m *CreateGroupResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateGroupResponse.Merge(m, src) -} -func (m *CreateGroupResponse) XXX_Size() int { - return xxx_messageInfo_CreateGroupResponse.Size(m) -} -func (m *CreateGroupResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CreateGroupResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateGroupResponse proto.InternalMessageInfo - -func (m *CreateGroupResponse) GetGroupId() *wrappers.StringValue { - if m != nil { - return m.GroupId - } - return nil -} - -type DescribeGroupsRequest struct { - // query key, support these fields(group_id, parent_group_id, group_path, status) - SearchWord *wrappers.StringValue `protobuf:"bytes,1,opt,name=search_word,json=searchWord,proto3" json:"search_word,omitempty"` - // sort key, order by sort_key, default create_time - SortKey *wrappers.StringValue `protobuf:"bytes,2,opt,name=sort_key,json=sortKey,proto3" json:"sort_key,omitempty"` - // value = 0 sort ASC, value = 1 sort DESC - Reverse *wrappers.BoolValue `protobuf:"bytes,3,opt,name=reverse,proto3" json:"reverse,omitempty"` - // data limit per page, default value 20, max value 200 - Limit uint32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` - // data offset, default 0 - Offset uint32 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` - // use root group ids to get all groups - RootGroupId []string `protobuf:"bytes,6,rep,name=root_group_id,json=rootGroupId,proto3" json:"root_group_id,omitempty"` - // parent group ids - ParentGroupId []string `protobuf:"bytes,7,rep,name=parent_group_id,json=parentGroupId,proto3" json:"parent_group_id,omitempty"` - // group ids - GroupId []string `protobuf:"bytes,8,rep,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // group path, a concat string gid-xxx.gid-xxx.gid... - GroupPath []string `protobuf:"bytes,9,rep,name=group_path,json=groupPath,proto3" json:"group_path,omitempty"` - // group name - GroupName []string `protobuf:"bytes,10,rep,name=group_name,json=groupName,proto3" json:"group_name,omitempty"` - // status eg.[active|deleted] - Status []string `protobuf:"bytes,11,rep,name=status,proto3" json:"status,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeGroupsRequest) Reset() { *m = DescribeGroupsRequest{} } -func (m *DescribeGroupsRequest) String() string { return proto.CompactTextString(m) } -func (*DescribeGroupsRequest) ProtoMessage() {} -func (*DescribeGroupsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{23} -} - -func (m *DescribeGroupsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeGroupsRequest.Unmarshal(m, b) -} -func (m *DescribeGroupsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeGroupsRequest.Marshal(b, m, deterministic) -} -func (m *DescribeGroupsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeGroupsRequest.Merge(m, src) -} -func (m *DescribeGroupsRequest) XXX_Size() int { - return xxx_messageInfo_DescribeGroupsRequest.Size(m) -} -func (m *DescribeGroupsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeGroupsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeGroupsRequest proto.InternalMessageInfo - -func (m *DescribeGroupsRequest) GetSearchWord() *wrappers.StringValue { - if m != nil { - return m.SearchWord - } - return nil -} - -func (m *DescribeGroupsRequest) GetSortKey() *wrappers.StringValue { - if m != nil { - return m.SortKey - } - return nil -} - -func (m *DescribeGroupsRequest) GetReverse() *wrappers.BoolValue { - if m != nil { - return m.Reverse - } - return nil -} - -func (m *DescribeGroupsRequest) GetLimit() uint32 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *DescribeGroupsRequest) GetOffset() uint32 { - if m != nil { - return m.Offset - } - return 0 -} - -func (m *DescribeGroupsRequest) GetRootGroupId() []string { - if m != nil { - return m.RootGroupId - } - return nil -} - -func (m *DescribeGroupsRequest) GetParentGroupId() []string { - if m != nil { - return m.ParentGroupId - } - return nil -} - -func (m *DescribeGroupsRequest) GetGroupId() []string { - if m != nil { - return m.GroupId - } - return nil -} - -func (m *DescribeGroupsRequest) GetGroupPath() []string { - if m != nil { - return m.GroupPath - } - return nil -} - -func (m *DescribeGroupsRequest) GetGroupName() []string { - if m != nil { - return m.GroupName - } - return nil -} - -func (m *DescribeGroupsRequest) GetStatus() []string { - if m != nil { - return m.Status - } - return nil -} - -type DescribeGroupsResponse struct { - // total count of qualified group - TotalCount uint32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - // list of group - GroupSet []*Group `protobuf:"bytes,2,rep,name=group_set,json=groupSet,proto3" json:"group_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeGroupsResponse) Reset() { *m = DescribeGroupsResponse{} } -func (m *DescribeGroupsResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeGroupsResponse) ProtoMessage() {} -func (*DescribeGroupsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{24} -} - -func (m *DescribeGroupsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeGroupsResponse.Unmarshal(m, b) -} -func (m *DescribeGroupsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeGroupsResponse.Marshal(b, m, deterministic) -} -func (m *DescribeGroupsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeGroupsResponse.Merge(m, src) -} -func (m *DescribeGroupsResponse) XXX_Size() int { - return xxx_messageInfo_DescribeGroupsResponse.Size(m) -} -func (m *DescribeGroupsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeGroupsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeGroupsResponse proto.InternalMessageInfo - -func (m *DescribeGroupsResponse) GetTotalCount() uint32 { - if m != nil { - return m.TotalCount - } - return 0 -} - -func (m *DescribeGroupsResponse) GetGroupSet() []*Group { - if m != nil { - return m.GroupSet - } - return nil -} - -type DescribeGroupsDetailResponse struct { - // total count of group with detail info - TotalCount uint32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - // list of group with detail info - GroupDetailSet []*GroupDetail `protobuf:"bytes,2,rep,name=group_detail_set,json=groupDetailSet,proto3" json:"group_detail_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeGroupsDetailResponse) Reset() { *m = DescribeGroupsDetailResponse{} } -func (m *DescribeGroupsDetailResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeGroupsDetailResponse) ProtoMessage() {} -func (*DescribeGroupsDetailResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{25} -} - -func (m *DescribeGroupsDetailResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeGroupsDetailResponse.Unmarshal(m, b) -} -func (m *DescribeGroupsDetailResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeGroupsDetailResponse.Marshal(b, m, deterministic) -} -func (m *DescribeGroupsDetailResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeGroupsDetailResponse.Merge(m, src) -} -func (m *DescribeGroupsDetailResponse) XXX_Size() int { - return xxx_messageInfo_DescribeGroupsDetailResponse.Size(m) -} -func (m *DescribeGroupsDetailResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeGroupsDetailResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeGroupsDetailResponse proto.InternalMessageInfo - -func (m *DescribeGroupsDetailResponse) GetTotalCount() uint32 { - if m != nil { - return m.TotalCount - } - return 0 -} - -func (m *DescribeGroupsDetailResponse) GetGroupDetailSet() []*GroupDetail { - if m != nil { - return m.GroupDetailSet - } - return nil -} - -type ModifyGroupRequest struct { - // required, id of group to modify - GroupId *wrappers.StringValue `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // group name - Name *wrappers.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // group description - Description *wrappers.StringValue `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - // parent group id - ParentGroupId *wrappers.StringValue `protobuf:"bytes,4,opt,name=parent_group_id,json=parentGroupId,proto3" json:"parent_group_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyGroupRequest) Reset() { *m = ModifyGroupRequest{} } -func (m *ModifyGroupRequest) String() string { return proto.CompactTextString(m) } -func (*ModifyGroupRequest) ProtoMessage() {} -func (*ModifyGroupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{26} -} - -func (m *ModifyGroupRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyGroupRequest.Unmarshal(m, b) -} -func (m *ModifyGroupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyGroupRequest.Marshal(b, m, deterministic) -} -func (m *ModifyGroupRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyGroupRequest.Merge(m, src) -} -func (m *ModifyGroupRequest) XXX_Size() int { - return xxx_messageInfo_ModifyGroupRequest.Size(m) -} -func (m *ModifyGroupRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyGroupRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyGroupRequest proto.InternalMessageInfo - -func (m *ModifyGroupRequest) GetGroupId() *wrappers.StringValue { - if m != nil { - return m.GroupId - } - return nil -} - -func (m *ModifyGroupRequest) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *ModifyGroupRequest) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *ModifyGroupRequest) GetParentGroupId() *wrappers.StringValue { - if m != nil { - return m.ParentGroupId - } - return nil -} - -type ModifyGroupResponse struct { - // id of group modified - GroupId *wrappers.StringValue `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyGroupResponse) Reset() { *m = ModifyGroupResponse{} } -func (m *ModifyGroupResponse) String() string { return proto.CompactTextString(m) } -func (*ModifyGroupResponse) ProtoMessage() {} -func (*ModifyGroupResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{27} -} - -func (m *ModifyGroupResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyGroupResponse.Unmarshal(m, b) -} -func (m *ModifyGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyGroupResponse.Marshal(b, m, deterministic) -} -func (m *ModifyGroupResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyGroupResponse.Merge(m, src) -} -func (m *ModifyGroupResponse) XXX_Size() int { - return xxx_messageInfo_ModifyGroupResponse.Size(m) -} -func (m *ModifyGroupResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyGroupResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyGroupResponse proto.InternalMessageInfo - -func (m *ModifyGroupResponse) GetGroupId() *wrappers.StringValue { - if m != nil { - return m.GroupId - } - return nil -} - -type DeleteGroupsRequest struct { - // required, ids of group to delete - GroupId []string `protobuf:"bytes,1,rep,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteGroupsRequest) Reset() { *m = DeleteGroupsRequest{} } -func (m *DeleteGroupsRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteGroupsRequest) ProtoMessage() {} -func (*DeleteGroupsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{28} -} - -func (m *DeleteGroupsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteGroupsRequest.Unmarshal(m, b) -} -func (m *DeleteGroupsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteGroupsRequest.Marshal(b, m, deterministic) -} -func (m *DeleteGroupsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteGroupsRequest.Merge(m, src) -} -func (m *DeleteGroupsRequest) XXX_Size() int { - return xxx_messageInfo_DeleteGroupsRequest.Size(m) -} -func (m *DeleteGroupsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteGroupsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteGroupsRequest proto.InternalMessageInfo - -func (m *DeleteGroupsRequest) GetGroupId() []string { - if m != nil { - return m.GroupId - } - return nil -} - -type DeleteGroupsResponse struct { - // ids of group deleted - GroupId []string `protobuf:"bytes,1,rep,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteGroupsResponse) Reset() { *m = DeleteGroupsResponse{} } -func (m *DeleteGroupsResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteGroupsResponse) ProtoMessage() {} -func (*DeleteGroupsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{29} -} - -func (m *DeleteGroupsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteGroupsResponse.Unmarshal(m, b) -} -func (m *DeleteGroupsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteGroupsResponse.Marshal(b, m, deterministic) -} -func (m *DeleteGroupsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteGroupsResponse.Merge(m, src) -} -func (m *DeleteGroupsResponse) XXX_Size() int { - return xxx_messageInfo_DeleteGroupsResponse.Size(m) -} -func (m *DeleteGroupsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteGroupsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteGroupsResponse proto.InternalMessageInfo - -func (m *DeleteGroupsResponse) GetGroupId() []string { - if m != nil { - return m.GroupId - } - return nil -} - -type JoinGroupRequest struct { - // required, ids of group for user to join in - GroupId []string `protobuf:"bytes,1,rep,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // required, ids of user to join - UserId []string `protobuf:"bytes,2,rep,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *JoinGroupRequest) Reset() { *m = JoinGroupRequest{} } -func (m *JoinGroupRequest) String() string { return proto.CompactTextString(m) } -func (*JoinGroupRequest) ProtoMessage() {} -func (*JoinGroupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{30} -} - -func (m *JoinGroupRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_JoinGroupRequest.Unmarshal(m, b) -} -func (m *JoinGroupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_JoinGroupRequest.Marshal(b, m, deterministic) -} -func (m *JoinGroupRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_JoinGroupRequest.Merge(m, src) -} -func (m *JoinGroupRequest) XXX_Size() int { - return xxx_messageInfo_JoinGroupRequest.Size(m) -} -func (m *JoinGroupRequest) XXX_DiscardUnknown() { - xxx_messageInfo_JoinGroupRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_JoinGroupRequest proto.InternalMessageInfo - -func (m *JoinGroupRequest) GetGroupId() []string { - if m != nil { - return m.GroupId - } - return nil -} - -func (m *JoinGroupRequest) GetUserId() []string { - if m != nil { - return m.UserId - } - return nil -} - -type JoinGroupResponse struct { - // ids of group for user to join in - GroupId []string `protobuf:"bytes,1,rep,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // ids of user to join - UserId []string `protobuf:"bytes,2,rep,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *JoinGroupResponse) Reset() { *m = JoinGroupResponse{} } -func (m *JoinGroupResponse) String() string { return proto.CompactTextString(m) } -func (*JoinGroupResponse) ProtoMessage() {} -func (*JoinGroupResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{31} -} - -func (m *JoinGroupResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_JoinGroupResponse.Unmarshal(m, b) -} -func (m *JoinGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_JoinGroupResponse.Marshal(b, m, deterministic) -} -func (m *JoinGroupResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_JoinGroupResponse.Merge(m, src) -} -func (m *JoinGroupResponse) XXX_Size() int { - return xxx_messageInfo_JoinGroupResponse.Size(m) -} -func (m *JoinGroupResponse) XXX_DiscardUnknown() { - xxx_messageInfo_JoinGroupResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_JoinGroupResponse proto.InternalMessageInfo - -func (m *JoinGroupResponse) GetGroupId() []string { - if m != nil { - return m.GroupId - } - return nil -} - -func (m *JoinGroupResponse) GetUserId() []string { - if m != nil { - return m.UserId - } - return nil -} - -type LeaveGroupRequest struct { - // required, ids of group for user to leave from - GroupId []string `protobuf:"bytes,1,rep,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // required, ids of user to leave - UserId []string `protobuf:"bytes,2,rep,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LeaveGroupRequest) Reset() { *m = LeaveGroupRequest{} } -func (m *LeaveGroupRequest) String() string { return proto.CompactTextString(m) } -func (*LeaveGroupRequest) ProtoMessage() {} -func (*LeaveGroupRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{32} -} - -func (m *LeaveGroupRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LeaveGroupRequest.Unmarshal(m, b) -} -func (m *LeaveGroupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LeaveGroupRequest.Marshal(b, m, deterministic) -} -func (m *LeaveGroupRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaveGroupRequest.Merge(m, src) -} -func (m *LeaveGroupRequest) XXX_Size() int { - return xxx_messageInfo_LeaveGroupRequest.Size(m) -} -func (m *LeaveGroupRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LeaveGroupRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaveGroupRequest proto.InternalMessageInfo - -func (m *LeaveGroupRequest) GetGroupId() []string { - if m != nil { - return m.GroupId - } - return nil -} - -func (m *LeaveGroupRequest) GetUserId() []string { - if m != nil { - return m.UserId - } - return nil -} - -type LeaveGroupResponse struct { - // ids of group for user to leave from - GroupId []string `protobuf:"bytes,1,rep,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // ids of user to leave - UserId []string `protobuf:"bytes,2,rep,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LeaveGroupResponse) Reset() { *m = LeaveGroupResponse{} } -func (m *LeaveGroupResponse) String() string { return proto.CompactTextString(m) } -func (*LeaveGroupResponse) ProtoMessage() {} -func (*LeaveGroupResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{33} -} - -func (m *LeaveGroupResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LeaveGroupResponse.Unmarshal(m, b) -} -func (m *LeaveGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LeaveGroupResponse.Marshal(b, m, deterministic) -} -func (m *LeaveGroupResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaveGroupResponse.Merge(m, src) -} -func (m *LeaveGroupResponse) XXX_Size() int { - return xxx_messageInfo_LeaveGroupResponse.Size(m) -} -func (m *LeaveGroupResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LeaveGroupResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_LeaveGroupResponse proto.InternalMessageInfo - -func (m *LeaveGroupResponse) GetGroupId() []string { - if m != nil { - return m.GroupId - } - return nil -} - -func (m *LeaveGroupResponse) GetUserId() []string { - if m != nil { - return m.UserId - } - return nil -} - -type Role struct { - // role id - RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` - // role name - RoleName string `protobuf:"bytes,2,opt,name=role_name,json=roleName,proto3" json:"role_name,omitempty"` - // role description - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - // portal eg.[global_admin|user|isv] - Portal string `protobuf:"bytes,4,opt,name=portal,proto3" json:"portal,omitempty"` - // own - Owner string `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty"` - // owner path, concat string group_path:user_id - OwnerPath string `protobuf:"bytes,6,opt,name=owner_path,json=ownerPath,proto3" json:"owner_path,omitempty"` - // status eg.[active|deleted] - Status string `protobuf:"bytes,7,opt,name=status,proto3" json:"status,omitempty"` - // controller eg.[self|pitrix] - Controller string `protobuf:"bytes,8,opt,name=controller,proto3" json:"controller,omitempty"` - // the time when role create - CreateTime *timestamp.Timestamp `protobuf:"bytes,9,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // the time when role update - UpdateTime *timestamp.Timestamp `protobuf:"bytes,10,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` - // record change time of status - StatusTime *timestamp.Timestamp `protobuf:"bytes,11,opt,name=status_time,json=statusTime,proto3" json:"status_time,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Role) Reset() { *m = Role{} } -func (m *Role) String() string { return proto.CompactTextString(m) } -func (*Role) ProtoMessage() {} -func (*Role) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{34} -} - -func (m *Role) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Role.Unmarshal(m, b) -} -func (m *Role) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Role.Marshal(b, m, deterministic) -} -func (m *Role) XXX_Merge(src proto.Message) { - xxx_messageInfo_Role.Merge(m, src) -} -func (m *Role) XXX_Size() int { - return xxx_messageInfo_Role.Size(m) -} -func (m *Role) XXX_DiscardUnknown() { - xxx_messageInfo_Role.DiscardUnknown(m) -} - -var xxx_messageInfo_Role proto.InternalMessageInfo - -func (m *Role) GetRoleId() string { - if m != nil { - return m.RoleId - } - return "" -} - -func (m *Role) GetRoleName() string { - if m != nil { - return m.RoleName - } - return "" -} - -func (m *Role) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *Role) GetPortal() string { - if m != nil { - return m.Portal - } - return "" -} - -func (m *Role) GetOwner() string { - if m != nil { - return m.Owner - } - return "" -} - -func (m *Role) GetOwnerPath() string { - if m != nil { - return m.OwnerPath - } - return "" -} - -func (m *Role) GetStatus() string { - if m != nil { - return m.Status - } - return "" -} - -func (m *Role) GetController() string { - if m != nil { - return m.Controller - } - return "" -} - -func (m *Role) GetCreateTime() *timestamp.Timestamp { - if m != nil { - return m.CreateTime - } - return nil -} - -func (m *Role) GetUpdateTime() *timestamp.Timestamp { - if m != nil { - return m.UpdateTime - } - return nil -} - -func (m *Role) GetStatusTime() *timestamp.Timestamp { - if m != nil { - return m.StatusTime - } - return nil -} - -type Api struct { - // api id - ApiId string `protobuf:"bytes,1,opt,name=api_id,json=apiId,proto3" json:"api_id,omitempty"` - // api method, rpc method eg.[Token|CanDo|...] - ApiMethod string `protobuf:"bytes,2,opt,name=api_method,json=apiMethod,proto3" json:"api_method,omitempty"` - // url method, http verb - UrlMethod string `protobuf:"bytes,3,opt,name=url_method,json=urlMethod,proto3" json:"url_method,omitempty"` - // request url - Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Api) Reset() { *m = Api{} } -func (m *Api) String() string { return proto.CompactTextString(m) } -func (*Api) ProtoMessage() {} -func (*Api) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{35} -} - -func (m *Api) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Api.Unmarshal(m, b) -} -func (m *Api) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Api.Marshal(b, m, deterministic) -} -func (m *Api) XXX_Merge(src proto.Message) { - xxx_messageInfo_Api.Merge(m, src) -} -func (m *Api) XXX_Size() int { - return xxx_messageInfo_Api.Size(m) -} -func (m *Api) XXX_DiscardUnknown() { - xxx_messageInfo_Api.DiscardUnknown(m) -} - -var xxx_messageInfo_Api proto.InternalMessageInfo - -func (m *Api) GetApiId() string { - if m != nil { - return m.ApiId - } - return "" -} - -func (m *Api) GetApiMethod() string { - if m != nil { - return m.ApiMethod - } - return "" -} - -func (m *Api) GetUrlMethod() string { - if m != nil { - return m.UrlMethod - } - return "" -} - -func (m *Api) GetUrl() string { - if m != nil { - return m.Url - } - return "" -} - -type ActionBundle struct { - // bundle of action, bundle contain one more api - ActionBundleId string `protobuf:"bytes,1,opt,name=action_bundle_id,json=actionBundleId,proto3" json:"action_bundle_id,omitempty"` - // name of bundle - ActionBundleName string `protobuf:"bytes,2,opt,name=action_bundle_name,json=actionBundleName,proto3" json:"action_bundle_name,omitempty"` - // list of api in bundle - ApiSet []*Api `protobuf:"bytes,3,rep,name=api_set,json=apiSet,proto3" json:"api_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ActionBundle) Reset() { *m = ActionBundle{} } -func (m *ActionBundle) String() string { return proto.CompactTextString(m) } -func (*ActionBundle) ProtoMessage() {} -func (*ActionBundle) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{36} -} - -func (m *ActionBundle) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ActionBundle.Unmarshal(m, b) -} -func (m *ActionBundle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ActionBundle.Marshal(b, m, deterministic) -} -func (m *ActionBundle) XXX_Merge(src proto.Message) { - xxx_messageInfo_ActionBundle.Merge(m, src) -} -func (m *ActionBundle) XXX_Size() int { - return xxx_messageInfo_ActionBundle.Size(m) -} -func (m *ActionBundle) XXX_DiscardUnknown() { - xxx_messageInfo_ActionBundle.DiscardUnknown(m) -} - -var xxx_messageInfo_ActionBundle proto.InternalMessageInfo - -func (m *ActionBundle) GetActionBundleId() string { - if m != nil { - return m.ActionBundleId - } - return "" -} - -func (m *ActionBundle) GetActionBundleName() string { - if m != nil { - return m.ActionBundleName - } - return "" -} - -func (m *ActionBundle) GetApiSet() []*Api { - if m != nil { - return m.ApiSet - } - return nil -} - -type Feature struct { - // feature id - FeatureId string `protobuf:"bytes,1,opt,name=feature_id,json=featureId,proto3" json:"feature_id,omitempty"` - // feature name - FeatureName string `protobuf:"bytes,2,opt,name=feature_name,json=featureName,proto3" json:"feature_name,omitempty"` - // list of action bundle - ActionBundleSet []*ActionBundle `protobuf:"bytes,3,rep,name=action_bundle_set,json=actionBundleSet,proto3" json:"action_bundle_set,omitempty"` - // list of checked action bundle - CheckedActionBundleIdSet []string `protobuf:"bytes,4,rep,name=checked_action_bundle_id_set,json=checkedActionBundleIdSet,proto3" json:"checked_action_bundle_id_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Feature) Reset() { *m = Feature{} } -func (m *Feature) String() string { return proto.CompactTextString(m) } -func (*Feature) ProtoMessage() {} -func (*Feature) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{37} -} - -func (m *Feature) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Feature.Unmarshal(m, b) -} -func (m *Feature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Feature.Marshal(b, m, deterministic) -} -func (m *Feature) XXX_Merge(src proto.Message) { - xxx_messageInfo_Feature.Merge(m, src) -} -func (m *Feature) XXX_Size() int { - return xxx_messageInfo_Feature.Size(m) -} -func (m *Feature) XXX_DiscardUnknown() { - xxx_messageInfo_Feature.DiscardUnknown(m) -} - -var xxx_messageInfo_Feature proto.InternalMessageInfo - -func (m *Feature) GetFeatureId() string { - if m != nil { - return m.FeatureId - } - return "" -} - -func (m *Feature) GetFeatureName() string { - if m != nil { - return m.FeatureName - } - return "" -} - -func (m *Feature) GetActionBundleSet() []*ActionBundle { - if m != nil { - return m.ActionBundleSet - } - return nil -} - -func (m *Feature) GetCheckedActionBundleIdSet() []string { - if m != nil { - return m.CheckedActionBundleIdSet - } - return nil -} - -type ModuleElem struct { - // module id - ModuleId string `protobuf:"bytes,1,opt,name=module_id,json=moduleId,proto3" json:"module_id,omitempty"` - // module name - ModuleName string `protobuf:"bytes,2,opt,name=module_name,json=moduleName,proto3" json:"module_name,omitempty"` - // list of feature - FeatureSet []*Feature `protobuf:"bytes,3,rep,name=feature_set,json=featureSet,proto3" json:"feature_set,omitempty"` - // access level of visiting data - DataLevel string `protobuf:"bytes,4,opt,name=data_level,json=dataLevel,proto3" json:"data_level,omitempty"` - // is all feature in module elem checked - IsCheckAll bool `protobuf:"varint,5,opt,name=is_check_all,json=isCheckAll,proto3" json:"is_check_all,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModuleElem) Reset() { *m = ModuleElem{} } -func (m *ModuleElem) String() string { return proto.CompactTextString(m) } -func (*ModuleElem) ProtoMessage() {} -func (*ModuleElem) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{38} -} - -func (m *ModuleElem) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModuleElem.Unmarshal(m, b) -} -func (m *ModuleElem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModuleElem.Marshal(b, m, deterministic) -} -func (m *ModuleElem) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModuleElem.Merge(m, src) -} -func (m *ModuleElem) XXX_Size() int { - return xxx_messageInfo_ModuleElem.Size(m) -} -func (m *ModuleElem) XXX_DiscardUnknown() { - xxx_messageInfo_ModuleElem.DiscardUnknown(m) -} - -var xxx_messageInfo_ModuleElem proto.InternalMessageInfo - -func (m *ModuleElem) GetModuleId() string { - if m != nil { - return m.ModuleId - } - return "" -} - -func (m *ModuleElem) GetModuleName() string { - if m != nil { - return m.ModuleName - } - return "" -} - -func (m *ModuleElem) GetFeatureSet() []*Feature { - if m != nil { - return m.FeatureSet - } - return nil -} - -func (m *ModuleElem) GetDataLevel() string { - if m != nil { - return m.DataLevel - } - return "" -} - -func (m *ModuleElem) GetIsCheckAll() bool { - if m != nil { - return m.IsCheckAll - } - return false -} - -type Module struct { - // list of module elem - ModuleElemSet []*ModuleElem `protobuf:"bytes,1,rep,name=module_elem_set,json=moduleElemSet,proto3" json:"module_elem_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Module) Reset() { *m = Module{} } -func (m *Module) String() string { return proto.CompactTextString(m) } -func (*Module) ProtoMessage() {} -func (*Module) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{39} -} - -func (m *Module) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Module.Unmarshal(m, b) -} -func (m *Module) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Module.Marshal(b, m, deterministic) -} -func (m *Module) XXX_Merge(src proto.Message) { - xxx_messageInfo_Module.Merge(m, src) -} -func (m *Module) XXX_Size() int { - return xxx_messageInfo_Module.Size(m) -} -func (m *Module) XXX_DiscardUnknown() { - xxx_messageInfo_Module.DiscardUnknown(m) -} - -var xxx_messageInfo_Module proto.InternalMessageInfo - -func (m *Module) GetModuleElemSet() []*ModuleElem { - if m != nil { - return m.ModuleElemSet - } - return nil -} - -type CanDoRequest struct { - // required, id of user to check whether has permission - UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - // required, request uri - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` - // required, url method, http verb - UrlMethod string `protobuf:"bytes,3,opt,name=url_method,json=urlMethod,proto3" json:"url_method,omitempty"` - // rpc method eg.[Token|CanDo|...] - ApiMethod string `protobuf:"bytes,4,opt,name=api_method,json=apiMethod,proto3" json:"api_method,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CanDoRequest) Reset() { *m = CanDoRequest{} } -func (m *CanDoRequest) String() string { return proto.CompactTextString(m) } -func (*CanDoRequest) ProtoMessage() {} -func (*CanDoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{40} -} - -func (m *CanDoRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CanDoRequest.Unmarshal(m, b) -} -func (m *CanDoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CanDoRequest.Marshal(b, m, deterministic) -} -func (m *CanDoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CanDoRequest.Merge(m, src) -} -func (m *CanDoRequest) XXX_Size() int { - return xxx_messageInfo_CanDoRequest.Size(m) -} -func (m *CanDoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CanDoRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CanDoRequest proto.InternalMessageInfo - -func (m *CanDoRequest) GetUserId() string { - if m != nil { - return m.UserId - } - return "" -} - -func (m *CanDoRequest) GetUrl() string { - if m != nil { - return m.Url - } - return "" -} - -func (m *CanDoRequest) GetUrlMethod() string { - if m != nil { - return m.UrlMethod - } - return "" -} - -func (m *CanDoRequest) GetApiMethod() string { - if m != nil { - return m.ApiMethod - } - return "" -} - -type CanDoResponse struct { - // id of user to check whether has permission - UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - // access path of user - AccessPath string `protobuf:"bytes,2,opt,name=access_path,json=accessPath,proto3" json:"access_path,omitempty"` - // owner path of user, concat string group_path:user_id - OwnerPath string `protobuf:"bytes,3,opt,name=owner_path,json=ownerPath,proto3" json:"owner_path,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CanDoResponse) Reset() { *m = CanDoResponse{} } -func (m *CanDoResponse) String() string { return proto.CompactTextString(m) } -func (*CanDoResponse) ProtoMessage() {} -func (*CanDoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{41} -} - -func (m *CanDoResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CanDoResponse.Unmarshal(m, b) -} -func (m *CanDoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CanDoResponse.Marshal(b, m, deterministic) -} -func (m *CanDoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CanDoResponse.Merge(m, src) -} -func (m *CanDoResponse) XXX_Size() int { - return xxx_messageInfo_CanDoResponse.Size(m) -} -func (m *CanDoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CanDoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CanDoResponse proto.InternalMessageInfo - -func (m *CanDoResponse) GetUserId() string { - if m != nil { - return m.UserId - } - return "" -} - -func (m *CanDoResponse) GetAccessPath() string { - if m != nil { - return m.AccessPath - } - return "" -} - -func (m *CanDoResponse) GetOwnerPath() string { - if m != nil { - return m.OwnerPath - } - return "" -} - -type GetRoleModuleRequest struct { - // required, use role id to get role's module - RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetRoleModuleRequest) Reset() { *m = GetRoleModuleRequest{} } -func (m *GetRoleModuleRequest) String() string { return proto.CompactTextString(m) } -func (*GetRoleModuleRequest) ProtoMessage() {} -func (*GetRoleModuleRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{42} -} - -func (m *GetRoleModuleRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetRoleModuleRequest.Unmarshal(m, b) -} -func (m *GetRoleModuleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetRoleModuleRequest.Marshal(b, m, deterministic) -} -func (m *GetRoleModuleRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetRoleModuleRequest.Merge(m, src) -} -func (m *GetRoleModuleRequest) XXX_Size() int { - return xxx_messageInfo_GetRoleModuleRequest.Size(m) -} -func (m *GetRoleModuleRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetRoleModuleRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetRoleModuleRequest proto.InternalMessageInfo - -func (m *GetRoleModuleRequest) GetRoleId() string { - if m != nil { - return m.RoleId - } - return "" -} - -type GetRoleModuleResponse struct { - // role id - RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` - // module info of role - Module *Module `protobuf:"bytes,2,opt,name=module,proto3" json:"module,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetRoleModuleResponse) Reset() { *m = GetRoleModuleResponse{} } -func (m *GetRoleModuleResponse) String() string { return proto.CompactTextString(m) } -func (*GetRoleModuleResponse) ProtoMessage() {} -func (*GetRoleModuleResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{43} -} - -func (m *GetRoleModuleResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetRoleModuleResponse.Unmarshal(m, b) -} -func (m *GetRoleModuleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetRoleModuleResponse.Marshal(b, m, deterministic) -} -func (m *GetRoleModuleResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetRoleModuleResponse.Merge(m, src) -} -func (m *GetRoleModuleResponse) XXX_Size() int { - return xxx_messageInfo_GetRoleModuleResponse.Size(m) -} -func (m *GetRoleModuleResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetRoleModuleResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetRoleModuleResponse proto.InternalMessageInfo - -func (m *GetRoleModuleResponse) GetRoleId() string { - if m != nil { - return m.RoleId - } - return "" -} - -func (m *GetRoleModuleResponse) GetModule() *Module { - if m != nil { - return m.Module - } - return nil -} - -type ModifyRoleModuleRequest struct { - // required, use role id to modify role module - RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` - // required, module info - Module *Module `protobuf:"bytes,2,opt,name=module,proto3" json:"module,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyRoleModuleRequest) Reset() { *m = ModifyRoleModuleRequest{} } -func (m *ModifyRoleModuleRequest) String() string { return proto.CompactTextString(m) } -func (*ModifyRoleModuleRequest) ProtoMessage() {} -func (*ModifyRoleModuleRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{44} -} - -func (m *ModifyRoleModuleRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyRoleModuleRequest.Unmarshal(m, b) -} -func (m *ModifyRoleModuleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyRoleModuleRequest.Marshal(b, m, deterministic) -} -func (m *ModifyRoleModuleRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyRoleModuleRequest.Merge(m, src) -} -func (m *ModifyRoleModuleRequest) XXX_Size() int { - return xxx_messageInfo_ModifyRoleModuleRequest.Size(m) -} -func (m *ModifyRoleModuleRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyRoleModuleRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyRoleModuleRequest proto.InternalMessageInfo - -func (m *ModifyRoleModuleRequest) GetRoleId() string { - if m != nil { - return m.RoleId - } - return "" -} - -func (m *ModifyRoleModuleRequest) GetModule() *Module { - if m != nil { - return m.Module - } - return nil -} - -type ModifyRoleModuleResponse struct { - // role id used to modify role module - RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyRoleModuleResponse) Reset() { *m = ModifyRoleModuleResponse{} } -func (m *ModifyRoleModuleResponse) String() string { return proto.CompactTextString(m) } -func (*ModifyRoleModuleResponse) ProtoMessage() {} -func (*ModifyRoleModuleResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{45} -} - -func (m *ModifyRoleModuleResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyRoleModuleResponse.Unmarshal(m, b) -} -func (m *ModifyRoleModuleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyRoleModuleResponse.Marshal(b, m, deterministic) -} -func (m *ModifyRoleModuleResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyRoleModuleResponse.Merge(m, src) -} -func (m *ModifyRoleModuleResponse) XXX_Size() int { - return xxx_messageInfo_ModifyRoleModuleResponse.Size(m) -} -func (m *ModifyRoleModuleResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyRoleModuleResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyRoleModuleResponse proto.InternalMessageInfo - -func (m *ModifyRoleModuleResponse) GetRoleId() string { - if m != nil { - return m.RoleId - } - return "" -} - -type CreateRoleRequest struct { - // required, role name - RoleName string `protobuf:"bytes,1,opt,name=role_name,json=roleName,proto3" json:"role_name,omitempty"` - // role description - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - // required, portal of role eg.[global_admin|user|isv] - Portal string `protobuf:"bytes,3,opt,name=portal,proto3" json:"portal,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateRoleRequest) Reset() { *m = CreateRoleRequest{} } -func (m *CreateRoleRequest) String() string { return proto.CompactTextString(m) } -func (*CreateRoleRequest) ProtoMessage() {} -func (*CreateRoleRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{46} -} - -func (m *CreateRoleRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateRoleRequest.Unmarshal(m, b) -} -func (m *CreateRoleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateRoleRequest.Marshal(b, m, deterministic) -} -func (m *CreateRoleRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateRoleRequest.Merge(m, src) -} -func (m *CreateRoleRequest) XXX_Size() int { - return xxx_messageInfo_CreateRoleRequest.Size(m) -} -func (m *CreateRoleRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateRoleRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateRoleRequest proto.InternalMessageInfo - -func (m *CreateRoleRequest) GetRoleName() string { - if m != nil { - return m.RoleName - } - return "" -} - -func (m *CreateRoleRequest) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *CreateRoleRequest) GetPortal() string { - if m != nil { - return m.Portal - } - return "" -} - -type CreateRoleResponse struct { - // id of role created - RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateRoleResponse) Reset() { *m = CreateRoleResponse{} } -func (m *CreateRoleResponse) String() string { return proto.CompactTextString(m) } -func (*CreateRoleResponse) ProtoMessage() {} -func (*CreateRoleResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{47} -} - -func (m *CreateRoleResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateRoleResponse.Unmarshal(m, b) -} -func (m *CreateRoleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateRoleResponse.Marshal(b, m, deterministic) -} -func (m *CreateRoleResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateRoleResponse.Merge(m, src) -} -func (m *CreateRoleResponse) XXX_Size() int { - return xxx_messageInfo_CreateRoleResponse.Size(m) -} -func (m *CreateRoleResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CreateRoleResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateRoleResponse proto.InternalMessageInfo - -func (m *CreateRoleResponse) GetRoleId() string { - if m != nil { - return m.RoleId - } - return "" -} - -type DeleteRolesRequest struct { - // required, ids of role to delete - RoleId []string `protobuf:"bytes,1,rep,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteRolesRequest) Reset() { *m = DeleteRolesRequest{} } -func (m *DeleteRolesRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteRolesRequest) ProtoMessage() {} -func (*DeleteRolesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{48} -} - -func (m *DeleteRolesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteRolesRequest.Unmarshal(m, b) -} -func (m *DeleteRolesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteRolesRequest.Marshal(b, m, deterministic) -} -func (m *DeleteRolesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteRolesRequest.Merge(m, src) -} -func (m *DeleteRolesRequest) XXX_Size() int { - return xxx_messageInfo_DeleteRolesRequest.Size(m) -} -func (m *DeleteRolesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteRolesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteRolesRequest proto.InternalMessageInfo - -func (m *DeleteRolesRequest) GetRoleId() []string { - if m != nil { - return m.RoleId - } - return nil -} - -type DeleteRolesResponse struct { - // ids of roles deleted - RoleId []string `protobuf:"bytes,1,rep,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteRolesResponse) Reset() { *m = DeleteRolesResponse{} } -func (m *DeleteRolesResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteRolesResponse) ProtoMessage() {} -func (*DeleteRolesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{49} -} - -func (m *DeleteRolesResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteRolesResponse.Unmarshal(m, b) -} -func (m *DeleteRolesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteRolesResponse.Marshal(b, m, deterministic) -} -func (m *DeleteRolesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteRolesResponse.Merge(m, src) -} -func (m *DeleteRolesResponse) XXX_Size() int { - return xxx_messageInfo_DeleteRolesResponse.Size(m) -} -func (m *DeleteRolesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteRolesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteRolesResponse proto.InternalMessageInfo - -func (m *DeleteRolesResponse) GetRoleId() []string { - if m != nil { - return m.RoleId - } - return nil -} - -type ModifyRoleRequest struct { - // required, id of role to modify - RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` - // role name - RoleName string `protobuf:"bytes,2,opt,name=role_name,json=roleName,proto3" json:"role_name,omitempty"` - // role description - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyRoleRequest) Reset() { *m = ModifyRoleRequest{} } -func (m *ModifyRoleRequest) String() string { return proto.CompactTextString(m) } -func (*ModifyRoleRequest) ProtoMessage() {} -func (*ModifyRoleRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{50} -} - -func (m *ModifyRoleRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyRoleRequest.Unmarshal(m, b) -} -func (m *ModifyRoleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyRoleRequest.Marshal(b, m, deterministic) -} -func (m *ModifyRoleRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyRoleRequest.Merge(m, src) -} -func (m *ModifyRoleRequest) XXX_Size() int { - return xxx_messageInfo_ModifyRoleRequest.Size(m) -} -func (m *ModifyRoleRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyRoleRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyRoleRequest proto.InternalMessageInfo - -func (m *ModifyRoleRequest) GetRoleId() string { - if m != nil { - return m.RoleId - } - return "" -} - -func (m *ModifyRoleRequest) GetRoleName() string { - if m != nil { - return m.RoleName - } - return "" -} - -func (m *ModifyRoleRequest) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -type ModifyRoleResponse struct { - // id of role modified - RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyRoleResponse) Reset() { *m = ModifyRoleResponse{} } -func (m *ModifyRoleResponse) String() string { return proto.CompactTextString(m) } -func (*ModifyRoleResponse) ProtoMessage() {} -func (*ModifyRoleResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{51} -} - -func (m *ModifyRoleResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyRoleResponse.Unmarshal(m, b) -} -func (m *ModifyRoleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyRoleResponse.Marshal(b, m, deterministic) -} -func (m *ModifyRoleResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyRoleResponse.Merge(m, src) -} -func (m *ModifyRoleResponse) XXX_Size() int { - return xxx_messageInfo_ModifyRoleResponse.Size(m) -} -func (m *ModifyRoleResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyRoleResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyRoleResponse proto.InternalMessageInfo - -func (m *ModifyRoleResponse) GetRoleId() string { - if m != nil { - return m.RoleId - } - return "" -} - -type GetRoleRequest struct { - // required, use role id to get role info - RoleId string `protobuf:"bytes,1,opt,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetRoleRequest) Reset() { *m = GetRoleRequest{} } -func (m *GetRoleRequest) String() string { return proto.CompactTextString(m) } -func (*GetRoleRequest) ProtoMessage() {} -func (*GetRoleRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{52} -} - -func (m *GetRoleRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetRoleRequest.Unmarshal(m, b) -} -func (m *GetRoleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetRoleRequest.Marshal(b, m, deterministic) -} -func (m *GetRoleRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetRoleRequest.Merge(m, src) -} -func (m *GetRoleRequest) XXX_Size() int { - return xxx_messageInfo_GetRoleRequest.Size(m) -} -func (m *GetRoleRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetRoleRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetRoleRequest proto.InternalMessageInfo - -func (m *GetRoleRequest) GetRoleId() string { - if m != nil { - return m.RoleId - } - return "" -} - -type GetRoleResponse struct { - // role info - Role *Role `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetRoleResponse) Reset() { *m = GetRoleResponse{} } -func (m *GetRoleResponse) String() string { return proto.CompactTextString(m) } -func (*GetRoleResponse) ProtoMessage() {} -func (*GetRoleResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{53} -} - -func (m *GetRoleResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetRoleResponse.Unmarshal(m, b) -} -func (m *GetRoleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetRoleResponse.Marshal(b, m, deterministic) -} -func (m *GetRoleResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetRoleResponse.Merge(m, src) -} -func (m *GetRoleResponse) XXX_Size() int { - return xxx_messageInfo_GetRoleResponse.Size(m) -} -func (m *GetRoleResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetRoleResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetRoleResponse proto.InternalMessageInfo - -func (m *GetRoleResponse) GetRole() *Role { - if m != nil { - return m.Role - } - return nil -} - -type DescribeRolesRequest struct { - // query key, support these fields(role_id, portal, status) - SearchWord string `protobuf:"bytes,1,opt,name=search_word,json=searchWord,proto3" json:"search_word,omitempty"` - // sort key, order by sort_key, default create_time - SortKey string `protobuf:"bytes,2,opt,name=sort_key,json=sortKey,proto3" json:"sort_key,omitempty"` - // value = 0 sort ASC, value = 1 sort DESC - Reverse bool `protobuf:"varint,3,opt,name=reverse,proto3" json:"reverse,omitempty"` - // data offset, default 0 - Offset uint32 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"` - // data limit per page, default value 20, max value 200 - Limit uint32 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"` - // role ids - RoleId []string `protobuf:"bytes,6,rep,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` - // name - RoleName []string `protobuf:"bytes,7,rep,name=role_name,json=roleName,proto3" json:"role_name,omitempty"` - // portal eg.[global_admin|user|isv] - Portal []string `protobuf:"bytes,8,rep,name=portal,proto3" json:"portal,omitempty"` - // status eg.[active|deleted] - Status []string `protobuf:"bytes,9,rep,name=status,proto3" json:"status,omitempty"` - // action bundle ids - ActionBundleId []string `protobuf:"bytes,10,rep,name=action_bundle_id,json=actionBundleId,proto3" json:"action_bundle_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeRolesRequest) Reset() { *m = DescribeRolesRequest{} } -func (m *DescribeRolesRequest) String() string { return proto.CompactTextString(m) } -func (*DescribeRolesRequest) ProtoMessage() {} -func (*DescribeRolesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{54} -} - -func (m *DescribeRolesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeRolesRequest.Unmarshal(m, b) -} -func (m *DescribeRolesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeRolesRequest.Marshal(b, m, deterministic) -} -func (m *DescribeRolesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeRolesRequest.Merge(m, src) -} -func (m *DescribeRolesRequest) XXX_Size() int { - return xxx_messageInfo_DescribeRolesRequest.Size(m) -} -func (m *DescribeRolesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeRolesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeRolesRequest proto.InternalMessageInfo - -func (m *DescribeRolesRequest) GetSearchWord() string { - if m != nil { - return m.SearchWord - } - return "" -} - -func (m *DescribeRolesRequest) GetSortKey() string { - if m != nil { - return m.SortKey - } - return "" -} - -func (m *DescribeRolesRequest) GetReverse() bool { - if m != nil { - return m.Reverse - } - return false -} - -func (m *DescribeRolesRequest) GetOffset() uint32 { - if m != nil { - return m.Offset - } - return 0 -} - -func (m *DescribeRolesRequest) GetLimit() uint32 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *DescribeRolesRequest) GetRoleId() []string { - if m != nil { - return m.RoleId - } - return nil -} - -func (m *DescribeRolesRequest) GetRoleName() []string { - if m != nil { - return m.RoleName - } - return nil -} - -func (m *DescribeRolesRequest) GetPortal() []string { - if m != nil { - return m.Portal - } - return nil -} - -func (m *DescribeRolesRequest) GetStatus() []string { - if m != nil { - return m.Status - } - return nil -} - -func (m *DescribeRolesRequest) GetActionBundleId() []string { - if m != nil { - return m.ActionBundleId - } - return nil -} - -type DescribeRolesResponse struct { - // total count of roles - TotalCount uint32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - // list of role - RoleSet []*Role `protobuf:"bytes,2,rep,name=role_set,json=roleSet,proto3" json:"role_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeRolesResponse) Reset() { *m = DescribeRolesResponse{} } -func (m *DescribeRolesResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeRolesResponse) ProtoMessage() {} -func (*DescribeRolesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{55} -} - -func (m *DescribeRolesResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeRolesResponse.Unmarshal(m, b) -} -func (m *DescribeRolesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeRolesResponse.Marshal(b, m, deterministic) -} -func (m *DescribeRolesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeRolesResponse.Merge(m, src) -} -func (m *DescribeRolesResponse) XXX_Size() int { - return xxx_messageInfo_DescribeRolesResponse.Size(m) -} -func (m *DescribeRolesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeRolesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeRolesResponse proto.InternalMessageInfo - -func (m *DescribeRolesResponse) GetTotalCount() uint32 { - if m != nil { - return m.TotalCount - } - return 0 -} - -func (m *DescribeRolesResponse) GetRoleSet() []*Role { - if m != nil { - return m.RoleSet - } - return nil -} - -type BindUserRoleRequest struct { - // required, ids of user to bind - UserId []string `protobuf:"bytes,1,rep,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - // required, ids of role for user to bind with - RoleId []string `protobuf:"bytes,2,rep,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BindUserRoleRequest) Reset() { *m = BindUserRoleRequest{} } -func (m *BindUserRoleRequest) String() string { return proto.CompactTextString(m) } -func (*BindUserRoleRequest) ProtoMessage() {} -func (*BindUserRoleRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{56} -} - -func (m *BindUserRoleRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BindUserRoleRequest.Unmarshal(m, b) -} -func (m *BindUserRoleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BindUserRoleRequest.Marshal(b, m, deterministic) -} -func (m *BindUserRoleRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_BindUserRoleRequest.Merge(m, src) -} -func (m *BindUserRoleRequest) XXX_Size() int { - return xxx_messageInfo_BindUserRoleRequest.Size(m) -} -func (m *BindUserRoleRequest) XXX_DiscardUnknown() { - xxx_messageInfo_BindUserRoleRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_BindUserRoleRequest proto.InternalMessageInfo - -func (m *BindUserRoleRequest) GetUserId() []string { - if m != nil { - return m.UserId - } - return nil -} - -func (m *BindUserRoleRequest) GetRoleId() []string { - if m != nil { - return m.RoleId - } - return nil -} - -type BindUserRoleResponse struct { - // ids of user bind - UserId []string `protobuf:"bytes,1,rep,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - // ids of role for user to bind with - RoleId []string `protobuf:"bytes,2,rep,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BindUserRoleResponse) Reset() { *m = BindUserRoleResponse{} } -func (m *BindUserRoleResponse) String() string { return proto.CompactTextString(m) } -func (*BindUserRoleResponse) ProtoMessage() {} -func (*BindUserRoleResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{57} -} - -func (m *BindUserRoleResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BindUserRoleResponse.Unmarshal(m, b) -} -func (m *BindUserRoleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BindUserRoleResponse.Marshal(b, m, deterministic) -} -func (m *BindUserRoleResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BindUserRoleResponse.Merge(m, src) -} -func (m *BindUserRoleResponse) XXX_Size() int { - return xxx_messageInfo_BindUserRoleResponse.Size(m) -} -func (m *BindUserRoleResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BindUserRoleResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_BindUserRoleResponse proto.InternalMessageInfo - -func (m *BindUserRoleResponse) GetUserId() []string { - if m != nil { - return m.UserId - } - return nil -} - -func (m *BindUserRoleResponse) GetRoleId() []string { - if m != nil { - return m.RoleId - } - return nil -} - -type UnbindUserRoleRequest struct { - // ids of user to unbind - UserId []string `protobuf:"bytes,1,rep,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - // ids of role for user to unbind with - RoleId []string `protobuf:"bytes,2,rep,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UnbindUserRoleRequest) Reset() { *m = UnbindUserRoleRequest{} } -func (m *UnbindUserRoleRequest) String() string { return proto.CompactTextString(m) } -func (*UnbindUserRoleRequest) ProtoMessage() {} -func (*UnbindUserRoleRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{58} -} - -func (m *UnbindUserRoleRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UnbindUserRoleRequest.Unmarshal(m, b) -} -func (m *UnbindUserRoleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UnbindUserRoleRequest.Marshal(b, m, deterministic) -} -func (m *UnbindUserRoleRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnbindUserRoleRequest.Merge(m, src) -} -func (m *UnbindUserRoleRequest) XXX_Size() int { - return xxx_messageInfo_UnbindUserRoleRequest.Size(m) -} -func (m *UnbindUserRoleRequest) XXX_DiscardUnknown() { - xxx_messageInfo_UnbindUserRoleRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_UnbindUserRoleRequest proto.InternalMessageInfo - -func (m *UnbindUserRoleRequest) GetUserId() []string { - if m != nil { - return m.UserId - } - return nil -} - -func (m *UnbindUserRoleRequest) GetRoleId() []string { - if m != nil { - return m.RoleId - } - return nil -} - -type UnbindUserRoleResponse struct { - // ids of user to unbind - UserId []string `protobuf:"bytes,1,rep,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - // ids of role for user to unbind with - RoleId []string `protobuf:"bytes,2,rep,name=role_id,json=roleId,proto3" json:"role_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UnbindUserRoleResponse) Reset() { *m = UnbindUserRoleResponse{} } -func (m *UnbindUserRoleResponse) String() string { return proto.CompactTextString(m) } -func (*UnbindUserRoleResponse) ProtoMessage() {} -func (*UnbindUserRoleResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{59} -} - -func (m *UnbindUserRoleResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UnbindUserRoleResponse.Unmarshal(m, b) -} -func (m *UnbindUserRoleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UnbindUserRoleResponse.Marshal(b, m, deterministic) -} -func (m *UnbindUserRoleResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_UnbindUserRoleResponse.Merge(m, src) -} -func (m *UnbindUserRoleResponse) XXX_Size() int { - return xxx_messageInfo_UnbindUserRoleResponse.Size(m) -} -func (m *UnbindUserRoleResponse) XXX_DiscardUnknown() { - xxx_messageInfo_UnbindUserRoleResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_UnbindUserRoleResponse proto.InternalMessageInfo - -func (m *UnbindUserRoleResponse) GetUserId() []string { - if m != nil { - return m.UserId - } - return nil -} - -func (m *UnbindUserRoleResponse) GetRoleId() []string { - if m != nil { - return m.RoleId - } - return nil -} - -type CreateClientRequest struct { - // required, user id for create client - UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateClientRequest) Reset() { *m = CreateClientRequest{} } -func (m *CreateClientRequest) String() string { return proto.CompactTextString(m) } -func (*CreateClientRequest) ProtoMessage() {} -func (*CreateClientRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{60} -} - -func (m *CreateClientRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateClientRequest.Unmarshal(m, b) -} -func (m *CreateClientRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateClientRequest.Marshal(b, m, deterministic) -} -func (m *CreateClientRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateClientRequest.Merge(m, src) -} -func (m *CreateClientRequest) XXX_Size() int { - return xxx_messageInfo_CreateClientRequest.Size(m) -} -func (m *CreateClientRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateClientRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateClientRequest proto.InternalMessageInfo - -func (m *CreateClientRequest) GetUserId() string { - if m != nil { - return m.UserId - } - return "" -} - -type CreateClientResponse struct { - // user id of client - UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - // client id of user - ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - // client secret,used for validate client credentials - ClientSecret string `protobuf:"bytes,3,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateClientResponse) Reset() { *m = CreateClientResponse{} } -func (m *CreateClientResponse) String() string { return proto.CompactTextString(m) } -func (*CreateClientResponse) ProtoMessage() {} -func (*CreateClientResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{61} -} - -func (m *CreateClientResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateClientResponse.Unmarshal(m, b) -} -func (m *CreateClientResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateClientResponse.Marshal(b, m, deterministic) -} -func (m *CreateClientResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateClientResponse.Merge(m, src) -} -func (m *CreateClientResponse) XXX_Size() int { - return xxx_messageInfo_CreateClientResponse.Size(m) -} -func (m *CreateClientResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CreateClientResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateClientResponse proto.InternalMessageInfo - -func (m *CreateClientResponse) GetUserId() string { - if m != nil { - return m.UserId - } - return "" -} - -func (m *CreateClientResponse) GetClientId() string { - if m != nil { - return m.ClientId - } - return "" -} - -func (m *CreateClientResponse) GetClientSecret() string { - if m != nil { - return m.ClientSecret - } - return "" -} - -type TokenRequest struct { - // required, type of client request verification.eg.[client_credentials or password or refresh_token] - GrantType string `protobuf:"bytes,1,opt,name=grant_type,json=grantType,proto3" json:"grant_type,omitempty"` - // required, client id - ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"` - // required, used for validate client credentials - ClientSecret string `protobuf:"bytes,3,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"` - // scope - Scope string `protobuf:"bytes,4,opt,name=scope,proto3" json:"scope,omitempty"` - // required or not depend on grant_type, user's name - Username string `protobuf:"bytes,5,opt,name=username,proto3" json:"username,omitempty"` - // required or not depend on grant_type, user's password - Password string `protobuf:"bytes,6,opt,name=password,proto3" json:"password,omitempty"` - // required or not depend on grant_type, refresh token to check whether token expired - RefreshToken string `protobuf:"bytes,7,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TokenRequest) Reset() { *m = TokenRequest{} } -func (m *TokenRequest) String() string { return proto.CompactTextString(m) } -func (*TokenRequest) ProtoMessage() {} -func (*TokenRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{62} -} - -func (m *TokenRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TokenRequest.Unmarshal(m, b) -} -func (m *TokenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TokenRequest.Marshal(b, m, deterministic) -} -func (m *TokenRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenRequest.Merge(m, src) -} -func (m *TokenRequest) XXX_Size() int { - return xxx_messageInfo_TokenRequest.Size(m) -} -func (m *TokenRequest) XXX_DiscardUnknown() { - xxx_messageInfo_TokenRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_TokenRequest proto.InternalMessageInfo - -func (m *TokenRequest) GetGrantType() string { - if m != nil { - return m.GrantType - } - return "" -} - -func (m *TokenRequest) GetClientId() string { - if m != nil { - return m.ClientId - } - return "" -} - -func (m *TokenRequest) GetClientSecret() string { - if m != nil { - return m.ClientSecret - } - return "" -} - -func (m *TokenRequest) GetScope() string { - if m != nil { - return m.Scope - } - return "" -} - -func (m *TokenRequest) GetUsername() string { - if m != nil { - return m.Username - } - return "" -} - -func (m *TokenRequest) GetPassword() string { - if m != nil { - return m.Password - } - return "" -} - -func (m *TokenRequest) GetRefreshToken() string { - if m != nil { - return m.RefreshToken - } - return "" -} - -type TokenResponse struct { - // token type.eg.[sender,bearer] - TokenType string `protobuf:"bytes,1,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` - // default 2h - ExpiresIn int32 `protobuf:"varint,2,opt,name=expires_in,json=expiresIn,proto3" json:"expires_in,omitempty"` - //access token, generator by jwt(key=secrete key) - AccessToken string `protobuf:"bytes,3,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` - //refresh token, timeliness,default expired after 2 weeks - RefreshToken string `protobuf:"bytes,4,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` - //id token, generator by jwt(key="") - IdToken string `protobuf:"bytes,5,opt,name=id_token,json=idToken,proto3" json:"id_token,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TokenResponse) Reset() { *m = TokenResponse{} } -func (m *TokenResponse) String() string { return proto.CompactTextString(m) } -func (*TokenResponse) ProtoMessage() {} -func (*TokenResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e28828dcb8d24f0, []int{63} -} - -func (m *TokenResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TokenResponse.Unmarshal(m, b) -} -func (m *TokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TokenResponse.Marshal(b, m, deterministic) -} -func (m *TokenResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenResponse.Merge(m, src) -} -func (m *TokenResponse) XXX_Size() int { - return xxx_messageInfo_TokenResponse.Size(m) -} -func (m *TokenResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TokenResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_TokenResponse proto.InternalMessageInfo - -func (m *TokenResponse) GetTokenType() string { - if m != nil { - return m.TokenType - } - return "" -} - -func (m *TokenResponse) GetExpiresIn() int32 { - if m != nil { - return m.ExpiresIn - } - return 0 -} - -func (m *TokenResponse) GetAccessToken() string { - if m != nil { - return m.AccessToken - } - return "" -} - -func (m *TokenResponse) GetRefreshToken() string { - if m != nil { - return m.RefreshToken - } - return "" -} - -func (m *TokenResponse) GetIdToken() string { - if m != nil { - return m.IdToken - } - return "" -} - -func init() { - proto.RegisterType((*User)(nil), "openpitrix.User") - proto.RegisterType((*UserDetail)(nil), "openpitrix.UserDetail") - proto.RegisterType((*Group)(nil), "openpitrix.Group") - proto.RegisterType((*GroupDetail)(nil), "openpitrix.GroupDetail") - proto.RegisterType((*DescribeUsersRequest)(nil), "openpitrix.DescribeUsersRequest") - proto.RegisterType((*DescribeUsersResponse)(nil), "openpitrix.DescribeUsersResponse") - proto.RegisterType((*DescribeUsersDetailResponse)(nil), "openpitrix.DescribeUsersDetailResponse") - proto.RegisterType((*ModifyUserRequest)(nil), "openpitrix.ModifyUserRequest") - proto.RegisterType((*ModifyUserResponse)(nil), "openpitrix.ModifyUserResponse") - proto.RegisterType((*DeleteUsersRequest)(nil), "openpitrix.DeleteUsersRequest") - proto.RegisterType((*DeleteUsersResponse)(nil), "openpitrix.DeleteUsersResponse") - proto.RegisterType((*CreatePasswordResetRequest)(nil), "openpitrix.CreatePasswordResetRequest") - proto.RegisterType((*CreatePasswordResetResponse)(nil), "openpitrix.CreatePasswordResetResponse") - proto.RegisterType((*ChangePasswordRequest)(nil), "openpitrix.ChangePasswordRequest") - proto.RegisterType((*ChangePasswordResponse)(nil), "openpitrix.ChangePasswordResponse") - proto.RegisterType((*GetPasswordResetRequest)(nil), "openpitrix.GetPasswordResetRequest") - proto.RegisterType((*GetPasswordResetResponse)(nil), "openpitrix.GetPasswordResetResponse") - proto.RegisterType((*CreateUserRequest)(nil), "openpitrix.CreateUserRequest") - proto.RegisterType((*CreateUserResponse)(nil), "openpitrix.CreateUserResponse") - proto.RegisterType((*ValidateUserPasswordRequest)(nil), "openpitrix.ValidateUserPasswordRequest") - proto.RegisterType((*ValidateUserPasswordResponse)(nil), "openpitrix.ValidateUserPasswordResponse") - proto.RegisterType((*CreateGroupRequest)(nil), "openpitrix.CreateGroupRequest") - proto.RegisterType((*CreateGroupResponse)(nil), "openpitrix.CreateGroupResponse") - proto.RegisterType((*DescribeGroupsRequest)(nil), "openpitrix.DescribeGroupsRequest") - proto.RegisterType((*DescribeGroupsResponse)(nil), "openpitrix.DescribeGroupsResponse") - proto.RegisterType((*DescribeGroupsDetailResponse)(nil), "openpitrix.DescribeGroupsDetailResponse") - proto.RegisterType((*ModifyGroupRequest)(nil), "openpitrix.ModifyGroupRequest") - proto.RegisterType((*ModifyGroupResponse)(nil), "openpitrix.ModifyGroupResponse") - proto.RegisterType((*DeleteGroupsRequest)(nil), "openpitrix.DeleteGroupsRequest") - proto.RegisterType((*DeleteGroupsResponse)(nil), "openpitrix.DeleteGroupsResponse") - proto.RegisterType((*JoinGroupRequest)(nil), "openpitrix.JoinGroupRequest") - proto.RegisterType((*JoinGroupResponse)(nil), "openpitrix.JoinGroupResponse") - proto.RegisterType((*LeaveGroupRequest)(nil), "openpitrix.LeaveGroupRequest") - proto.RegisterType((*LeaveGroupResponse)(nil), "openpitrix.LeaveGroupResponse") - proto.RegisterType((*Role)(nil), "openpitrix.Role") - proto.RegisterType((*Api)(nil), "openpitrix.Api") - proto.RegisterType((*ActionBundle)(nil), "openpitrix.ActionBundle") - proto.RegisterType((*Feature)(nil), "openpitrix.Feature") - proto.RegisterType((*ModuleElem)(nil), "openpitrix.ModuleElem") - proto.RegisterType((*Module)(nil), "openpitrix.Module") - proto.RegisterType((*CanDoRequest)(nil), "openpitrix.CanDoRequest") - proto.RegisterType((*CanDoResponse)(nil), "openpitrix.CanDoResponse") - proto.RegisterType((*GetRoleModuleRequest)(nil), "openpitrix.GetRoleModuleRequest") - proto.RegisterType((*GetRoleModuleResponse)(nil), "openpitrix.GetRoleModuleResponse") - proto.RegisterType((*ModifyRoleModuleRequest)(nil), "openpitrix.ModifyRoleModuleRequest") - proto.RegisterType((*ModifyRoleModuleResponse)(nil), "openpitrix.ModifyRoleModuleResponse") - proto.RegisterType((*CreateRoleRequest)(nil), "openpitrix.CreateRoleRequest") - proto.RegisterType((*CreateRoleResponse)(nil), "openpitrix.CreateRoleResponse") - proto.RegisterType((*DeleteRolesRequest)(nil), "openpitrix.DeleteRolesRequest") - proto.RegisterType((*DeleteRolesResponse)(nil), "openpitrix.DeleteRolesResponse") - proto.RegisterType((*ModifyRoleRequest)(nil), "openpitrix.ModifyRoleRequest") - proto.RegisterType((*ModifyRoleResponse)(nil), "openpitrix.ModifyRoleResponse") - proto.RegisterType((*GetRoleRequest)(nil), "openpitrix.GetRoleRequest") - proto.RegisterType((*GetRoleResponse)(nil), "openpitrix.GetRoleResponse") - proto.RegisterType((*DescribeRolesRequest)(nil), "openpitrix.DescribeRolesRequest") - proto.RegisterType((*DescribeRolesResponse)(nil), "openpitrix.DescribeRolesResponse") - proto.RegisterType((*BindUserRoleRequest)(nil), "openpitrix.BindUserRoleRequest") - proto.RegisterType((*BindUserRoleResponse)(nil), "openpitrix.BindUserRoleResponse") - proto.RegisterType((*UnbindUserRoleRequest)(nil), "openpitrix.UnbindUserRoleRequest") - proto.RegisterType((*UnbindUserRoleResponse)(nil), "openpitrix.UnbindUserRoleResponse") - proto.RegisterType((*CreateClientRequest)(nil), "openpitrix.CreateClientRequest") - proto.RegisterType((*CreateClientResponse)(nil), "openpitrix.CreateClientResponse") - proto.RegisterType((*TokenRequest)(nil), "openpitrix.TokenRequest") - proto.RegisterType((*TokenResponse)(nil), "openpitrix.TokenResponse") -} - -func init() { proto.RegisterFile("account.proto", fileDescriptor_8e28828dcb8d24f0) } - -var fileDescriptor_8e28828dcb8d24f0 = []byte{ - // 3561 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x3a, 0x5d, 0x6f, 0x1b, 0xc7, - 0xb5, 0x77, 0x29, 0x8a, 0x12, 0x0f, 0x45, 0x49, 0x1e, 0xcb, 0x32, 0x4d, 0x49, 0xf6, 0x7a, 0x63, - 0xd8, 0xb2, 0x2c, 0x4b, 0x89, 0x92, 0x20, 0x81, 0x73, 0xe3, 0x80, 0x96, 0x13, 0x5b, 0x49, 0xec, - 0x04, 0x74, 0x9c, 0x00, 0x37, 0x37, 0x21, 0x56, 0xdc, 0xa1, 0xb8, 0xf1, 0x72, 0x97, 0xd9, 0x5d, - 0x4a, 0xf1, 0xbd, 0x17, 0xb7, 0x68, 0xd0, 0x00, 0x6d, 0x81, 0xa0, 0x29, 0x8b, 0x14, 0xfd, 0x78, - 0x6a, 0x81, 0xbe, 0x04, 0x7d, 0x08, 0xfa, 0x52, 0xf4, 0xb1, 0x2f, 0x05, 0x0a, 0xf4, 0xa1, 0x1f, - 0xff, 0xa0, 0x2d, 0xd0, 0xf7, 0xf6, 0x0f, 0x14, 0x73, 0x66, 0x76, 0x77, 0x66, 0xb9, 0x94, 0x48, - 0x2b, 0x09, 0x50, 0xa0, 0x4f, 0xe2, 0xce, 0x39, 0x33, 0xe7, 0x63, 0xce, 0x9c, 0x4f, 0x41, 0xd9, - 0x6c, 0x36, 0xbd, 0x9e, 0x1b, 0x6e, 0x74, 0x7d, 0x2f, 0xf4, 0x08, 0x78, 0x5d, 0xea, 0x76, 0xed, - 0xd0, 0xb7, 0x3f, 0xa8, 0x9e, 0xdd, 0xf3, 0xbc, 0x3d, 0x87, 0x6e, 0x22, 0x64, 0xb7, 0xd7, 0xda, - 0x3c, 0xf0, 0xcd, 0x6e, 0x97, 0xfa, 0x01, 0xc7, 0xad, 0x9e, 0x4b, 0xc3, 0x43, 0xbb, 0x43, 0x83, - 0xd0, 0xec, 0x74, 0x05, 0xc2, 0xb2, 0x40, 0x30, 0xbb, 0xf6, 0xa6, 0xe9, 0xba, 0x5e, 0x68, 0x86, - 0xb6, 0xe7, 0x46, 0xdb, 0xd7, 0xf1, 0x4f, 0xf3, 0xea, 0x1e, 0x75, 0xaf, 0x06, 0x07, 0xe6, 0xde, - 0x1e, 0xf5, 0x37, 0xbd, 0x2e, 0x62, 0x0c, 0x62, 0x1b, 0x3f, 0xcc, 0x43, 0xfe, 0x7e, 0x40, 0x7d, - 0xf2, 0x34, 0x4c, 0xf5, 0x02, 0xea, 0x37, 0x6c, 0xab, 0xa2, 0xe9, 0xda, 0x6a, 0x69, 0x6b, 0x79, - 0x83, 0x93, 0xd9, 0x88, 0xf8, 0xd8, 0xb8, 0x17, 0xfa, 0xb6, 0xbb, 0xf7, 0xa6, 0xe9, 0xf4, 0x68, - 0xbd, 0xc0, 0x90, 0x77, 0x2c, 0xf2, 0x2c, 0x4c, 0xb3, 0x5f, 0xae, 0xd9, 0xa1, 0x95, 0xdc, 0x08, - 0xfb, 0x62, 0x6c, 0xb2, 0x05, 0x93, 0xb4, 0x63, 0xda, 0x4e, 0x65, 0x62, 0x84, 0x6d, 0x1c, 0x95, - 0xbc, 0x00, 0x33, 0xdd, 0xb6, 0xe7, 0xd2, 0x86, 0xdb, 0xeb, 0xec, 0x52, 0xbf, 0x92, 0x1f, 0x61, - 0x6b, 0x09, 0x77, 0xdc, 0xc5, 0x0d, 0xe4, 0x3a, 0x94, 0x2c, 0x1a, 0x34, 0x7d, 0x1b, 0x15, 0x52, - 0x99, 0x1c, 0x65, 0xbf, 0xb4, 0x81, 0x3c, 0x05, 0x85, 0x20, 0x34, 0xc3, 0x5e, 0x50, 0x29, 0x8c, - 0xa2, 0x24, 0x8e, 0x4b, 0x9e, 0x83, 0x52, 0xd3, 0xa7, 0x66, 0x48, 0x1b, 0xec, 0x2a, 0x2b, 0x53, - 0xb8, 0xb5, 0x3a, 0xb0, 0xf5, 0x8d, 0xe8, 0x9e, 0xeb, 0xc0, 0xd1, 0xd9, 0x02, 0xdb, 0xdc, 0xeb, - 0x5a, 0xf1, 0xe6, 0xe9, 0xa3, 0x37, 0x73, 0xf4, 0x68, 0x33, 0xe7, 0x81, 0x6f, 0x2e, 0x1e, 0xbd, - 0x99, 0xa3, 0xb3, 0x05, 0xe3, 0x3b, 0x1a, 0x00, 0xb3, 0x8d, 0x9b, 0x34, 0x64, 0xca, 0xbf, 0x00, - 0x79, 0x76, 0x79, 0xc2, 0x3c, 0xe6, 0x37, 0x12, 0x93, 0xde, 0x60, 0x58, 0x75, 0x84, 0x92, 0x2b, - 0x30, 0xed, 0x7b, 0x0e, 0x6d, 0x04, 0x34, 0xac, 0xe4, 0xf4, 0x89, 0x34, 0x66, 0xdd, 0x73, 0x68, - 0x7d, 0x8a, 0x61, 0xdc, 0xa3, 0x21, 0xd9, 0x80, 0xe2, 0x9e, 0xef, 0xf5, 0xba, 0x88, 0x3d, 0x81, - 0xd8, 0x27, 0x64, 0xec, 0x5b, 0x0c, 0x58, 0x9f, 0x46, 0x9c, 0x7b, 0x34, 0x34, 0x7e, 0x9a, 0x87, - 0x49, 0x5c, 0x23, 0x37, 0x61, 0xae, 0x6b, 0xfa, 0xd4, 0x0d, 0x1b, 0xfc, 0x80, 0x11, 0xcd, 0xb6, - 0xcc, 0x37, 0xe1, 0x19, 0x3b, 0x16, 0x79, 0x06, 0xa6, 0xe3, 0xed, 0xa3, 0x58, 0xef, 0xd4, 0x9e, - 0xd8, 0xf8, 0x1c, 0x00, 0xdf, 0xd8, 0x35, 0xc3, 0xf6, 0x48, 0x16, 0xcc, 0x05, 0x7d, 0xdd, 0x0c, - 0xdb, 0xe4, 0x71, 0xc8, 0xe3, 0x7b, 0x19, 0xc5, 0x7a, 0x11, 0x53, 0x32, 0xbb, 0xc9, 0x31, 0xcc, - 0x2e, 0x65, 0xec, 0x85, 0x71, 0x8d, 0xfd, 0x5f, 0xd4, 0x6c, 0x9b, 0x50, 0xc2, 0xfb, 0x15, 0x66, - 0x7b, 0x09, 0x26, 0x51, 0xf5, 0xc2, 0x3e, 0x32, 0xec, 0x8b, 0xc3, 0x99, 0xe5, 0xa2, 0x07, 0x1c, - 0x62, 0xb9, 0x68, 0xe3, 0xe8, 0x23, 0x99, 0x25, 0xfe, 0x7e, 0x02, 0x16, 0x6e, 0xa2, 0xae, 0x76, - 0x29, 0x83, 0x04, 0x75, 0xfa, 0x7e, 0x8f, 0x06, 0x21, 0x79, 0x1e, 0x4a, 0x01, 0x35, 0xfd, 0x66, - 0xbb, 0x71, 0xe0, 0xf9, 0xa3, 0x19, 0x25, 0xf0, 0x0d, 0x6f, 0x79, 0x3e, 0x5a, 0x64, 0xe0, 0xf9, - 0x61, 0xe3, 0x01, 0x7d, 0x38, 0x9a, 0x45, 0x32, 0xec, 0x57, 0xe8, 0x43, 0xf2, 0x14, 0x4c, 0xf9, - 0x74, 0x9f, 0xfa, 0x01, 0x15, 0xe6, 0x38, 0xa8, 0xae, 0x1b, 0x9e, 0xe7, 0x88, 0x5d, 0x02, 0x95, - 0x2c, 0xc0, 0xa4, 0x63, 0x77, 0xec, 0x10, 0x6d, 0xb1, 0x5c, 0xe7, 0x1f, 0x64, 0x11, 0x0a, 0x5e, - 0xab, 0xc5, 0xf4, 0x30, 0x89, 0xcb, 0xe2, 0x8b, 0x18, 0x50, 0xf6, 0x3d, 0x4f, 0x7a, 0x72, 0x05, - 0x7d, 0x62, 0xb5, 0x58, 0x2f, 0xb1, 0xc5, 0xe8, 0x49, 0x9d, 0x91, 0x9e, 0xd4, 0x14, 0x82, 0xe3, - 0x47, 0x73, 0x3a, 0x09, 0x31, 0xd3, 0x08, 0x89, 0x82, 0xc8, 0x62, 0x6c, 0xde, 0x45, 0xbe, 0x2e, - 0x0c, 0xf8, 0x34, 0xa0, 0xa7, 0x60, 0x1b, 0x80, 0x03, 0xd8, 0xe7, 0x8e, 0x45, 0xaa, 0x52, 0xd4, - 0x29, 0x21, 0x24, 0x89, 0x2b, 0x0b, 0x51, 0x5c, 0x99, 0x41, 0x80, 0x88, 0x1c, 0xe7, 0x53, 0x91, - 0xa3, 0xcc, 0x39, 0x97, 0x62, 0x83, 0x41, 0xe1, 0x54, 0xea, 0x46, 0x83, 0xae, 0xe7, 0x06, 0x94, - 0x9c, 0x83, 0x52, 0xe8, 0x85, 0xa6, 0xd3, 0xc0, 0x88, 0x8e, 0x57, 0x5a, 0xae, 0x03, 0x2e, 0x6d, - 0xb3, 0x95, 0xf1, 0x2c, 0xe7, 0xff, 0x61, 0x49, 0x21, 0xc3, 0xcd, 0x74, 0x74, 0x62, 0xd7, 0x61, - 0x0e, 0x89, 0x59, 0xb8, 0x4f, 0xa2, 0xb9, 0x98, 0xa6, 0x29, 0x4e, 0x2e, 0xf7, 0xe2, 0xdf, 0x8c, - 0xfe, 0x3f, 0x72, 0x70, 0xe2, 0x8e, 0x67, 0xd9, 0xad, 0x87, 0xc8, 0x97, 0x30, 0xdb, 0x47, 0x0c, - 0xff, 0x71, 0x10, 0xcf, 0x8d, 0x1e, 0xc4, 0xe5, 0x94, 0x61, 0x62, 0xac, 0x94, 0x21, 0xe5, 0xd0, - 0xf2, 0xe3, 0x3a, 0xb4, 0x67, 0x61, 0xba, 0x6b, 0x06, 0x01, 0x3e, 0xcc, 0x51, 0x1c, 0x69, 0x8c, - 0x3d, 0x90, 0x78, 0x14, 0xc6, 0x4c, 0x3c, 0x8c, 0x57, 0x80, 0xc8, 0x4a, 0x17, 0x97, 0xfd, 0x68, - 0x5a, 0x37, 0xae, 0x02, 0xb9, 0x49, 0x1d, 0x1a, 0xaa, 0x9e, 0xe7, 0xb4, 0x7c, 0x98, 0xf4, 0xbc, - 0x8c, 0x0d, 0x38, 0xa9, 0xa0, 0x0b, 0xe2, 0x43, 0xf1, 0x3f, 0xd6, 0xa0, 0xba, 0x8d, 0x9e, 0xfc, - 0x75, 0x21, 0x7f, 0x9d, 0x06, 0x34, 0x3c, 0xa6, 0xa9, 0xc8, 0xca, 0xcf, 0x8d, 0xa3, 0x7c, 0xc6, - 0xcf, 0x52, 0x26, 0x3f, 0xc7, 0xd2, 0x22, 0x73, 0xb5, 0x3e, 0x3b, 0x67, 0xe4, 0xe0, 0x8f, 0xd8, - 0x3b, 0x96, 0xf1, 0x5d, 0x0d, 0x4e, 0x6d, 0xb7, 0x4d, 0x77, 0x4f, 0xe2, 0x87, 0xab, 0xe6, 0x05, - 0x98, 0x71, 0xe9, 0x41, 0x23, 0x96, 0x73, 0x14, 0x76, 0x4a, 0x2e, 0x3d, 0x88, 0xce, 0x79, 0x74, - 0x9e, 0x5e, 0x83, 0xc5, 0x34, 0x4b, 0xc7, 0xb3, 0xb1, 0xa7, 0xe0, 0xf4, 0x2d, 0x1a, 0x66, 0x1a, - 0xc0, 0x19, 0x89, 0x49, 0x76, 0x64, 0x31, 0x61, 0xe3, 0x2e, 0x54, 0x06, 0x77, 0x09, 0x46, 0x86, - 0x6f, 0x93, 0x4d, 0x31, 0x87, 0x90, 0x88, 0x8b, 0x5f, 0xe5, 0xe0, 0x04, 0xbf, 0x7a, 0xd9, 0x59, - 0xc5, 0x5e, 0x47, 0x7b, 0xf4, 0xd2, 0x21, 0x37, 0x6e, 0xe9, 0x20, 0xdb, 0xef, 0xc4, 0x58, 0xce, - 0xe3, 0xe9, 0x24, 0x8c, 0x8d, 0xe2, 0xb2, 0xa2, 0x20, 0x77, 0xcc, 0x5a, 0x85, 0xb9, 0x1c, 0x59, - 0x75, 0xc7, 0x33, 0x87, 0xd7, 0x60, 0xe9, 0x4d, 0xd3, 0xb1, 0x2d, 0x71, 0x5c, 0xda, 0xf0, 0x17, - 0xe4, 0x1b, 0x89, 0x83, 0x6e, 0x35, 0xf5, 0xe4, 0x8b, 0xd2, 0xa3, 0xfe, 0x4f, 0x58, 0xce, 0x3e, - 0x50, 0xf0, 0xb9, 0x0c, 0xc5, 0x7d, 0x01, 0xe7, 0x9c, 0x4e, 0xd7, 0x93, 0x05, 0xe3, 0x77, 0x5a, - 0x24, 0x1c, 0x4f, 0xe1, 0x04, 0x1b, 0x5f, 0x4c, 0x55, 0x10, 0xe5, 0xe7, 0xb9, 0x91, 0xf3, 0xf3, - 0xd4, 0x55, 0x4d, 0x8c, 0x7b, 0x55, 0x77, 0xe1, 0xa4, 0x22, 0x8d, 0xd0, 0x81, 0x5c, 0x9e, 0x68, - 0x63, 0x94, 0x27, 0xc6, 0xe7, 0x13, 0x49, 0x2e, 0x83, 0x47, 0xfe, 0x3b, 0x3d, 0x15, 0x77, 0x7b, - 0x71, 0xd0, 0x42, 0x78, 0x96, 0x9a, 0xb2, 0x01, 0x39, 0x8d, 0x9d, 0x56, 0xd3, 0xd8, 0x15, 0xa5, - 0xf6, 0xe3, 0x19, 0xab, 0x54, 0xdd, 0xc5, 0x60, 0xb4, 0x21, 0x90, 0xc0, 0x77, 0x99, 0xa9, 0x24, - 0xb9, 0x6e, 0x49, 0xce, 0x75, 0x0d, 0x1b, 0x16, 0xd3, 0x37, 0x36, 0x6a, 0x46, 0xa8, 0x54, 0xd1, - 0xb9, 0xa3, 0xab, 0xe8, 0x0f, 0x35, 0x58, 0x56, 0x69, 0x8d, 0x9b, 0x83, 0xd6, 0x60, 0x9e, 0x53, - 0x1c, 0x48, 0x42, 0x4f, 0x0f, 0x10, 0x16, 0x67, 0xcf, 0xee, 0x25, 0x1f, 0x8c, 0x89, 0x8f, 0x72, - 0x51, 0x46, 0xa4, 0xbc, 0xe0, 0x47, 0x35, 0xf9, 0xaf, 0xfe, 0xd1, 0x66, 0x39, 0x9b, 0xfc, 0xd8, - 0xce, 0x86, 0x3d, 0x7d, 0x45, 0x0d, 0xc7, 0x7d, 0xfa, 0x8f, 0x47, 0xc9, 0x9e, 0xfa, 0xee, 0xcf, - 0x28, 0xe7, 0xc9, 0xf6, 0x6c, 0x3c, 0xc1, 0x2a, 0x59, 0x79, 0x47, 0x12, 0xaf, 0x87, 0x6d, 0x79, - 0x09, 0xe6, 0x5f, 0xf6, 0x6c, 0x57, 0xb9, 0xb9, 0xe1, 0xe8, 0x6a, 0x78, 0x97, 0x33, 0xcd, 0x5b, - 0x70, 0x42, 0x3a, 0xe7, 0x48, 0xba, 0x87, 0x1e, 0xf4, 0x2a, 0x35, 0xf7, 0xe9, 0xb1, 0x39, 0xba, - 0x0d, 0x44, 0x3e, 0xe8, 0x18, 0x2c, 0xfd, 0x68, 0x02, 0xf2, 0x75, 0xcf, 0xa1, 0x72, 0x15, 0xcb, - 0xa3, 0x63, 0x14, 0xe0, 0x97, 0xa0, 0x88, 0x80, 0xd8, 0x6e, 0x8b, 0x75, 0xec, 0x9d, 0xa1, 0x9f, - 0xd0, 0x07, 0xad, 0xb3, 0xa8, 0xda, 0xdf, 0x22, 0x14, 0xba, 0x9e, 0x1f, 0x9a, 0x0e, 0x9a, 0x5d, - 0xb1, 0x2e, 0xbe, 0x98, 0xd3, 0xf4, 0x0e, 0x5c, 0xea, 0xa3, 0x77, 0x2c, 0xd6, 0xf9, 0x07, 0x73, - 0x4b, 0xf8, 0x83, 0x7b, 0xad, 0x02, 0x82, 0x8a, 0xb8, 0x82, 0x5e, 0x2b, 0x71, 0x4b, 0x53, 0xfc, - 0x30, 0x51, 0x82, 0x9f, 0x05, 0x68, 0x7a, 0x6e, 0xe8, 0x7b, 0x8e, 0x43, 0x7d, 0xec, 0xe2, 0x14, - 0xeb, 0xd2, 0x4a, 0xba, 0x47, 0x54, 0x3c, 0x4e, 0x8f, 0x08, 0x8e, 0xd3, 0x23, 0x2a, 0x8d, 0xd5, - 0x23, 0x72, 0x60, 0xa2, 0xd6, 0xb5, 0xc9, 0x29, 0x28, 0x98, 0x5d, 0x3b, 0xb9, 0x99, 0x49, 0xb3, - 0x6b, 0x73, 0x0f, 0xcf, 0x96, 0x3b, 0x34, 0x6c, 0x7b, 0x51, 0xe6, 0x52, 0x34, 0xbb, 0xf6, 0x1d, - 0x5c, 0x60, 0xe0, 0x9e, 0xef, 0x44, 0x60, 0x7e, 0x33, 0xc5, 0x9e, 0xef, 0x08, 0xf0, 0x3c, 0x4c, - 0xf4, 0xfc, 0xe8, 0x52, 0xd8, 0x4f, 0xe3, 0x13, 0x0d, 0x66, 0x6a, 0x4d, 0x76, 0x69, 0x37, 0x7a, - 0xae, 0xe5, 0x50, 0xb2, 0x0a, 0xf3, 0x26, 0x7e, 0x37, 0x76, 0x71, 0x21, 0xe1, 0x60, 0xd6, 0x94, - 0xf0, 0x76, 0x2c, 0xb2, 0x0e, 0x44, 0xc5, 0x94, 0x8c, 0x65, 0x5e, 0xc6, 0x45, 0xa3, 0x59, 0x85, - 0x29, 0xc6, 0x78, 0xd2, 0x4d, 0x9d, 0x93, 0xdd, 0x71, 0xad, 0x6b, 0xd7, 0x99, 0xbc, 0xcc, 0xfd, - 0xfe, 0x41, 0x83, 0xa9, 0x97, 0xa8, 0x19, 0xf6, 0x7c, 0xca, 0xe4, 0x69, 0xf1, 0x9f, 0x09, 0x1f, - 0x45, 0xb1, 0xb2, 0x63, 0x91, 0xf3, 0x30, 0x13, 0x81, 0x25, 0xe2, 0x25, 0xb1, 0x86, 0x74, 0x6f, - 0xc2, 0x09, 0x95, 0xcb, 0x84, 0x83, 0x8a, 0xc2, 0x81, 0xc4, 0x70, 0x7d, 0x4e, 0x66, 0xff, 0x1e, - 0x0d, 0xc9, 0x75, 0x58, 0x6e, 0xb6, 0x69, 0xf3, 0x01, 0xb5, 0x1a, 0x69, 0xed, 0xe0, 0x81, 0x79, - 0x7c, 0x5f, 0x15, 0x81, 0x53, 0x53, 0x14, 0xc5, 0x64, 0xfa, 0xb5, 0x06, 0x70, 0xc7, 0xb3, 0x7a, - 0x0e, 0x7d, 0xd1, 0xa1, 0x1d, 0xf6, 0xbc, 0x3a, 0xf8, 0x95, 0x48, 0x35, 0xcd, 0x17, 0x76, 0x2c, - 0x16, 0xe2, 0x04, 0x50, 0x92, 0x09, 0xf8, 0xd2, 0x5d, 0xde, 0x72, 0x8d, 0x24, 0x94, 0x84, 0x39, - 0x29, 0x0b, 0x23, 0xd4, 0x57, 0x8f, 0x94, 0xc7, 0x44, 0x58, 0x01, 0xb0, 0xcc, 0xd0, 0x6c, 0x38, - 0x74, 0x9f, 0x46, 0x26, 0x50, 0x64, 0x2b, 0xaf, 0xb2, 0x05, 0xa2, 0xc3, 0x8c, 0x1d, 0x34, 0x50, - 0x80, 0x86, 0xe9, 0x38, 0xf8, 0x42, 0xa7, 0xeb, 0x60, 0x07, 0xdb, 0x6c, 0xa9, 0xe6, 0x38, 0xc6, - 0x6d, 0x28, 0x70, 0x11, 0xc8, 0x75, 0x98, 0x13, 0x1c, 0x52, 0x87, 0x76, 0x90, 0x09, 0x6d, 0xb0, - 0xcf, 0x93, 0xc8, 0x5b, 0x2f, 0x77, 0xe2, 0xdf, 0x4c, 0x1b, 0x07, 0x30, 0xb3, 0x6d, 0xba, 0x37, - 0xbd, 0xcc, 0xf6, 0x80, 0x54, 0x63, 0x45, 0xf6, 0x9a, 0x8b, 0xed, 0xf5, 0x28, 0x03, 0x57, 0x9f, - 0x47, 0x3e, 0xf5, 0x3c, 0x8c, 0x36, 0x94, 0x05, 0xe1, 0xac, 0x46, 0x83, 0x4c, 0xf9, 0x1c, 0x94, - 0xcc, 0x66, 0x93, 0x06, 0x01, 0x77, 0x4a, 0xe2, 0x12, 0xf8, 0x52, 0x94, 0x4b, 0x49, 0x4e, 0x6b, - 0x22, 0xe5, 0xb4, 0x8c, 0x4d, 0x58, 0xb8, 0x45, 0x43, 0xe6, 0x64, 0xb9, 0x1a, 0x24, 0x51, 0x33, - 0x3d, 0xae, 0xf1, 0xdf, 0x70, 0x2a, 0xb5, 0x21, 0x61, 0x31, 0xdb, 0x47, 0xaf, 0x41, 0x81, 0xab, - 0x55, 0x24, 0x16, 0x64, 0x50, 0xf9, 0x75, 0x81, 0x61, 0xbc, 0x0b, 0xa7, 0x79, 0x28, 0x1f, 0x9d, - 0xa3, 0xb1, 0xce, 0x7f, 0x12, 0x2a, 0x83, 0xe7, 0x1f, 0x21, 0x80, 0xf1, 0x5e, 0x54, 0x40, 0xe3, - 0xe4, 0x45, 0xb0, 0xa3, 0x44, 0x1e, 0xed, 0xf0, 0xc8, 0x93, 0x3b, 0x2c, 0xf2, 0x4c, 0xc8, 0x91, - 0xc7, 0xb8, 0x1a, 0x15, 0x65, 0x9c, 0xd6, 0x51, 0xac, 0xc5, 0x6d, 0x2c, 0x86, 0x1e, 0x64, 0xaa, - 0x4a, 0x6a, 0xfa, 0x26, 0x6d, 0x2c, 0x81, 0x9e, 0x75, 0xbc, 0x8c, 0xff, 0x20, 0xea, 0x73, 0xca, - 0x92, 0x7f, 0x49, 0xc1, 0x98, 0xc9, 0x22, 0x13, 0x3b, 0x4a, 0xf4, 0xcb, 0x30, 0x2b, 0x0c, 0xf1, - 0x48, 0x9b, 0x7d, 0x06, 0xe6, 0x62, 0x54, 0x71, 0xec, 0x05, 0xc8, 0x33, 0x60, 0xd6, 0x24, 0x0e, - 0xf1, 0x10, 0x6a, 0x7c, 0x96, 0x4b, 0x46, 0x14, 0x8a, 0x86, 0xcf, 0x0d, 0xd6, 0x80, 0x45, 0xa5, - 0xca, 0x3b, 0x93, 0xaa, 0xf2, 0x8a, 0x49, 0x1d, 0x57, 0x51, 0xeb, 0xb8, 0xe9, 0xa4, 0x56, 0x4b, - 0xaa, 0xb2, 0xbc, 0x52, 0x95, 0xc5, 0x35, 0xdc, 0xa4, 0x5c, 0xc3, 0x49, 0xe2, 0x16, 0x94, 0xd6, - 0xbe, 0x72, 0x0f, 0xbc, 0x34, 0x4b, 0xee, 0x21, 0x31, 0x3c, 0x31, 0x40, 0x10, 0x29, 0xcf, 0xb0, - 0x01, 0x42, 0x56, 0x9c, 0xe5, 0x15, 0x59, 0x2a, 0xce, 0xca, 0xcd, 0x7f, 0xd5, 0xbc, 0x46, 0x69, - 0xfe, 0x8f, 0x3c, 0xf0, 0x34, 0x6e, 0xc1, 0xc9, 0x1b, 0xb6, 0x6b, 0x61, 0x47, 0x46, 0xbd, 0xfc, - 0xcc, 0x56, 0xac, 0xac, 0xa6, 0x9c, 0x62, 0xdc, 0xb7, 0x61, 0x41, 0x3d, 0xe8, 0x88, 0xa6, 0xee, - 0xf0, 0x93, 0x76, 0xe0, 0xd4, 0x7d, 0x77, 0xf7, 0x0b, 0x61, 0xea, 0x65, 0x58, 0x4c, 0x1f, 0xf5, - 0xc8, 0x6c, 0x6d, 0x44, 0x2d, 0x91, 0x6d, 0xc7, 0xa6, 0x6e, 0x78, 0x54, 0x14, 0x33, 0xde, 0x87, - 0x05, 0x15, 0xff, 0xa8, 0xe0, 0xb3, 0x04, 0xc5, 0x26, 0xa2, 0x26, 0x5d, 0xc7, 0x69, 0xbe, 0xb0, - 0x63, 0x91, 0xc7, 0xa0, 0x2c, 0x80, 0x01, 0x6d, 0xfa, 0x18, 0xff, 0x19, 0xc2, 0x0c, 0x5f, 0xbc, - 0x87, 0x6b, 0xc6, 0x9f, 0x35, 0x98, 0x79, 0xc3, 0x7b, 0x40, 0xdd, 0x88, 0x39, 0x2c, 0xfd, 0x4d, - 0x37, 0x6c, 0x84, 0x0f, 0xbb, 0x91, 0x5f, 0x2d, 0xe2, 0xca, 0x1b, 0x0f, 0xbb, 0xf4, 0xf8, 0x14, - 0xd9, 0x5b, 0x0a, 0x9a, 0x5e, 0x97, 0x8a, 0xa0, 0xcb, 0x3f, 0x94, 0x69, 0x18, 0xcf, 0xf9, 0x93, - 0x91, 0x89, 0xdc, 0x82, 0x2b, 0xa8, 0x2d, 0x38, 0x46, 0xd2, 0xa7, 0x2d, 0x9f, 0x06, 0xed, 0x46, - 0xc8, 0xc4, 0x10, 0xa9, 0xff, 0x8c, 0x58, 0x44, 0xd1, 0x8c, 0xcf, 0x35, 0x28, 0x0b, 0x21, 0x85, - 0x46, 0x57, 0x00, 0x10, 0x5d, 0x91, 0x12, 0x57, 0x50, 0xca, 0x15, 0x00, 0xfa, 0x41, 0xd7, 0xf6, - 0x69, 0xd0, 0xb0, 0x79, 0xf4, 0x98, 0xac, 0x17, 0xc5, 0xca, 0x8e, 0xcb, 0xb2, 0x49, 0x11, 0xf3, - 0x39, 0x4d, 0xe1, 0x4b, 0xf9, 0x1a, 0x12, 0x1a, 0xe4, 0x2b, 0x3f, 0xc8, 0x17, 0xf3, 0x51, 0xb6, - 0x25, 0xe0, 0x5c, 0xe8, 0x29, 0xdb, 0x42, 0xd0, 0xd6, 0xdf, 0x16, 0x61, 0xb6, 0xc6, 0xff, 0xfd, - 0xe6, 0x8e, 0xe9, 0x9a, 0x7b, 0xd4, 0x27, 0xbf, 0xd5, 0xa0, 0xac, 0x4c, 0xdd, 0x88, 0x2e, 0x3f, - 0xd2, 0xac, 0x49, 0x6e, 0xf5, 0xfc, 0x21, 0x18, 0x5c, 0x15, 0x46, 0xd0, 0xaf, 0x35, 0xc8, 0x3b, - 0xb7, 0x68, 0xa8, 0x33, 0x85, 0x07, 0xeb, 0x7a, 0xcb, 0x76, 0x42, 0xea, 0xeb, 0x07, 0x76, 0xd8, - 0xd6, 0x5b, 0x36, 0x75, 0xac, 0x60, 0x55, 0x58, 0xdf, 0xba, 0x8e, 0x3d, 0xd1, 0x75, 0x5d, 0xee, - 0x42, 0xaf, 0xeb, 0xdc, 0x51, 0x5d, 0x5e, 0xd7, 0x2d, 0xda, 0x32, 0x7b, 0x4e, 0xa8, 0xfb, 0x34, - 0xec, 0xf9, 0xae, 0x6e, 0x3a, 0x0e, 0x3f, 0xf3, 0xc3, 0x3f, 0xfd, 0xf5, 0x7b, 0xb9, 0x12, 0x29, - 0x6e, 0xee, 0x3f, 0xb1, 0x89, 0x0b, 0xe4, 0x1b, 0x39, 0x16, 0x08, 0x07, 0x26, 0x88, 0x23, 0x48, - 0x74, 0x69, 0x28, 0x86, 0xda, 0x00, 0x32, 0x7e, 0xa2, 0xf5, 0x6b, 0x1f, 0x69, 0xe4, 0x43, 0x4d, - 0x12, 0xcd, 0x76, 0x9b, 0x4e, 0xcf, 0xa2, 0xf8, 0xa9, 0xdb, 0x6e, 0xcb, 0xd3, 0xbd, 0x96, 0xce, - 0x1e, 0xab, 0x6e, 0xba, 0x96, 0x8e, 0xe5, 0xf0, 0x97, 0x26, 0x3f, 0x21, 0xf3, 0xb1, 0xfc, 0xa2, - 0xe7, 0x44, 0xf6, 0x31, 0xd9, 0x17, 0x13, 0x35, 0xb2, 0x92, 0xca, 0x9b, 0xd4, 0xf1, 0x66, 0xf5, - 0xec, 0x30, 0xb0, 0x10, 0xf8, 0x72, 0xbf, 0x46, 0xc8, 0x3c, 0x07, 0x24, 0x12, 0x22, 0xed, 0xd9, - 0xad, 0x44, 0xf7, 0xd7, 0xb4, 0x35, 0xf2, 0x35, 0x28, 0x49, 0xd3, 0x34, 0x72, 0x56, 0xd5, 0x69, - 0x7a, 0x2a, 0x57, 0x3d, 0x37, 0x14, 0x2e, 0x48, 0x6f, 0xf6, 0x6b, 0x15, 0xb2, 0xc8, 0x21, 0x9c, - 0xf4, 0x2e, 0x67, 0xa1, 0x61, 0x5b, 0x9c, 0x81, 0x35, 0x95, 0x81, 0xef, 0x6b, 0x30, 0xab, 0xce, - 0x7a, 0x88, 0x62, 0xaa, 0x99, 0xa3, 0xa9, 0xaa, 0x71, 0x18, 0x8a, 0x60, 0xe5, 0xf9, 0x7e, 0x6d, - 0x91, 0x2c, 0x70, 0x20, 0x67, 0x25, 0xf2, 0x15, 0xc8, 0xc8, 0x59, 0xe3, 0x4c, 0xcc, 0xc8, 0x66, - 0x04, 0xb9, 0xd6, 0x44, 0x74, 0xc6, 0xd8, 0x2f, 0xb5, 0xc8, 0x67, 0x2b, 0x03, 0x20, 0x72, 0x51, - 0x21, 0x3d, 0x74, 0xb0, 0xa8, 0x9a, 0xe7, 0x21, 0x03, 0x3f, 0xe3, 0xb5, 0x7e, 0xed, 0x32, 0xb9, - 0xc4, 0x31, 0x74, 0x53, 0xf7, 0xf9, 0x7e, 0x3d, 0xf4, 0x74, 0x1c, 0x28, 0x21, 0xeb, 0x97, 0x02, - 0xc1, 0x3c, 0xb2, 0xbe, 0x62, 0x54, 0x32, 0x58, 0x47, 0x6c, 0xc6, 0xf9, 0x37, 0x35, 0x28, 0xef, - 0x04, 0xfb, 0xc9, 0xb8, 0x44, 0xb5, 0xa7, 0x81, 0x09, 0x94, 0x6a, 0x4f, 0x83, 0x53, 0x16, 0xe3, - 0xd9, 0x7e, 0x6d, 0x85, 0x2c, 0xed, 0x04, 0xfb, 0xec, 0x91, 0x74, 0x1d, 0x33, 0x6c, 0x79, 0x7e, - 0x47, 0xe7, 0xad, 0x0f, 0x64, 0x8f, 0x9b, 0xb5, 0x51, 0x66, 0x5c, 0xd9, 0xc1, 0x7e, 0x23, 0xbe, - 0xdd, 0x4f, 0x34, 0x80, 0x2f, 0x8e, 0x8f, 0xed, 0x7e, 0x6d, 0x9d, 0xac, 0x6d, 0x27, 0x74, 0xd7, - 0x75, 0xbb, 0xc5, 0xaf, 0xb6, 0x6d, 0xee, 0x53, 0xdd, 0xb4, 0x3a, 0xb6, 0xab, 0x77, 0xa9, 0xdf, - 0xb1, 0x83, 0xc0, 0xf6, 0x5c, 0x6e, 0x70, 0x86, 0x6a, 0x70, 0x9f, 0x69, 0x30, 0x9f, 0x9e, 0xea, - 0x91, 0xc7, 0x94, 0x46, 0x6f, 0xf6, 0xa4, 0xb0, 0x7a, 0xe1, 0x70, 0x24, 0xc1, 0xe4, 0x2b, 0xfd, - 0xda, 0x2a, 0xb9, 0xc8, 0x5c, 0x4d, 0x72, 0x97, 0xcc, 0xb7, 0x0c, 0xde, 0xa5, 0x30, 0xc4, 0x2a, - 0x19, 0x7a, 0x9b, 0xe4, 0x73, 0x0d, 0x16, 0xb2, 0x06, 0x4b, 0x44, 0xb1, 0xae, 0x43, 0x66, 0x59, - 0xd5, 0xd5, 0xa3, 0x11, 0x05, 0xe3, 0x2f, 0xf6, 0x6b, 0xcb, 0xa4, 0x1a, 0xa1, 0x70, 0xb5, 0x32, - 0x67, 0xa8, 0x30, 0xab, 0x1b, 0x4b, 0x19, 0xcc, 0x46, 0xa3, 0x2c, 0xa6, 0xdf, 0x4f, 0x35, 0x28, - 0x49, 0xe3, 0x1f, 0x92, 0x71, 0xa9, 0x72, 0x5f, 0x53, 0x75, 0x29, 0x19, 0x73, 0x23, 0xc6, 0xd7, - 0x55, 0x72, 0x45, 0xdc, 0xba, 0xf0, 0xcc, 0x26, 0xff, 0xa1, 0x37, 0x3d, 0x37, 0x34, 0x6d, 0x57, - 0xf7, 0x5c, 0xaa, 0x77, 0x3c, 0x5f, 0xb2, 0xc6, 0x39, 0x03, 0x18, 0xa3, 0x88, 0x86, 0xf7, 0xfe, - 0x17, 0x0d, 0x66, 0xd5, 0x39, 0x01, 0xc9, 0x8c, 0x89, 0x4a, 0xa7, 0x59, 0x75, 0x34, 0xd9, 0x23, - 0x0d, 0xe3, 0x5b, 0x5a, 0xbf, 0x16, 0x12, 0x9f, 0x5d, 0x39, 0x27, 0xb7, 0xae, 0x37, 0x4d, 0x57, - 0x89, 0x1e, 0x61, 0x9b, 0x06, 0x34, 0x8a, 0x21, 0x51, 0xf3, 0x75, 0x5d, 0x4f, 0x75, 0xdc, 0xd7, - 0xf5, 0x64, 0x14, 0x73, 0x78, 0x30, 0xe1, 0x74, 0x50, 0xd0, 0x19, 0x22, 0x09, 0x4a, 0x7e, 0x20, - 0x95, 0x49, 0xf2, 0x34, 0x64, 0x14, 0x59, 0x57, 0x87, 0xa3, 0xa4, 0x22, 0xea, 0x2f, 0xb4, 0x7e, - 0xed, 0x53, 0x8d, 0xf4, 0x35, 0x59, 0xe6, 0x28, 0xa4, 0x46, 0xc1, 0x4e, 0xb7, 0x5d, 0x3d, 0x6c, - 0xdb, 0x41, 0x74, 0x67, 0x5f, 0xa1, 0x4e, 0x4e, 0x92, 0x13, 0x89, 0x4e, 0xa2, 0x10, 0xfb, 0xbf, - 0x50, 0x92, 0x66, 0x13, 0x24, 0x23, 0x88, 0x0e, 0xb7, 0xcb, 0x8c, 0xa1, 0x86, 0x71, 0xa5, 0x5f, - 0x3b, 0x49, 0x44, 0x51, 0x2e, 0xcc, 0x31, 0x0e, 0xb3, 0x73, 0x5b, 0x29, 0xeb, 0xfb, 0x1f, 0x98, - 0x91, 0xc7, 0x12, 0x24, 0x23, 0x90, 0xaa, 0x97, 0xa1, 0x0f, 0x47, 0x10, 0xf4, 0x2f, 0xf5, 0x6b, - 0x73, 0xa4, 0x2c, 0x42, 0xad, 0x24, 0xfc, 0xdc, 0x5a, 0x8a, 0xf6, 0xc7, 0x1a, 0x14, 0xe3, 0xc1, - 0x04, 0x59, 0x96, 0x0f, 0x4e, 0xcf, 0x3d, 0xaa, 0x2b, 0x43, 0xa0, 0x89, 0x07, 0xbe, 0x48, 0x2e, - 0xb0, 0xf5, 0xf8, 0xda, 0xf1, 0xaa, 0xd9, 0xdd, 0xbe, 0xc7, 0x56, 0x63, 0x00, 0xb2, 0xb2, 0x60, - 0xcc, 0x49, 0xac, 0x30, 0x04, 0xe1, 0x21, 0x20, 0x19, 0x4b, 0xa8, 0x41, 0x61, 0x60, 0xee, 0xa1, - 0x06, 0x85, 0xc1, 0x69, 0x86, 0x71, 0xbb, 0x5f, 0x5b, 0x23, 0xab, 0x08, 0x18, 0xe4, 0xc9, 0xc1, - 0xe5, 0x96, 0xef, 0x75, 0x64, 0xb6, 0x4e, 0x19, 0xf3, 0x12, 0x5b, 0x88, 0x73, 0x4d, 0x5b, 0xdb, - 0xfa, 0x63, 0x09, 0xca, 0x35, 0xcc, 0xdc, 0xa3, 0x44, 0xfb, 0xe7, 0x1a, 0x4c, 0x62, 0xf7, 0x8f, - 0x28, 0x8d, 0x5f, 0xb9, 0x13, 0x59, 0x3d, 0x93, 0x01, 0x11, 0xac, 0xb9, 0xfd, 0xda, 0x5b, 0xe4, - 0x7e, 0xe4, 0x51, 0x03, 0xfd, 0xa0, 0x4d, 0xc3, 0x36, 0xf5, 0x99, 0xe5, 0x23, 0x8b, 0x6f, 0x8b, - 0xc4, 0xe8, 0x1d, 0x1e, 0xbe, 0x92, 0xc0, 0xc5, 0x82, 0xff, 0xbe, 0x1d, 0xd8, 0xcc, 0xbe, 0x03, - 0xaf, 0xe7, 0x37, 0xe9, 0xdb, 0x49, 0x0b, 0xf3, 0x5a, 0xcf, 0x77, 0xde, 0x91, 0x43, 0x5b, 0xd3, - 0x74, 0x2d, 0x8f, 0x29, 0xf6, 0x37, 0x1a, 0x94, 0x95, 0x8e, 0xa0, 0x9a, 0x45, 0x67, 0x75, 0x17, - 0xd5, 0xba, 0x20, 0xb3, 0x9d, 0x68, 0x74, 0xfb, 0xb5, 0xfb, 0xe4, 0x1e, 0x7b, 0xea, 0x98, 0x20, - 0xf3, 0xfe, 0xdd, 0xba, 0x6e, 0xd9, 0xad, 0x16, 0x65, 0x6f, 0x95, 0x2f, 0xb7, 0xcd, 0x40, 0x5a, - 0x52, 0x65, 0xe1, 0xf5, 0x90, 0x04, 0xe6, 0x67, 0xc8, 0xd9, 0x30, 0x3b, 0x23, 0xb8, 0xc6, 0xd7, - 0xc9, 0xcf, 0x34, 0x98, 0x4f, 0x37, 0x07, 0xd5, 0x18, 0x3d, 0xa4, 0x35, 0xa9, 0xc6, 0xe8, 0x61, - 0xfd, 0x45, 0xe3, 0x25, 0x8c, 0xd1, 0xe2, 0xe9, 0x4a, 0x42, 0xe9, 0x61, 0xdb, 0x0c, 0xd1, 0x70, - 0x76, 0x29, 0xbf, 0x00, 0x6a, 0xc9, 0x16, 0x23, 0x33, 0xc9, 0x14, 0xfe, 0xe3, 0x38, 0xbd, 0xc1, - 0xd9, 0x58, 0x46, 0x7a, 0x23, 0xb5, 0x20, 0xb2, 0xd2, 0x1b, 0xb9, 0xad, 0x60, 0xdc, 0xed, 0xd7, - 0x9e, 0x21, 0x4f, 0x8b, 0x40, 0xc7, 0x48, 0x8d, 0xac, 0xe3, 0x40, 0x36, 0x07, 0xce, 0xa4, 0xb6, - 0xc6, 0x1c, 0x9e, 0xd4, 0x62, 0xcc, 0xca, 0xed, 0xe5, 0x46, 0x5a, 0x56, 0x6e, 0xaf, 0x34, 0x8f, - 0x98, 0xc3, 0x5b, 0x20, 0xe4, 0x86, 0x19, 0x36, 0xdb, 0xba, 0xc5, 0xdd, 0x0e, 0xd2, 0x92, 0xf3, - 0xfa, 0x98, 0xf8, 0xff, 0x45, 0x05, 0xcd, 0xa0, 0x66, 0x06, 0xfa, 0x98, 0x59, 0x05, 0x8d, 0xa2, - 0x19, 0x5e, 0x55, 0x70, 0xca, 0x1d, 0xe9, 0xd6, 0xd2, 0x65, 0x4d, 0x4c, 0xbd, 0x05, 0x53, 0xc2, - 0x96, 0x49, 0x35, 0xc3, 0xc0, 0x23, 0xba, 0x4b, 0x99, 0x30, 0x41, 0xd4, 0x40, 0xff, 0x1a, 0x9b, - 0x7d, 0x4c, 0x0b, 0xc8, 0x74, 0x44, 0x8b, 0xf4, 0x92, 0x42, 0x9c, 0x2b, 0x39, 0xb3, 0x6c, 0x55, - 0xd4, 0x7c, 0xfe, 0x10, 0x0c, 0x41, 0xf9, 0x5c, 0xbf, 0x56, 0x22, 0xc5, 0x88, 0xb2, 0x52, 0x34, - 0xe3, 0x02, 0xb3, 0xbb, 0x19, 0xb9, 0x61, 0xa6, 0x86, 0x93, 0x8c, 0x9e, 0x9c, 0x1a, 0x4e, 0xb2, - 0x7a, 0x6d, 0xcc, 0x8f, 0x5e, 0x25, 0x57, 0x18, 0x28, 0xa9, 0x83, 0x79, 0x8e, 0x6d, 0x8a, 0x42, - 0x8e, 0x3a, 0x9e, 0xbb, 0x87, 0xcf, 0x19, 0x31, 0xe4, 0xa4, 0x9f, 0x21, 0x5c, 0x63, 0x8b, 0x4c, - 0xf9, 0xdf, 0xd6, 0x60, 0x56, 0xed, 0x9c, 0xa9, 0xd9, 0x47, 0x66, 0x83, 0x4e, 0xcd, 0xb4, 0xb2, - 0x1b, 0x6f, 0xc6, 0x13, 0x58, 0xd2, 0x71, 0x60, 0x92, 0xa0, 0x26, 0xcc, 0xac, 0x0d, 0x30, 0xb3, - 0xf5, 0xf7, 0xa8, 0xad, 0x15, 0xf9, 0xf4, 0xaf, 0x6b, 0x30, 0x23, 0xf7, 0xd6, 0x48, 0x46, 0x02, - 0xaa, 0x74, 0xe9, 0x54, 0xdd, 0x65, 0xb5, 0xe5, 0x8c, 0x0d, 0x34, 0x15, 0xf1, 0x72, 0x79, 0x8f, - 0x0b, 0x19, 0x5a, 0x34, 0x30, 0x0f, 0xf1, 0xcc, 0x5e, 0xd8, 0xde, 0xda, 0xe4, 0x00, 0xa6, 0xa1, - 0x77, 0x61, 0x92, 0xf7, 0x7d, 0x94, 0xb0, 0x22, 0x77, 0xdf, 0xd4, 0xb0, 0xa2, 0xb4, 0xac, 0x0c, - 0xbd, 0x5f, 0xcb, 0xed, 0xfe, 0x87, 0xec, 0x97, 0x04, 0x01, 0xec, 0x1f, 0x5d, 0xd3, 0xd6, 0x6e, - 0xe4, 0xff, 0x2b, 0xd7, 0xdd, 0xdd, 0x2d, 0xe0, 0xd8, 0xf8, 0xc9, 0x7f, 0x06, 0x00, 0x00, 0xff, - 0xff, 0xa9, 0x61, 0x9c, 0x7e, 0xbe, 0x35, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// AccountManagerClient is the client API for AccountManager service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type AccountManagerClient interface { - // Get users, filter with fields(user_id, email, phone_number, status), default return all users - DescribeUsers(ctx context.Context, in *DescribeUsersRequest, opts ...grpc.CallOption) (*DescribeUsersResponse, error) - // Get users, include user info of role and group, filter with fields(user_id, email, phone_number, status), default return all users - DescribeUsersDetail(ctx context.Context, in *DescribeUsersRequest, opts ...grpc.CallOption) (*DescribeUsersDetailResponse, error) - // Modify user info - ModifyUser(ctx context.Context, in *ModifyUserRequest, opts ...grpc.CallOption) (*ModifyUserResponse, error) - // Delete users by user_ids - DeleteUsers(ctx context.Context, in *DeleteUsersRequest, opts ...grpc.CallOption) (*DeleteUsersResponse, error) - // Change user password - ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*ChangePasswordResponse, error) - // Create a request to reset user password - CreatePasswordReset(ctx context.Context, in *CreatePasswordResetRequest, opts ...grpc.CallOption) (*CreatePasswordResetResponse, error) - // Isv of platform create user - IsvCreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error) - // Create user, if user have admin permission - CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error) - // Get a request of reset user's password - GetPasswordReset(ctx context.Context, in *GetPasswordResetRequest, opts ...grpc.CallOption) (*GetPasswordResetResponse, error) - // Validate user and password - ValidateUserPassword(ctx context.Context, in *ValidateUserPasswordRequest, opts ...grpc.CallOption) (*ValidateUserPasswordResponse, error) - // Create group, a group contain one more user - CreateGroup(ctx context.Context, in *CreateGroupRequest, opts ...grpc.CallOption) (*CreateGroupResponse, error) - // Get groups, can filter with these fields(group_id, parent_group_id, group_path, status), default return all groups - DescribeGroups(ctx context.Context, in *DescribeGroupsRequest, opts ...grpc.CallOption) (*DescribeGroupsResponse, error) - // Get groups, include all user in this group, can filter with these fields(group_id, parent_group_id, group_path, status), default return all groups - DescribeGroupsDetail(ctx context.Context, in *DescribeGroupsRequest, opts ...grpc.CallOption) (*DescribeGroupsDetailResponse, error) - //Modify group info - ModifyGroup(ctx context.Context, in *ModifyGroupRequest, opts ...grpc.CallOption) (*ModifyGroupResponse, error) - // Delete groups - DeleteGroups(ctx context.Context, in *DeleteGroupsRequest, opts ...grpc.CallOption) (*DeleteGroupsResponse, error) - // Join groups, user can join in groups - JoinGroup(ctx context.Context, in *JoinGroupRequest, opts ...grpc.CallOption) (*JoinGroupResponse, error) - // Leave groups, user can leave from groups - LeaveGroup(ctx context.Context, in *LeaveGroupRequest, opts ...grpc.CallOption) (*LeaveGroupResponse, error) -} - -type accountManagerClient struct { - cc *grpc.ClientConn -} - -func NewAccountManagerClient(cc *grpc.ClientConn) AccountManagerClient { - return &accountManagerClient{cc} -} - -func (c *accountManagerClient) DescribeUsers(ctx context.Context, in *DescribeUsersRequest, opts ...grpc.CallOption) (*DescribeUsersResponse, error) { - out := new(DescribeUsersResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AccountManager/DescribeUsers", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountManagerClient) DescribeUsersDetail(ctx context.Context, in *DescribeUsersRequest, opts ...grpc.CallOption) (*DescribeUsersDetailResponse, error) { - out := new(DescribeUsersDetailResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AccountManager/DescribeUsersDetail", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountManagerClient) ModifyUser(ctx context.Context, in *ModifyUserRequest, opts ...grpc.CallOption) (*ModifyUserResponse, error) { - out := new(ModifyUserResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AccountManager/ModifyUser", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountManagerClient) DeleteUsers(ctx context.Context, in *DeleteUsersRequest, opts ...grpc.CallOption) (*DeleteUsersResponse, error) { - out := new(DeleteUsersResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AccountManager/DeleteUsers", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountManagerClient) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*ChangePasswordResponse, error) { - out := new(ChangePasswordResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AccountManager/ChangePassword", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountManagerClient) CreatePasswordReset(ctx context.Context, in *CreatePasswordResetRequest, opts ...grpc.CallOption) (*CreatePasswordResetResponse, error) { - out := new(CreatePasswordResetResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AccountManager/CreatePasswordReset", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountManagerClient) IsvCreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error) { - out := new(CreateUserResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AccountManager/IsvCreateUser", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountManagerClient) CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error) { - out := new(CreateUserResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AccountManager/CreateUser", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountManagerClient) GetPasswordReset(ctx context.Context, in *GetPasswordResetRequest, opts ...grpc.CallOption) (*GetPasswordResetResponse, error) { - out := new(GetPasswordResetResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AccountManager/GetPasswordReset", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountManagerClient) ValidateUserPassword(ctx context.Context, in *ValidateUserPasswordRequest, opts ...grpc.CallOption) (*ValidateUserPasswordResponse, error) { - out := new(ValidateUserPasswordResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AccountManager/ValidateUserPassword", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountManagerClient) CreateGroup(ctx context.Context, in *CreateGroupRequest, opts ...grpc.CallOption) (*CreateGroupResponse, error) { - out := new(CreateGroupResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AccountManager/CreateGroup", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountManagerClient) DescribeGroups(ctx context.Context, in *DescribeGroupsRequest, opts ...grpc.CallOption) (*DescribeGroupsResponse, error) { - out := new(DescribeGroupsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AccountManager/DescribeGroups", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountManagerClient) DescribeGroupsDetail(ctx context.Context, in *DescribeGroupsRequest, opts ...grpc.CallOption) (*DescribeGroupsDetailResponse, error) { - out := new(DescribeGroupsDetailResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AccountManager/DescribeGroupsDetail", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountManagerClient) ModifyGroup(ctx context.Context, in *ModifyGroupRequest, opts ...grpc.CallOption) (*ModifyGroupResponse, error) { - out := new(ModifyGroupResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AccountManager/ModifyGroup", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountManagerClient) DeleteGroups(ctx context.Context, in *DeleteGroupsRequest, opts ...grpc.CallOption) (*DeleteGroupsResponse, error) { - out := new(DeleteGroupsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AccountManager/DeleteGroups", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountManagerClient) JoinGroup(ctx context.Context, in *JoinGroupRequest, opts ...grpc.CallOption) (*JoinGroupResponse, error) { - out := new(JoinGroupResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AccountManager/JoinGroup", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountManagerClient) LeaveGroup(ctx context.Context, in *LeaveGroupRequest, opts ...grpc.CallOption) (*LeaveGroupResponse, error) { - out := new(LeaveGroupResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AccountManager/LeaveGroup", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// AccountManagerServer is the server API for AccountManager service. -type AccountManagerServer interface { - // Get users, filter with fields(user_id, email, phone_number, status), default return all users - DescribeUsers(context.Context, *DescribeUsersRequest) (*DescribeUsersResponse, error) - // Get users, include user info of role and group, filter with fields(user_id, email, phone_number, status), default return all users - DescribeUsersDetail(context.Context, *DescribeUsersRequest) (*DescribeUsersDetailResponse, error) - // Modify user info - ModifyUser(context.Context, *ModifyUserRequest) (*ModifyUserResponse, error) - // Delete users by user_ids - DeleteUsers(context.Context, *DeleteUsersRequest) (*DeleteUsersResponse, error) - // Change user password - ChangePassword(context.Context, *ChangePasswordRequest) (*ChangePasswordResponse, error) - // Create a request to reset user password - CreatePasswordReset(context.Context, *CreatePasswordResetRequest) (*CreatePasswordResetResponse, error) - // Isv of platform create user - IsvCreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error) - // Create user, if user have admin permission - CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error) - // Get a request of reset user's password - GetPasswordReset(context.Context, *GetPasswordResetRequest) (*GetPasswordResetResponse, error) - // Validate user and password - ValidateUserPassword(context.Context, *ValidateUserPasswordRequest) (*ValidateUserPasswordResponse, error) - // Create group, a group contain one more user - CreateGroup(context.Context, *CreateGroupRequest) (*CreateGroupResponse, error) - // Get groups, can filter with these fields(group_id, parent_group_id, group_path, status), default return all groups - DescribeGroups(context.Context, *DescribeGroupsRequest) (*DescribeGroupsResponse, error) - // Get groups, include all user in this group, can filter with these fields(group_id, parent_group_id, group_path, status), default return all groups - DescribeGroupsDetail(context.Context, *DescribeGroupsRequest) (*DescribeGroupsDetailResponse, error) - //Modify group info - ModifyGroup(context.Context, *ModifyGroupRequest) (*ModifyGroupResponse, error) - // Delete groups - DeleteGroups(context.Context, *DeleteGroupsRequest) (*DeleteGroupsResponse, error) - // Join groups, user can join in groups - JoinGroup(context.Context, *JoinGroupRequest) (*JoinGroupResponse, error) - // Leave groups, user can leave from groups - LeaveGroup(context.Context, *LeaveGroupRequest) (*LeaveGroupResponse, error) -} - -// UnimplementedAccountManagerServer can be embedded to have forward compatible implementations. -type UnimplementedAccountManagerServer struct { -} - -func (*UnimplementedAccountManagerServer) DescribeUsers(ctx context.Context, req *DescribeUsersRequest) (*DescribeUsersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeUsers not implemented") -} -func (*UnimplementedAccountManagerServer) DescribeUsersDetail(ctx context.Context, req *DescribeUsersRequest) (*DescribeUsersDetailResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeUsersDetail not implemented") -} -func (*UnimplementedAccountManagerServer) ModifyUser(ctx context.Context, req *ModifyUserRequest) (*ModifyUserResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ModifyUser not implemented") -} -func (*UnimplementedAccountManagerServer) DeleteUsers(ctx context.Context, req *DeleteUsersRequest) (*DeleteUsersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteUsers not implemented") -} -func (*UnimplementedAccountManagerServer) ChangePassword(ctx context.Context, req *ChangePasswordRequest) (*ChangePasswordResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ChangePassword not implemented") -} -func (*UnimplementedAccountManagerServer) CreatePasswordReset(ctx context.Context, req *CreatePasswordResetRequest) (*CreatePasswordResetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreatePasswordReset not implemented") -} -func (*UnimplementedAccountManagerServer) IsvCreateUser(ctx context.Context, req *CreateUserRequest) (*CreateUserResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method IsvCreateUser not implemented") -} -func (*UnimplementedAccountManagerServer) CreateUser(ctx context.Context, req *CreateUserRequest) (*CreateUserResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateUser not implemented") -} -func (*UnimplementedAccountManagerServer) GetPasswordReset(ctx context.Context, req *GetPasswordResetRequest) (*GetPasswordResetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPasswordReset not implemented") -} -func (*UnimplementedAccountManagerServer) ValidateUserPassword(ctx context.Context, req *ValidateUserPasswordRequest) (*ValidateUserPasswordResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ValidateUserPassword not implemented") -} -func (*UnimplementedAccountManagerServer) CreateGroup(ctx context.Context, req *CreateGroupRequest) (*CreateGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateGroup not implemented") -} -func (*UnimplementedAccountManagerServer) DescribeGroups(ctx context.Context, req *DescribeGroupsRequest) (*DescribeGroupsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeGroups not implemented") -} -func (*UnimplementedAccountManagerServer) DescribeGroupsDetail(ctx context.Context, req *DescribeGroupsRequest) (*DescribeGroupsDetailResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeGroupsDetail not implemented") -} -func (*UnimplementedAccountManagerServer) ModifyGroup(ctx context.Context, req *ModifyGroupRequest) (*ModifyGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ModifyGroup not implemented") -} -func (*UnimplementedAccountManagerServer) DeleteGroups(ctx context.Context, req *DeleteGroupsRequest) (*DeleteGroupsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteGroups not implemented") -} -func (*UnimplementedAccountManagerServer) JoinGroup(ctx context.Context, req *JoinGroupRequest) (*JoinGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method JoinGroup not implemented") -} -func (*UnimplementedAccountManagerServer) LeaveGroup(ctx context.Context, req *LeaveGroupRequest) (*LeaveGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LeaveGroup not implemented") -} - -func RegisterAccountManagerServer(s *grpc.Server, srv AccountManagerServer) { - s.RegisterService(&_AccountManager_serviceDesc, srv) -} - -func _AccountManager_DescribeUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeUsersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountManagerServer).DescribeUsers(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AccountManager/DescribeUsers", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountManagerServer).DescribeUsers(ctx, req.(*DescribeUsersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccountManager_DescribeUsersDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeUsersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountManagerServer).DescribeUsersDetail(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AccountManager/DescribeUsersDetail", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountManagerServer).DescribeUsersDetail(ctx, req.(*DescribeUsersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccountManager_ModifyUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ModifyUserRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountManagerServer).ModifyUser(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AccountManager/ModifyUser", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountManagerServer).ModifyUser(ctx, req.(*ModifyUserRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccountManager_DeleteUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteUsersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountManagerServer).DeleteUsers(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AccountManager/DeleteUsers", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountManagerServer).DeleteUsers(ctx, req.(*DeleteUsersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccountManager_ChangePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ChangePasswordRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountManagerServer).ChangePassword(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AccountManager/ChangePassword", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountManagerServer).ChangePassword(ctx, req.(*ChangePasswordRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccountManager_CreatePasswordReset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreatePasswordResetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountManagerServer).CreatePasswordReset(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AccountManager/CreatePasswordReset", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountManagerServer).CreatePasswordReset(ctx, req.(*CreatePasswordResetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccountManager_IsvCreateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateUserRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountManagerServer).IsvCreateUser(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AccountManager/IsvCreateUser", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountManagerServer).IsvCreateUser(ctx, req.(*CreateUserRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccountManager_CreateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateUserRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountManagerServer).CreateUser(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AccountManager/CreateUser", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountManagerServer).CreateUser(ctx, req.(*CreateUserRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccountManager_GetPasswordReset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPasswordResetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountManagerServer).GetPasswordReset(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AccountManager/GetPasswordReset", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountManagerServer).GetPasswordReset(ctx, req.(*GetPasswordResetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccountManager_ValidateUserPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ValidateUserPasswordRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountManagerServer).ValidateUserPassword(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AccountManager/ValidateUserPassword", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountManagerServer).ValidateUserPassword(ctx, req.(*ValidateUserPasswordRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccountManager_CreateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateGroupRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountManagerServer).CreateGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AccountManager/CreateGroup", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountManagerServer).CreateGroup(ctx, req.(*CreateGroupRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccountManager_DescribeGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeGroupsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountManagerServer).DescribeGroups(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AccountManager/DescribeGroups", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountManagerServer).DescribeGroups(ctx, req.(*DescribeGroupsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccountManager_DescribeGroupsDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeGroupsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountManagerServer).DescribeGroupsDetail(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AccountManager/DescribeGroupsDetail", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountManagerServer).DescribeGroupsDetail(ctx, req.(*DescribeGroupsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccountManager_ModifyGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ModifyGroupRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountManagerServer).ModifyGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AccountManager/ModifyGroup", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountManagerServer).ModifyGroup(ctx, req.(*ModifyGroupRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccountManager_DeleteGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteGroupsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountManagerServer).DeleteGroups(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AccountManager/DeleteGroups", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountManagerServer).DeleteGroups(ctx, req.(*DeleteGroupsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccountManager_JoinGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(JoinGroupRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountManagerServer).JoinGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AccountManager/JoinGroup", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountManagerServer).JoinGroup(ctx, req.(*JoinGroupRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccountManager_LeaveGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LeaveGroupRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccountManagerServer).LeaveGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AccountManager/LeaveGroup", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccountManagerServer).LeaveGroup(ctx, req.(*LeaveGroupRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _AccountManager_serviceDesc = grpc.ServiceDesc{ - ServiceName: "openpitrix.AccountManager", - HandlerType: (*AccountManagerServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "DescribeUsers", - Handler: _AccountManager_DescribeUsers_Handler, - }, - { - MethodName: "DescribeUsersDetail", - Handler: _AccountManager_DescribeUsersDetail_Handler, - }, - { - MethodName: "ModifyUser", - Handler: _AccountManager_ModifyUser_Handler, - }, - { - MethodName: "DeleteUsers", - Handler: _AccountManager_DeleteUsers_Handler, - }, - { - MethodName: "ChangePassword", - Handler: _AccountManager_ChangePassword_Handler, - }, - { - MethodName: "CreatePasswordReset", - Handler: _AccountManager_CreatePasswordReset_Handler, - }, - { - MethodName: "IsvCreateUser", - Handler: _AccountManager_IsvCreateUser_Handler, - }, - { - MethodName: "CreateUser", - Handler: _AccountManager_CreateUser_Handler, - }, - { - MethodName: "GetPasswordReset", - Handler: _AccountManager_GetPasswordReset_Handler, - }, - { - MethodName: "ValidateUserPassword", - Handler: _AccountManager_ValidateUserPassword_Handler, - }, - { - MethodName: "CreateGroup", - Handler: _AccountManager_CreateGroup_Handler, - }, - { - MethodName: "DescribeGroups", - Handler: _AccountManager_DescribeGroups_Handler, - }, - { - MethodName: "DescribeGroupsDetail", - Handler: _AccountManager_DescribeGroupsDetail_Handler, - }, - { - MethodName: "ModifyGroup", - Handler: _AccountManager_ModifyGroup_Handler, - }, - { - MethodName: "DeleteGroups", - Handler: _AccountManager_DeleteGroups_Handler, - }, - { - MethodName: "JoinGroup", - Handler: _AccountManager_JoinGroup_Handler, - }, - { - MethodName: "LeaveGroup", - Handler: _AccountManager_LeaveGroup_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "account.proto", -} - -// AccessManagerClient is the client API for AccessManager service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type AccessManagerClient interface { - // Validate whether the user[user_id] have permission to visit resource[url_method:url] - CanDo(ctx context.Context, in *CanDoRequest, opts ...grpc.CallOption) (*CanDoResponse, error) - // Get role module, different role has different permission to access different module - GetRoleModule(ctx context.Context, in *GetRoleModuleRequest, opts ...grpc.CallOption) (*GetRoleModuleResponse, error) - // Modify role module that can be visited - ModifyRoleModule(ctx context.Context, in *ModifyRoleModuleRequest, opts ...grpc.CallOption) (*ModifyRoleModuleResponse, error) - // Create role, different role has different permissions - CreateRole(ctx context.Context, in *CreateRoleRequest, opts ...grpc.CallOption) (*CreateRoleResponse, error) - // Batch delete roles - DeleteRoles(ctx context.Context, in *DeleteRolesRequest, opts ...grpc.CallOption) (*DeleteRolesResponse, error) - // Modify role info - ModifyRole(ctx context.Context, in *ModifyRoleRequest, opts ...grpc.CallOption) (*ModifyRoleResponse, error) - // Get role info - GetRole(ctx context.Context, in *GetRoleRequest, opts ...grpc.CallOption) (*GetRoleResponse, error) - // Get roles, filter with these fields(role_id, portal, status) - DescribeRoles(ctx context.Context, in *DescribeRolesRequest, opts ...grpc.CallOption) (*DescribeRolesResponse, error) - // Bind role and user, a user belong to a role - BindUserRole(ctx context.Context, in *BindUserRoleRequest, opts ...grpc.CallOption) (*BindUserRoleResponse, error) - // Unbind user and role - UnbindUserRole(ctx context.Context, in *UnbindUserRoleRequest, opts ...grpc.CallOption) (*UnbindUserRoleResponse, error) -} - -type accessManagerClient struct { - cc *grpc.ClientConn -} - -func NewAccessManagerClient(cc *grpc.ClientConn) AccessManagerClient { - return &accessManagerClient{cc} -} - -func (c *accessManagerClient) CanDo(ctx context.Context, in *CanDoRequest, opts ...grpc.CallOption) (*CanDoResponse, error) { - out := new(CanDoResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AccessManager/CanDo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accessManagerClient) GetRoleModule(ctx context.Context, in *GetRoleModuleRequest, opts ...grpc.CallOption) (*GetRoleModuleResponse, error) { - out := new(GetRoleModuleResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AccessManager/GetRoleModule", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accessManagerClient) ModifyRoleModule(ctx context.Context, in *ModifyRoleModuleRequest, opts ...grpc.CallOption) (*ModifyRoleModuleResponse, error) { - out := new(ModifyRoleModuleResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AccessManager/ModifyRoleModule", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accessManagerClient) CreateRole(ctx context.Context, in *CreateRoleRequest, opts ...grpc.CallOption) (*CreateRoleResponse, error) { - out := new(CreateRoleResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AccessManager/CreateRole", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accessManagerClient) DeleteRoles(ctx context.Context, in *DeleteRolesRequest, opts ...grpc.CallOption) (*DeleteRolesResponse, error) { - out := new(DeleteRolesResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AccessManager/DeleteRoles", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accessManagerClient) ModifyRole(ctx context.Context, in *ModifyRoleRequest, opts ...grpc.CallOption) (*ModifyRoleResponse, error) { - out := new(ModifyRoleResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AccessManager/ModifyRole", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accessManagerClient) GetRole(ctx context.Context, in *GetRoleRequest, opts ...grpc.CallOption) (*GetRoleResponse, error) { - out := new(GetRoleResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AccessManager/GetRole", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accessManagerClient) DescribeRoles(ctx context.Context, in *DescribeRolesRequest, opts ...grpc.CallOption) (*DescribeRolesResponse, error) { - out := new(DescribeRolesResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AccessManager/DescribeRoles", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accessManagerClient) BindUserRole(ctx context.Context, in *BindUserRoleRequest, opts ...grpc.CallOption) (*BindUserRoleResponse, error) { - out := new(BindUserRoleResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AccessManager/BindUserRole", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accessManagerClient) UnbindUserRole(ctx context.Context, in *UnbindUserRoleRequest, opts ...grpc.CallOption) (*UnbindUserRoleResponse, error) { - out := new(UnbindUserRoleResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AccessManager/UnbindUserRole", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// AccessManagerServer is the server API for AccessManager service. -type AccessManagerServer interface { - // Validate whether the user[user_id] have permission to visit resource[url_method:url] - CanDo(context.Context, *CanDoRequest) (*CanDoResponse, error) - // Get role module, different role has different permission to access different module - GetRoleModule(context.Context, *GetRoleModuleRequest) (*GetRoleModuleResponse, error) - // Modify role module that can be visited - ModifyRoleModule(context.Context, *ModifyRoleModuleRequest) (*ModifyRoleModuleResponse, error) - // Create role, different role has different permissions - CreateRole(context.Context, *CreateRoleRequest) (*CreateRoleResponse, error) - // Batch delete roles - DeleteRoles(context.Context, *DeleteRolesRequest) (*DeleteRolesResponse, error) - // Modify role info - ModifyRole(context.Context, *ModifyRoleRequest) (*ModifyRoleResponse, error) - // Get role info - GetRole(context.Context, *GetRoleRequest) (*GetRoleResponse, error) - // Get roles, filter with these fields(role_id, portal, status) - DescribeRoles(context.Context, *DescribeRolesRequest) (*DescribeRolesResponse, error) - // Bind role and user, a user belong to a role - BindUserRole(context.Context, *BindUserRoleRequest) (*BindUserRoleResponse, error) - // Unbind user and role - UnbindUserRole(context.Context, *UnbindUserRoleRequest) (*UnbindUserRoleResponse, error) -} - -// UnimplementedAccessManagerServer can be embedded to have forward compatible implementations. -type UnimplementedAccessManagerServer struct { -} - -func (*UnimplementedAccessManagerServer) CanDo(ctx context.Context, req *CanDoRequest) (*CanDoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CanDo not implemented") -} -func (*UnimplementedAccessManagerServer) GetRoleModule(ctx context.Context, req *GetRoleModuleRequest) (*GetRoleModuleResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetRoleModule not implemented") -} -func (*UnimplementedAccessManagerServer) ModifyRoleModule(ctx context.Context, req *ModifyRoleModuleRequest) (*ModifyRoleModuleResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ModifyRoleModule not implemented") -} -func (*UnimplementedAccessManagerServer) CreateRole(ctx context.Context, req *CreateRoleRequest) (*CreateRoleResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateRole not implemented") -} -func (*UnimplementedAccessManagerServer) DeleteRoles(ctx context.Context, req *DeleteRolesRequest) (*DeleteRolesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteRoles not implemented") -} -func (*UnimplementedAccessManagerServer) ModifyRole(ctx context.Context, req *ModifyRoleRequest) (*ModifyRoleResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ModifyRole not implemented") -} -func (*UnimplementedAccessManagerServer) GetRole(ctx context.Context, req *GetRoleRequest) (*GetRoleResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetRole not implemented") -} -func (*UnimplementedAccessManagerServer) DescribeRoles(ctx context.Context, req *DescribeRolesRequest) (*DescribeRolesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeRoles not implemented") -} -func (*UnimplementedAccessManagerServer) BindUserRole(ctx context.Context, req *BindUserRoleRequest) (*BindUserRoleResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BindUserRole not implemented") -} -func (*UnimplementedAccessManagerServer) UnbindUserRole(ctx context.Context, req *UnbindUserRoleRequest) (*UnbindUserRoleResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnbindUserRole not implemented") -} - -func RegisterAccessManagerServer(s *grpc.Server, srv AccessManagerServer) { - s.RegisterService(&_AccessManager_serviceDesc, srv) -} - -func _AccessManager_CanDo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CanDoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccessManagerServer).CanDo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AccessManager/CanDo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccessManagerServer).CanDo(ctx, req.(*CanDoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccessManager_GetRoleModule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRoleModuleRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccessManagerServer).GetRoleModule(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AccessManager/GetRoleModule", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccessManagerServer).GetRoleModule(ctx, req.(*GetRoleModuleRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccessManager_ModifyRoleModule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ModifyRoleModuleRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccessManagerServer).ModifyRoleModule(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AccessManager/ModifyRoleModule", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccessManagerServer).ModifyRoleModule(ctx, req.(*ModifyRoleModuleRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccessManager_CreateRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateRoleRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccessManagerServer).CreateRole(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AccessManager/CreateRole", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccessManagerServer).CreateRole(ctx, req.(*CreateRoleRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccessManager_DeleteRoles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteRolesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccessManagerServer).DeleteRoles(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AccessManager/DeleteRoles", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccessManagerServer).DeleteRoles(ctx, req.(*DeleteRolesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccessManager_ModifyRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ModifyRoleRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccessManagerServer).ModifyRole(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AccessManager/ModifyRole", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccessManagerServer).ModifyRole(ctx, req.(*ModifyRoleRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccessManager_GetRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRoleRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccessManagerServer).GetRole(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AccessManager/GetRole", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccessManagerServer).GetRole(ctx, req.(*GetRoleRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccessManager_DescribeRoles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeRolesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccessManagerServer).DescribeRoles(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AccessManager/DescribeRoles", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccessManagerServer).DescribeRoles(ctx, req.(*DescribeRolesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccessManager_BindUserRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BindUserRoleRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccessManagerServer).BindUserRole(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AccessManager/BindUserRole", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccessManagerServer).BindUserRole(ctx, req.(*BindUserRoleRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AccessManager_UnbindUserRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UnbindUserRoleRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AccessManagerServer).UnbindUserRole(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AccessManager/UnbindUserRole", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AccessManagerServer).UnbindUserRole(ctx, req.(*UnbindUserRoleRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _AccessManager_serviceDesc = grpc.ServiceDesc{ - ServiceName: "openpitrix.AccessManager", - HandlerType: (*AccessManagerServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CanDo", - Handler: _AccessManager_CanDo_Handler, - }, - { - MethodName: "GetRoleModule", - Handler: _AccessManager_GetRoleModule_Handler, - }, - { - MethodName: "ModifyRoleModule", - Handler: _AccessManager_ModifyRoleModule_Handler, - }, - { - MethodName: "CreateRole", - Handler: _AccessManager_CreateRole_Handler, - }, - { - MethodName: "DeleteRoles", - Handler: _AccessManager_DeleteRoles_Handler, - }, - { - MethodName: "ModifyRole", - Handler: _AccessManager_ModifyRole_Handler, - }, - { - MethodName: "GetRole", - Handler: _AccessManager_GetRole_Handler, - }, - { - MethodName: "DescribeRoles", - Handler: _AccessManager_DescribeRoles_Handler, - }, - { - MethodName: "BindUserRole", - Handler: _AccessManager_BindUserRole_Handler, - }, - { - MethodName: "UnbindUserRole", - Handler: _AccessManager_UnbindUserRole_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "account.proto", -} - -// TokenManagerClient is the client API for TokenManager service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type TokenManagerClient interface { - // Create client - CreateClient(ctx context.Context, in *CreateClientRequest, opts ...grpc.CallOption) (*CreateClientResponse, error) - // get access_token with client_credentials or password - // - // Ref: - // - https://www.digitalocean.com/community/tutorials/an-introduction-to-oauth-2 - // - https://alexbilbie.com/guide-to-oauth-2-grants/ - // - https://tools.ietf.org/html/rfc6749#section-4.4 - // - // refresh access_token - // - // Ref: https://tools.ietf.org/html/rfc6749#section-6 - // - // Get token - Token(ctx context.Context, in *TokenRequest, opts ...grpc.CallOption) (*TokenResponse, error) -} - -type tokenManagerClient struct { - cc *grpc.ClientConn -} - -func NewTokenManagerClient(cc *grpc.ClientConn) TokenManagerClient { - return &tokenManagerClient{cc} -} - -func (c *tokenManagerClient) CreateClient(ctx context.Context, in *CreateClientRequest, opts ...grpc.CallOption) (*CreateClientResponse, error) { - out := new(CreateClientResponse) - err := c.cc.Invoke(ctx, "/openpitrix.TokenManager/CreateClient", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *tokenManagerClient) Token(ctx context.Context, in *TokenRequest, opts ...grpc.CallOption) (*TokenResponse, error) { - out := new(TokenResponse) - err := c.cc.Invoke(ctx, "/openpitrix.TokenManager/Token", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// TokenManagerServer is the server API for TokenManager service. -type TokenManagerServer interface { - // Create client - CreateClient(context.Context, *CreateClientRequest) (*CreateClientResponse, error) - // get access_token with client_credentials or password - // - // Ref: - // - https://www.digitalocean.com/community/tutorials/an-introduction-to-oauth-2 - // - https://alexbilbie.com/guide-to-oauth-2-grants/ - // - https://tools.ietf.org/html/rfc6749#section-4.4 - // - // refresh access_token - // - // Ref: https://tools.ietf.org/html/rfc6749#section-6 - // - // Get token - Token(context.Context, *TokenRequest) (*TokenResponse, error) -} - -// UnimplementedTokenManagerServer can be embedded to have forward compatible implementations. -type UnimplementedTokenManagerServer struct { -} - -func (*UnimplementedTokenManagerServer) CreateClient(ctx context.Context, req *CreateClientRequest) (*CreateClientResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateClient not implemented") -} -func (*UnimplementedTokenManagerServer) Token(ctx context.Context, req *TokenRequest) (*TokenResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Token not implemented") -} - -func RegisterTokenManagerServer(s *grpc.Server, srv TokenManagerServer) { - s.RegisterService(&_TokenManager_serviceDesc, srv) -} - -func _TokenManager_CreateClient_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateClientRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TokenManagerServer).CreateClient(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.TokenManager/CreateClient", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TokenManagerServer).CreateClient(ctx, req.(*CreateClientRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TokenManager_Token_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TokenRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TokenManagerServer).Token(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.TokenManager/Token", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TokenManagerServer).Token(ctx, req.(*TokenRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _TokenManager_serviceDesc = grpc.ServiceDesc{ - ServiceName: "openpitrix.TokenManager", - HandlerType: (*TokenManagerServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateClient", - Handler: _TokenManager_CreateClient_Handler, - }, - { - MethodName: "Token", - Handler: _TokenManager_Token_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "account.proto", -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/account.pb.gw.go b/vendor/openpitrix.io/openpitrix/pkg/pb/account.pb.gw.go deleted file mode 100644 index 214c08e75..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/account.pb.gw.go +++ /dev/null @@ -1,2445 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: account.proto - -/* -Package pb is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package pb - -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/status" -) - -// 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 ( - filter_AccountManager_DescribeUsers_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_AccountManager_DescribeUsers_0(ctx context.Context, marshaler runtime.Marshaler, client AccountManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeUsersRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AccountManager_DescribeUsers_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccountManager_DescribeUsers_0(ctx context.Context, marshaler runtime.Marshaler, server AccountManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeUsersRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AccountManager_DescribeUsers_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeUsers(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_AccountManager_DescribeUsersDetail_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_AccountManager_DescribeUsersDetail_0(ctx context.Context, marshaler runtime.Marshaler, client AccountManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeUsersRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AccountManager_DescribeUsersDetail_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeUsersDetail(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccountManager_DescribeUsersDetail_0(ctx context.Context, marshaler runtime.Marshaler, server AccountManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeUsersRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AccountManager_DescribeUsersDetail_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeUsersDetail(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AccountManager_ModifyUser_0(ctx context.Context, marshaler runtime.Marshaler, client AccountManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyUserRequest - 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.ModifyUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccountManager_ModifyUser_0(ctx context.Context, marshaler runtime.Marshaler, server AccountManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyUserRequest - 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.ModifyUser(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AccountManager_DeleteUsers_0(ctx context.Context, marshaler runtime.Marshaler, client AccountManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteUsersRequest - 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.DeleteUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccountManager_DeleteUsers_0(ctx context.Context, marshaler runtime.Marshaler, server AccountManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteUsersRequest - 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.DeleteUsers(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AccountManager_ChangePassword_0(ctx context.Context, marshaler runtime.Marshaler, client AccountManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ChangePasswordRequest - 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.ChangePassword(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccountManager_ChangePassword_0(ctx context.Context, marshaler runtime.Marshaler, server AccountManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ChangePasswordRequest - 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.ChangePassword(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AccountManager_CreatePasswordReset_0(ctx context.Context, marshaler runtime.Marshaler, client AccountManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePasswordResetRequest - 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.CreatePasswordReset(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccountManager_CreatePasswordReset_0(ctx context.Context, marshaler runtime.Marshaler, server AccountManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePasswordResetRequest - 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.CreatePasswordReset(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AccountManager_IsvCreateUser_0(ctx context.Context, marshaler runtime.Marshaler, client AccountManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateUserRequest - 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.IsvCreateUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccountManager_IsvCreateUser_0(ctx context.Context, marshaler runtime.Marshaler, server AccountManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateUserRequest - 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.IsvCreateUser(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AccountManager_CreateUser_0(ctx context.Context, marshaler runtime.Marshaler, client AccountManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateUserRequest - 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.CreateUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccountManager_CreateUser_0(ctx context.Context, marshaler runtime.Marshaler, server AccountManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateUserRequest - 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.CreateUser(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_AccountManager_GetPasswordReset_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_AccountManager_GetPasswordReset_0(ctx context.Context, marshaler runtime.Marshaler, client AccountManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPasswordResetRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AccountManager_GetPasswordReset_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetPasswordReset(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccountManager_GetPasswordReset_0(ctx context.Context, marshaler runtime.Marshaler, server AccountManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPasswordResetRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AccountManager_GetPasswordReset_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetPasswordReset(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AccountManager_ValidateUserPassword_0(ctx context.Context, marshaler runtime.Marshaler, client AccountManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ValidateUserPasswordRequest - 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.ValidateUserPassword(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccountManager_ValidateUserPassword_0(ctx context.Context, marshaler runtime.Marshaler, server AccountManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ValidateUserPasswordRequest - 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.ValidateUserPassword(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AccountManager_CreateGroup_0(ctx context.Context, marshaler runtime.Marshaler, client AccountManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateGroupRequest - 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.CreateGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccountManager_CreateGroup_0(ctx context.Context, marshaler runtime.Marshaler, server AccountManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateGroupRequest - 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.CreateGroup(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_AccountManager_DescribeGroups_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_AccountManager_DescribeGroups_0(ctx context.Context, marshaler runtime.Marshaler, client AccountManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeGroupsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AccountManager_DescribeGroups_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeGroups(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccountManager_DescribeGroups_0(ctx context.Context, marshaler runtime.Marshaler, server AccountManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeGroupsRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AccountManager_DescribeGroups_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeGroups(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_AccountManager_DescribeGroupsDetail_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_AccountManager_DescribeGroupsDetail_0(ctx context.Context, marshaler runtime.Marshaler, client AccountManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeGroupsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AccountManager_DescribeGroupsDetail_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeGroupsDetail(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccountManager_DescribeGroupsDetail_0(ctx context.Context, marshaler runtime.Marshaler, server AccountManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeGroupsRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AccountManager_DescribeGroupsDetail_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeGroupsDetail(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AccountManager_ModifyGroup_0(ctx context.Context, marshaler runtime.Marshaler, client AccountManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyGroupRequest - 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.ModifyGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccountManager_ModifyGroup_0(ctx context.Context, marshaler runtime.Marshaler, server AccountManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyGroupRequest - 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.ModifyGroup(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AccountManager_DeleteGroups_0(ctx context.Context, marshaler runtime.Marshaler, client AccountManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteGroupsRequest - 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.DeleteGroups(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccountManager_DeleteGroups_0(ctx context.Context, marshaler runtime.Marshaler, server AccountManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteGroupsRequest - 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.DeleteGroups(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AccountManager_JoinGroup_0(ctx context.Context, marshaler runtime.Marshaler, client AccountManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq JoinGroupRequest - 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.JoinGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccountManager_JoinGroup_0(ctx context.Context, marshaler runtime.Marshaler, server AccountManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq JoinGroupRequest - 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.JoinGroup(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AccountManager_LeaveGroup_0(ctx context.Context, marshaler runtime.Marshaler, client AccountManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq LeaveGroupRequest - 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.LeaveGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccountManager_LeaveGroup_0(ctx context.Context, marshaler runtime.Marshaler, server AccountManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq LeaveGroupRequest - 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.LeaveGroup(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AccessManager_CanDo_0(ctx context.Context, marshaler runtime.Marshaler, client AccessManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CanDoRequest - 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.CanDo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccessManager_CanDo_0(ctx context.Context, marshaler runtime.Marshaler, server AccessManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CanDoRequest - 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.CanDo(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_AccessManager_GetRoleModule_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_AccessManager_GetRoleModule_0(ctx context.Context, marshaler runtime.Marshaler, client AccessManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRoleModuleRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AccessManager_GetRoleModule_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetRoleModule(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccessManager_GetRoleModule_0(ctx context.Context, marshaler runtime.Marshaler, server AccessManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRoleModuleRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AccessManager_GetRoleModule_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetRoleModule(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AccessManager_ModifyRoleModule_0(ctx context.Context, marshaler runtime.Marshaler, client AccessManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyRoleModuleRequest - 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.ModifyRoleModule(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccessManager_ModifyRoleModule_0(ctx context.Context, marshaler runtime.Marshaler, server AccessManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyRoleModuleRequest - 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.ModifyRoleModule(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AccessManager_CreateRole_0(ctx context.Context, marshaler runtime.Marshaler, client AccessManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateRoleRequest - 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.CreateRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccessManager_CreateRole_0(ctx context.Context, marshaler runtime.Marshaler, server AccessManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateRoleRequest - 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.CreateRole(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AccessManager_DeleteRoles_0(ctx context.Context, marshaler runtime.Marshaler, client AccessManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRolesRequest - 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.DeleteRoles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccessManager_DeleteRoles_0(ctx context.Context, marshaler runtime.Marshaler, server AccessManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRolesRequest - 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.DeleteRoles(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AccessManager_ModifyRole_0(ctx context.Context, marshaler runtime.Marshaler, client AccessManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyRoleRequest - 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.ModifyRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccessManager_ModifyRole_0(ctx context.Context, marshaler runtime.Marshaler, server AccessManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyRoleRequest - 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.ModifyRole(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_AccessManager_GetRole_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_AccessManager_GetRole_0(ctx context.Context, marshaler runtime.Marshaler, client AccessManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRoleRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AccessManager_GetRole_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccessManager_GetRole_0(ctx context.Context, marshaler runtime.Marshaler, server AccessManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRoleRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AccessManager_GetRole_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetRole(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_AccessManager_DescribeRoles_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_AccessManager_DescribeRoles_0(ctx context.Context, marshaler runtime.Marshaler, client AccessManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeRolesRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AccessManager_DescribeRoles_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeRoles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccessManager_DescribeRoles_0(ctx context.Context, marshaler runtime.Marshaler, server AccessManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeRolesRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AccessManager_DescribeRoles_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeRoles(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AccessManager_BindUserRole_0(ctx context.Context, marshaler runtime.Marshaler, client AccessManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq BindUserRoleRequest - 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.BindUserRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccessManager_BindUserRole_0(ctx context.Context, marshaler runtime.Marshaler, server AccessManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq BindUserRoleRequest - 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.BindUserRole(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AccessManager_UnbindUserRole_0(ctx context.Context, marshaler runtime.Marshaler, client AccessManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UnbindUserRoleRequest - 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.UnbindUserRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AccessManager_UnbindUserRole_0(ctx context.Context, marshaler runtime.Marshaler, server AccessManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UnbindUserRoleRequest - 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.UnbindUserRole(ctx, &protoReq) - return msg, metadata, err - -} - -func request_TokenManager_CreateClient_0(ctx context.Context, marshaler runtime.Marshaler, client TokenManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateClientRequest - 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.CreateClient(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_TokenManager_CreateClient_0(ctx context.Context, marshaler runtime.Marshaler, server TokenManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateClientRequest - 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.CreateClient(ctx, &protoReq) - return msg, metadata, err - -} - -func request_TokenManager_Token_0(ctx context.Context, marshaler runtime.Marshaler, client TokenManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq TokenRequest - 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.Token(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_TokenManager_Token_0(ctx context.Context, marshaler runtime.Marshaler, server TokenManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq TokenRequest - 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.Token(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterAccountManagerHandlerServer registers the http handlers for service AccountManager to "mux". -// UnaryRPC :call AccountManagerServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterAccountManagerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AccountManagerServer) error { - - mux.Handle("GET", pattern_AccountManager_DescribeUsers_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccountManager_DescribeUsers_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_DescribeUsers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AccountManager_DescribeUsersDetail_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccountManager_DescribeUsersDetail_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_DescribeUsersDetail_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_AccountManager_ModifyUser_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccountManager_ModifyUser_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_ModifyUser_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_AccountManager_DeleteUsers_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccountManager_DeleteUsers_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_DeleteUsers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AccountManager_ChangePassword_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccountManager_ChangePassword_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_ChangePassword_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AccountManager_CreatePasswordReset_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccountManager_CreatePasswordReset_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_CreatePasswordReset_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AccountManager_IsvCreateUser_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccountManager_IsvCreateUser_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_IsvCreateUser_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AccountManager_CreateUser_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccountManager_CreateUser_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_CreateUser_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AccountManager_GetPasswordReset_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccountManager_GetPasswordReset_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_GetPasswordReset_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AccountManager_ValidateUserPassword_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccountManager_ValidateUserPassword_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_ValidateUserPassword_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AccountManager_CreateGroup_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccountManager_CreateGroup_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_CreateGroup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AccountManager_DescribeGroups_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccountManager_DescribeGroups_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_DescribeGroups_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AccountManager_DescribeGroupsDetail_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccountManager_DescribeGroupsDetail_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_DescribeGroupsDetail_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_AccountManager_ModifyGroup_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccountManager_ModifyGroup_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_ModifyGroup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_AccountManager_DeleteGroups_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccountManager_DeleteGroups_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_DeleteGroups_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AccountManager_JoinGroup_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccountManager_JoinGroup_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_JoinGroup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AccountManager_LeaveGroup_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccountManager_LeaveGroup_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_LeaveGroup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterAccessManagerHandlerServer registers the http handlers for service AccessManager to "mux". -// UnaryRPC :call AccessManagerServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterAccessManagerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AccessManagerServer) error { - - mux.Handle("POST", pattern_AccessManager_CanDo_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccessManager_CanDo_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccessManager_CanDo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AccessManager_GetRoleModule_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccessManager_GetRoleModule_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccessManager_GetRoleModule_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AccessManager_ModifyRoleModule_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccessManager_ModifyRoleModule_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccessManager_ModifyRoleModule_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AccessManager_CreateRole_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccessManager_CreateRole_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccessManager_CreateRole_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_AccessManager_DeleteRoles_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccessManager_DeleteRoles_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccessManager_DeleteRoles_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_AccessManager_ModifyRole_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccessManager_ModifyRole_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccessManager_ModifyRole_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AccessManager_GetRole_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccessManager_GetRole_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccessManager_GetRole_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AccessManager_DescribeRoles_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccessManager_DescribeRoles_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccessManager_DescribeRoles_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AccessManager_BindUserRole_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccessManager_BindUserRole_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccessManager_BindUserRole_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_AccessManager_UnbindUserRole_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AccessManager_UnbindUserRole_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccessManager_UnbindUserRole_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterTokenManagerHandlerServer registers the http handlers for service TokenManager to "mux". -// UnaryRPC :call TokenManagerServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterTokenManagerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TokenManagerServer) error { - - mux.Handle("POST", pattern_TokenManager_CreateClient_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_TokenManager_CreateClient_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_TokenManager_CreateClient_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_TokenManager_Token_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_TokenManager_Token_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_TokenManager_Token_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterAccountManagerHandlerFromEndpoint is same as RegisterAccountManagerHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterAccountManagerHandlerFromEndpoint(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 RegisterAccountManagerHandler(ctx, mux, conn) -} - -// RegisterAccountManagerHandler registers the http handlers for service AccountManager to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterAccountManagerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterAccountManagerHandlerClient(ctx, mux, NewAccountManagerClient(conn)) -} - -// RegisterAccountManagerHandlerClient registers the http handlers for service AccountManager -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AccountManagerClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AccountManagerClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "AccountManagerClient" to call the correct interceptors. -func RegisterAccountManagerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AccountManagerClient) error { - - mux.Handle("GET", pattern_AccountManager_DescribeUsers_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_AccountManager_DescribeUsers_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_DescribeUsers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AccountManager_DescribeUsersDetail_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_AccountManager_DescribeUsersDetail_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_DescribeUsersDetail_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_AccountManager_ModifyUser_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_AccountManager_ModifyUser_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_ModifyUser_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_AccountManager_DeleteUsers_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_AccountManager_DeleteUsers_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_DeleteUsers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AccountManager_ChangePassword_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_AccountManager_ChangePassword_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_ChangePassword_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AccountManager_CreatePasswordReset_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_AccountManager_CreatePasswordReset_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_CreatePasswordReset_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AccountManager_IsvCreateUser_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_AccountManager_IsvCreateUser_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_IsvCreateUser_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AccountManager_CreateUser_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_AccountManager_CreateUser_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_CreateUser_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AccountManager_GetPasswordReset_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_AccountManager_GetPasswordReset_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_GetPasswordReset_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AccountManager_ValidateUserPassword_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_AccountManager_ValidateUserPassword_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_ValidateUserPassword_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AccountManager_CreateGroup_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_AccountManager_CreateGroup_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_CreateGroup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AccountManager_DescribeGroups_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_AccountManager_DescribeGroups_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_DescribeGroups_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AccountManager_DescribeGroupsDetail_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_AccountManager_DescribeGroupsDetail_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_DescribeGroupsDetail_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_AccountManager_ModifyGroup_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_AccountManager_ModifyGroup_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_ModifyGroup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_AccountManager_DeleteGroups_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_AccountManager_DeleteGroups_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_DeleteGroups_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AccountManager_JoinGroup_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_AccountManager_JoinGroup_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_JoinGroup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AccountManager_LeaveGroup_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_AccountManager_LeaveGroup_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccountManager_LeaveGroup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_AccountManager_DescribeUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "users"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AccountManager_DescribeUsersDetail_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "users_detail"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AccountManager_ModifyUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "users"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AccountManager_DeleteUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "users"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AccountManager_ChangePassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "users", "password"}, "change", runtime.AssumeColonVerbOpt(true))) - - pattern_AccountManager_CreatePasswordReset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "users", "password"}, "reset", runtime.AssumeColonVerbOpt(true))) - - pattern_AccountManager_IsvCreateUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "isv_users"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AccountManager_CreateUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "users"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AccountManager_GetPasswordReset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "users", "password"}, "reset", runtime.AssumeColonVerbOpt(true))) - - pattern_AccountManager_ValidateUserPassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "users", "password"}, "validate", runtime.AssumeColonVerbOpt(true))) - - pattern_AccountManager_CreateGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "groups"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AccountManager_DescribeGroups_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "groups"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AccountManager_DescribeGroupsDetail_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "groups_detail"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AccountManager_ModifyGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "groups"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AccountManager_DeleteGroups_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "groups"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AccountManager_JoinGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "groups"}, "join", runtime.AssumeColonVerbOpt(true))) - - pattern_AccountManager_LeaveGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "groups"}, "leave", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_AccountManager_DescribeUsers_0 = runtime.ForwardResponseMessage - - forward_AccountManager_DescribeUsersDetail_0 = runtime.ForwardResponseMessage - - forward_AccountManager_ModifyUser_0 = runtime.ForwardResponseMessage - - forward_AccountManager_DeleteUsers_0 = runtime.ForwardResponseMessage - - forward_AccountManager_ChangePassword_0 = runtime.ForwardResponseMessage - - forward_AccountManager_CreatePasswordReset_0 = runtime.ForwardResponseMessage - - forward_AccountManager_IsvCreateUser_0 = runtime.ForwardResponseMessage - - forward_AccountManager_CreateUser_0 = runtime.ForwardResponseMessage - - forward_AccountManager_GetPasswordReset_0 = runtime.ForwardResponseMessage - - forward_AccountManager_ValidateUserPassword_0 = runtime.ForwardResponseMessage - - forward_AccountManager_CreateGroup_0 = runtime.ForwardResponseMessage - - forward_AccountManager_DescribeGroups_0 = runtime.ForwardResponseMessage - - forward_AccountManager_DescribeGroupsDetail_0 = runtime.ForwardResponseMessage - - forward_AccountManager_ModifyGroup_0 = runtime.ForwardResponseMessage - - forward_AccountManager_DeleteGroups_0 = runtime.ForwardResponseMessage - - forward_AccountManager_JoinGroup_0 = runtime.ForwardResponseMessage - - forward_AccountManager_LeaveGroup_0 = runtime.ForwardResponseMessage -) - -// RegisterAccessManagerHandlerFromEndpoint is same as RegisterAccessManagerHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterAccessManagerHandlerFromEndpoint(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 RegisterAccessManagerHandler(ctx, mux, conn) -} - -// RegisterAccessManagerHandler registers the http handlers for service AccessManager to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterAccessManagerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterAccessManagerHandlerClient(ctx, mux, NewAccessManagerClient(conn)) -} - -// RegisterAccessManagerHandlerClient registers the http handlers for service AccessManager -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AccessManagerClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AccessManagerClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "AccessManagerClient" to call the correct interceptors. -func RegisterAccessManagerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AccessManagerClient) error { - - mux.Handle("POST", pattern_AccessManager_CanDo_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_AccessManager_CanDo_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccessManager_CanDo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AccessManager_GetRoleModule_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_AccessManager_GetRoleModule_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccessManager_GetRoleModule_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AccessManager_ModifyRoleModule_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_AccessManager_ModifyRoleModule_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccessManager_ModifyRoleModule_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AccessManager_CreateRole_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_AccessManager_CreateRole_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccessManager_CreateRole_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_AccessManager_DeleteRoles_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_AccessManager_DeleteRoles_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccessManager_DeleteRoles_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_AccessManager_ModifyRole_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_AccessManager_ModifyRole_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccessManager_ModifyRole_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AccessManager_GetRole_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_AccessManager_GetRole_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccessManager_GetRole_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AccessManager_DescribeRoles_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_AccessManager_DescribeRoles_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccessManager_DescribeRoles_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AccessManager_BindUserRole_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_AccessManager_BindUserRole_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccessManager_BindUserRole_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_AccessManager_UnbindUserRole_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_AccessManager_UnbindUserRole_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AccessManager_UnbindUserRole_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_AccessManager_CanDo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "cando"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AccessManager_GetRoleModule_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "roles"}, "module", runtime.AssumeColonVerbOpt(true))) - - pattern_AccessManager_ModifyRoleModule_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "roles"}, "module", runtime.AssumeColonVerbOpt(true))) - - pattern_AccessManager_CreateRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "roles"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AccessManager_DeleteRoles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "roles"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AccessManager_ModifyRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "roles"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AccessManager_GetRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "role"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AccessManager_DescribeRoles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "roles"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AccessManager_BindUserRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "user"}, "role", runtime.AssumeColonVerbOpt(true))) - - pattern_AccessManager_UnbindUserRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "user"}, "role", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_AccessManager_CanDo_0 = runtime.ForwardResponseMessage - - forward_AccessManager_GetRoleModule_0 = runtime.ForwardResponseMessage - - forward_AccessManager_ModifyRoleModule_0 = runtime.ForwardResponseMessage - - forward_AccessManager_CreateRole_0 = runtime.ForwardResponseMessage - - forward_AccessManager_DeleteRoles_0 = runtime.ForwardResponseMessage - - forward_AccessManager_ModifyRole_0 = runtime.ForwardResponseMessage - - forward_AccessManager_GetRole_0 = runtime.ForwardResponseMessage - - forward_AccessManager_DescribeRoles_0 = runtime.ForwardResponseMessage - - forward_AccessManager_BindUserRole_0 = runtime.ForwardResponseMessage - - forward_AccessManager_UnbindUserRole_0 = runtime.ForwardResponseMessage -) - -// RegisterTokenManagerHandlerFromEndpoint is same as RegisterTokenManagerHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterTokenManagerHandlerFromEndpoint(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 RegisterTokenManagerHandler(ctx, mux, conn) -} - -// RegisterTokenManagerHandler registers the http handlers for service TokenManager to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterTokenManagerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterTokenManagerHandlerClient(ctx, mux, NewTokenManagerClient(conn)) -} - -// RegisterTokenManagerHandlerClient registers the http handlers for service TokenManager -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TokenManagerClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TokenManagerClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "TokenManagerClient" to call the correct interceptors. -func RegisterTokenManagerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TokenManagerClient) error { - - mux.Handle("POST", pattern_TokenManager_CreateClient_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_TokenManager_CreateClient_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_TokenManager_CreateClient_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_TokenManager_Token_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_TokenManager_Token_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_TokenManager_Token_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_TokenManager_CreateClient_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "oauth2", "client"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_TokenManager_Token_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "oauth2", "token"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_TokenManager_CreateClient_0 = runtime.ForwardResponseMessage - - forward_TokenManager_Token_0 = runtime.ForwardResponseMessage -) diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/app.pb.go b/vendor/openpitrix.io/openpitrix/pkg/pb/app.pb.go deleted file mode 100644 index 49945633a..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/app.pb.go +++ /dev/null @@ -1,5322 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: app.proto - -package pb - -import ( - context "context" - fmt "fmt" - math "math" - - proto "github.com/golang/protobuf/proto" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type UploadAppAttachmentRequest_Type int32 - -const ( - UploadAppAttachmentRequest_icon UploadAppAttachmentRequest_Type = 0 - UploadAppAttachmentRequest_screenshot UploadAppAttachmentRequest_Type = 1 -) - -var UploadAppAttachmentRequest_Type_name = map[int32]string{ - 0: "icon", - 1: "screenshot", -} - -var UploadAppAttachmentRequest_Type_value = map[string]int32{ - "icon": 0, - "screenshot": 1, -} - -func (x UploadAppAttachmentRequest_Type) String() string { - return proto.EnumName(UploadAppAttachmentRequest_Type_name, int32(x)) -} - -func (UploadAppAttachmentRequest_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{6, 0} -} - -type CreateAppRequest struct { - // required, app name - Name *wrappers.StringValue `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // optional, vmbased/helm - VersionType *wrappers.StringValue `protobuf:"bytes,2,opt,name=version_type,json=versionType,proto3" json:"version_type,omitempty"` - // required, version with specific app package - VersionPackage *wrappers.BytesValue `protobuf:"bytes,3,opt,name=version_package,json=versionPackage,proto3" json:"version_package,omitempty"` - // required, version name of the app - VersionName *wrappers.StringValue `protobuf:"bytes,5,opt,name=version_name,json=versionName,proto3" json:"version_name,omitempty"` - // app icon - Icon *wrappers.BytesValue `protobuf:"bytes,6,opt,name=icon,proto3" json:"icon,omitempty"` - // isv - Isv *wrappers.StringValue `protobuf:"bytes,7,opt,name=isv,proto3" json:"isv,omitempty"` - // categories - Categories []string `protobuf:"bytes,8,rep,name=categories,proto3" json:"categories,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateAppRequest) Reset() { *m = CreateAppRequest{} } -func (m *CreateAppRequest) String() string { return proto.CompactTextString(m) } -func (*CreateAppRequest) ProtoMessage() {} -func (*CreateAppRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{0} -} - -func (m *CreateAppRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateAppRequest.Unmarshal(m, b) -} -func (m *CreateAppRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateAppRequest.Marshal(b, m, deterministic) -} -func (m *CreateAppRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateAppRequest.Merge(m, src) -} -func (m *CreateAppRequest) XXX_Size() int { - return xxx_messageInfo_CreateAppRequest.Size(m) -} -func (m *CreateAppRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateAppRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateAppRequest proto.InternalMessageInfo - -func (m *CreateAppRequest) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *CreateAppRequest) GetVersionType() *wrappers.StringValue { - if m != nil { - return m.VersionType - } - return nil -} - -func (m *CreateAppRequest) GetVersionPackage() *wrappers.BytesValue { - if m != nil { - return m.VersionPackage - } - return nil -} - -func (m *CreateAppRequest) GetVersionName() *wrappers.StringValue { - if m != nil { - return m.VersionName - } - return nil -} - -func (m *CreateAppRequest) GetIcon() *wrappers.BytesValue { - if m != nil { - return m.Icon - } - return nil -} - -func (m *CreateAppRequest) GetIsv() *wrappers.StringValue { - if m != nil { - return m.Isv - } - return nil -} - -func (m *CreateAppRequest) GetCategories() []string { - if m != nil { - return m.Categories - } - return nil -} - -type CreateAppResponse struct { - // app id - AppId *wrappers.StringValue `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - // version id of the app - VersionId *wrappers.StringValue `protobuf:"bytes,2,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateAppResponse) Reset() { *m = CreateAppResponse{} } -func (m *CreateAppResponse) String() string { return proto.CompactTextString(m) } -func (*CreateAppResponse) ProtoMessage() {} -func (*CreateAppResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{1} -} - -func (m *CreateAppResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateAppResponse.Unmarshal(m, b) -} -func (m *CreateAppResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateAppResponse.Marshal(b, m, deterministic) -} -func (m *CreateAppResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateAppResponse.Merge(m, src) -} -func (m *CreateAppResponse) XXX_Size() int { - return xxx_messageInfo_CreateAppResponse.Size(m) -} -func (m *CreateAppResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CreateAppResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateAppResponse proto.InternalMessageInfo - -func (m *CreateAppResponse) GetAppId() *wrappers.StringValue { - if m != nil { - return m.AppId - } - return nil -} - -func (m *CreateAppResponse) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -type ValidatePackageRequest struct { - // optional, vmbased/helm - VersionType string `protobuf:"bytes,2,opt,name=version_type,json=versionType,proto3" json:"version_type,omitempty"` - // required, version package eg.[the wordpress-0.0.1.tgz will be encoded to bytes] - VersionPackage []byte `protobuf:"bytes,3,opt,name=version_package,json=versionPackage,proto3" json:"version_package,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ValidatePackageRequest) Reset() { *m = ValidatePackageRequest{} } -func (m *ValidatePackageRequest) String() string { return proto.CompactTextString(m) } -func (*ValidatePackageRequest) ProtoMessage() {} -func (*ValidatePackageRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{2} -} - -func (m *ValidatePackageRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ValidatePackageRequest.Unmarshal(m, b) -} -func (m *ValidatePackageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ValidatePackageRequest.Marshal(b, m, deterministic) -} -func (m *ValidatePackageRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatePackageRequest.Merge(m, src) -} -func (m *ValidatePackageRequest) XXX_Size() int { - return xxx_messageInfo_ValidatePackageRequest.Size(m) -} -func (m *ValidatePackageRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatePackageRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatePackageRequest proto.InternalMessageInfo - -func (m *ValidatePackageRequest) GetVersionType() string { - if m != nil { - return m.VersionType - } - return "" -} - -func (m *ValidatePackageRequest) GetVersionPackage() []byte { - if m != nil { - return m.VersionPackage - } - return nil -} - -type ValidatePackageResponse struct { - // filename map to detail - ErrorDetails map[string]string `protobuf:"bytes,1,rep,name=error_details,json=errorDetails,proto3" json:"error_details,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // error eg.[json error] - Error *wrappers.StringValue `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` - // app name eg.[wordpress|mysql|...] - Name *wrappers.StringValue `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - // app version name.eg.[0.1.0] - VersionName *wrappers.StringValue `protobuf:"bytes,4,opt,name=version_name,json=versionName,proto3" json:"version_name,omitempty"` - // app url - Url *wrappers.StringValue `protobuf:"bytes,5,opt,name=url,proto3" json:"url,omitempty"` - // app description - Description *wrappers.StringValue `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ValidatePackageResponse) Reset() { *m = ValidatePackageResponse{} } -func (m *ValidatePackageResponse) String() string { return proto.CompactTextString(m) } -func (*ValidatePackageResponse) ProtoMessage() {} -func (*ValidatePackageResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{3} -} - -func (m *ValidatePackageResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ValidatePackageResponse.Unmarshal(m, b) -} -func (m *ValidatePackageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ValidatePackageResponse.Marshal(b, m, deterministic) -} -func (m *ValidatePackageResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatePackageResponse.Merge(m, src) -} -func (m *ValidatePackageResponse) XXX_Size() int { - return xxx_messageInfo_ValidatePackageResponse.Size(m) -} -func (m *ValidatePackageResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatePackageResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatePackageResponse proto.InternalMessageInfo - -func (m *ValidatePackageResponse) GetErrorDetails() map[string]string { - if m != nil { - return m.ErrorDetails - } - return nil -} - -func (m *ValidatePackageResponse) GetError() *wrappers.StringValue { - if m != nil { - return m.Error - } - return nil -} - -func (m *ValidatePackageResponse) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *ValidatePackageResponse) GetVersionName() *wrappers.StringValue { - if m != nil { - return m.VersionName - } - return nil -} - -func (m *ValidatePackageResponse) GetUrl() *wrappers.StringValue { - if m != nil { - return m.Url - } - return nil -} - -func (m *ValidatePackageResponse) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -type ModifyAppRequest struct { - // required, id of app to modify - AppId *wrappers.StringValue `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - // name of the app - Name *wrappers.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // description of the app - Description *wrappers.StringValue `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - // home page of the app - Home *wrappers.StringValue `protobuf:"bytes,4,opt,name=home,proto3" json:"home,omitempty"` - // maintainers who maintainer the app - Maintainers *wrappers.StringValue `protobuf:"bytes,7,opt,name=maintainers,proto3" json:"maintainers,omitempty"` - // sources of app - Sources *wrappers.StringValue `protobuf:"bytes,8,opt,name=sources,proto3" json:"sources,omitempty"` - // instructions of the app - Readme *wrappers.StringValue `protobuf:"bytes,9,opt,name=readme,proto3" json:"readme,omitempty"` - // abstraction of app - Abstraction *wrappers.StringValue `protobuf:"bytes,10,opt,name=abstraction,proto3" json:"abstraction,omitempty"` - // tos of app - Tos *wrappers.StringValue `protobuf:"bytes,11,opt,name=tos,proto3" json:"tos,omitempty"` - // category id of the app - CategoryId *wrappers.StringValue `protobuf:"bytes,12,opt,name=category_id,json=categoryId,proto3" json:"category_id,omitempty"` - // key words of the app - Keywords *wrappers.StringValue `protobuf:"bytes,13,opt,name=keywords,proto3" json:"keywords,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyAppRequest) Reset() { *m = ModifyAppRequest{} } -func (m *ModifyAppRequest) String() string { return proto.CompactTextString(m) } -func (*ModifyAppRequest) ProtoMessage() {} -func (*ModifyAppRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{4} -} - -func (m *ModifyAppRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyAppRequest.Unmarshal(m, b) -} -func (m *ModifyAppRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyAppRequest.Marshal(b, m, deterministic) -} -func (m *ModifyAppRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyAppRequest.Merge(m, src) -} -func (m *ModifyAppRequest) XXX_Size() int { - return xxx_messageInfo_ModifyAppRequest.Size(m) -} -func (m *ModifyAppRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyAppRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyAppRequest proto.InternalMessageInfo - -func (m *ModifyAppRequest) GetAppId() *wrappers.StringValue { - if m != nil { - return m.AppId - } - return nil -} - -func (m *ModifyAppRequest) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *ModifyAppRequest) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *ModifyAppRequest) GetHome() *wrappers.StringValue { - if m != nil { - return m.Home - } - return nil -} - -func (m *ModifyAppRequest) GetMaintainers() *wrappers.StringValue { - if m != nil { - return m.Maintainers - } - return nil -} - -func (m *ModifyAppRequest) GetSources() *wrappers.StringValue { - if m != nil { - return m.Sources - } - return nil -} - -func (m *ModifyAppRequest) GetReadme() *wrappers.StringValue { - if m != nil { - return m.Readme - } - return nil -} - -func (m *ModifyAppRequest) GetAbstraction() *wrappers.StringValue { - if m != nil { - return m.Abstraction - } - return nil -} - -func (m *ModifyAppRequest) GetTos() *wrappers.StringValue { - if m != nil { - return m.Tos - } - return nil -} - -func (m *ModifyAppRequest) GetCategoryId() *wrappers.StringValue { - if m != nil { - return m.CategoryId - } - return nil -} - -func (m *ModifyAppRequest) GetKeywords() *wrappers.StringValue { - if m != nil { - return m.Keywords - } - return nil -} - -type ModifyAppResponse struct { - // id of app modified - AppId *wrappers.StringValue `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyAppResponse) Reset() { *m = ModifyAppResponse{} } -func (m *ModifyAppResponse) String() string { return proto.CompactTextString(m) } -func (*ModifyAppResponse) ProtoMessage() {} -func (*ModifyAppResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{5} -} - -func (m *ModifyAppResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyAppResponse.Unmarshal(m, b) -} -func (m *ModifyAppResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyAppResponse.Marshal(b, m, deterministic) -} -func (m *ModifyAppResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyAppResponse.Merge(m, src) -} -func (m *ModifyAppResponse) XXX_Size() int { - return xxx_messageInfo_ModifyAppResponse.Size(m) -} -func (m *ModifyAppResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyAppResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyAppResponse proto.InternalMessageInfo - -func (m *ModifyAppResponse) GetAppId() *wrappers.StringValue { - if m != nil { - return m.AppId - } - return nil -} - -type UploadAppAttachmentRequest struct { - // required, id of app to upload attachment - AppId *wrappers.StringValue `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - // optional: icon/screenshot - Type UploadAppAttachmentRequest_Type `protobuf:"varint,2,opt,name=type,proto3,enum=openpitrix.UploadAppAttachmentRequest_Type" json:"type,omitempty"` - // required, content of attachment - AttachmentContent *wrappers.BytesValue `protobuf:"bytes,3,opt,name=attachment_content,json=attachmentContent,proto3" json:"attachment_content,omitempty"` - // only for screenshot, range: [0, 5] - Sequence *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=sequence,proto3" json:"sequence,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UploadAppAttachmentRequest) Reset() { *m = UploadAppAttachmentRequest{} } -func (m *UploadAppAttachmentRequest) String() string { return proto.CompactTextString(m) } -func (*UploadAppAttachmentRequest) ProtoMessage() {} -func (*UploadAppAttachmentRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{6} -} - -func (m *UploadAppAttachmentRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UploadAppAttachmentRequest.Unmarshal(m, b) -} -func (m *UploadAppAttachmentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UploadAppAttachmentRequest.Marshal(b, m, deterministic) -} -func (m *UploadAppAttachmentRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UploadAppAttachmentRequest.Merge(m, src) -} -func (m *UploadAppAttachmentRequest) XXX_Size() int { - return xxx_messageInfo_UploadAppAttachmentRequest.Size(m) -} -func (m *UploadAppAttachmentRequest) XXX_DiscardUnknown() { - xxx_messageInfo_UploadAppAttachmentRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_UploadAppAttachmentRequest proto.InternalMessageInfo - -func (m *UploadAppAttachmentRequest) GetAppId() *wrappers.StringValue { - if m != nil { - return m.AppId - } - return nil -} - -func (m *UploadAppAttachmentRequest) GetType() UploadAppAttachmentRequest_Type { - if m != nil { - return m.Type - } - return UploadAppAttachmentRequest_icon -} - -func (m *UploadAppAttachmentRequest) GetAttachmentContent() *wrappers.BytesValue { - if m != nil { - return m.AttachmentContent - } - return nil -} - -func (m *UploadAppAttachmentRequest) GetSequence() *wrappers.UInt32Value { - if m != nil { - return m.Sequence - } - return nil -} - -type UploadAppAttachmentResponse struct { - // id of app to upload attachment - AppId *wrappers.StringValue `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UploadAppAttachmentResponse) Reset() { *m = UploadAppAttachmentResponse{} } -func (m *UploadAppAttachmentResponse) String() string { return proto.CompactTextString(m) } -func (*UploadAppAttachmentResponse) ProtoMessage() {} -func (*UploadAppAttachmentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{7} -} - -func (m *UploadAppAttachmentResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UploadAppAttachmentResponse.Unmarshal(m, b) -} -func (m *UploadAppAttachmentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UploadAppAttachmentResponse.Marshal(b, m, deterministic) -} -func (m *UploadAppAttachmentResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_UploadAppAttachmentResponse.Merge(m, src) -} -func (m *UploadAppAttachmentResponse) XXX_Size() int { - return xxx_messageInfo_UploadAppAttachmentResponse.Size(m) -} -func (m *UploadAppAttachmentResponse) XXX_DiscardUnknown() { - xxx_messageInfo_UploadAppAttachmentResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_UploadAppAttachmentResponse proto.InternalMessageInfo - -func (m *UploadAppAttachmentResponse) GetAppId() *wrappers.StringValue { - if m != nil { - return m.AppId - } - return nil -} - -type DeleteAppsRequest struct { - // required, ids of app to delete - AppId []string `protobuf:"bytes,1,rep,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteAppsRequest) Reset() { *m = DeleteAppsRequest{} } -func (m *DeleteAppsRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteAppsRequest) ProtoMessage() {} -func (*DeleteAppsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{8} -} - -func (m *DeleteAppsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteAppsRequest.Unmarshal(m, b) -} -func (m *DeleteAppsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteAppsRequest.Marshal(b, m, deterministic) -} -func (m *DeleteAppsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteAppsRequest.Merge(m, src) -} -func (m *DeleteAppsRequest) XXX_Size() int { - return xxx_messageInfo_DeleteAppsRequest.Size(m) -} -func (m *DeleteAppsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteAppsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteAppsRequest proto.InternalMessageInfo - -func (m *DeleteAppsRequest) GetAppId() []string { - if m != nil { - return m.AppId - } - return nil -} - -type DeleteAppsResponse struct { - // ids of app deleted - AppId []string `protobuf:"bytes,1,rep,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteAppsResponse) Reset() { *m = DeleteAppsResponse{} } -func (m *DeleteAppsResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteAppsResponse) ProtoMessage() {} -func (*DeleteAppsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{9} -} - -func (m *DeleteAppsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteAppsResponse.Unmarshal(m, b) -} -func (m *DeleteAppsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteAppsResponse.Marshal(b, m, deterministic) -} -func (m *DeleteAppsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteAppsResponse.Merge(m, src) -} -func (m *DeleteAppsResponse) XXX_Size() int { - return xxx_messageInfo_DeleteAppsResponse.Size(m) -} -func (m *DeleteAppsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteAppsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteAppsResponse proto.InternalMessageInfo - -func (m *DeleteAppsResponse) GetAppId() []string { - if m != nil { - return m.AppId - } - return nil -} - -type App struct { - // app id - AppId *wrappers.StringValue `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - // whether there is a released version in the app - Active *wrappers.BoolValue `protobuf:"bytes,2,opt,name=active,proto3" json:"active,omitempty"` - // app name - Name *wrappers.StringValue `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - // repository(store app package) id - RepoId *wrappers.StringValue `protobuf:"bytes,4,opt,name=repo_id,json=repoId,proto3" json:"repo_id,omitempty"` - // app description - Description *wrappers.StringValue `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - // status eg.[modify|submit|review|cancel|release|delete|pass|reject|suspend|recover] - Status *wrappers.StringValue `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"` - // app home page - Home *wrappers.StringValue `protobuf:"bytes,7,opt,name=home,proto3" json:"home,omitempty"` - // app icon - Icon *wrappers.StringValue `protobuf:"bytes,8,opt,name=icon,proto3" json:"icon,omitempty"` - // app screenshots - Screenshots *wrappers.StringValue `protobuf:"bytes,9,opt,name=screenshots,proto3" json:"screenshots,omitempty"` - // app maintainers - Maintainers *wrappers.StringValue `protobuf:"bytes,10,opt,name=maintainers,proto3" json:"maintainers,omitempty"` - // app key words - Keywords *wrappers.StringValue `protobuf:"bytes,11,opt,name=keywords,proto3" json:"keywords,omitempty"` - // sources of app - Sources *wrappers.StringValue `protobuf:"bytes,12,opt,name=sources,proto3" json:"sources,omitempty"` - // app instructions - Readme *wrappers.StringValue `protobuf:"bytes,13,opt,name=readme,proto3" json:"readme,omitempty"` - // chart name of app - ChartName *wrappers.StringValue `protobuf:"bytes,14,opt,name=chart_name,json=chartName,proto3" json:"chart_name,omitempty"` - // abstraction of app - Abstraction *wrappers.StringValue `protobuf:"bytes,15,opt,name=abstraction,proto3" json:"abstraction,omitempty"` - // tos of app - Tos *wrappers.StringValue `protobuf:"bytes,16,opt,name=tos,proto3" json:"tos,omitempty"` - // owner of app - Owner *wrappers.StringValue `protobuf:"bytes,17,opt,name=owner,proto3" json:"owner,omitempty"` - // the time when app create - CreateTime *timestamp.Timestamp `protobuf:"bytes,18,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // record status changed time - StatusTime *timestamp.Timestamp `protobuf:"bytes,19,opt,name=status_time,json=statusTime,proto3" json:"status_time,omitempty"` - // the time when app update - UpdateTime *timestamp.Timestamp `protobuf:"bytes,20,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` - // list of category, the app may belong to one more category - CategorySet []*ResourceCategory `protobuf:"bytes,21,rep,name=category_set,json=categorySet,proto3" json:"category_set,omitempty"` - // latest version of app - LatestAppVersion *AppVersion `protobuf:"bytes,22,opt,name=latest_app_version,json=latestAppVersion,proto3" json:"latest_app_version,omitempty"` - // app version types eg.[vmbased|helm] - AppVersionTypes *wrappers.StringValue `protobuf:"bytes,23,opt,name=app_version_types,json=appVersionTypes,proto3" json:"app_version_types,omitempty"` - // company name - CompanyName *wrappers.StringValue `protobuf:"bytes,24,opt,name=company_name,json=companyName,proto3" json:"company_name,omitempty"` - // company website - CompanyWebsite *wrappers.StringValue `protobuf:"bytes,25,opt,name=company_website,json=companyWebsite,proto3" json:"company_website,omitempty"` - // company profile - CompanyProfile *wrappers.StringValue `protobuf:"bytes,26,opt,name=company_profile,json=companyProfile,proto3" json:"company_profile,omitempty"` - // company join time - CompanyJoinTime *timestamp.Timestamp `protobuf:"bytes,27,opt,name=company_join_time,json=companyJoinTime,proto3" json:"company_join_time,omitempty"` - // owner path of the app, concat string group_path:user_id - OwnerPath *wrappers.StringValue `protobuf:"bytes,28,opt,name=owner_path,json=ownerPath,proto3" json:"owner_path,omitempty"` - // the isv user who create the app - Isv *wrappers.StringValue `protobuf:"bytes,29,opt,name=isv,proto3" json:"isv,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *App) Reset() { *m = App{} } -func (m *App) String() string { return proto.CompactTextString(m) } -func (*App) ProtoMessage() {} -func (*App) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{10} -} - -func (m *App) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_App.Unmarshal(m, b) -} -func (m *App) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_App.Marshal(b, m, deterministic) -} -func (m *App) XXX_Merge(src proto.Message) { - xxx_messageInfo_App.Merge(m, src) -} -func (m *App) XXX_Size() int { - return xxx_messageInfo_App.Size(m) -} -func (m *App) XXX_DiscardUnknown() { - xxx_messageInfo_App.DiscardUnknown(m) -} - -var xxx_messageInfo_App proto.InternalMessageInfo - -func (m *App) GetAppId() *wrappers.StringValue { - if m != nil { - return m.AppId - } - return nil -} - -func (m *App) GetActive() *wrappers.BoolValue { - if m != nil { - return m.Active - } - return nil -} - -func (m *App) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *App) GetRepoId() *wrappers.StringValue { - if m != nil { - return m.RepoId - } - return nil -} - -func (m *App) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *App) GetStatus() *wrappers.StringValue { - if m != nil { - return m.Status - } - return nil -} - -func (m *App) GetHome() *wrappers.StringValue { - if m != nil { - return m.Home - } - return nil -} - -func (m *App) GetIcon() *wrappers.StringValue { - if m != nil { - return m.Icon - } - return nil -} - -func (m *App) GetScreenshots() *wrappers.StringValue { - if m != nil { - return m.Screenshots - } - return nil -} - -func (m *App) GetMaintainers() *wrappers.StringValue { - if m != nil { - return m.Maintainers - } - return nil -} - -func (m *App) GetKeywords() *wrappers.StringValue { - if m != nil { - return m.Keywords - } - return nil -} - -func (m *App) GetSources() *wrappers.StringValue { - if m != nil { - return m.Sources - } - return nil -} - -func (m *App) GetReadme() *wrappers.StringValue { - if m != nil { - return m.Readme - } - return nil -} - -func (m *App) GetChartName() *wrappers.StringValue { - if m != nil { - return m.ChartName - } - return nil -} - -func (m *App) GetAbstraction() *wrappers.StringValue { - if m != nil { - return m.Abstraction - } - return nil -} - -func (m *App) GetTos() *wrappers.StringValue { - if m != nil { - return m.Tos - } - return nil -} - -func (m *App) GetOwner() *wrappers.StringValue { - if m != nil { - return m.Owner - } - return nil -} - -func (m *App) GetCreateTime() *timestamp.Timestamp { - if m != nil { - return m.CreateTime - } - return nil -} - -func (m *App) GetStatusTime() *timestamp.Timestamp { - if m != nil { - return m.StatusTime - } - return nil -} - -func (m *App) GetUpdateTime() *timestamp.Timestamp { - if m != nil { - return m.UpdateTime - } - return nil -} - -func (m *App) GetCategorySet() []*ResourceCategory { - if m != nil { - return m.CategorySet - } - return nil -} - -func (m *App) GetLatestAppVersion() *AppVersion { - if m != nil { - return m.LatestAppVersion - } - return nil -} - -func (m *App) GetAppVersionTypes() *wrappers.StringValue { - if m != nil { - return m.AppVersionTypes - } - return nil -} - -func (m *App) GetCompanyName() *wrappers.StringValue { - if m != nil { - return m.CompanyName - } - return nil -} - -func (m *App) GetCompanyWebsite() *wrappers.StringValue { - if m != nil { - return m.CompanyWebsite - } - return nil -} - -func (m *App) GetCompanyProfile() *wrappers.StringValue { - if m != nil { - return m.CompanyProfile - } - return nil -} - -func (m *App) GetCompanyJoinTime() *timestamp.Timestamp { - if m != nil { - return m.CompanyJoinTime - } - return nil -} - -func (m *App) GetOwnerPath() *wrappers.StringValue { - if m != nil { - return m.OwnerPath - } - return nil -} - -func (m *App) GetIsv() *wrappers.StringValue { - if m != nil { - return m.Isv - } - return nil -} - -type DescribeAppsRequest struct { - // query key, support these fields(app_id, name, repo_id, description, status, home, icon, screenshots, maintainers, sources, readme, owner, chart_name) - SearchWord *wrappers.StringValue `protobuf:"bytes,1,opt,name=search_word,json=searchWord,proto3" json:"search_word,omitempty"` - // sort key, order by sort_key, default create_time - SortKey *wrappers.StringValue `protobuf:"bytes,2,opt,name=sort_key,json=sortKey,proto3" json:"sort_key,omitempty"` - // value = 0 sort ASC, value = 1 sort DESC - Reverse *wrappers.BoolValue `protobuf:"bytes,3,opt,name=reverse,proto3" json:"reverse,omitempty"` - // data limit per page, default is 20, max value is 200 - Limit uint32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` - // data offset, default is 0 - Offset uint32 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` - // app ids - AppId []string `protobuf:"bytes,11,rep,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - // app name - Name []string `protobuf:"bytes,12,rep,name=name,proto3" json:"name,omitempty"` - // app repository ids - RepoId []string `protobuf:"bytes,13,rep,name=repo_id,json=repoId,proto3" json:"repo_id,omitempty"` - // app status eg.[modify|submit|review|cancel|release|delete|pass|reject|suspend|recover] - Status []string `protobuf:"bytes,14,rep,name=status,proto3" json:"status,omitempty"` - // app owner - Owner []string `protobuf:"bytes,15,rep,name=owner,proto3" json:"owner,omitempty"` - // app chart name - ChartName []string `protobuf:"bytes,16,rep,name=chart_name,json=chartName,proto3" json:"chart_name,omitempty"` - // app category ids - CategoryId []string `protobuf:"bytes,17,rep,name=category_id,json=categoryId,proto3" json:"category_id,omitempty"` - // select column to display - DisplayColumns []string `protobuf:"bytes,18,rep,name=display_columns,json=displayColumns,proto3" json:"display_columns,omitempty"` - // isv - Isv []string `protobuf:"bytes,19,rep,name=isv,proto3" json:"isv,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeAppsRequest) Reset() { *m = DescribeAppsRequest{} } -func (m *DescribeAppsRequest) String() string { return proto.CompactTextString(m) } -func (*DescribeAppsRequest) ProtoMessage() {} -func (*DescribeAppsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{11} -} - -func (m *DescribeAppsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeAppsRequest.Unmarshal(m, b) -} -func (m *DescribeAppsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeAppsRequest.Marshal(b, m, deterministic) -} -func (m *DescribeAppsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeAppsRequest.Merge(m, src) -} -func (m *DescribeAppsRequest) XXX_Size() int { - return xxx_messageInfo_DescribeAppsRequest.Size(m) -} -func (m *DescribeAppsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeAppsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeAppsRequest proto.InternalMessageInfo - -func (m *DescribeAppsRequest) GetSearchWord() *wrappers.StringValue { - if m != nil { - return m.SearchWord - } - return nil -} - -func (m *DescribeAppsRequest) GetSortKey() *wrappers.StringValue { - if m != nil { - return m.SortKey - } - return nil -} - -func (m *DescribeAppsRequest) GetReverse() *wrappers.BoolValue { - if m != nil { - return m.Reverse - } - return nil -} - -func (m *DescribeAppsRequest) GetLimit() uint32 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *DescribeAppsRequest) GetOffset() uint32 { - if m != nil { - return m.Offset - } - return 0 -} - -func (m *DescribeAppsRequest) GetAppId() []string { - if m != nil { - return m.AppId - } - return nil -} - -func (m *DescribeAppsRequest) GetName() []string { - if m != nil { - return m.Name - } - return nil -} - -func (m *DescribeAppsRequest) GetRepoId() []string { - if m != nil { - return m.RepoId - } - return nil -} - -func (m *DescribeAppsRequest) GetStatus() []string { - if m != nil { - return m.Status - } - return nil -} - -func (m *DescribeAppsRequest) GetOwner() []string { - if m != nil { - return m.Owner - } - return nil -} - -func (m *DescribeAppsRequest) GetChartName() []string { - if m != nil { - return m.ChartName - } - return nil -} - -func (m *DescribeAppsRequest) GetCategoryId() []string { - if m != nil { - return m.CategoryId - } - return nil -} - -func (m *DescribeAppsRequest) GetDisplayColumns() []string { - if m != nil { - return m.DisplayColumns - } - return nil -} - -func (m *DescribeAppsRequest) GetIsv() []string { - if m != nil { - return m.Isv - } - return nil -} - -type DescribeAppsResponse struct { - // total count of qualified app - TotalCount uint32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - // list of app - AppSet []*App `protobuf:"bytes,2,rep,name=app_set,json=appSet,proto3" json:"app_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeAppsResponse) Reset() { *m = DescribeAppsResponse{} } -func (m *DescribeAppsResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeAppsResponse) ProtoMessage() {} -func (*DescribeAppsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{12} -} - -func (m *DescribeAppsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeAppsResponse.Unmarshal(m, b) -} -func (m *DescribeAppsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeAppsResponse.Marshal(b, m, deterministic) -} -func (m *DescribeAppsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeAppsResponse.Merge(m, src) -} -func (m *DescribeAppsResponse) XXX_Size() int { - return xxx_messageInfo_DescribeAppsResponse.Size(m) -} -func (m *DescribeAppsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeAppsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeAppsResponse proto.InternalMessageInfo - -func (m *DescribeAppsResponse) GetTotalCount() uint32 { - if m != nil { - return m.TotalCount - } - return 0 -} - -func (m *DescribeAppsResponse) GetAppSet() []*App { - if m != nil { - return m.AppSet - } - return nil -} - -type CreateAppVersionRequest struct { - // required, id of app to create new version - AppId *wrappers.StringValue `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - // required, version name eg.[0.1.0|0.1.3|...] - Name *wrappers.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // description of app of specific version - Description *wrappers.StringValue `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - // optional: vmbased/helm - Type *wrappers.StringValue `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` - // package of app of specific version - Package *wrappers.BytesValue `protobuf:"bytes,5,opt,name=package,proto3" json:"package,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateAppVersionRequest) Reset() { *m = CreateAppVersionRequest{} } -func (m *CreateAppVersionRequest) String() string { return proto.CompactTextString(m) } -func (*CreateAppVersionRequest) ProtoMessage() {} -func (*CreateAppVersionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{13} -} - -func (m *CreateAppVersionRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateAppVersionRequest.Unmarshal(m, b) -} -func (m *CreateAppVersionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateAppVersionRequest.Marshal(b, m, deterministic) -} -func (m *CreateAppVersionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateAppVersionRequest.Merge(m, src) -} -func (m *CreateAppVersionRequest) XXX_Size() int { - return xxx_messageInfo_CreateAppVersionRequest.Size(m) -} -func (m *CreateAppVersionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateAppVersionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateAppVersionRequest proto.InternalMessageInfo - -func (m *CreateAppVersionRequest) GetAppId() *wrappers.StringValue { - if m != nil { - return m.AppId - } - return nil -} - -func (m *CreateAppVersionRequest) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *CreateAppVersionRequest) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *CreateAppVersionRequest) GetType() *wrappers.StringValue { - if m != nil { - return m.Type - } - return nil -} - -func (m *CreateAppVersionRequest) GetPackage() *wrappers.BytesValue { - if m != nil { - return m.Package - } - return nil -} - -type CreateAppVersionResponse struct { - // version id - VersionId *wrappers.StringValue `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateAppVersionResponse) Reset() { *m = CreateAppVersionResponse{} } -func (m *CreateAppVersionResponse) String() string { return proto.CompactTextString(m) } -func (*CreateAppVersionResponse) ProtoMessage() {} -func (*CreateAppVersionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{14} -} - -func (m *CreateAppVersionResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateAppVersionResponse.Unmarshal(m, b) -} -func (m *CreateAppVersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateAppVersionResponse.Marshal(b, m, deterministic) -} -func (m *CreateAppVersionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateAppVersionResponse.Merge(m, src) -} -func (m *CreateAppVersionResponse) XXX_Size() int { - return xxx_messageInfo_CreateAppVersionResponse.Size(m) -} -func (m *CreateAppVersionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CreateAppVersionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateAppVersionResponse proto.InternalMessageInfo - -func (m *CreateAppVersionResponse) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -type ModifyAppVersionRequest struct { - // required, version id of app to modify - VersionId *wrappers.StringValue `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - // app name - Name *wrappers.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // app description - Description *wrappers.StringValue `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - // package of app to replace other - Package *wrappers.BytesValue `protobuf:"bytes,4,opt,name=package,proto3" json:"package,omitempty"` - // filename map to file_content - PackageFiles map[string][]byte `protobuf:"bytes,5,rep,name=package_files,json=packageFiles,proto3" json:"package_files,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyAppVersionRequest) Reset() { *m = ModifyAppVersionRequest{} } -func (m *ModifyAppVersionRequest) String() string { return proto.CompactTextString(m) } -func (*ModifyAppVersionRequest) ProtoMessage() {} -func (*ModifyAppVersionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{15} -} - -func (m *ModifyAppVersionRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyAppVersionRequest.Unmarshal(m, b) -} -func (m *ModifyAppVersionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyAppVersionRequest.Marshal(b, m, deterministic) -} -func (m *ModifyAppVersionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyAppVersionRequest.Merge(m, src) -} -func (m *ModifyAppVersionRequest) XXX_Size() int { - return xxx_messageInfo_ModifyAppVersionRequest.Size(m) -} -func (m *ModifyAppVersionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyAppVersionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyAppVersionRequest proto.InternalMessageInfo - -func (m *ModifyAppVersionRequest) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -func (m *ModifyAppVersionRequest) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *ModifyAppVersionRequest) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *ModifyAppVersionRequest) GetPackage() *wrappers.BytesValue { - if m != nil { - return m.Package - } - return nil -} - -func (m *ModifyAppVersionRequest) GetPackageFiles() map[string][]byte { - if m != nil { - return m.PackageFiles - } - return nil -} - -type ModifyAppVersionResponse struct { - // required, version id - VersionId *wrappers.StringValue `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyAppVersionResponse) Reset() { *m = ModifyAppVersionResponse{} } -func (m *ModifyAppVersionResponse) String() string { return proto.CompactTextString(m) } -func (*ModifyAppVersionResponse) ProtoMessage() {} -func (*ModifyAppVersionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{16} -} - -func (m *ModifyAppVersionResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyAppVersionResponse.Unmarshal(m, b) -} -func (m *ModifyAppVersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyAppVersionResponse.Marshal(b, m, deterministic) -} -func (m *ModifyAppVersionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyAppVersionResponse.Merge(m, src) -} -func (m *ModifyAppVersionResponse) XXX_Size() int { - return xxx_messageInfo_ModifyAppVersionResponse.Size(m) -} -func (m *ModifyAppVersionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyAppVersionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyAppVersionResponse proto.InternalMessageInfo - -func (m *ModifyAppVersionResponse) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -type AppVersion struct { - // version id of app - VersionId *wrappers.StringValue `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - // active or not - Active *wrappers.BoolValue `protobuf:"bytes,2,opt,name=active,proto3" json:"active,omitempty"` - // app id - AppId *wrappers.StringValue `protobuf:"bytes,3,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - // owner - Owner *wrappers.StringValue `protobuf:"bytes,4,opt,name=owner,proto3" json:"owner,omitempty"` - // version name - Name *wrappers.StringValue `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` - // description of app of specific version - Description *wrappers.StringValue `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` - // home of app of specific version - Home *wrappers.StringValue `protobuf:"bytes,7,opt,name=home,proto3" json:"home,omitempty"` - // icon of app of specific version - Icon *wrappers.StringValue `protobuf:"bytes,8,opt,name=icon,proto3" json:"icon,omitempty"` - // screenshots of app of specific version - Screenshots *wrappers.StringValue `protobuf:"bytes,9,opt,name=screenshots,proto3" json:"screenshots,omitempty"` - // maintainers of app of specific version - Maintainers *wrappers.StringValue `protobuf:"bytes,10,opt,name=maintainers,proto3" json:"maintainers,omitempty"` - // keywords of app of specific version - Keywords *wrappers.StringValue `protobuf:"bytes,11,opt,name=keywords,proto3" json:"keywords,omitempty"` - // sources of app of specific version - Sources *wrappers.StringValue `protobuf:"bytes,12,opt,name=sources,proto3" json:"sources,omitempty"` - // readme of app of specific version - Readme *wrappers.StringValue `protobuf:"bytes,13,opt,name=readme,proto3" json:"readme,omitempty"` - // package name of app of specific version - PackageName *wrappers.StringValue `protobuf:"bytes,14,opt,name=package_name,json=packageName,proto3" json:"package_name,omitempty"` - // status of app of specific version eg.[draft|submitted|passed|rejected|active|in-review|deleted|suspended] - Status *wrappers.StringValue `protobuf:"bytes,15,opt,name=status,proto3" json:"status,omitempty"` - // review id of app of specific version - ReviewId *wrappers.StringValue `protobuf:"bytes,16,opt,name=review_id,json=reviewId,proto3" json:"review_id,omitempty"` - // the time when app version create - CreateTime *timestamp.Timestamp `protobuf:"bytes,17,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // record status changed time - StatusTime *timestamp.Timestamp `protobuf:"bytes,18,opt,name=status_time,json=statusTime,proto3" json:"status_time,omitempty"` - // the time when app version update - UpdateTime *timestamp.Timestamp `protobuf:"bytes,19,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` - // sequence of app of specific version - Sequence *wrappers.UInt32Value `protobuf:"bytes,20,opt,name=sequence,proto3" json:"sequence,omitempty"` - // message path of app of specific version - Message *wrappers.StringValue `protobuf:"bytes,21,opt,name=message,proto3" json:"message,omitempty"` - // type of app of specific version - Type *wrappers.StringValue `protobuf:"bytes,22,opt,name=type,proto3" json:"type,omitempty"` - // owner path of app of specific version, concat string group_path:user_id - OwnerPath *wrappers.StringValue `protobuf:"bytes,23,opt,name=owner_path,json=ownerPath,proto3" json:"owner_path,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AppVersion) Reset() { *m = AppVersion{} } -func (m *AppVersion) String() string { return proto.CompactTextString(m) } -func (*AppVersion) ProtoMessage() {} -func (*AppVersion) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{17} -} - -func (m *AppVersion) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AppVersion.Unmarshal(m, b) -} -func (m *AppVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AppVersion.Marshal(b, m, deterministic) -} -func (m *AppVersion) XXX_Merge(src proto.Message) { - xxx_messageInfo_AppVersion.Merge(m, src) -} -func (m *AppVersion) XXX_Size() int { - return xxx_messageInfo_AppVersion.Size(m) -} -func (m *AppVersion) XXX_DiscardUnknown() { - xxx_messageInfo_AppVersion.DiscardUnknown(m) -} - -var xxx_messageInfo_AppVersion proto.InternalMessageInfo - -func (m *AppVersion) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -func (m *AppVersion) GetActive() *wrappers.BoolValue { - if m != nil { - return m.Active - } - return nil -} - -func (m *AppVersion) GetAppId() *wrappers.StringValue { - if m != nil { - return m.AppId - } - return nil -} - -func (m *AppVersion) GetOwner() *wrappers.StringValue { - if m != nil { - return m.Owner - } - return nil -} - -func (m *AppVersion) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *AppVersion) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *AppVersion) GetHome() *wrappers.StringValue { - if m != nil { - return m.Home - } - return nil -} - -func (m *AppVersion) GetIcon() *wrappers.StringValue { - if m != nil { - return m.Icon - } - return nil -} - -func (m *AppVersion) GetScreenshots() *wrappers.StringValue { - if m != nil { - return m.Screenshots - } - return nil -} - -func (m *AppVersion) GetMaintainers() *wrappers.StringValue { - if m != nil { - return m.Maintainers - } - return nil -} - -func (m *AppVersion) GetKeywords() *wrappers.StringValue { - if m != nil { - return m.Keywords - } - return nil -} - -func (m *AppVersion) GetSources() *wrappers.StringValue { - if m != nil { - return m.Sources - } - return nil -} - -func (m *AppVersion) GetReadme() *wrappers.StringValue { - if m != nil { - return m.Readme - } - return nil -} - -func (m *AppVersion) GetPackageName() *wrappers.StringValue { - if m != nil { - return m.PackageName - } - return nil -} - -func (m *AppVersion) GetStatus() *wrappers.StringValue { - if m != nil { - return m.Status - } - return nil -} - -func (m *AppVersion) GetReviewId() *wrappers.StringValue { - if m != nil { - return m.ReviewId - } - return nil -} - -func (m *AppVersion) GetCreateTime() *timestamp.Timestamp { - if m != nil { - return m.CreateTime - } - return nil -} - -func (m *AppVersion) GetStatusTime() *timestamp.Timestamp { - if m != nil { - return m.StatusTime - } - return nil -} - -func (m *AppVersion) GetUpdateTime() *timestamp.Timestamp { - if m != nil { - return m.UpdateTime - } - return nil -} - -func (m *AppVersion) GetSequence() *wrappers.UInt32Value { - if m != nil { - return m.Sequence - } - return nil -} - -func (m *AppVersion) GetMessage() *wrappers.StringValue { - if m != nil { - return m.Message - } - return nil -} - -func (m *AppVersion) GetType() *wrappers.StringValue { - if m != nil { - return m.Type - } - return nil -} - -func (m *AppVersion) GetOwnerPath() *wrappers.StringValue { - if m != nil { - return m.OwnerPath - } - return nil -} - -type AppVersionAudit struct { - // id of version to audit - VersionId *wrappers.StringValue `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - // id of specific version app - AppId *wrappers.StringValue `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - // audit status, eg.[draft|submitted|passed|rejected|active|in-review|deleted|suspended] - Status *wrappers.StringValue `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` - // version name - VersionName *wrappers.StringValue `protobuf:"bytes,4,opt,name=version_name,json=versionName,proto3" json:"version_name,omitempty"` - // name of specific version app - AppName *wrappers.StringValue `protobuf:"bytes,5,opt,name=app_name,json=appName,proto3" json:"app_name,omitempty"` - // user of auditer - Operator *wrappers.StringValue `protobuf:"bytes,6,opt,name=operator,proto3" json:"operator,omitempty"` - // operator of auditer eg.[global_admin|developer|business|technical|isv] - OperatorType *wrappers.StringValue `protobuf:"bytes,7,opt,name=operator_type,json=operatorType,proto3" json:"operator_type,omitempty"` - // audit message - Message *wrappers.StringValue `protobuf:"bytes,8,opt,name=message,proto3" json:"message,omitempty"` - // review id - ReviewId *wrappers.StringValue `protobuf:"bytes,9,opt,name=review_id,json=reviewId,proto3" json:"review_id,omitempty"` - // record status changed time - StatusTime *timestamp.Timestamp `protobuf:"bytes,10,opt,name=status_time,json=statusTime,proto3" json:"status_time,omitempty"` - // version type - VersionType *wrappers.StringValue `protobuf:"bytes,11,opt,name=version_type,json=versionType,proto3" json:"version_type,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AppVersionAudit) Reset() { *m = AppVersionAudit{} } -func (m *AppVersionAudit) String() string { return proto.CompactTextString(m) } -func (*AppVersionAudit) ProtoMessage() {} -func (*AppVersionAudit) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{18} -} - -func (m *AppVersionAudit) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AppVersionAudit.Unmarshal(m, b) -} -func (m *AppVersionAudit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AppVersionAudit.Marshal(b, m, deterministic) -} -func (m *AppVersionAudit) XXX_Merge(src proto.Message) { - xxx_messageInfo_AppVersionAudit.Merge(m, src) -} -func (m *AppVersionAudit) XXX_Size() int { - return xxx_messageInfo_AppVersionAudit.Size(m) -} -func (m *AppVersionAudit) XXX_DiscardUnknown() { - xxx_messageInfo_AppVersionAudit.DiscardUnknown(m) -} - -var xxx_messageInfo_AppVersionAudit proto.InternalMessageInfo - -func (m *AppVersionAudit) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -func (m *AppVersionAudit) GetAppId() *wrappers.StringValue { - if m != nil { - return m.AppId - } - return nil -} - -func (m *AppVersionAudit) GetStatus() *wrappers.StringValue { - if m != nil { - return m.Status - } - return nil -} - -func (m *AppVersionAudit) GetVersionName() *wrappers.StringValue { - if m != nil { - return m.VersionName - } - return nil -} - -func (m *AppVersionAudit) GetAppName() *wrappers.StringValue { - if m != nil { - return m.AppName - } - return nil -} - -func (m *AppVersionAudit) GetOperator() *wrappers.StringValue { - if m != nil { - return m.Operator - } - return nil -} - -func (m *AppVersionAudit) GetOperatorType() *wrappers.StringValue { - if m != nil { - return m.OperatorType - } - return nil -} - -func (m *AppVersionAudit) GetMessage() *wrappers.StringValue { - if m != nil { - return m.Message - } - return nil -} - -func (m *AppVersionAudit) GetReviewId() *wrappers.StringValue { - if m != nil { - return m.ReviewId - } - return nil -} - -func (m *AppVersionAudit) GetStatusTime() *timestamp.Timestamp { - if m != nil { - return m.StatusTime - } - return nil -} - -func (m *AppVersionAudit) GetVersionType() *wrappers.StringValue { - if m != nil { - return m.VersionType - } - return nil -} - -type AppVersionReviewPhase struct { - // review status of app version eg.[isv-in-review|isv-passed|isv-rejected|isv-draft|business-in-review|business-passed|business-rejected|develop-draft|develop-in-review|develop-passed|develop-rejected|develop-draft] - Status *wrappers.StringValue `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` - // user of reviewer - Operator *wrappers.StringValue `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"` - // operator type of reviewer eg.[global_admin|developer|business|technical|isv] - OperatorType *wrappers.StringValue `protobuf:"bytes,3,opt,name=operator_type,json=operatorType,proto3" json:"operator_type,omitempty"` - // review message - Message *wrappers.StringValue `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"` - // record status changed time - StatusTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=status_time,json=statusTime,proto3" json:"status_time,omitempty"` - // app version review time - ReviewTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=review_time,json=reviewTime,proto3" json:"review_time,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AppVersionReviewPhase) Reset() { *m = AppVersionReviewPhase{} } -func (m *AppVersionReviewPhase) String() string { return proto.CompactTextString(m) } -func (*AppVersionReviewPhase) ProtoMessage() {} -func (*AppVersionReviewPhase) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{19} -} - -func (m *AppVersionReviewPhase) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AppVersionReviewPhase.Unmarshal(m, b) -} -func (m *AppVersionReviewPhase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AppVersionReviewPhase.Marshal(b, m, deterministic) -} -func (m *AppVersionReviewPhase) XXX_Merge(src proto.Message) { - xxx_messageInfo_AppVersionReviewPhase.Merge(m, src) -} -func (m *AppVersionReviewPhase) XXX_Size() int { - return xxx_messageInfo_AppVersionReviewPhase.Size(m) -} -func (m *AppVersionReviewPhase) XXX_DiscardUnknown() { - xxx_messageInfo_AppVersionReviewPhase.DiscardUnknown(m) -} - -var xxx_messageInfo_AppVersionReviewPhase proto.InternalMessageInfo - -func (m *AppVersionReviewPhase) GetStatus() *wrappers.StringValue { - if m != nil { - return m.Status - } - return nil -} - -func (m *AppVersionReviewPhase) GetOperator() *wrappers.StringValue { - if m != nil { - return m.Operator - } - return nil -} - -func (m *AppVersionReviewPhase) GetOperatorType() *wrappers.StringValue { - if m != nil { - return m.OperatorType - } - return nil -} - -func (m *AppVersionReviewPhase) GetMessage() *wrappers.StringValue { - if m != nil { - return m.Message - } - return nil -} - -func (m *AppVersionReviewPhase) GetStatusTime() *timestamp.Timestamp { - if m != nil { - return m.StatusTime - } - return nil -} - -func (m *AppVersionReviewPhase) GetReviewTime() *timestamp.Timestamp { - if m != nil { - return m.ReviewTime - } - return nil -} - -type AppVersionReview struct { - // review id - ReviewId *wrappers.StringValue `protobuf:"bytes,1,opt,name=review_id,json=reviewId,proto3" json:"review_id,omitempty"` - // id of app version - VersionId *wrappers.StringValue `protobuf:"bytes,2,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - // app id - AppId *wrappers.StringValue `protobuf:"bytes,3,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - // version name of specific app version - VersionName *wrappers.StringValue `protobuf:"bytes,4,opt,name=version_name,json=versionName,proto3" json:"version_name,omitempty"` - // app name - AppName *wrappers.StringValue `protobuf:"bytes,5,opt,name=app_name,json=appName,proto3" json:"app_name,omitempty"` - // review status eg.[isv-in-review|isv-passed|isv-rejected|isv-draft|business-in-review|business-passed|business-rejected|develop-draft|develop-in-review|develop-passed|develop-rejected|develop-draft] - Status *wrappers.StringValue `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"` - // review phase, app need one more reviewer to review, when reviewer reviewed, status changed - Phase map[string]*AppVersionReviewPhase `protobuf:"bytes,7,rep,name=phase,proto3" json:"phase,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // record status changed time - StatusTime *timestamp.Timestamp `protobuf:"bytes,8,opt,name=status_time,json=statusTime,proto3" json:"status_time,omitempty"` - // user who review the app version - Reviewer *wrappers.StringValue `protobuf:"bytes,9,opt,name=reviewer,proto3" json:"reviewer,omitempty"` - // version type - VersionType *wrappers.StringValue `protobuf:"bytes,10,opt,name=version_type,json=versionType,proto3" json:"version_type,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AppVersionReview) Reset() { *m = AppVersionReview{} } -func (m *AppVersionReview) String() string { return proto.CompactTextString(m) } -func (*AppVersionReview) ProtoMessage() {} -func (*AppVersionReview) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{20} -} - -func (m *AppVersionReview) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AppVersionReview.Unmarshal(m, b) -} -func (m *AppVersionReview) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AppVersionReview.Marshal(b, m, deterministic) -} -func (m *AppVersionReview) XXX_Merge(src proto.Message) { - xxx_messageInfo_AppVersionReview.Merge(m, src) -} -func (m *AppVersionReview) XXX_Size() int { - return xxx_messageInfo_AppVersionReview.Size(m) -} -func (m *AppVersionReview) XXX_DiscardUnknown() { - xxx_messageInfo_AppVersionReview.DiscardUnknown(m) -} - -var xxx_messageInfo_AppVersionReview proto.InternalMessageInfo - -func (m *AppVersionReview) GetReviewId() *wrappers.StringValue { - if m != nil { - return m.ReviewId - } - return nil -} - -func (m *AppVersionReview) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -func (m *AppVersionReview) GetAppId() *wrappers.StringValue { - if m != nil { - return m.AppId - } - return nil -} - -func (m *AppVersionReview) GetVersionName() *wrappers.StringValue { - if m != nil { - return m.VersionName - } - return nil -} - -func (m *AppVersionReview) GetAppName() *wrappers.StringValue { - if m != nil { - return m.AppName - } - return nil -} - -func (m *AppVersionReview) GetStatus() *wrappers.StringValue { - if m != nil { - return m.Status - } - return nil -} - -func (m *AppVersionReview) GetPhase() map[string]*AppVersionReviewPhase { - if m != nil { - return m.Phase - } - return nil -} - -func (m *AppVersionReview) GetStatusTime() *timestamp.Timestamp { - if m != nil { - return m.StatusTime - } - return nil -} - -func (m *AppVersionReview) GetReviewer() *wrappers.StringValue { - if m != nil { - return m.Reviewer - } - return nil -} - -func (m *AppVersionReview) GetVersionType() *wrappers.StringValue { - if m != nil { - return m.VersionType - } - return nil -} - -type DescribeAppVersionReviewsRequest struct { - // query key, support these fields(review_id, version_id, app_id, status, reviewer, app_name, owner) - SearchWord *wrappers.StringValue `protobuf:"bytes,1,opt,name=search_word,json=searchWord,proto3" json:"search_word,omitempty"` - // sort key, order by sort_key, default create_time - SortKey *wrappers.StringValue `protobuf:"bytes,2,opt,name=sort_key,json=sortKey,proto3" json:"sort_key,omitempty"` - // value = 0 sort ASC, value = 1 sort DESC - Reverse *wrappers.BoolValue `protobuf:"bytes,3,opt,name=reverse,proto3" json:"reverse,omitempty"` - // data limit per page, default is 20, max value is 200 - Limit uint32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` - // data offset, default is 0 - Offset uint32 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` - // app ids - AppId []string `protobuf:"bytes,10,rep,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - // app version ids - VersionId []string `protobuf:"bytes,11,rep,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - // app version review ids - ReviewId []string `protobuf:"bytes,12,rep,name=review_id,json=reviewId,proto3" json:"review_id,omitempty"` - // app version status eg.[isv-in-review|isv-passed|isv-rejected|isv-draft|business-in-review|business-passed|business-rejected|develop-draft|develop-in-review|develop-passed|develop-rejected|develop-draft] - Status []string `protobuf:"bytes,13,rep,name=status,proto3" json:"status,omitempty"` - // select columns to display - DisplayColumns []string `protobuf:"bytes,14,rep,name=display_columns,json=displayColumns,proto3" json:"display_columns,omitempty"` - // reviewer of app version eg.[global_admin|developer|business|technical|isv] - Reviewer []string `protobuf:"bytes,15,rep,name=reviewer,proto3" json:"reviewer,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeAppVersionReviewsRequest) Reset() { *m = DescribeAppVersionReviewsRequest{} } -func (m *DescribeAppVersionReviewsRequest) String() string { return proto.CompactTextString(m) } -func (*DescribeAppVersionReviewsRequest) ProtoMessage() {} -func (*DescribeAppVersionReviewsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{21} -} - -func (m *DescribeAppVersionReviewsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeAppVersionReviewsRequest.Unmarshal(m, b) -} -func (m *DescribeAppVersionReviewsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeAppVersionReviewsRequest.Marshal(b, m, deterministic) -} -func (m *DescribeAppVersionReviewsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeAppVersionReviewsRequest.Merge(m, src) -} -func (m *DescribeAppVersionReviewsRequest) XXX_Size() int { - return xxx_messageInfo_DescribeAppVersionReviewsRequest.Size(m) -} -func (m *DescribeAppVersionReviewsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeAppVersionReviewsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeAppVersionReviewsRequest proto.InternalMessageInfo - -func (m *DescribeAppVersionReviewsRequest) GetSearchWord() *wrappers.StringValue { - if m != nil { - return m.SearchWord - } - return nil -} - -func (m *DescribeAppVersionReviewsRequest) GetSortKey() *wrappers.StringValue { - if m != nil { - return m.SortKey - } - return nil -} - -func (m *DescribeAppVersionReviewsRequest) GetReverse() *wrappers.BoolValue { - if m != nil { - return m.Reverse - } - return nil -} - -func (m *DescribeAppVersionReviewsRequest) GetLimit() uint32 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *DescribeAppVersionReviewsRequest) GetOffset() uint32 { - if m != nil { - return m.Offset - } - return 0 -} - -func (m *DescribeAppVersionReviewsRequest) GetAppId() []string { - if m != nil { - return m.AppId - } - return nil -} - -func (m *DescribeAppVersionReviewsRequest) GetVersionId() []string { - if m != nil { - return m.VersionId - } - return nil -} - -func (m *DescribeAppVersionReviewsRequest) GetReviewId() []string { - if m != nil { - return m.ReviewId - } - return nil -} - -func (m *DescribeAppVersionReviewsRequest) GetStatus() []string { - if m != nil { - return m.Status - } - return nil -} - -func (m *DescribeAppVersionReviewsRequest) GetDisplayColumns() []string { - if m != nil { - return m.DisplayColumns - } - return nil -} - -func (m *DescribeAppVersionReviewsRequest) GetReviewer() []string { - if m != nil { - return m.Reviewer - } - return nil -} - -type DescribeAppVersionReviewsResponse struct { - // total count of reviews of app with specific version - TotalCount uint32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - // list of reviews of app with specific version - AppVersionReviewSet []*AppVersionReview `protobuf:"bytes,2,rep,name=app_version_review_set,json=appVersionReviewSet,proto3" json:"app_version_review_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeAppVersionReviewsResponse) Reset() { *m = DescribeAppVersionReviewsResponse{} } -func (m *DescribeAppVersionReviewsResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeAppVersionReviewsResponse) ProtoMessage() {} -func (*DescribeAppVersionReviewsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{22} -} - -func (m *DescribeAppVersionReviewsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeAppVersionReviewsResponse.Unmarshal(m, b) -} -func (m *DescribeAppVersionReviewsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeAppVersionReviewsResponse.Marshal(b, m, deterministic) -} -func (m *DescribeAppVersionReviewsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeAppVersionReviewsResponse.Merge(m, src) -} -func (m *DescribeAppVersionReviewsResponse) XXX_Size() int { - return xxx_messageInfo_DescribeAppVersionReviewsResponse.Size(m) -} -func (m *DescribeAppVersionReviewsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeAppVersionReviewsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeAppVersionReviewsResponse proto.InternalMessageInfo - -func (m *DescribeAppVersionReviewsResponse) GetTotalCount() uint32 { - if m != nil { - return m.TotalCount - } - return 0 -} - -func (m *DescribeAppVersionReviewsResponse) GetAppVersionReviewSet() []*AppVersionReview { - if m != nil { - return m.AppVersionReviewSet - } - return nil -} - -type DescribeAppVersionAuditsRequest struct { - // query key, support these fields(version_id, app_id, status, operator, role) - SearchWord *wrappers.StringValue `protobuf:"bytes,1,opt,name=search_word,json=searchWord,proto3" json:"search_word,omitempty"` - // sort key, order by sort_key, default create_time - SortKey *wrappers.StringValue `protobuf:"bytes,2,opt,name=sort_key,json=sortKey,proto3" json:"sort_key,omitempty"` - // value = 0 sort ASC, value = 1 sort DESC - Reverse *wrappers.BoolValue `protobuf:"bytes,3,opt,name=reverse,proto3" json:"reverse,omitempty"` - // data limit per page, default is 20, max value is 200 - Limit uint32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` - // data offset, default is 0 - Offset uint32 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` - // app ids - AppId []string `protobuf:"bytes,10,rep,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - // app version ids - VersionId []string `protobuf:"bytes,11,rep,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - // app version audit status eg.[draft|submitted|passed|rejected|active|in-review|deleted|suspended] - Status []string `protobuf:"bytes,12,rep,name=status,proto3" json:"status,omitempty"` - // auditer of app version - Operator []string `protobuf:"bytes,13,rep,name=operator,proto3" json:"operator,omitempty"` - // operator type eg.[global_admin|developer|business|technical|isv] - OperatorType []string `protobuf:"bytes,14,rep,name=operator_type,json=operatorType,proto3" json:"operator_type,omitempty"` - // select columns to display - DisplayColumns []string `protobuf:"bytes,15,rep,name=display_columns,json=displayColumns,proto3" json:"display_columns,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeAppVersionAuditsRequest) Reset() { *m = DescribeAppVersionAuditsRequest{} } -func (m *DescribeAppVersionAuditsRequest) String() string { return proto.CompactTextString(m) } -func (*DescribeAppVersionAuditsRequest) ProtoMessage() {} -func (*DescribeAppVersionAuditsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{23} -} - -func (m *DescribeAppVersionAuditsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeAppVersionAuditsRequest.Unmarshal(m, b) -} -func (m *DescribeAppVersionAuditsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeAppVersionAuditsRequest.Marshal(b, m, deterministic) -} -func (m *DescribeAppVersionAuditsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeAppVersionAuditsRequest.Merge(m, src) -} -func (m *DescribeAppVersionAuditsRequest) XXX_Size() int { - return xxx_messageInfo_DescribeAppVersionAuditsRequest.Size(m) -} -func (m *DescribeAppVersionAuditsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeAppVersionAuditsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeAppVersionAuditsRequest proto.InternalMessageInfo - -func (m *DescribeAppVersionAuditsRequest) GetSearchWord() *wrappers.StringValue { - if m != nil { - return m.SearchWord - } - return nil -} - -func (m *DescribeAppVersionAuditsRequest) GetSortKey() *wrappers.StringValue { - if m != nil { - return m.SortKey - } - return nil -} - -func (m *DescribeAppVersionAuditsRequest) GetReverse() *wrappers.BoolValue { - if m != nil { - return m.Reverse - } - return nil -} - -func (m *DescribeAppVersionAuditsRequest) GetLimit() uint32 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *DescribeAppVersionAuditsRequest) GetOffset() uint32 { - if m != nil { - return m.Offset - } - return 0 -} - -func (m *DescribeAppVersionAuditsRequest) GetAppId() []string { - if m != nil { - return m.AppId - } - return nil -} - -func (m *DescribeAppVersionAuditsRequest) GetVersionId() []string { - if m != nil { - return m.VersionId - } - return nil -} - -func (m *DescribeAppVersionAuditsRequest) GetStatus() []string { - if m != nil { - return m.Status - } - return nil -} - -func (m *DescribeAppVersionAuditsRequest) GetOperator() []string { - if m != nil { - return m.Operator - } - return nil -} - -func (m *DescribeAppVersionAuditsRequest) GetOperatorType() []string { - if m != nil { - return m.OperatorType - } - return nil -} - -func (m *DescribeAppVersionAuditsRequest) GetDisplayColumns() []string { - if m != nil { - return m.DisplayColumns - } - return nil -} - -type DescribeAppVersionAuditsResponse struct { - // total count of audits of app with specific version - TotalCount uint32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - // list of audit - AppVersionAuditSet []*AppVersionAudit `protobuf:"bytes,2,rep,name=app_version_audit_set,json=appVersionAuditSet,proto3" json:"app_version_audit_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeAppVersionAuditsResponse) Reset() { *m = DescribeAppVersionAuditsResponse{} } -func (m *DescribeAppVersionAuditsResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeAppVersionAuditsResponse) ProtoMessage() {} -func (*DescribeAppVersionAuditsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{24} -} - -func (m *DescribeAppVersionAuditsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeAppVersionAuditsResponse.Unmarshal(m, b) -} -func (m *DescribeAppVersionAuditsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeAppVersionAuditsResponse.Marshal(b, m, deterministic) -} -func (m *DescribeAppVersionAuditsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeAppVersionAuditsResponse.Merge(m, src) -} -func (m *DescribeAppVersionAuditsResponse) XXX_Size() int { - return xxx_messageInfo_DescribeAppVersionAuditsResponse.Size(m) -} -func (m *DescribeAppVersionAuditsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeAppVersionAuditsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeAppVersionAuditsResponse proto.InternalMessageInfo - -func (m *DescribeAppVersionAuditsResponse) GetTotalCount() uint32 { - if m != nil { - return m.TotalCount - } - return 0 -} - -func (m *DescribeAppVersionAuditsResponse) GetAppVersionAuditSet() []*AppVersionAudit { - if m != nil { - return m.AppVersionAuditSet - } - return nil -} - -type DescribeAppVersionsRequest struct { - // query key, support these fields(version_id, app_id, name, owner, description, package_name, status, type) - SearchWord *wrappers.StringValue `protobuf:"bytes,1,opt,name=search_word,json=searchWord,proto3" json:"search_word,omitempty"` - // sort key, order by sort_key, default create_time - SortKey *wrappers.StringValue `protobuf:"bytes,2,opt,name=sort_key,json=sortKey,proto3" json:"sort_key,omitempty"` - // value = 0 sort ASC, value = 1 sort DESC - Reverse *wrappers.BoolValue `protobuf:"bytes,3,opt,name=reverse,proto3" json:"reverse,omitempty"` - // data limit per page, default value 20, max value 200 - Limit uint32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` - // data offset, default 0 - Offset uint32 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` - // app version ids - VersionId []string `protobuf:"bytes,10,rep,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - // app ids - AppId []string `protobuf:"bytes,11,rep,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - // app version name - Name []string `protobuf:"bytes,12,rep,name=name,proto3" json:"name,omitempty"` - // owner - Owner []string `protobuf:"bytes,13,rep,name=owner,proto3" json:"owner,omitempty"` - // description - Description []string `protobuf:"bytes,14,rep,name=description,proto3" json:"description,omitempty"` - // app version package name - PackageName []string `protobuf:"bytes,15,rep,name=package_name,json=packageName,proto3" json:"package_name,omitempty"` - // app version status eg.[draft|submitted|passed|rejected|active|in-review|deleted|suspended] - Status []string `protobuf:"bytes,16,rep,name=status,proto3" json:"status,omitempty"` - // app version type - Type []string `protobuf:"bytes,17,rep,name=type,proto3" json:"type,omitempty"` - // select columns to display - DisplayColumns []string `protobuf:"bytes,18,rep,name=display_columns,json=displayColumns,proto3" json:"display_columns,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeAppVersionsRequest) Reset() { *m = DescribeAppVersionsRequest{} } -func (m *DescribeAppVersionsRequest) String() string { return proto.CompactTextString(m) } -func (*DescribeAppVersionsRequest) ProtoMessage() {} -func (*DescribeAppVersionsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{25} -} - -func (m *DescribeAppVersionsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeAppVersionsRequest.Unmarshal(m, b) -} -func (m *DescribeAppVersionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeAppVersionsRequest.Marshal(b, m, deterministic) -} -func (m *DescribeAppVersionsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeAppVersionsRequest.Merge(m, src) -} -func (m *DescribeAppVersionsRequest) XXX_Size() int { - return xxx_messageInfo_DescribeAppVersionsRequest.Size(m) -} -func (m *DescribeAppVersionsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeAppVersionsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeAppVersionsRequest proto.InternalMessageInfo - -func (m *DescribeAppVersionsRequest) GetSearchWord() *wrappers.StringValue { - if m != nil { - return m.SearchWord - } - return nil -} - -func (m *DescribeAppVersionsRequest) GetSortKey() *wrappers.StringValue { - if m != nil { - return m.SortKey - } - return nil -} - -func (m *DescribeAppVersionsRequest) GetReverse() *wrappers.BoolValue { - if m != nil { - return m.Reverse - } - return nil -} - -func (m *DescribeAppVersionsRequest) GetLimit() uint32 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *DescribeAppVersionsRequest) GetOffset() uint32 { - if m != nil { - return m.Offset - } - return 0 -} - -func (m *DescribeAppVersionsRequest) GetVersionId() []string { - if m != nil { - return m.VersionId - } - return nil -} - -func (m *DescribeAppVersionsRequest) GetAppId() []string { - if m != nil { - return m.AppId - } - return nil -} - -func (m *DescribeAppVersionsRequest) GetName() []string { - if m != nil { - return m.Name - } - return nil -} - -func (m *DescribeAppVersionsRequest) GetOwner() []string { - if m != nil { - return m.Owner - } - return nil -} - -func (m *DescribeAppVersionsRequest) GetDescription() []string { - if m != nil { - return m.Description - } - return nil -} - -func (m *DescribeAppVersionsRequest) GetPackageName() []string { - if m != nil { - return m.PackageName - } - return nil -} - -func (m *DescribeAppVersionsRequest) GetStatus() []string { - if m != nil { - return m.Status - } - return nil -} - -func (m *DescribeAppVersionsRequest) GetType() []string { - if m != nil { - return m.Type - } - return nil -} - -func (m *DescribeAppVersionsRequest) GetDisplayColumns() []string { - if m != nil { - return m.DisplayColumns - } - return nil -} - -type DescribeAppVersionsResponse struct { - // total count of qualified app version - TotalCount uint32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - // list of app vaesion - AppVersionSet []*AppVersion `protobuf:"bytes,2,rep,name=app_version_set,json=appVersionSet,proto3" json:"app_version_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeAppVersionsResponse) Reset() { *m = DescribeAppVersionsResponse{} } -func (m *DescribeAppVersionsResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeAppVersionsResponse) ProtoMessage() {} -func (*DescribeAppVersionsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{26} -} - -func (m *DescribeAppVersionsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeAppVersionsResponse.Unmarshal(m, b) -} -func (m *DescribeAppVersionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeAppVersionsResponse.Marshal(b, m, deterministic) -} -func (m *DescribeAppVersionsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeAppVersionsResponse.Merge(m, src) -} -func (m *DescribeAppVersionsResponse) XXX_Size() int { - return xxx_messageInfo_DescribeAppVersionsResponse.Size(m) -} -func (m *DescribeAppVersionsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeAppVersionsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeAppVersionsResponse proto.InternalMessageInfo - -func (m *DescribeAppVersionsResponse) GetTotalCount() uint32 { - if m != nil { - return m.TotalCount - } - return 0 -} - -func (m *DescribeAppVersionsResponse) GetAppVersionSet() []*AppVersion { - if m != nil { - return m.AppVersionSet - } - return nil -} - -type GetAppVersionPackageRequest struct { - // required, use version id to get package - VersionId *wrappers.StringValue `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetAppVersionPackageRequest) Reset() { *m = GetAppVersionPackageRequest{} } -func (m *GetAppVersionPackageRequest) String() string { return proto.CompactTextString(m) } -func (*GetAppVersionPackageRequest) ProtoMessage() {} -func (*GetAppVersionPackageRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{27} -} - -func (m *GetAppVersionPackageRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetAppVersionPackageRequest.Unmarshal(m, b) -} -func (m *GetAppVersionPackageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetAppVersionPackageRequest.Marshal(b, m, deterministic) -} -func (m *GetAppVersionPackageRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetAppVersionPackageRequest.Merge(m, src) -} -func (m *GetAppVersionPackageRequest) XXX_Size() int { - return xxx_messageInfo_GetAppVersionPackageRequest.Size(m) -} -func (m *GetAppVersionPackageRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetAppVersionPackageRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetAppVersionPackageRequest proto.InternalMessageInfo - -func (m *GetAppVersionPackageRequest) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -type GetAppVersionPackageResponse struct { - // package of specific app version - Package []byte `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"` - // app id of package - AppId *wrappers.StringValue `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - // version id of package - VersionId *wrappers.StringValue `protobuf:"bytes,3,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetAppVersionPackageResponse) Reset() { *m = GetAppVersionPackageResponse{} } -func (m *GetAppVersionPackageResponse) String() string { return proto.CompactTextString(m) } -func (*GetAppVersionPackageResponse) ProtoMessage() {} -func (*GetAppVersionPackageResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{28} -} - -func (m *GetAppVersionPackageResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetAppVersionPackageResponse.Unmarshal(m, b) -} -func (m *GetAppVersionPackageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetAppVersionPackageResponse.Marshal(b, m, deterministic) -} -func (m *GetAppVersionPackageResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetAppVersionPackageResponse.Merge(m, src) -} -func (m *GetAppVersionPackageResponse) XXX_Size() int { - return xxx_messageInfo_GetAppVersionPackageResponse.Size(m) -} -func (m *GetAppVersionPackageResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetAppVersionPackageResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetAppVersionPackageResponse proto.InternalMessageInfo - -func (m *GetAppVersionPackageResponse) GetPackage() []byte { - if m != nil { - return m.Package - } - return nil -} - -func (m *GetAppVersionPackageResponse) GetAppId() *wrappers.StringValue { - if m != nil { - return m.AppId - } - return nil -} - -func (m *GetAppVersionPackageResponse) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -type GetAppVersionPackageFilesRequest struct { - // use version id to get file of package - VersionId *wrappers.StringValue `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - // files - Files []string `protobuf:"bytes,2,rep,name=files,proto3" json:"files,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetAppVersionPackageFilesRequest) Reset() { *m = GetAppVersionPackageFilesRequest{} } -func (m *GetAppVersionPackageFilesRequest) String() string { return proto.CompactTextString(m) } -func (*GetAppVersionPackageFilesRequest) ProtoMessage() {} -func (*GetAppVersionPackageFilesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{29} -} - -func (m *GetAppVersionPackageFilesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetAppVersionPackageFilesRequest.Unmarshal(m, b) -} -func (m *GetAppVersionPackageFilesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetAppVersionPackageFilesRequest.Marshal(b, m, deterministic) -} -func (m *GetAppVersionPackageFilesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetAppVersionPackageFilesRequest.Merge(m, src) -} -func (m *GetAppVersionPackageFilesRequest) XXX_Size() int { - return xxx_messageInfo_GetAppVersionPackageFilesRequest.Size(m) -} -func (m *GetAppVersionPackageFilesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetAppVersionPackageFilesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetAppVersionPackageFilesRequest proto.InternalMessageInfo - -func (m *GetAppVersionPackageFilesRequest) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -func (m *GetAppVersionPackageFilesRequest) GetFiles() []string { - if m != nil { - return m.Files - } - return nil -} - -type GetAppVersionPackageFilesResponse struct { - // filename map to content - Files map[string][]byte `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // version id - VersionId *wrappers.StringValue `protobuf:"bytes,2,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetAppVersionPackageFilesResponse) Reset() { *m = GetAppVersionPackageFilesResponse{} } -func (m *GetAppVersionPackageFilesResponse) String() string { return proto.CompactTextString(m) } -func (*GetAppVersionPackageFilesResponse) ProtoMessage() {} -func (*GetAppVersionPackageFilesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{30} -} - -func (m *GetAppVersionPackageFilesResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetAppVersionPackageFilesResponse.Unmarshal(m, b) -} -func (m *GetAppVersionPackageFilesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetAppVersionPackageFilesResponse.Marshal(b, m, deterministic) -} -func (m *GetAppVersionPackageFilesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetAppVersionPackageFilesResponse.Merge(m, src) -} -func (m *GetAppVersionPackageFilesResponse) XXX_Size() int { - return xxx_messageInfo_GetAppVersionPackageFilesResponse.Size(m) -} -func (m *GetAppVersionPackageFilesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetAppVersionPackageFilesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetAppVersionPackageFilesResponse proto.InternalMessageInfo - -func (m *GetAppVersionPackageFilesResponse) GetFiles() map[string][]byte { - if m != nil { - return m.Files - } - return nil -} - -func (m *GetAppVersionPackageFilesResponse) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -type GetAppStatisticsRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetAppStatisticsRequest) Reset() { *m = GetAppStatisticsRequest{} } -func (m *GetAppStatisticsRequest) String() string { return proto.CompactTextString(m) } -func (*GetAppStatisticsRequest) ProtoMessage() {} -func (*GetAppStatisticsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{31} -} - -func (m *GetAppStatisticsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetAppStatisticsRequest.Unmarshal(m, b) -} -func (m *GetAppStatisticsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetAppStatisticsRequest.Marshal(b, m, deterministic) -} -func (m *GetAppStatisticsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetAppStatisticsRequest.Merge(m, src) -} -func (m *GetAppStatisticsRequest) XXX_Size() int { - return xxx_messageInfo_GetAppStatisticsRequest.Size(m) -} -func (m *GetAppStatisticsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetAppStatisticsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetAppStatisticsRequest proto.InternalMessageInfo - -type GetAppStatisticsResponse struct { - // range of app created time map to app count, max length is 14 - LastTwoWeekCreated map[string]uint32 `protobuf:"bytes,1,rep,name=last_two_week_created,json=lastTwoWeekCreated,proto3" json:"last_two_week_created,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - // repo id map to app count, max length is 10 - TopTenRepos map[string]uint32 `protobuf:"bytes,2,rep,name=top_ten_repos,json=topTenRepos,proto3" json:"top_ten_repos,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - // total app count - AppCount uint32 `protobuf:"varint,3,opt,name=app_count,json=appCount,proto3" json:"app_count,omitempty"` - // total repository count - RepoCount uint32 `protobuf:"varint,4,opt,name=repo_count,json=repoCount,proto3" json:"repo_count,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetAppStatisticsResponse) Reset() { *m = GetAppStatisticsResponse{} } -func (m *GetAppStatisticsResponse) String() string { return proto.CompactTextString(m) } -func (*GetAppStatisticsResponse) ProtoMessage() {} -func (*GetAppStatisticsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{32} -} - -func (m *GetAppStatisticsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetAppStatisticsResponse.Unmarshal(m, b) -} -func (m *GetAppStatisticsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetAppStatisticsResponse.Marshal(b, m, deterministic) -} -func (m *GetAppStatisticsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetAppStatisticsResponse.Merge(m, src) -} -func (m *GetAppStatisticsResponse) XXX_Size() int { - return xxx_messageInfo_GetAppStatisticsResponse.Size(m) -} -func (m *GetAppStatisticsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetAppStatisticsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetAppStatisticsResponse proto.InternalMessageInfo - -func (m *GetAppStatisticsResponse) GetLastTwoWeekCreated() map[string]uint32 { - if m != nil { - return m.LastTwoWeekCreated - } - return nil -} - -func (m *GetAppStatisticsResponse) GetTopTenRepos() map[string]uint32 { - if m != nil { - return m.TopTenRepos - } - return nil -} - -func (m *GetAppStatisticsResponse) GetAppCount() uint32 { - if m != nil { - return m.AppCount - } - return 0 -} - -func (m *GetAppStatisticsResponse) GetRepoCount() uint32 { - if m != nil { - return m.RepoCount - } - return 0 -} - -type SubmitAppVersionRequest struct { - // required, id of version to submit - VersionId *wrappers.StringValue `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SubmitAppVersionRequest) Reset() { *m = SubmitAppVersionRequest{} } -func (m *SubmitAppVersionRequest) String() string { return proto.CompactTextString(m) } -func (*SubmitAppVersionRequest) ProtoMessage() {} -func (*SubmitAppVersionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{33} -} - -func (m *SubmitAppVersionRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SubmitAppVersionRequest.Unmarshal(m, b) -} -func (m *SubmitAppVersionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SubmitAppVersionRequest.Marshal(b, m, deterministic) -} -func (m *SubmitAppVersionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubmitAppVersionRequest.Merge(m, src) -} -func (m *SubmitAppVersionRequest) XXX_Size() int { - return xxx_messageInfo_SubmitAppVersionRequest.Size(m) -} -func (m *SubmitAppVersionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SubmitAppVersionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SubmitAppVersionRequest proto.InternalMessageInfo - -func (m *SubmitAppVersionRequest) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -type SubmitAppVersionResponse struct { - // required, id of version submitted - VersionId *wrappers.StringValue `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SubmitAppVersionResponse) Reset() { *m = SubmitAppVersionResponse{} } -func (m *SubmitAppVersionResponse) String() string { return proto.CompactTextString(m) } -func (*SubmitAppVersionResponse) ProtoMessage() {} -func (*SubmitAppVersionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{34} -} - -func (m *SubmitAppVersionResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SubmitAppVersionResponse.Unmarshal(m, b) -} -func (m *SubmitAppVersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SubmitAppVersionResponse.Marshal(b, m, deterministic) -} -func (m *SubmitAppVersionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubmitAppVersionResponse.Merge(m, src) -} -func (m *SubmitAppVersionResponse) XXX_Size() int { - return xxx_messageInfo_SubmitAppVersionResponse.Size(m) -} -func (m *SubmitAppVersionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SubmitAppVersionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SubmitAppVersionResponse proto.InternalMessageInfo - -func (m *SubmitAppVersionResponse) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -type CancelAppVersionRequest struct { - // required, id of version to cancel - VersionId *wrappers.StringValue `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CancelAppVersionRequest) Reset() { *m = CancelAppVersionRequest{} } -func (m *CancelAppVersionRequest) String() string { return proto.CompactTextString(m) } -func (*CancelAppVersionRequest) ProtoMessage() {} -func (*CancelAppVersionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{35} -} - -func (m *CancelAppVersionRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CancelAppVersionRequest.Unmarshal(m, b) -} -func (m *CancelAppVersionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CancelAppVersionRequest.Marshal(b, m, deterministic) -} -func (m *CancelAppVersionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CancelAppVersionRequest.Merge(m, src) -} -func (m *CancelAppVersionRequest) XXX_Size() int { - return xxx_messageInfo_CancelAppVersionRequest.Size(m) -} -func (m *CancelAppVersionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CancelAppVersionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CancelAppVersionRequest proto.InternalMessageInfo - -func (m *CancelAppVersionRequest) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -type CancelAppVersionResponse struct { - // required, id of version canceled - VersionId *wrappers.StringValue `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CancelAppVersionResponse) Reset() { *m = CancelAppVersionResponse{} } -func (m *CancelAppVersionResponse) String() string { return proto.CompactTextString(m) } -func (*CancelAppVersionResponse) ProtoMessage() {} -func (*CancelAppVersionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{36} -} - -func (m *CancelAppVersionResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CancelAppVersionResponse.Unmarshal(m, b) -} -func (m *CancelAppVersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CancelAppVersionResponse.Marshal(b, m, deterministic) -} -func (m *CancelAppVersionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CancelAppVersionResponse.Merge(m, src) -} -func (m *CancelAppVersionResponse) XXX_Size() int { - return xxx_messageInfo_CancelAppVersionResponse.Size(m) -} -func (m *CancelAppVersionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CancelAppVersionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CancelAppVersionResponse proto.InternalMessageInfo - -func (m *CancelAppVersionResponse) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -type ReleaseAppVersionRequest struct { - // required, id of version to release - VersionId *wrappers.StringValue `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ReleaseAppVersionRequest) Reset() { *m = ReleaseAppVersionRequest{} } -func (m *ReleaseAppVersionRequest) String() string { return proto.CompactTextString(m) } -func (*ReleaseAppVersionRequest) ProtoMessage() {} -func (*ReleaseAppVersionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{37} -} - -func (m *ReleaseAppVersionRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ReleaseAppVersionRequest.Unmarshal(m, b) -} -func (m *ReleaseAppVersionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ReleaseAppVersionRequest.Marshal(b, m, deterministic) -} -func (m *ReleaseAppVersionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReleaseAppVersionRequest.Merge(m, src) -} -func (m *ReleaseAppVersionRequest) XXX_Size() int { - return xxx_messageInfo_ReleaseAppVersionRequest.Size(m) -} -func (m *ReleaseAppVersionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ReleaseAppVersionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ReleaseAppVersionRequest proto.InternalMessageInfo - -func (m *ReleaseAppVersionRequest) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -type ReleaseAppVersionResponse struct { - // required, id of version released - VersionId *wrappers.StringValue `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ReleaseAppVersionResponse) Reset() { *m = ReleaseAppVersionResponse{} } -func (m *ReleaseAppVersionResponse) String() string { return proto.CompactTextString(m) } -func (*ReleaseAppVersionResponse) ProtoMessage() {} -func (*ReleaseAppVersionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{38} -} - -func (m *ReleaseAppVersionResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ReleaseAppVersionResponse.Unmarshal(m, b) -} -func (m *ReleaseAppVersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ReleaseAppVersionResponse.Marshal(b, m, deterministic) -} -func (m *ReleaseAppVersionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReleaseAppVersionResponse.Merge(m, src) -} -func (m *ReleaseAppVersionResponse) XXX_Size() int { - return xxx_messageInfo_ReleaseAppVersionResponse.Size(m) -} -func (m *ReleaseAppVersionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ReleaseAppVersionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ReleaseAppVersionResponse proto.InternalMessageInfo - -func (m *ReleaseAppVersionResponse) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -type DeleteAppVersionRequest struct { - // required, id of version to delete - VersionId *wrappers.StringValue `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteAppVersionRequest) Reset() { *m = DeleteAppVersionRequest{} } -func (m *DeleteAppVersionRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteAppVersionRequest) ProtoMessage() {} -func (*DeleteAppVersionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{39} -} - -func (m *DeleteAppVersionRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteAppVersionRequest.Unmarshal(m, b) -} -func (m *DeleteAppVersionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteAppVersionRequest.Marshal(b, m, deterministic) -} -func (m *DeleteAppVersionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteAppVersionRequest.Merge(m, src) -} -func (m *DeleteAppVersionRequest) XXX_Size() int { - return xxx_messageInfo_DeleteAppVersionRequest.Size(m) -} -func (m *DeleteAppVersionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteAppVersionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteAppVersionRequest proto.InternalMessageInfo - -func (m *DeleteAppVersionRequest) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -type DeleteAppVersionResponse struct { - // required, id of version deleted - VersionId *wrappers.StringValue `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteAppVersionResponse) Reset() { *m = DeleteAppVersionResponse{} } -func (m *DeleteAppVersionResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteAppVersionResponse) ProtoMessage() {} -func (*DeleteAppVersionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{40} -} - -func (m *DeleteAppVersionResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteAppVersionResponse.Unmarshal(m, b) -} -func (m *DeleteAppVersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteAppVersionResponse.Marshal(b, m, deterministic) -} -func (m *DeleteAppVersionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteAppVersionResponse.Merge(m, src) -} -func (m *DeleteAppVersionResponse) XXX_Size() int { - return xxx_messageInfo_DeleteAppVersionResponse.Size(m) -} -func (m *DeleteAppVersionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteAppVersionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteAppVersionResponse proto.InternalMessageInfo - -func (m *DeleteAppVersionResponse) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -type ReviewAppVersionRequest struct { - // required, id of version to review - VersionId *wrappers.StringValue `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ReviewAppVersionRequest) Reset() { *m = ReviewAppVersionRequest{} } -func (m *ReviewAppVersionRequest) String() string { return proto.CompactTextString(m) } -func (*ReviewAppVersionRequest) ProtoMessage() {} -func (*ReviewAppVersionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{41} -} - -func (m *ReviewAppVersionRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ReviewAppVersionRequest.Unmarshal(m, b) -} -func (m *ReviewAppVersionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ReviewAppVersionRequest.Marshal(b, m, deterministic) -} -func (m *ReviewAppVersionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReviewAppVersionRequest.Merge(m, src) -} -func (m *ReviewAppVersionRequest) XXX_Size() int { - return xxx_messageInfo_ReviewAppVersionRequest.Size(m) -} -func (m *ReviewAppVersionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ReviewAppVersionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ReviewAppVersionRequest proto.InternalMessageInfo - -func (m *ReviewAppVersionRequest) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -type ReviewAppVersionResponse struct { - // id of version reviewed - VersionId *wrappers.StringValue `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ReviewAppVersionResponse) Reset() { *m = ReviewAppVersionResponse{} } -func (m *ReviewAppVersionResponse) String() string { return proto.CompactTextString(m) } -func (*ReviewAppVersionResponse) ProtoMessage() {} -func (*ReviewAppVersionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{42} -} - -func (m *ReviewAppVersionResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ReviewAppVersionResponse.Unmarshal(m, b) -} -func (m *ReviewAppVersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ReviewAppVersionResponse.Marshal(b, m, deterministic) -} -func (m *ReviewAppVersionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReviewAppVersionResponse.Merge(m, src) -} -func (m *ReviewAppVersionResponse) XXX_Size() int { - return xxx_messageInfo_ReviewAppVersionResponse.Size(m) -} -func (m *ReviewAppVersionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ReviewAppVersionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ReviewAppVersionResponse proto.InternalMessageInfo - -func (m *ReviewAppVersionResponse) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -type PassAppVersionRequest struct { - // required, id of version to pass - VersionId *wrappers.StringValue `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PassAppVersionRequest) Reset() { *m = PassAppVersionRequest{} } -func (m *PassAppVersionRequest) String() string { return proto.CompactTextString(m) } -func (*PassAppVersionRequest) ProtoMessage() {} -func (*PassAppVersionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{43} -} - -func (m *PassAppVersionRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PassAppVersionRequest.Unmarshal(m, b) -} -func (m *PassAppVersionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PassAppVersionRequest.Marshal(b, m, deterministic) -} -func (m *PassAppVersionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PassAppVersionRequest.Merge(m, src) -} -func (m *PassAppVersionRequest) XXX_Size() int { - return xxx_messageInfo_PassAppVersionRequest.Size(m) -} -func (m *PassAppVersionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PassAppVersionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_PassAppVersionRequest proto.InternalMessageInfo - -func (m *PassAppVersionRequest) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -type PassAppVersionResponse struct { - // id of version passed - VersionId *wrappers.StringValue `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PassAppVersionResponse) Reset() { *m = PassAppVersionResponse{} } -func (m *PassAppVersionResponse) String() string { return proto.CompactTextString(m) } -func (*PassAppVersionResponse) ProtoMessage() {} -func (*PassAppVersionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{44} -} - -func (m *PassAppVersionResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PassAppVersionResponse.Unmarshal(m, b) -} -func (m *PassAppVersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PassAppVersionResponse.Marshal(b, m, deterministic) -} -func (m *PassAppVersionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PassAppVersionResponse.Merge(m, src) -} -func (m *PassAppVersionResponse) XXX_Size() int { - return xxx_messageInfo_PassAppVersionResponse.Size(m) -} -func (m *PassAppVersionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PassAppVersionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_PassAppVersionResponse proto.InternalMessageInfo - -func (m *PassAppVersionResponse) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -type RejectAppVersionRequest struct { - // required, id of version to reject - VersionId *wrappers.StringValue `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - // reject message - Message *wrappers.StringValue `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RejectAppVersionRequest) Reset() { *m = RejectAppVersionRequest{} } -func (m *RejectAppVersionRequest) String() string { return proto.CompactTextString(m) } -func (*RejectAppVersionRequest) ProtoMessage() {} -func (*RejectAppVersionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{45} -} - -func (m *RejectAppVersionRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RejectAppVersionRequest.Unmarshal(m, b) -} -func (m *RejectAppVersionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RejectAppVersionRequest.Marshal(b, m, deterministic) -} -func (m *RejectAppVersionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RejectAppVersionRequest.Merge(m, src) -} -func (m *RejectAppVersionRequest) XXX_Size() int { - return xxx_messageInfo_RejectAppVersionRequest.Size(m) -} -func (m *RejectAppVersionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_RejectAppVersionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_RejectAppVersionRequest proto.InternalMessageInfo - -func (m *RejectAppVersionRequest) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -func (m *RejectAppVersionRequest) GetMessage() *wrappers.StringValue { - if m != nil { - return m.Message - } - return nil -} - -type RejectAppVersionResponse struct { - // id of version rejected - VersionId *wrappers.StringValue `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RejectAppVersionResponse) Reset() { *m = RejectAppVersionResponse{} } -func (m *RejectAppVersionResponse) String() string { return proto.CompactTextString(m) } -func (*RejectAppVersionResponse) ProtoMessage() {} -func (*RejectAppVersionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{46} -} - -func (m *RejectAppVersionResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RejectAppVersionResponse.Unmarshal(m, b) -} -func (m *RejectAppVersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RejectAppVersionResponse.Marshal(b, m, deterministic) -} -func (m *RejectAppVersionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RejectAppVersionResponse.Merge(m, src) -} -func (m *RejectAppVersionResponse) XXX_Size() int { - return xxx_messageInfo_RejectAppVersionResponse.Size(m) -} -func (m *RejectAppVersionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RejectAppVersionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_RejectAppVersionResponse proto.InternalMessageInfo - -func (m *RejectAppVersionResponse) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -type SuspendAppVersionRequest struct { - // required, id of version to suspend - VersionId *wrappers.StringValue `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SuspendAppVersionRequest) Reset() { *m = SuspendAppVersionRequest{} } -func (m *SuspendAppVersionRequest) String() string { return proto.CompactTextString(m) } -func (*SuspendAppVersionRequest) ProtoMessage() {} -func (*SuspendAppVersionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{47} -} - -func (m *SuspendAppVersionRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SuspendAppVersionRequest.Unmarshal(m, b) -} -func (m *SuspendAppVersionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SuspendAppVersionRequest.Marshal(b, m, deterministic) -} -func (m *SuspendAppVersionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SuspendAppVersionRequest.Merge(m, src) -} -func (m *SuspendAppVersionRequest) XXX_Size() int { - return xxx_messageInfo_SuspendAppVersionRequest.Size(m) -} -func (m *SuspendAppVersionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SuspendAppVersionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SuspendAppVersionRequest proto.InternalMessageInfo - -func (m *SuspendAppVersionRequest) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -type SuspendAppVersionResponse struct { - // id of version suspended - VersionId *wrappers.StringValue `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SuspendAppVersionResponse) Reset() { *m = SuspendAppVersionResponse{} } -func (m *SuspendAppVersionResponse) String() string { return proto.CompactTextString(m) } -func (*SuspendAppVersionResponse) ProtoMessage() {} -func (*SuspendAppVersionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{48} -} - -func (m *SuspendAppVersionResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SuspendAppVersionResponse.Unmarshal(m, b) -} -func (m *SuspendAppVersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SuspendAppVersionResponse.Marshal(b, m, deterministic) -} -func (m *SuspendAppVersionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SuspendAppVersionResponse.Merge(m, src) -} -func (m *SuspendAppVersionResponse) XXX_Size() int { - return xxx_messageInfo_SuspendAppVersionResponse.Size(m) -} -func (m *SuspendAppVersionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SuspendAppVersionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SuspendAppVersionResponse proto.InternalMessageInfo - -func (m *SuspendAppVersionResponse) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -type RecoverAppVersionRequest struct { - // required, id of version to recover - VersionId *wrappers.StringValue `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RecoverAppVersionRequest) Reset() { *m = RecoverAppVersionRequest{} } -func (m *RecoverAppVersionRequest) String() string { return proto.CompactTextString(m) } -func (*RecoverAppVersionRequest) ProtoMessage() {} -func (*RecoverAppVersionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{49} -} - -func (m *RecoverAppVersionRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RecoverAppVersionRequest.Unmarshal(m, b) -} -func (m *RecoverAppVersionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RecoverAppVersionRequest.Marshal(b, m, deterministic) -} -func (m *RecoverAppVersionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RecoverAppVersionRequest.Merge(m, src) -} -func (m *RecoverAppVersionRequest) XXX_Size() int { - return xxx_messageInfo_RecoverAppVersionRequest.Size(m) -} -func (m *RecoverAppVersionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_RecoverAppVersionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_RecoverAppVersionRequest proto.InternalMessageInfo - -func (m *RecoverAppVersionRequest) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -type RecoverAppVersionResponse struct { - // id of version recovered - VersionId *wrappers.StringValue `protobuf:"bytes,1,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RecoverAppVersionResponse) Reset() { *m = RecoverAppVersionResponse{} } -func (m *RecoverAppVersionResponse) String() string { return proto.CompactTextString(m) } -func (*RecoverAppVersionResponse) ProtoMessage() {} -func (*RecoverAppVersionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{50} -} - -func (m *RecoverAppVersionResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RecoverAppVersionResponse.Unmarshal(m, b) -} -func (m *RecoverAppVersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RecoverAppVersionResponse.Marshal(b, m, deterministic) -} -func (m *RecoverAppVersionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RecoverAppVersionResponse.Merge(m, src) -} -func (m *RecoverAppVersionResponse) XXX_Size() int { - return xxx_messageInfo_RecoverAppVersionResponse.Size(m) -} -func (m *RecoverAppVersionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RecoverAppVersionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_RecoverAppVersionResponse proto.InternalMessageInfo - -func (m *RecoverAppVersionResponse) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -type SyncRepoRequest struct { - // required, id of repository to synchronize - RepoId string `protobuf:"bytes,1,opt,name=repo_id,json=repoId,proto3" json:"repo_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SyncRepoRequest) Reset() { *m = SyncRepoRequest{} } -func (m *SyncRepoRequest) String() string { return proto.CompactTextString(m) } -func (*SyncRepoRequest) ProtoMessage() {} -func (*SyncRepoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{51} -} - -func (m *SyncRepoRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SyncRepoRequest.Unmarshal(m, b) -} -func (m *SyncRepoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SyncRepoRequest.Marshal(b, m, deterministic) -} -func (m *SyncRepoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SyncRepoRequest.Merge(m, src) -} -func (m *SyncRepoRequest) XXX_Size() int { - return xxx_messageInfo_SyncRepoRequest.Size(m) -} -func (m *SyncRepoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SyncRepoRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SyncRepoRequest proto.InternalMessageInfo - -func (m *SyncRepoRequest) GetRepoId() string { - if m != nil { - return m.RepoId - } - return "" -} - -type SyncRepoResponse struct { - // synchronized ok or not - Failed bool `protobuf:"varint,1,opt,name=failed,proto3" json:"failed,omitempty"` - // result - Result string `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SyncRepoResponse) Reset() { *m = SyncRepoResponse{} } -func (m *SyncRepoResponse) String() string { return proto.CompactTextString(m) } -func (*SyncRepoResponse) ProtoMessage() {} -func (*SyncRepoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e0f9056a14b86d47, []int{52} -} - -func (m *SyncRepoResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SyncRepoResponse.Unmarshal(m, b) -} -func (m *SyncRepoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SyncRepoResponse.Marshal(b, m, deterministic) -} -func (m *SyncRepoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SyncRepoResponse.Merge(m, src) -} -func (m *SyncRepoResponse) XXX_Size() int { - return xxx_messageInfo_SyncRepoResponse.Size(m) -} -func (m *SyncRepoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SyncRepoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SyncRepoResponse proto.InternalMessageInfo - -func (m *SyncRepoResponse) GetFailed() bool { - if m != nil { - return m.Failed - } - return false -} - -func (m *SyncRepoResponse) GetResult() string { - if m != nil { - return m.Result - } - return "" -} - -func init() { - proto.RegisterEnum("openpitrix.UploadAppAttachmentRequest_Type", UploadAppAttachmentRequest_Type_name, UploadAppAttachmentRequest_Type_value) - proto.RegisterType((*CreateAppRequest)(nil), "openpitrix.CreateAppRequest") - proto.RegisterType((*CreateAppResponse)(nil), "openpitrix.CreateAppResponse") - proto.RegisterType((*ValidatePackageRequest)(nil), "openpitrix.ValidatePackageRequest") - proto.RegisterType((*ValidatePackageResponse)(nil), "openpitrix.ValidatePackageResponse") - proto.RegisterMapType((map[string]string)(nil), "openpitrix.ValidatePackageResponse.ErrorDetailsEntry") - proto.RegisterType((*ModifyAppRequest)(nil), "openpitrix.ModifyAppRequest") - proto.RegisterType((*ModifyAppResponse)(nil), "openpitrix.ModifyAppResponse") - proto.RegisterType((*UploadAppAttachmentRequest)(nil), "openpitrix.UploadAppAttachmentRequest") - proto.RegisterType((*UploadAppAttachmentResponse)(nil), "openpitrix.UploadAppAttachmentResponse") - proto.RegisterType((*DeleteAppsRequest)(nil), "openpitrix.DeleteAppsRequest") - proto.RegisterType((*DeleteAppsResponse)(nil), "openpitrix.DeleteAppsResponse") - proto.RegisterType((*App)(nil), "openpitrix.App") - proto.RegisterType((*DescribeAppsRequest)(nil), "openpitrix.DescribeAppsRequest") - proto.RegisterType((*DescribeAppsResponse)(nil), "openpitrix.DescribeAppsResponse") - proto.RegisterType((*CreateAppVersionRequest)(nil), "openpitrix.CreateAppVersionRequest") - proto.RegisterType((*CreateAppVersionResponse)(nil), "openpitrix.CreateAppVersionResponse") - proto.RegisterType((*ModifyAppVersionRequest)(nil), "openpitrix.ModifyAppVersionRequest") - proto.RegisterMapType((map[string][]byte)(nil), "openpitrix.ModifyAppVersionRequest.PackageFilesEntry") - proto.RegisterType((*ModifyAppVersionResponse)(nil), "openpitrix.ModifyAppVersionResponse") - proto.RegisterType((*AppVersion)(nil), "openpitrix.AppVersion") - proto.RegisterType((*AppVersionAudit)(nil), "openpitrix.AppVersionAudit") - proto.RegisterType((*AppVersionReviewPhase)(nil), "openpitrix.AppVersionReviewPhase") - proto.RegisterType((*AppVersionReview)(nil), "openpitrix.AppVersionReview") - proto.RegisterMapType((map[string]*AppVersionReviewPhase)(nil), "openpitrix.AppVersionReview.PhaseEntry") - proto.RegisterType((*DescribeAppVersionReviewsRequest)(nil), "openpitrix.DescribeAppVersionReviewsRequest") - proto.RegisterType((*DescribeAppVersionReviewsResponse)(nil), "openpitrix.DescribeAppVersionReviewsResponse") - proto.RegisterType((*DescribeAppVersionAuditsRequest)(nil), "openpitrix.DescribeAppVersionAuditsRequest") - proto.RegisterType((*DescribeAppVersionAuditsResponse)(nil), "openpitrix.DescribeAppVersionAuditsResponse") - proto.RegisterType((*DescribeAppVersionsRequest)(nil), "openpitrix.DescribeAppVersionsRequest") - proto.RegisterType((*DescribeAppVersionsResponse)(nil), "openpitrix.DescribeAppVersionsResponse") - proto.RegisterType((*GetAppVersionPackageRequest)(nil), "openpitrix.GetAppVersionPackageRequest") - proto.RegisterType((*GetAppVersionPackageResponse)(nil), "openpitrix.GetAppVersionPackageResponse") - proto.RegisterType((*GetAppVersionPackageFilesRequest)(nil), "openpitrix.GetAppVersionPackageFilesRequest") - proto.RegisterType((*GetAppVersionPackageFilesResponse)(nil), "openpitrix.GetAppVersionPackageFilesResponse") - proto.RegisterMapType((map[string][]byte)(nil), "openpitrix.GetAppVersionPackageFilesResponse.FilesEntry") - proto.RegisterType((*GetAppStatisticsRequest)(nil), "openpitrix.GetAppStatisticsRequest") - proto.RegisterType((*GetAppStatisticsResponse)(nil), "openpitrix.GetAppStatisticsResponse") - proto.RegisterMapType((map[string]uint32)(nil), "openpitrix.GetAppStatisticsResponse.LastTwoWeekCreatedEntry") - proto.RegisterMapType((map[string]uint32)(nil), "openpitrix.GetAppStatisticsResponse.TopTenReposEntry") - proto.RegisterType((*SubmitAppVersionRequest)(nil), "openpitrix.SubmitAppVersionRequest") - proto.RegisterType((*SubmitAppVersionResponse)(nil), "openpitrix.SubmitAppVersionResponse") - proto.RegisterType((*CancelAppVersionRequest)(nil), "openpitrix.CancelAppVersionRequest") - proto.RegisterType((*CancelAppVersionResponse)(nil), "openpitrix.CancelAppVersionResponse") - proto.RegisterType((*ReleaseAppVersionRequest)(nil), "openpitrix.ReleaseAppVersionRequest") - proto.RegisterType((*ReleaseAppVersionResponse)(nil), "openpitrix.ReleaseAppVersionResponse") - proto.RegisterType((*DeleteAppVersionRequest)(nil), "openpitrix.DeleteAppVersionRequest") - proto.RegisterType((*DeleteAppVersionResponse)(nil), "openpitrix.DeleteAppVersionResponse") - proto.RegisterType((*ReviewAppVersionRequest)(nil), "openpitrix.ReviewAppVersionRequest") - proto.RegisterType((*ReviewAppVersionResponse)(nil), "openpitrix.ReviewAppVersionResponse") - proto.RegisterType((*PassAppVersionRequest)(nil), "openpitrix.PassAppVersionRequest") - proto.RegisterType((*PassAppVersionResponse)(nil), "openpitrix.PassAppVersionResponse") - proto.RegisterType((*RejectAppVersionRequest)(nil), "openpitrix.RejectAppVersionRequest") - proto.RegisterType((*RejectAppVersionResponse)(nil), "openpitrix.RejectAppVersionResponse") - proto.RegisterType((*SuspendAppVersionRequest)(nil), "openpitrix.SuspendAppVersionRequest") - proto.RegisterType((*SuspendAppVersionResponse)(nil), "openpitrix.SuspendAppVersionResponse") - proto.RegisterType((*RecoverAppVersionRequest)(nil), "openpitrix.RecoverAppVersionRequest") - proto.RegisterType((*RecoverAppVersionResponse)(nil), "openpitrix.RecoverAppVersionResponse") - proto.RegisterType((*SyncRepoRequest)(nil), "openpitrix.SyncRepoRequest") - proto.RegisterType((*SyncRepoResponse)(nil), "openpitrix.SyncRepoResponse") -} - -func init() { proto.RegisterFile("app.proto", fileDescriptor_e0f9056a14b86d47) } - -var fileDescriptor_e0f9056a14b86d47 = []byte{ - // 3987 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0x4d, 0x6c, 0x24, 0x49, - 0x56, 0xde, 0xac, 0xb2, 0xdd, 0xf6, 0x2b, 0xbb, 0xed, 0x0a, 0xb7, 0xed, 0x72, 0xf5, 0x5f, 0x76, - 0x76, 0xef, 0xf4, 0x5f, 0xb5, 0x3d, 0xeb, 0x99, 0xd9, 0x69, 0x66, 0x98, 0x6e, 0x55, 0x77, 0xcf, - 0xec, 0xf4, 0xc2, 0x36, 0x4d, 0xb5, 0xa7, 0x1b, 0x1a, 0x89, 0x22, 0x5c, 0x15, 0xb6, 0x73, 0xbb, - 0x9c, 0x99, 0x9b, 0x11, 0x65, 0xe3, 0x0b, 0x87, 0x95, 0xf6, 0x08, 0x12, 0xb5, 0x12, 0x20, 0xb4, - 0x68, 0xf8, 0x97, 0x76, 0x24, 0x56, 0x08, 0x58, 0x69, 0x81, 0x91, 0x56, 0xc0, 0x8a, 0x0b, 0x3f, - 0x42, 0xe2, 0xc6, 0x81, 0x13, 0x27, 0x8e, 0x9c, 0x39, 0xa0, 0xf8, 0xc9, 0xcc, 0xc8, 0xac, 0xca, - 0xaa, 0xcc, 0x72, 0x59, 0xc3, 0x6a, 0xe7, 0x64, 0x57, 0xc6, 0x7b, 0x11, 0x2f, 0xde, 0xfb, 0xe2, - 0xfd, 0x45, 0x26, 0xcc, 0x61, 0xcf, 0xdb, 0xf0, 0x7c, 0x97, 0xb9, 0x08, 0x5c, 0x8f, 0x38, 0x9e, - 0xcd, 0x7c, 0xfb, 0x57, 0xab, 0x97, 0xf6, 0x5c, 0x77, 0xaf, 0x43, 0x36, 0xc5, 0xc8, 0x4e, 0x77, - 0x77, 0xf3, 0xc8, 0xc7, 0x9e, 0x47, 0x7c, 0x2a, 0x69, 0xab, 0x97, 0x93, 0xe3, 0xcc, 0x3e, 0x20, - 0x94, 0xe1, 0x03, 0x35, 0x59, 0xf5, 0x82, 0x22, 0xc0, 0x9e, 0xbd, 0x89, 0x1d, 0xc7, 0x65, 0x98, - 0xd9, 0xae, 0x13, 0xb0, 0xd7, 0xc4, 0x9f, 0xd6, 0x9d, 0x3d, 0xe2, 0xdc, 0xa1, 0x47, 0x78, 0x6f, - 0x8f, 0xf8, 0x9b, 0xae, 0x27, 0x28, 0x06, 0x50, 0x97, 0xd8, 0xb1, 0x47, 0xd4, 0x0f, 0xeb, 0xd7, - 0x8b, 0xb0, 0xf4, 0xd0, 0x27, 0x98, 0x91, 0xba, 0xe7, 0x35, 0xc8, 0x37, 0xba, 0x84, 0x32, 0xf4, - 0x3a, 0x4c, 0x39, 0xf8, 0x80, 0x54, 0x0c, 0xd3, 0xb8, 0x51, 0xda, 0xba, 0xb0, 0x21, 0x17, 0xdf, - 0x08, 0xa4, 0xdb, 0x78, 0xc6, 0x7c, 0xdb, 0xd9, 0x7b, 0x8e, 0x3b, 0x5d, 0xd2, 0x10, 0x94, 0xe8, - 0x3e, 0xcc, 0x1f, 0x12, 0x9f, 0xda, 0xae, 0xd3, 0xe4, 0xb3, 0x57, 0x0a, 0x19, 0x38, 0x4b, 0x8a, - 0x63, 0xfb, 0xd8, 0x23, 0xe8, 0x11, 0x2c, 0x06, 0x13, 0x78, 0xb8, 0xf5, 0x0a, 0xef, 0x91, 0x4a, - 0x51, 0xcc, 0x71, 0xbe, 0x6f, 0x8e, 0x07, 0xc7, 0x8c, 0x50, 0x39, 0xc5, 0x59, 0xc5, 0xf3, 0x54, - 0xb2, 0xe8, 0x62, 0x88, 0x0d, 0x4c, 0xe7, 0x10, 0xe3, 0x09, 0xdf, 0xc7, 0x26, 0x4c, 0xd9, 0x2d, - 0xd7, 0xa9, 0xcc, 0x8c, 0x5e, 0x5b, 0x10, 0xa2, 0x0d, 0x28, 0xda, 0xf4, 0xb0, 0x72, 0x26, 0xc3, - 0x42, 0x9c, 0x10, 0x5d, 0x02, 0x68, 0x61, 0x46, 0xf6, 0x5c, 0xdf, 0x26, 0xb4, 0x32, 0x6b, 0x16, - 0x6f, 0xcc, 0x35, 0xb4, 0x27, 0xd6, 0xb7, 0x0c, 0x28, 0x6b, 0xf6, 0xa0, 0x9e, 0xeb, 0x50, 0x82, - 0xde, 0x80, 0x19, 0xec, 0x79, 0x4d, 0xbb, 0x9d, 0xc9, 0x24, 0xd3, 0xd8, 0xf3, 0x1e, 0xb7, 0xd1, - 0xbb, 0x00, 0x81, 0x32, 0xec, 0x76, 0x26, 0x8b, 0xcc, 0x29, 0xfa, 0xc7, 0x6d, 0xab, 0x0d, 0xab, - 0xcf, 0x71, 0xc7, 0x6e, 0x63, 0x46, 0x94, 0x72, 0x03, 0x70, 0x5c, 0x19, 0x60, 0xea, 0xb9, 0xb8, - 0x31, 0xaf, 0x0f, 0x36, 0xe6, 0x7c, 0xd2, 0x5e, 0xd6, 0xbf, 0x14, 0x61, 0xad, 0x6f, 0x19, 0xb5, - 0xe7, 0x97, 0xb0, 0x40, 0x7c, 0xdf, 0xf5, 0x9b, 0x6d, 0xc2, 0xb0, 0xdd, 0xa1, 0x15, 0xc3, 0x2c, - 0xde, 0x28, 0x6d, 0xbd, 0xb5, 0x11, 0x9d, 0xab, 0x8d, 0x14, 0xde, 0x8d, 0xf7, 0x39, 0xe3, 0x23, - 0xc9, 0xf7, 0xbe, 0xc3, 0xfc, 0xe3, 0xc6, 0x3c, 0xd1, 0x1e, 0xa1, 0x2d, 0x98, 0x16, 0xbf, 0x33, - 0x69, 0x45, 0x92, 0x86, 0x87, 0xa2, 0x38, 0xce, 0xa1, 0x10, 0x9c, 0x53, 0x79, 0xd1, 0xb8, 0x01, - 0xc5, 0xae, 0xdf, 0xc9, 0x84, 0x62, 0x4e, 0x88, 0xee, 0x41, 0xa9, 0x4d, 0x68, 0xcb, 0xb7, 0xc5, - 0xd9, 0x57, 0x20, 0x1e, 0xb1, 0x9e, 0xc6, 0x50, 0xbd, 0x0f, 0xe5, 0x3e, 0xcd, 0xa1, 0x25, 0x28, - 0xbe, 0x22, 0xc7, 0x02, 0x78, 0x73, 0x0d, 0xfe, 0x2f, 0x3a, 0x07, 0xd3, 0x87, 0x9c, 0x59, 0x99, - 0x5e, 0xfe, 0x78, 0xa7, 0x70, 0xd7, 0xb0, 0xbe, 0x39, 0x0d, 0x4b, 0x5f, 0x73, 0xdb, 0xf6, 0xee, - 0xb1, 0xe6, 0x4d, 0xc6, 0x02, 0x6f, 0xa0, 0xed, 0x42, 0x66, 0x6d, 0x27, 0x36, 0x5f, 0xcc, 0xb9, - 0x79, 0xbe, 0xe2, 0xbe, 0x9b, 0xd1, 0x4a, 0x82, 0x92, 0xaf, 0x78, 0x80, 0x6d, 0x87, 0x61, 0xdb, - 0x21, 0x3e, 0xcd, 0xe4, 0x03, 0x74, 0x06, 0xf4, 0x65, 0x38, 0x43, 0xdd, 0xae, 0xdf, 0x12, 0x8e, - 0x60, 0x34, 0x6f, 0x40, 0x8c, 0xde, 0x84, 0x19, 0x9f, 0xe0, 0xf6, 0x01, 0xa9, 0xcc, 0x65, 0x60, - 0x53, 0xb4, 0x5c, 0x5a, 0xbc, 0x43, 0x99, 0x8f, 0x5b, 0x42, 0x3f, 0x90, 0x45, 0x5a, 0x8d, 0x81, - 0x83, 0x91, 0xb9, 0xb4, 0x52, 0xca, 0x02, 0x46, 0xe6, 0x52, 0xf4, 0x1e, 0x94, 0x94, 0x5f, 0x3b, - 0xe6, 0xb6, 0x9f, 0xcf, 0xc0, 0x17, 0x38, 0xc2, 0xe3, 0xc7, 0x6d, 0x74, 0x17, 0x66, 0x5f, 0x91, - 0xe3, 0x23, 0xd7, 0x6f, 0xd3, 0xca, 0x42, 0x06, 0xde, 0x90, 0xda, 0xfa, 0x10, 0xca, 0x1a, 0x06, - 0x4f, 0xe0, 0x41, 0xad, 0xbf, 0x29, 0x40, 0xf5, 0x23, 0xaf, 0xe3, 0xe2, 0x76, 0xdd, 0xf3, 0xea, - 0x8c, 0xe1, 0xd6, 0xfe, 0x01, 0x71, 0xd8, 0x89, 0x80, 0x7d, 0x1f, 0xa6, 0x42, 0xb7, 0x79, 0x76, - 0xeb, 0xb6, 0xee, 0xcd, 0xd2, 0x97, 0xda, 0xe0, 0x6e, 0xb5, 0x21, 0x18, 0xd1, 0x57, 0x01, 0xe1, - 0x70, 0xbc, 0xd9, 0x72, 0x1d, 0x46, 0x1c, 0x96, 0x25, 0x58, 0x96, 0x23, 0xb6, 0x87, 0x92, 0x8b, - 0x2b, 0x99, 0xf2, 0x15, 0x9c, 0x56, 0x3a, 0xee, 0x3f, 0x7a, 0xec, 0xb0, 0x37, 0xb6, 0x94, 0x92, - 0x03, 0x6a, 0xcb, 0x84, 0x29, 0xe1, 0xea, 0x67, 0x65, 0xc0, 0x5c, 0xfa, 0x02, 0x3a, 0x0b, 0x40, - 0x5b, 0x3e, 0x21, 0x0e, 0xdd, 0x77, 0xd9, 0x92, 0x61, 0x35, 0xe0, 0xfc, 0xc0, 0x0d, 0x9d, 0xc4, - 0x20, 0xb7, 0xa0, 0xfc, 0x88, 0x74, 0x88, 0x08, 0x8e, 0x34, 0x30, 0xc3, 0x8a, 0x36, 0x13, 0x0f, - 0xa7, 0x8a, 0xf6, 0x36, 0x20, 0x9d, 0x56, 0x2d, 0x9b, 0x42, 0xfc, 0x8f, 0x0b, 0x50, 0xac, 0x7b, - 0xde, 0x78, 0x26, 0xdd, 0x82, 0x19, 0x7e, 0x46, 0x0e, 0x03, 0x6f, 0x55, 0xed, 0xb7, 0x82, 0xeb, - 0x76, 0xd4, 0x69, 0x94, 0x94, 0x63, 0x44, 0x93, 0xb7, 0xe0, 0x8c, 0x4f, 0x3c, 0x97, 0xcb, 0x36, - 0x95, 0xed, 0xd8, 0x7b, 0xee, 0xe3, 0x76, 0xd2, 0x2d, 0x4e, 0xe7, 0x75, 0x8b, 0x6f, 0xc2, 0x0c, - 0x65, 0x98, 0x75, 0x69, 0xa6, 0x70, 0xa2, 0x68, 0x43, 0x67, 0x7a, 0x26, 0xb3, 0x33, 0x7d, 0x5d, - 0x65, 0x5e, 0x59, 0x3c, 0xa1, 0x4c, 0xbd, 0xee, 0x41, 0x29, 0x02, 0x1c, 0xcd, 0xe4, 0x0b, 0x75, - 0x86, 0xa4, 0xfb, 0x86, 0xbc, 0xee, 0x5b, 0xf7, 0x50, 0xa5, 0x3c, 0x1e, 0x4a, 0x77, 0xfc, 0xf3, - 0xe3, 0x39, 0xfe, 0x85, 0x1c, 0x8e, 0xff, 0x5d, 0x80, 0xd6, 0x3e, 0xf6, 0x99, 0x4c, 0x42, 0xce, - 0x66, 0xc9, 0x03, 0x05, 0xfd, 0x13, 0xdc, 0x1f, 0x35, 0x16, 0xc7, 0x8c, 0x1a, 0x4b, 0x59, 0xa3, - 0xc6, 0x16, 0x4c, 0xbb, 0x47, 0x0e, 0xf1, 0x2b, 0xe5, 0x2c, 0xe7, 0x4f, 0x90, 0xa2, 0x77, 0xa1, - 0xd4, 0x12, 0x29, 0x73, 0x93, 0x97, 0x4d, 0x15, 0x94, 0x72, 0x08, 0xb7, 0x83, 0x9a, 0xaa, 0x01, - 0x92, 0x9c, 0x3f, 0xe0, 0xcc, 0x12, 0xb3, 0x92, 0x79, 0x79, 0x34, 0xb3, 0x24, 0x0f, 0x98, 0xbb, - 0x5e, 0x3b, 0x5c, 0xf9, 0xdc, 0x68, 0x66, 0x49, 0x2e, 0x98, 0xef, 0xc3, 0x7c, 0x18, 0x20, 0x29, - 0x61, 0x95, 0x15, 0x91, 0xdf, 0x5e, 0xd0, 0x23, 0x42, 0x83, 0x48, 0xd3, 0x3f, 0x54, 0x74, 0x8d, - 0x30, 0xa4, 0x3e, 0x23, 0x0c, 0x3d, 0x02, 0xd4, 0xc1, 0x8c, 0x50, 0xd6, 0xe4, 0x3e, 0x4b, 0x25, - 0x8e, 0x95, 0x55, 0x21, 0xc4, 0xaa, 0x3e, 0x4d, 0xdd, 0xf3, 0x9e, 0xcb, 0xd1, 0xc6, 0x92, 0xe4, - 0x88, 0x9e, 0xa0, 0x0f, 0xa1, 0xac, 0xb1, 0x8b, 0x9c, 0x9e, 0x56, 0xd6, 0x32, 0x68, 0x7f, 0x11, - 0x87, 0x93, 0xf0, 0x50, 0x40, 0xc5, 0x86, 0xdc, 0x03, 0x0f, 0x3b, 0xc7, 0x12, 0x6a, 0x95, 0x2c, - 0x60, 0x51, 0x1c, 0x02, 0x6c, 0xef, 0xc3, 0x62, 0x30, 0xc1, 0x11, 0xd9, 0xa1, 0x36, 0x23, 0x95, - 0xf5, 0x0c, 0x73, 0x9c, 0x55, 0x4c, 0x2f, 0x24, 0x8f, 0x3e, 0x8d, 0xe7, 0xbb, 0xbb, 0x76, 0x87, - 0x54, 0xaa, 0x39, 0xa6, 0x79, 0x2a, 0x79, 0xd0, 0x07, 0x50, 0x0e, 0xa6, 0xf9, 0xba, 0x6b, 0x3b, - 0xd2, 0xc4, 0xe7, 0x47, 0x9a, 0x38, 0x58, 0xfb, 0xab, 0xae, 0xed, 0x28, 0x90, 0x80, 0xc0, 0x69, - 0xd3, 0xc3, 0x6c, 0xbf, 0x72, 0x21, 0xcb, 0xf9, 0x13, 0xf4, 0x4f, 0x31, 0xdb, 0x0f, 0xea, 0xcb, - 0x8b, 0x19, 0xeb, 0x4b, 0xeb, 0x3f, 0x8b, 0xb0, 0xfc, 0x48, 0xb8, 0xef, 0x9d, 0x58, 0x90, 0x7c, - 0x0f, 0x4a, 0x94, 0x60, 0xbf, 0xb5, 0xdf, 0xe4, 0x2e, 0x28, 0x53, 0x74, 0x03, 0xc9, 0xf0, 0xc2, - 0xf5, 0xdb, 0xe8, 0x6d, 0x98, 0xa5, 0xae, 0xcf, 0x9a, 0xbc, 0x12, 0x28, 0x64, 0x73, 0x59, 0x3e, - 0xfb, 0x19, 0x72, 0x8c, 0xde, 0xe4, 0x51, 0x8b, 0x63, 0x2b, 0x08, 0x75, 0xc3, 0x82, 0x63, 0x40, - 0xca, 0x2b, 0x8c, 0x8e, 0x7d, 0x60, 0x33, 0x11, 0xe9, 0x16, 0x1a, 0xf2, 0x07, 0x5a, 0x85, 0x19, - 0x77, 0x77, 0x97, 0x1f, 0x95, 0x69, 0xf1, 0x58, 0xfd, 0xd2, 0x62, 0x7a, 0x49, 0x8b, 0xe9, 0x08, - 0xa9, 0x10, 0x3b, 0x2f, 0x1e, 0xca, 0x20, 0xba, 0x16, 0x05, 0xd1, 0x05, 0xf1, 0x38, 0x08, 0x93, - 0xab, 0x61, 0x98, 0x3b, 0x2b, 0x9f, 0xab, 0x40, 0x76, 0x2e, 0xf0, 0x47, 0x8b, 0x72, 0x6a, 0xe9, - 0x71, 0x2e, 0xc6, 0x5c, 0xea, 0x92, 0x18, 0xd2, 0x9c, 0xe6, 0xe5, 0x78, 0xea, 0x5b, 0x8e, 0x55, - 0xf9, 0x3c, 0xb9, 0xbd, 0x0e, 0x8b, 0x6d, 0x9b, 0x7a, 0x1d, 0x7c, 0xdc, 0x6c, 0xb9, 0x9d, 0xee, - 0x81, 0x43, 0x2b, 0x48, 0x10, 0x9d, 0x55, 0x8f, 0x1f, 0xca, 0xa7, 0xbc, 0xf8, 0xe2, 0xe6, 0x5f, - 0x16, 0x83, 0xc2, 0xc0, 0x18, 0xce, 0xc5, 0xed, 0xab, 0x12, 0x9b, 0xcb, 0x50, 0x62, 0x2e, 0xc3, - 0x9d, 0x66, 0xcb, 0xed, 0x3a, 0x4c, 0x18, 0x78, 0xa1, 0x01, 0xe2, 0xd1, 0x43, 0xfe, 0x04, 0xdd, - 0x80, 0x33, 0x5c, 0x4b, 0x5c, 0x7d, 0x05, 0xe1, 0x69, 0x16, 0x13, 0x2e, 0xa2, 0xc1, 0xb5, 0xf8, - 0x8c, 0x30, 0xeb, 0xbb, 0x05, 0x58, 0x0b, 0x7b, 0x10, 0x81, 0xe3, 0xf8, 0xb1, 0x2b, 0xe6, 0x44, - 0x96, 0x9d, 0xa9, 0x98, 0x13, 0x69, 0xf5, 0x5b, 0x70, 0x26, 0xe8, 0x55, 0x4c, 0x8f, 0xce, 0xa5, - 0x03, 0x5a, 0xeb, 0x05, 0x54, 0xfa, 0x55, 0xa5, 0x4c, 0x12, 0x6f, 0xc0, 0x18, 0xf9, 0x1a, 0x30, - 0xdf, 0x29, 0xc2, 0x5a, 0x58, 0xc6, 0x24, 0x8c, 0x70, 0x92, 0x89, 0x3f, 0x03, 0x63, 0x68, 0xaa, - 0x9d, 0xca, 0xae, 0x5a, 0xf4, 0x12, 0x16, 0xd4, 0xbf, 0x4d, 0xee, 0x8f, 0x69, 0x65, 0xba, 0xbf, - 0x01, 0x94, 0xa2, 0xa1, 0x0d, 0xd5, 0x10, 0xfa, 0x80, 0xf3, 0xa9, 0x06, 0x90, 0xa7, 0x3d, 0xaa, - 0xde, 0x87, 0x72, 0x1f, 0xc9, 0xa8, 0x4e, 0xc7, 0xbc, 0xde, 0xe9, 0x78, 0x01, 0x95, 0xfe, 0xb5, - 0x27, 0x61, 0xf7, 0xef, 0x01, 0x80, 0x16, 0x9d, 0x4f, 0x64, 0xea, 0x71, 0x0a, 0x93, 0xe8, 0x80, - 0x17, 0xf3, 0x54, 0x40, 0xca, 0x4b, 0x4e, 0x65, 0xcf, 0xda, 0x02, 0x1c, 0x4e, 0x8f, 0x8b, 0xc3, - 0x99, 0x71, 0x3b, 0x3c, 0x9f, 0x17, 0x25, 0x9f, 0x7d, 0x51, 0x72, 0x1f, 0x82, 0x03, 0x99, 0xbd, - 0x2c, 0x29, 0x29, 0x0e, 0x11, 0x63, 0xa3, 0xba, 0x74, 0x31, 0x47, 0x5d, 0xfa, 0x53, 0x30, 0xe7, - 0x93, 0x43, 0x9b, 0x1c, 0x71, 0x80, 0x67, 0x29, 0x4a, 0x66, 0x25, 0xb9, 0x68, 0xa7, 0xc7, 0xaa, - 0x8c, 0xf2, 0x49, 0xaa, 0x0c, 0x74, 0x92, 0x2a, 0x63, 0x39, 0x57, 0x95, 0xa1, 0xb7, 0x78, 0xce, - 0xe5, 0x69, 0xf1, 0x70, 0x40, 0x1c, 0x10, 0x4a, 0xb9, 0xdb, 0x5e, 0xc9, 0x02, 0x08, 0x45, 0x1c, - 0xc6, 0xde, 0xd5, 0xcc, 0xb1, 0x37, 0x9e, 0x21, 0xaf, 0xe5, 0xca, 0x90, 0xad, 0x3f, 0x98, 0x86, - 0xc5, 0xc8, 0x61, 0xd6, 0xbb, 0x6d, 0xfb, 0x84, 0x01, 0x32, 0xf2, 0x80, 0x85, 0xec, 0x1e, 0x30, - 0x82, 0x63, 0x31, 0x07, 0x1c, 0x4f, 0x7c, 0x43, 0xf0, 0x36, 0xcc, 0x72, 0x59, 0x33, 0x3b, 0x52, - 0x9e, 0x02, 0x0a, 0xc6, 0xbb, 0x30, 0xeb, 0x7a, 0xc4, 0xc7, 0xcc, 0xf5, 0x33, 0x39, 0xd2, 0x90, - 0x1a, 0xd5, 0x61, 0x21, 0xf8, 0x5f, 0x5e, 0x00, 0x65, 0x71, 0xa7, 0xf3, 0x01, 0x8b, 0x68, 0x1a, - 0x6a, 0xc8, 0x9a, 0xcd, 0x83, 0xac, 0xd8, 0xe9, 0x9d, 0xcb, 0x7b, 0x7a, 0xf5, 0x03, 0x08, 0xb9, - 0x0e, 0x60, 0xf2, 0x76, 0xb3, 0x94, 0xf3, 0x76, 0xd3, 0xfa, 0xdf, 0x02, 0xac, 0xe8, 0x89, 0x02, - 0x17, 0xea, 0xe9, 0x3e, 0xa6, 0xba, 0x1b, 0x33, 0x72, 0xe0, 0x46, 0xb7, 0x5e, 0xe1, 0x64, 0xd6, - 0x2b, 0x9e, 0xc4, 0x7a, 0x53, 0x79, 0xac, 0x97, 0x30, 0xc1, 0x74, 0x5e, 0x1f, 0xa8, 0x4c, 0x2f, - 0x98, 0x67, 0x46, 0x33, 0x4b, 0x72, 0xfe, 0xc0, 0xfa, 0x87, 0x69, 0x58, 0x4a, 0xaa, 0x3f, 0x0e, - 0x26, 0x23, 0x27, 0x98, 0xc6, 0xbf, 0x59, 0x1d, 0x2f, 0xc1, 0xfa, 0xec, 0x1c, 0xc5, 0x78, 0xfd, - 0xdf, 0xf7, 0x60, 0xda, 0xe3, 0xf8, 0xae, 0x9c, 0x11, 0x39, 0xfb, 0xf5, 0x94, 0x6e, 0x94, 0x50, - 0xe8, 0x86, 0x38, 0x09, 0x32, 0x4b, 0x97, 0x5c, 0x49, 0xa8, 0xcc, 0xe6, 0x82, 0xca, 0x5d, 0x50, - 0x96, 0x22, 0x7e, 0x1e, 0x27, 0x41, 0xfc, 0xbe, 0x73, 0x0e, 0x39, 0xcf, 0x79, 0xf5, 0x97, 0x00, - 0xa2, 0xcd, 0x0c, 0xa8, 0x27, 0xde, 0xd6, 0xeb, 0x89, 0xd2, 0xd6, 0x95, 0x61, 0x6a, 0x11, 0x13, - 0xe9, 0x25, 0xc7, 0xf7, 0x8a, 0x60, 0x6a, 0xa5, 0x7f, 0x8c, 0xf8, 0x27, 0xac, 0xcf, 0x03, 0x7a, - 0x9f, 0xe7, 0x62, 0xec, 0x34, 0xca, 0x16, 0x90, 0x76, 0xde, 0xce, 0xeb, 0xe7, 0x5c, 0xf6, 0x82, - 0xa2, 0x93, 0x1c, 0xb5, 0x7d, 0x16, 0x62, 0x6d, 0x9f, 0x01, 0x0d, 0x9a, 0xb3, 0x03, 0x1b, 0x34, - 0x55, 0x0d, 0x6c, 0x8b, 0xfa, 0xe4, 0xc4, 0xb7, 0x7e, 0xdb, 0x80, 0x2b, 0x43, 0x0c, 0x96, 0xb5, - 0x71, 0xf3, 0xf3, 0xb0, 0xaa, 0x37, 0x68, 0xd5, 0x66, 0xa2, 0x3e, 0xce, 0x85, 0x61, 0x28, 0x6a, - 0x2c, 0xe3, 0xc4, 0x93, 0x67, 0x84, 0x59, 0xdf, 0x2f, 0xc2, 0xe5, 0x7e, 0xc9, 0x44, 0xee, 0xf4, - 0x39, 0x92, 0x52, 0x91, 0x14, 0x81, 0x65, 0x3e, 0x06, 0x96, 0xaa, 0x16, 0x8d, 0x25, 0x8c, 0xa2, - 0x78, 0x7b, 0x35, 0x19, 0x6f, 0x25, 0x8c, 0xe2, 0x11, 0x75, 0x00, 0xda, 0x16, 0x07, 0xa1, 0xcd, - 0xfa, 0xb6, 0x31, 0xc8, 0x05, 0x04, 0x76, 0xcb, 0x0a, 0xa8, 0x27, 0xb0, 0xa2, 0x03, 0x0a, 0x73, - 0x76, 0x0d, 0x4f, 0xe7, 0x07, 0xe3, 0x49, 0xac, 0xd2, 0x40, 0x38, 0xfe, 0x80, 0xa3, 0xe9, 0x7f, - 0x8a, 0x50, 0xed, 0x97, 0xea, 0x27, 0x02, 0x48, 0x71, 0xc4, 0x40, 0x12, 0x31, 0x39, 0x3a, 0xd3, - 0x61, 0xa3, 0x79, 0x41, 0x6f, 0x34, 0x9b, 0xf1, 0x96, 0x87, 0x04, 0x4f, 0xac, 0xa9, 0x71, 0x25, - 0x51, 0x48, 0x4b, 0xe0, 0xc4, 0x4a, 0xe5, 0x08, 0xb7, 0x4b, 0x31, 0xdc, 0x22, 0x55, 0xa8, 0xc9, - 0xfe, 0xb4, 0x2c, 0xc5, 0xb2, 0x76, 0xa6, 0xad, 0x5f, 0x83, 0xf3, 0x03, 0x6d, 0x9e, 0x15, 0x84, - 0xf7, 0x60, 0x51, 0x07, 0x61, 0x04, 0xbf, 0xb4, 0x9b, 0xab, 0x85, 0x08, 0x79, 0x1c, 0x74, 0x2f, - 0xe1, 0xfc, 0x57, 0x88, 0x76, 0x8f, 0x95, 0x78, 0x4b, 0xed, 0x44, 0x3d, 0xb8, 0x4f, 0x0c, 0xb8, - 0x30, 0x78, 0x72, 0xb5, 0xbb, 0x4a, 0xd4, 0xd1, 0x34, 0x44, 0x67, 0x30, 0x6c, 0x5a, 0x8e, 0x55, - 0x3c, 0xc6, 0x85, 0x2d, 0xe6, 0x13, 0xb6, 0x0b, 0xe6, 0x20, 0x59, 0x45, 0x5f, 0x73, 0x22, 0x0d, - 0xe3, 0x73, 0x30, 0x2d, 0xfb, 0xaf, 0x05, 0x89, 0x4c, 0xf1, 0xc3, 0xfa, 0x6f, 0x03, 0xae, 0x0c, - 0x59, 0x57, 0x29, 0xea, 0x49, 0xc0, 0x2b, 0x5f, 0xde, 0xbb, 0xab, 0xdb, 0x76, 0x24, 0xf7, 0x86, - 0xd6, 0xbe, 0x95, 0xd3, 0x9c, 0x28, 0xf3, 0xae, 0xde, 0x05, 0x18, 0xb3, 0xdb, 0xbb, 0x0e, 0x6b, - 0x52, 0xda, 0x67, 0x0c, 0x33, 0x9b, 0x32, 0xbb, 0x15, 0xa8, 0xd6, 0xfa, 0x6e, 0x11, 0x2a, 0xfd, - 0x63, 0x6a, 0xfb, 0x2e, 0xac, 0x74, 0x30, 0x65, 0x4d, 0x76, 0xe4, 0x36, 0x8f, 0x08, 0x79, 0xd5, - 0x94, 0x2d, 0xa1, 0xb6, 0x52, 0xc7, 0x4f, 0xf7, 0xab, 0xa3, 0x7f, 0x92, 0x8d, 0x9f, 0xc5, 0x94, - 0x6d, 0x1f, 0xb9, 0x2f, 0x08, 0x79, 0x25, 0xaf, 0x1a, 0xda, 0x52, 0x25, 0xa8, 0xd3, 0x37, 0x80, - 0x7e, 0x11, 0x16, 0x98, 0xeb, 0x35, 0x19, 0xe1, 0x79, 0x82, 0xe7, 0x52, 0x75, 0xa6, 0xde, 0xca, - 0xb4, 0xd0, 0xb6, 0xeb, 0x6d, 0x13, 0xa7, 0xc1, 0xf9, 0xe4, 0x0a, 0x25, 0x16, 0x3d, 0xe1, 0x79, - 0x14, 0x47, 0xb6, 0x3c, 0xcf, 0x45, 0x71, 0x9e, 0x79, 0x49, 0x21, 0x4f, 0xf3, 0x45, 0x00, 0x71, - 0xaf, 0x26, 0x47, 0xa5, 0xeb, 0x9c, 0xe3, 0x4f, 0xc4, 0x70, 0xf5, 0x7d, 0x58, 0x4b, 0xd9, 0xc5, - 0x28, 0x33, 0x2c, 0x68, 0x66, 0xa8, 0xde, 0x83, 0xa5, 0xa4, 0x8c, 0x79, 0xf8, 0xad, 0xe7, 0xb0, - 0xf6, 0xac, 0xbb, 0x73, 0x60, 0xb3, 0xc9, 0x5e, 0xa9, 0x58, 0x2f, 0xa0, 0xd2, 0x3f, 0xef, 0x24, - 0x2e, 0x03, 0x9e, 0xc3, 0xda, 0x43, 0xec, 0xb4, 0x48, 0x67, 0xf2, 0x02, 0xf7, 0xcf, 0x3b, 0x09, - 0x81, 0x5f, 0x40, 0xa5, 0x41, 0x3a, 0x04, 0x53, 0x32, 0x61, 0x89, 0x7f, 0x01, 0xd6, 0x07, 0x4c, - 0x3c, 0x21, 0x1d, 0x87, 0xef, 0x89, 0x4d, 0x58, 0xc7, 0xfd, 0xf3, 0x4e, 0x48, 0x60, 0x99, 0xc9, - 0x4f, 0x5e, 0xe0, 0xfe, 0x79, 0x27, 0x21, 0xf0, 0x36, 0xac, 0x3c, 0xc5, 0x94, 0x4e, 0x58, 0xdc, - 0x8f, 0x60, 0x35, 0x39, 0xeb, 0x24, 0x84, 0xfd, 0x0d, 0x83, 0xab, 0xf7, 0xeb, 0xa4, 0x35, 0x61, - 0x27, 0xa1, 0xb7, 0xcd, 0x0a, 0x39, 0xda, 0x66, 0xd2, 0x2c, 0x49, 0x79, 0x26, 0x74, 0x56, 0x9f, - 0x75, 0xa9, 0x47, 0x9c, 0xf6, 0xe4, 0xcf, 0xea, 0x80, 0x89, 0x27, 0xe6, 0x5e, 0x5a, 0xee, 0x21, - 0xf1, 0x4f, 0xc3, 0xbd, 0xf4, 0x4d, 0x3c, 0x09, 0x91, 0x6f, 0xc1, 0xe2, 0xb3, 0x63, 0xa7, 0xc5, - 0x23, 0x56, 0x20, 0xa9, 0xf6, 0x12, 0x8a, 0x0c, 0x5b, 0xea, 0x25, 0x14, 0xeb, 0x01, 0x2c, 0x45, - 0xb4, 0x6a, 0xf1, 0x55, 0x98, 0xd9, 0xc5, 0x76, 0x87, 0x48, 0xda, 0xd9, 0x86, 0xfa, 0xc5, 0x9f, - 0xfb, 0x84, 0x76, 0x3b, 0x4c, 0xbd, 0x85, 0xaf, 0x7e, 0x6d, 0x7d, 0xeb, 0x4d, 0x71, 0x7f, 0xfc, - 0x35, 0xec, 0xe0, 0x3d, 0xe2, 0xa3, 0xaf, 0xc0, 0x6c, 0x30, 0x25, 0x8a, 0x15, 0x76, 0x09, 0xa1, - 0xaa, 0x17, 0x06, 0x0f, 0x4a, 0x29, 0xac, 0x2f, 0xa0, 0xdf, 0x31, 0x60, 0x2e, 0x7c, 0xd3, 0x01, - 0xc5, 0xa8, 0x93, 0xdf, 0x0f, 0x55, 0x2f, 0xa6, 0x8c, 0xaa, 0xc9, 0x9e, 0xf4, 0xea, 0x77, 0xd1, - 0x97, 0xe5, 0x73, 0x13, 0x7b, 0x5e, 0xcd, 0xec, 0x52, 0xe2, 0x9b, 0xee, 0xae, 0x69, 0xd3, 0x43, - 0xb3, 0x85, 0x1d, 0xb3, 0x15, 0x8e, 0x99, 0xae, 0x63, 0xb2, 0x7d, 0x62, 0x7a, 0x1d, 0xcc, 0x76, - 0x5d, 0xff, 0xe0, 0x9b, 0xff, 0xfe, 0x5f, 0xdf, 0x2e, 0x2c, 0x58, 0xb3, 0x9b, 0x87, 0x5f, 0xda, - 0xc4, 0x9e, 0x47, 0xdf, 0x31, 0x6e, 0xa1, 0x3f, 0x37, 0x60, 0x31, 0xf1, 0x25, 0x08, 0xb2, 0x86, - 0x7e, 0x26, 0x22, 0xc5, 0xbc, 0x9a, 0xe1, 0x53, 0x12, 0x6b, 0xbb, 0x57, 0xbf, 0x83, 0x6e, 0x07, - 0xa3, 0x26, 0x97, 0x01, 0x33, 0x2e, 0xab, 0xca, 0xf8, 0x6f, 0xf0, 0xbf, 0xe6, 0xce, 0xb1, 0xe9, - 0x7a, 0x26, 0x73, 0xdd, 0xce, 0x4d, 0x21, 0xe1, 0x25, 0x6b, 0x3d, 0x90, 0x70, 0xf3, 0x50, 0xf1, - 0x06, 0xdf, 0xc2, 0x70, 0x91, 0x7f, 0xd7, 0x80, 0xa5, 0x64, 0x1e, 0x86, 0xae, 0x0e, 0xcf, 0xd2, - 0xa4, 0xd0, 0xd7, 0xb2, 0xa4, 0x72, 0xd6, 0xbb, 0xbd, 0xfa, 0x45, 0xc4, 0x0b, 0x24, 0x93, 0x86, - 0x83, 0xa6, 0xed, 0xec, 0xba, 0x5c, 0x72, 0x2e, 0x95, 0x90, 0x72, 0x05, 0x2d, 0x87, 0x52, 0x46, - 0x74, 0xe8, 0xf7, 0x0b, 0x30, 0xaf, 0xbf, 0x63, 0x84, 0x2e, 0xeb, 0x6b, 0x0e, 0x78, 0xbb, 0xac, - 0x6a, 0xa6, 0x13, 0x28, 0x81, 0xfe, 0xd9, 0xe8, 0xd5, 0x7f, 0x60, 0xa0, 0xef, 0x1b, 0x5c, 0x26, - 0xbe, 0x60, 0x4d, 0x18, 0x7a, 0xd7, 0xee, 0x30, 0xe2, 0x9b, 0x47, 0x36, 0xdb, 0xe7, 0x66, 0xa6, - 0xc4, 0xdc, 0xb5, 0x49, 0xa7, 0x4d, 0x6f, 0xc8, 0x22, 0xaa, 0x66, 0xf2, 0x9a, 0xb6, 0x66, 0xaa, - 0xe3, 0x52, 0x33, 0xb5, 0xca, 0xb7, 0x66, 0xca, 0x32, 0xb6, 0x66, 0xee, 0xbb, 0x9c, 0xc6, 0x6e, - 0x89, 0x67, 0xd1, 0x5d, 0x7a, 0xcd, 0xd4, 0x2e, 0xc6, 0x6b, 0xa6, 0xba, 0xaf, 0xe6, 0x93, 0xe1, - 0x36, 0x67, 0x10, 0x15, 0x76, 0xcd, 0x8c, 0x5e, 0xe4, 0xba, 0xc9, 0xe7, 0xdf, 0xc5, 0xdd, 0x0e, - 0x33, 0x7d, 0xc2, 0xba, 0xbe, 0x63, 0xe2, 0x4e, 0x27, 0xd2, 0x16, 0xa0, 0x10, 0x75, 0xe8, 0xaf, - 0x0a, 0x80, 0xc2, 0x7d, 0x8a, 0x17, 0x27, 0x26, 0xa5, 0xa8, 0xff, 0x30, 0x7a, 0xf5, 0x1f, 0x1a, - 0xe8, 0x53, 0xa9, 0x28, 0x31, 0xf5, 0x8f, 0xa9, 0xbe, 0xca, 0x68, 0x51, 0xe8, 0x4b, 0xec, 0xa1, - 0x29, 0xd4, 0xf6, 0x0d, 0x98, 0x0b, 0xdf, 0x9a, 0x89, 0xfb, 0x90, 0xe4, 0x57, 0x43, 0x71, 0x1f, - 0xd2, 0xf7, 0x3d, 0x87, 0x75, 0xbd, 0x57, 0x2f, 0xa3, 0x45, 0xf9, 0x5c, 0xf8, 0x09, 0x0e, 0x6e, - 0xe9, 0x1c, 0xb6, 0x62, 0xce, 0xe1, 0x63, 0x03, 0x96, 0x07, 0x7c, 0x87, 0x80, 0x5e, 0xcb, 0xf6, - 0xe5, 0x45, 0xf5, 0xfa, 0x48, 0x3a, 0x25, 0xd1, 0xdb, 0xbd, 0xfa, 0x1a, 0x5a, 0x91, 0x14, 0x42, - 0xa2, 0xe8, 0x73, 0x0b, 0x21, 0xd7, 0xda, 0x16, 0x52, 0x72, 0x6d, 0x46, 0x23, 0x5c, 0xc2, 0x43, - 0x80, 0xe8, 0x43, 0x05, 0x74, 0x31, 0x8e, 0x90, 0xc4, 0xc7, 0x0e, 0xd5, 0x4b, 0x69, 0xc3, 0x4a, - 0x8a, 0x9b, 0xbd, 0xfa, 0x32, 0x2a, 0x3f, 0xc0, 0xac, 0xb5, 0x6f, 0xb6, 0xc5, 0x70, 0x64, 0x90, - 0x85, 0x5b, 0x31, 0xcd, 0xfc, 0x9e, 0xa1, 0x7d, 0xfa, 0x19, 0xbc, 0x6f, 0x74, 0x75, 0xa0, 0xeb, - 0x8e, 0x87, 0xda, 0xb8, 0x0f, 0x4a, 0x7b, 0xfd, 0xcd, 0xba, 0xd7, 0xab, 0x9b, 0xe8, 0xd2, 0x43, - 0xcd, 0x95, 0xef, 0x9a, 0xd4, 0x23, 0x2d, 0x7b, 0xd7, 0x6e, 0x99, 0x2a, 0x40, 0x4a, 0x37, 0x64, - 0x2d, 0x29, 0xb9, 0x82, 0x76, 0x90, 0x90, 0xef, 0x8f, 0x0b, 0xb1, 0x57, 0x59, 0x83, 0x16, 0x53, - 0xdc, 0x72, 0xe9, 0x7d, 0xc7, 0xb8, 0xe5, 0x86, 0xf4, 0xaa, 0xac, 0xbf, 0x35, 0x7a, 0xf5, 0x8f, - 0x0d, 0xf4, 0x1d, 0x71, 0xe4, 0x02, 0x09, 0x94, 0xa3, 0x1c, 0x71, 0xec, 0xa2, 0xbc, 0xa0, 0x66, - 0xc6, 0x8f, 0xa0, 0x3a, 0x2d, 0xb1, 0x03, 0xa8, 0x37, 0xea, 0xa2, 0xe3, 0xc8, 0x8e, 0xbd, 0xf4, - 0xa3, 0x14, 0xca, 0x23, 0x34, 0x85, 0x50, 0x9f, 0xa6, 0xd0, 0x0f, 0x0b, 0xb0, 0xde, 0xe7, 0x8a, - 0x4e, 0x4f, 0x59, 0xff, 0x66, 0xf4, 0xea, 0x7f, 0x66, 0xa0, 0x4f, 0x74, 0xff, 0xf4, 0xff, 0x4a, - 0x67, 0xa1, 0xcb, 0x8c, 0xab, 0x6e, 0x1d, 0xad, 0xc5, 0xbd, 0x51, 0xa4, 0xc1, 0x4f, 0x0b, 0xbc, - 0x54, 0x1b, 0xdc, 0x55, 0x47, 0xb7, 0x87, 0x2b, 0x26, 0x76, 0x67, 0x52, 0xad, 0x65, 0x23, 0x56, - 0xaa, 0xfc, 0x91, 0xd1, 0xab, 0xff, 0xa1, 0x81, 0x3e, 0x96, 0xaa, 0x14, 0x63, 0xc2, 0x8d, 0xf1, - 0x0c, 0xc3, 0x76, 0x1d, 0xae, 0x4d, 0x25, 0xe3, 0x9d, 0xf0, 0xdc, 0x8c, 0xa7, 0xde, 0x40, 0x6d, - 0xc1, 0xad, 0x43, 0xcd, 0xf4, 0xdd, 0xce, 0x68, 0xd0, 0x29, 0xa1, 0x84, 0xfe, 0x2a, 0x68, 0x35, - 0x01, 0x3d, 0x79, 0x71, 0x40, 0xd1, 0x6f, 0xea, 0x00, 0x4c, 0x5e, 0x73, 0xa1, 0x11, 0x2a, 0x89, - 0x5f, 0x5f, 0x56, 0xef, 0x64, 0xa4, 0x56, 0x1a, 0xfc, 0x2d, 0xa3, 0x57, 0x67, 0xc8, 0xe7, 0xfa, - 0x93, 0xd7, 0x62, 0x74, 0x4c, 0xa5, 0x85, 0x37, 0x84, 0x35, 0x73, 0x98, 0xfe, 0x82, 0xab, 0xbd, - 0x9b, 0x31, 0x48, 0xf5, 0x5d, 0xce, 0x51, 0xe1, 0x5b, 0x93, 0xef, 0x87, 0xc6, 0x7d, 0x6b, 0xca, - 0x9b, 0xab, 0x71, 0xdf, 0x9a, 0xf6, 0x8a, 0xa9, 0xf2, 0xad, 0x2a, 0xfc, 0x05, 0xd6, 0x0a, 0xf2, - 0x3b, 0x9e, 0x2f, 0x63, 0xcf, 0x93, 0xbe, 0x75, 0x6b, 0xa0, 0x6f, 0xfd, 0x4b, 0x03, 0xce, 0x0d, - 0xea, 0xbf, 0xa2, 0xeb, 0xa3, 0x3a, 0xb4, 0x81, 0x9c, 0x37, 0x46, 0x13, 0x2a, 0x59, 0x3f, 0xec, - 0xd5, 0x5f, 0x43, 0xd7, 0xb8, 0x8d, 0xd4, 0x59, 0x4e, 0x35, 0x52, 0x8a, 0x56, 0x37, 0x83, 0xe6, - 0xfa, 0x5f, 0x1b, 0xb0, 0x9e, 0xda, 0x35, 0x8e, 0x23, 0x6d, 0x54, 0x4b, 0x3c, 0x8e, 0xb4, 0x91, - 0xad, 0x68, 0xeb, 0xbe, 0x88, 0xee, 0x2a, 0x79, 0x0d, 0x36, 0x62, 0x8a, 0xa6, 0xb4, 0x90, 0xfa, - 0x32, 0xba, 0x98, 0x22, 0xf5, 0xa6, 0xec, 0x5c, 0xff, 0x89, 0x01, 0x4b, 0xc9, 0x26, 0x61, 0x1c, - 0x11, 0x29, 0xad, 0xc9, 0x38, 0x22, 0xd2, 0xfa, 0x8c, 0xd6, 0x07, 0xbd, 0xfa, 0x79, 0xb4, 0x2e, - 0x87, 0x43, 0x44, 0x24, 0xc0, 0x60, 0x59, 0x7d, 0x42, 0xca, 0xcf, 0xb4, 0x36, 0xa9, 0xe0, 0xe3, - 0xc8, 0xe0, 0x72, 0x26, 0x7b, 0x83, 0x89, 0xac, 0x60, 0x70, 0x47, 0x32, 0x91, 0x15, 0xa4, 0xb4, - 0x17, 0x95, 0x9c, 0x72, 0x38, 0xbf, 0x9c, 0x2d, 0xc1, 0xc7, 0xe5, 0xfc, 0xc4, 0x80, 0x72, 0x5f, - 0x47, 0x10, 0x5d, 0x8b, 0x7f, 0x3d, 0x35, 0xb8, 0x13, 0x59, 0xfd, 0xe2, 0x08, 0xaa, 0x08, 0xb8, - 0x17, 0x50, 0x55, 0x8d, 0xa7, 0xc9, 0x7a, 0xd5, 0xba, 0x94, 0x22, 0xab, 0x2f, 0x19, 0x03, 0xa5, - 0x26, 0x9b, 0x81, 0x71, 0xa5, 0xa6, 0xb4, 0x20, 0xe3, 0x4a, 0x4d, 0xeb, 0x27, 0x2a, 0xa5, 0xca, - 0xe1, 0xfc, 0x4a, 0x95, 0x79, 0x22, 0x97, 0xf3, 0x53, 0x03, 0x96, 0x1f, 0xd3, 0xc3, 0x64, 0x1b, - 0x30, 0x2e, 0x6a, 0x4a, 0xf3, 0xb1, 0x7a, 0x6d, 0x38, 0x91, 0x12, 0xf5, 0x65, 0xaf, 0x7e, 0x1b, - 0xdd, 0xfc, 0x39, 0x15, 0x88, 0x82, 0xa2, 0x5f, 0xfa, 0xcd, 0x34, 0xd1, 0x5f, 0xb3, 0xae, 0xa4, - 0xea, 0x98, 0xf3, 0x6d, 0xda, 0xf4, 0x90, 0x8b, 0xff, 0x17, 0x06, 0x94, 0x1f, 0xd3, 0xc3, 0x78, - 0x5b, 0x10, 0xc5, 0xde, 0xb2, 0x19, 0xd8, 0x88, 0xac, 0x5a, 0xc3, 0x48, 0x94, 0xe0, 0xcf, 0x7b, - 0xf5, 0x9b, 0xe8, 0x7a, 0x52, 0x70, 0x0f, 0x53, 0x9a, 0x26, 0xf6, 0x35, 0xeb, 0x72, 0x8a, 0xd8, - 0x9c, 0x2b, 0x10, 0x3a, 0xd4, 0x79, 0xbc, 0xc7, 0x97, 0xd4, 0xf9, 0xc0, 0x8e, 0x64, 0x52, 0xe7, - 0x83, 0xdb, 0x84, 0xa9, 0x3a, 0xe7, 0xe4, 0xe3, 0xe8, 0x9c, 0xf3, 0x05, 0xe2, 0xff, 0x93, 0x01, - 0x95, 0x07, 0x5d, 0x6a, 0x3b, 0x84, 0xd2, 0xd3, 0xc4, 0x4d, 0xbb, 0x57, 0x7f, 0x1d, 0x6d, 0xe8, - 0x7b, 0xd8, 0x51, 0xab, 0x8e, 0x00, 0xcf, 0x6d, 0xeb, 0xb5, 0xe1, 0xe0, 0x09, 0xe6, 0xe1, 0xbb, - 0xf9, 0x3b, 0x03, 0x56, 0x83, 0xdd, 0x9c, 0x0e, 0x8c, 0x7e, 0xa5, 0x57, 0xdf, 0x40, 0xb5, 0x81, - 0xfb, 0x18, 0x86, 0xa5, 0x9b, 0xd6, 0xb5, 0x61, 0x58, 0xd2, 0xf7, 0x10, 0xb7, 0xc8, 0xe9, 0xa1, - 0x6a, 0xa8, 0x45, 0x86, 0x41, 0x6b, 0x98, 0x45, 0x04, 0xb4, 0xf4, 0xdd, 0xfc, 0xab, 0x01, 0xeb, - 0xdb, 0xa4, 0xb5, 0xef, 0xd8, 0x2d, 0xdc, 0x39, 0x4d, 0x80, 0xed, 0xf6, 0xea, 0x5f, 0x42, 0x9b, - 0xfa, 0x76, 0x58, 0xb0, 0xec, 0x08, 0x84, 0xd5, 0xac, 0xeb, 0xc3, 0x11, 0x16, 0x4e, 0xc4, 0x37, - 0xf4, 0x23, 0x03, 0xd6, 0xc2, 0x0d, 0x9d, 0x0e, 0xc6, 0x76, 0x7a, 0xf5, 0x4d, 0x74, 0x67, 0xf0, - 0x56, 0x86, 0x81, 0xec, 0x96, 0xf5, 0xc5, 0x61, 0x20, 0x8b, 0x6d, 0x23, 0x61, 0x97, 0xd3, 0x83, - 0xd9, 0x70, 0xbb, 0x0c, 0xc3, 0xd9, 0x30, 0xbb, 0x08, 0x9c, 0xc5, 0x36, 0xf4, 0x03, 0x03, 0x96, - 0xeb, 0xed, 0x03, 0xdb, 0x39, 0x1d, 0x9b, 0xf4, 0xfb, 0x60, 0xcc, 0x17, 0x1b, 0x6a, 0x8f, 0x74, - 0x1f, 0x2c, 0xec, 0x21, 0x26, 0xe0, 0xa2, 0xff, 0xbd, 0x01, 0x2b, 0x42, 0xf4, 0xd3, 0xb4, 0xc3, - 0x2f, 0x8b, 0x46, 0xb8, 0xbe, 0x01, 0xb1, 0xe4, 0x08, 0x1b, 0xdc, 0xb0, 0xae, 0x0e, 0xb7, 0x41, - 0xb8, 0x89, 0x3f, 0x32, 0xa0, 0xdc, 0x77, 0x6d, 0x84, 0x12, 0xc9, 0xef, 0xe0, 0xeb, 0xaa, 0x78, - 0x42, 0x97, 0x7a, 0xf7, 0x64, 0xd5, 0x7b, 0xf5, 0x15, 0xb4, 0xac, 0xc6, 0xf5, 0x42, 0x77, 0x44, - 0x26, 0x47, 0x25, 0x07, 0x97, 0xf2, 0x4f, 0x45, 0xda, 0x99, 0xb8, 0x29, 0x4a, 0xa6, 0x9d, 0x83, - 0x6f, 0xa8, 0x92, 0x69, 0x67, 0xca, 0x75, 0x93, 0xf5, 0xa8, 0x57, 0xaf, 0xa0, 0x55, 0x35, 0xae, - 0xeb, 0x35, 0x4b, 0xca, 0x29, 0x98, 0xde, 0x31, 0x6e, 0x3d, 0x98, 0x7a, 0x59, 0xf0, 0x76, 0x76, - 0x66, 0xc4, 0xf5, 0xd4, 0x1b, 0xff, 0x17, 0x00, 0x00, 0xff, 0xff, 0xd4, 0x78, 0x6d, 0xac, 0x98, - 0x4e, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// AppManagerClient is the client API for AppManager service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type AppManagerClient interface { - SyncRepo(ctx context.Context, in *SyncRepoRequest, opts ...grpc.CallOption) (*SyncRepoResponse, error) - // Create app, user of isv can create app on the platform - CreateApp(ctx context.Context, in *CreateAppRequest, opts ...grpc.CallOption) (*CreateAppResponse, error) - // Validate format of package(pack by op tool) - ValidatePackage(ctx context.Context, in *ValidatePackageRequest, opts ...grpc.CallOption) (*ValidatePackageResponse, error) - // Get statistics info of apps - GetAppStatistics(ctx context.Context, in *GetAppStatisticsRequest, opts ...grpc.CallOption) (*GetAppStatisticsResponse, error) - // Get apps, can filter with these fields(app_id, name, repo_id, description, status, home, icon, screenshots, maintainers, sources, readme, owner, chart_name), default return all apps - DescribeApps(ctx context.Context, in *DescribeAppsRequest, opts ...grpc.CallOption) (*DescribeAppsResponse, error) - // Get active apps, can filter with these fields(app_id, name, repo_id, description, status, home, icon, screenshots, maintainers, sources, readme, owner, chart_name), default return all apps - DescribeActiveApps(ctx context.Context, in *DescribeAppsRequest, opts ...grpc.CallOption) (*DescribeAppsResponse, error) - // Modify app info - ModifyApp(ctx context.Context, in *ModifyAppRequest, opts ...grpc.CallOption) (*ModifyAppResponse, error) - // Upload app attachment - UploadAppAttachment(ctx context.Context, in *UploadAppAttachmentRequest, opts ...grpc.CallOption) (*UploadAppAttachmentResponse, error) - // Batch delete apps - DeleteApps(ctx context.Context, in *DeleteAppsRequest, opts ...grpc.CallOption) (*DeleteAppsResponse, error) - // Create app of specific version - CreateAppVersion(ctx context.Context, in *CreateAppVersionRequest, opts ...grpc.CallOption) (*CreateAppVersionResponse, error) - // Get versions of app, can filter with these fields(version_id, app_id, name, owner, description, package_name, status, type), default return all app versions - DescribeAppVersions(ctx context.Context, in *DescribeAppVersionsRequest, opts ...grpc.CallOption) (*DescribeAppVersionsResponse, error) - // Get active versions of app, can filter with these fields(version_id, app_id, name, owner, description, package_name, status, type), default return all active app versions - DescribeActiveAppVersions(ctx context.Context, in *DescribeAppVersionsRequest, opts ...grpc.CallOption) (*DescribeAppVersionsResponse, error) - // Get audits information of version-specific app, can filter with these fields(version_id, app_id, status, operator, role), default return all app version audits - DescribeAppVersionAudits(ctx context.Context, in *DescribeAppVersionAuditsRequest, opts ...grpc.CallOption) (*DescribeAppVersionAuditsResponse, error) - // Get reviews of version-specific app, can filter with these fields(review_id, version_id, app_id, status, reviewer), default return all app version reviews - DescribeAppVersionReviews(ctx context.Context, in *DescribeAppVersionReviewsRequest, opts ...grpc.CallOption) (*DescribeAppVersionReviewsResponse, error) - // Modify version info of the app - ModifyAppVersion(ctx context.Context, in *ModifyAppVersionRequest, opts ...grpc.CallOption) (*ModifyAppVersionResponse, error) - // Get packages of version-specific app - GetAppVersionPackage(ctx context.Context, in *GetAppVersionPackageRequest, opts ...grpc.CallOption) (*GetAppVersionPackageResponse, error) - // Get app package files - GetAppVersionPackageFiles(ctx context.Context, in *GetAppVersionPackageFilesRequest, opts ...grpc.CallOption) (*GetAppVersionPackageFilesResponse, error) - // Submit version of the app - SubmitAppVersion(ctx context.Context, in *SubmitAppVersionRequest, opts ...grpc.CallOption) (*SubmitAppVersionResponse, error) - // Cancel version of the app - CancelAppVersion(ctx context.Context, in *CancelAppVersionRequest, opts ...grpc.CallOption) (*CancelAppVersionResponse, error) - // Release version of the app - ReleaseAppVersion(ctx context.Context, in *ReleaseAppVersionRequest, opts ...grpc.CallOption) (*ReleaseAppVersionResponse, error) - // Delete version of the app - DeleteAppVersion(ctx context.Context, in *DeleteAppVersionRequest, opts ...grpc.CallOption) (*DeleteAppVersionResponse, error) - // Operator of isv review version of the app - IsvReviewAppVersion(ctx context.Context, in *ReviewAppVersionRequest, opts ...grpc.CallOption) (*ReviewAppVersionResponse, error) - // Operator of isv pass version of the app - IsvPassAppVersion(ctx context.Context, in *PassAppVersionRequest, opts ...grpc.CallOption) (*PassAppVersionResponse, error) - // Operator of isv reject version of the app - IsvRejectAppVersion(ctx context.Context, in *RejectAppVersionRequest, opts ...grpc.CallOption) (*RejectAppVersionResponse, error) - // Operator of business review version of the app - BusinessReviewAppVersion(ctx context.Context, in *ReviewAppVersionRequest, opts ...grpc.CallOption) (*ReviewAppVersionResponse, error) - // Operator of business pass version of the app - BusinessPassAppVersion(ctx context.Context, in *PassAppVersionRequest, opts ...grpc.CallOption) (*PassAppVersionResponse, error) - // Operator of business reject version of the app - BusinessRejectAppVersion(ctx context.Context, in *RejectAppVersionRequest, opts ...grpc.CallOption) (*RejectAppVersionResponse, error) - // Operator of technical review version of the app - TechnicalReviewAppVersion(ctx context.Context, in *ReviewAppVersionRequest, opts ...grpc.CallOption) (*ReviewAppVersionResponse, error) - // Operator of technical pass version of the app - TechnicalPassAppVersion(ctx context.Context, in *PassAppVersionRequest, opts ...grpc.CallOption) (*PassAppVersionResponse, error) - // Operator of technical reject version of the app - TechnicalRejectAppVersion(ctx context.Context, in *RejectAppVersionRequest, opts ...grpc.CallOption) (*RejectAppVersionResponse, error) - // Operator of admin pass version of the app - AdminPassAppVersion(ctx context.Context, in *PassAppVersionRequest, opts ...grpc.CallOption) (*PassAppVersionResponse, error) - // Operator of admin reject version of the app - AdminRejectAppVersion(ctx context.Context, in *RejectAppVersionRequest, opts ...grpc.CallOption) (*RejectAppVersionResponse, error) - // Suspend app version - SuspendAppVersion(ctx context.Context, in *SuspendAppVersionRequest, opts ...grpc.CallOption) (*SuspendAppVersionResponse, error) - // Recover version of app - RecoverAppVersion(ctx context.Context, in *RecoverAppVersionRequest, opts ...grpc.CallOption) (*RecoverAppVersionResponse, error) -} - -type appManagerClient struct { - cc *grpc.ClientConn -} - -func NewAppManagerClient(cc *grpc.ClientConn) AppManagerClient { - return &appManagerClient{cc} -} - -func (c *appManagerClient) SyncRepo(ctx context.Context, in *SyncRepoRequest, opts ...grpc.CallOption) (*SyncRepoResponse, error) { - out := new(SyncRepoResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/SyncRepo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) CreateApp(ctx context.Context, in *CreateAppRequest, opts ...grpc.CallOption) (*CreateAppResponse, error) { - out := new(CreateAppResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/CreateApp", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) ValidatePackage(ctx context.Context, in *ValidatePackageRequest, opts ...grpc.CallOption) (*ValidatePackageResponse, error) { - out := new(ValidatePackageResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/ValidatePackage", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) GetAppStatistics(ctx context.Context, in *GetAppStatisticsRequest, opts ...grpc.CallOption) (*GetAppStatisticsResponse, error) { - out := new(GetAppStatisticsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/GetAppStatistics", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) DescribeApps(ctx context.Context, in *DescribeAppsRequest, opts ...grpc.CallOption) (*DescribeAppsResponse, error) { - out := new(DescribeAppsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/DescribeApps", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) DescribeActiveApps(ctx context.Context, in *DescribeAppsRequest, opts ...grpc.CallOption) (*DescribeAppsResponse, error) { - out := new(DescribeAppsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/DescribeActiveApps", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) ModifyApp(ctx context.Context, in *ModifyAppRequest, opts ...grpc.CallOption) (*ModifyAppResponse, error) { - out := new(ModifyAppResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/ModifyApp", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) UploadAppAttachment(ctx context.Context, in *UploadAppAttachmentRequest, opts ...grpc.CallOption) (*UploadAppAttachmentResponse, error) { - out := new(UploadAppAttachmentResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/UploadAppAttachment", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) DeleteApps(ctx context.Context, in *DeleteAppsRequest, opts ...grpc.CallOption) (*DeleteAppsResponse, error) { - out := new(DeleteAppsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/DeleteApps", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) CreateAppVersion(ctx context.Context, in *CreateAppVersionRequest, opts ...grpc.CallOption) (*CreateAppVersionResponse, error) { - out := new(CreateAppVersionResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/CreateAppVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) DescribeAppVersions(ctx context.Context, in *DescribeAppVersionsRequest, opts ...grpc.CallOption) (*DescribeAppVersionsResponse, error) { - out := new(DescribeAppVersionsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/DescribeAppVersions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) DescribeActiveAppVersions(ctx context.Context, in *DescribeAppVersionsRequest, opts ...grpc.CallOption) (*DescribeAppVersionsResponse, error) { - out := new(DescribeAppVersionsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/DescribeActiveAppVersions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) DescribeAppVersionAudits(ctx context.Context, in *DescribeAppVersionAuditsRequest, opts ...grpc.CallOption) (*DescribeAppVersionAuditsResponse, error) { - out := new(DescribeAppVersionAuditsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/DescribeAppVersionAudits", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) DescribeAppVersionReviews(ctx context.Context, in *DescribeAppVersionReviewsRequest, opts ...grpc.CallOption) (*DescribeAppVersionReviewsResponse, error) { - out := new(DescribeAppVersionReviewsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/DescribeAppVersionReviews", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) ModifyAppVersion(ctx context.Context, in *ModifyAppVersionRequest, opts ...grpc.CallOption) (*ModifyAppVersionResponse, error) { - out := new(ModifyAppVersionResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/ModifyAppVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) GetAppVersionPackage(ctx context.Context, in *GetAppVersionPackageRequest, opts ...grpc.CallOption) (*GetAppVersionPackageResponse, error) { - out := new(GetAppVersionPackageResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/GetAppVersionPackage", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) GetAppVersionPackageFiles(ctx context.Context, in *GetAppVersionPackageFilesRequest, opts ...grpc.CallOption) (*GetAppVersionPackageFilesResponse, error) { - out := new(GetAppVersionPackageFilesResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/GetAppVersionPackageFiles", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) SubmitAppVersion(ctx context.Context, in *SubmitAppVersionRequest, opts ...grpc.CallOption) (*SubmitAppVersionResponse, error) { - out := new(SubmitAppVersionResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/SubmitAppVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) CancelAppVersion(ctx context.Context, in *CancelAppVersionRequest, opts ...grpc.CallOption) (*CancelAppVersionResponse, error) { - out := new(CancelAppVersionResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/CancelAppVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) ReleaseAppVersion(ctx context.Context, in *ReleaseAppVersionRequest, opts ...grpc.CallOption) (*ReleaseAppVersionResponse, error) { - out := new(ReleaseAppVersionResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/ReleaseAppVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) DeleteAppVersion(ctx context.Context, in *DeleteAppVersionRequest, opts ...grpc.CallOption) (*DeleteAppVersionResponse, error) { - out := new(DeleteAppVersionResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/DeleteAppVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) IsvReviewAppVersion(ctx context.Context, in *ReviewAppVersionRequest, opts ...grpc.CallOption) (*ReviewAppVersionResponse, error) { - out := new(ReviewAppVersionResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/IsvReviewAppVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) IsvPassAppVersion(ctx context.Context, in *PassAppVersionRequest, opts ...grpc.CallOption) (*PassAppVersionResponse, error) { - out := new(PassAppVersionResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/IsvPassAppVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) IsvRejectAppVersion(ctx context.Context, in *RejectAppVersionRequest, opts ...grpc.CallOption) (*RejectAppVersionResponse, error) { - out := new(RejectAppVersionResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/IsvRejectAppVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) BusinessReviewAppVersion(ctx context.Context, in *ReviewAppVersionRequest, opts ...grpc.CallOption) (*ReviewAppVersionResponse, error) { - out := new(ReviewAppVersionResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/BusinessReviewAppVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) BusinessPassAppVersion(ctx context.Context, in *PassAppVersionRequest, opts ...grpc.CallOption) (*PassAppVersionResponse, error) { - out := new(PassAppVersionResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/BusinessPassAppVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) BusinessRejectAppVersion(ctx context.Context, in *RejectAppVersionRequest, opts ...grpc.CallOption) (*RejectAppVersionResponse, error) { - out := new(RejectAppVersionResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/BusinessRejectAppVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) TechnicalReviewAppVersion(ctx context.Context, in *ReviewAppVersionRequest, opts ...grpc.CallOption) (*ReviewAppVersionResponse, error) { - out := new(ReviewAppVersionResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/TechnicalReviewAppVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) TechnicalPassAppVersion(ctx context.Context, in *PassAppVersionRequest, opts ...grpc.CallOption) (*PassAppVersionResponse, error) { - out := new(PassAppVersionResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/TechnicalPassAppVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) TechnicalRejectAppVersion(ctx context.Context, in *RejectAppVersionRequest, opts ...grpc.CallOption) (*RejectAppVersionResponse, error) { - out := new(RejectAppVersionResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/TechnicalRejectAppVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) AdminPassAppVersion(ctx context.Context, in *PassAppVersionRequest, opts ...grpc.CallOption) (*PassAppVersionResponse, error) { - out := new(PassAppVersionResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/AdminPassAppVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) AdminRejectAppVersion(ctx context.Context, in *RejectAppVersionRequest, opts ...grpc.CallOption) (*RejectAppVersionResponse, error) { - out := new(RejectAppVersionResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/AdminRejectAppVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) SuspendAppVersion(ctx context.Context, in *SuspendAppVersionRequest, opts ...grpc.CallOption) (*SuspendAppVersionResponse, error) { - out := new(SuspendAppVersionResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/SuspendAppVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appManagerClient) RecoverAppVersion(ctx context.Context, in *RecoverAppVersionRequest, opts ...grpc.CallOption) (*RecoverAppVersionResponse, error) { - out := new(RecoverAppVersionResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AppManager/RecoverAppVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// AppManagerServer is the server API for AppManager service. -type AppManagerServer interface { - SyncRepo(context.Context, *SyncRepoRequest) (*SyncRepoResponse, error) - // Create app, user of isv can create app on the platform - CreateApp(context.Context, *CreateAppRequest) (*CreateAppResponse, error) - // Validate format of package(pack by op tool) - ValidatePackage(context.Context, *ValidatePackageRequest) (*ValidatePackageResponse, error) - // Get statistics info of apps - GetAppStatistics(context.Context, *GetAppStatisticsRequest) (*GetAppStatisticsResponse, error) - // Get apps, can filter with these fields(app_id, name, repo_id, description, status, home, icon, screenshots, maintainers, sources, readme, owner, chart_name), default return all apps - DescribeApps(context.Context, *DescribeAppsRequest) (*DescribeAppsResponse, error) - // Get active apps, can filter with these fields(app_id, name, repo_id, description, status, home, icon, screenshots, maintainers, sources, readme, owner, chart_name), default return all apps - DescribeActiveApps(context.Context, *DescribeAppsRequest) (*DescribeAppsResponse, error) - // Modify app info - ModifyApp(context.Context, *ModifyAppRequest) (*ModifyAppResponse, error) - // Upload app attachment - UploadAppAttachment(context.Context, *UploadAppAttachmentRequest) (*UploadAppAttachmentResponse, error) - // Batch delete apps - DeleteApps(context.Context, *DeleteAppsRequest) (*DeleteAppsResponse, error) - // Create app of specific version - CreateAppVersion(context.Context, *CreateAppVersionRequest) (*CreateAppVersionResponse, error) - // Get versions of app, can filter with these fields(version_id, app_id, name, owner, description, package_name, status, type), default return all app versions - DescribeAppVersions(context.Context, *DescribeAppVersionsRequest) (*DescribeAppVersionsResponse, error) - // Get active versions of app, can filter with these fields(version_id, app_id, name, owner, description, package_name, status, type), default return all active app versions - DescribeActiveAppVersions(context.Context, *DescribeAppVersionsRequest) (*DescribeAppVersionsResponse, error) - // Get audits information of version-specific app, can filter with these fields(version_id, app_id, status, operator, role), default return all app version audits - DescribeAppVersionAudits(context.Context, *DescribeAppVersionAuditsRequest) (*DescribeAppVersionAuditsResponse, error) - // Get reviews of version-specific app, can filter with these fields(review_id, version_id, app_id, status, reviewer), default return all app version reviews - DescribeAppVersionReviews(context.Context, *DescribeAppVersionReviewsRequest) (*DescribeAppVersionReviewsResponse, error) - // Modify version info of the app - ModifyAppVersion(context.Context, *ModifyAppVersionRequest) (*ModifyAppVersionResponse, error) - // Get packages of version-specific app - GetAppVersionPackage(context.Context, *GetAppVersionPackageRequest) (*GetAppVersionPackageResponse, error) - // Get app package files - GetAppVersionPackageFiles(context.Context, *GetAppVersionPackageFilesRequest) (*GetAppVersionPackageFilesResponse, error) - // Submit version of the app - SubmitAppVersion(context.Context, *SubmitAppVersionRequest) (*SubmitAppVersionResponse, error) - // Cancel version of the app - CancelAppVersion(context.Context, *CancelAppVersionRequest) (*CancelAppVersionResponse, error) - // Release version of the app - ReleaseAppVersion(context.Context, *ReleaseAppVersionRequest) (*ReleaseAppVersionResponse, error) - // Delete version of the app - DeleteAppVersion(context.Context, *DeleteAppVersionRequest) (*DeleteAppVersionResponse, error) - // Operator of isv review version of the app - IsvReviewAppVersion(context.Context, *ReviewAppVersionRequest) (*ReviewAppVersionResponse, error) - // Operator of isv pass version of the app - IsvPassAppVersion(context.Context, *PassAppVersionRequest) (*PassAppVersionResponse, error) - // Operator of isv reject version of the app - IsvRejectAppVersion(context.Context, *RejectAppVersionRequest) (*RejectAppVersionResponse, error) - // Operator of business review version of the app - BusinessReviewAppVersion(context.Context, *ReviewAppVersionRequest) (*ReviewAppVersionResponse, error) - // Operator of business pass version of the app - BusinessPassAppVersion(context.Context, *PassAppVersionRequest) (*PassAppVersionResponse, error) - // Operator of business reject version of the app - BusinessRejectAppVersion(context.Context, *RejectAppVersionRequest) (*RejectAppVersionResponse, error) - // Operator of technical review version of the app - TechnicalReviewAppVersion(context.Context, *ReviewAppVersionRequest) (*ReviewAppVersionResponse, error) - // Operator of technical pass version of the app - TechnicalPassAppVersion(context.Context, *PassAppVersionRequest) (*PassAppVersionResponse, error) - // Operator of technical reject version of the app - TechnicalRejectAppVersion(context.Context, *RejectAppVersionRequest) (*RejectAppVersionResponse, error) - // Operator of admin pass version of the app - AdminPassAppVersion(context.Context, *PassAppVersionRequest) (*PassAppVersionResponse, error) - // Operator of admin reject version of the app - AdminRejectAppVersion(context.Context, *RejectAppVersionRequest) (*RejectAppVersionResponse, error) - // Suspend app version - SuspendAppVersion(context.Context, *SuspendAppVersionRequest) (*SuspendAppVersionResponse, error) - // Recover version of app - RecoverAppVersion(context.Context, *RecoverAppVersionRequest) (*RecoverAppVersionResponse, error) -} - -// UnimplementedAppManagerServer can be embedded to have forward compatible implementations. -type UnimplementedAppManagerServer struct { -} - -func (*UnimplementedAppManagerServer) SyncRepo(ctx context.Context, req *SyncRepoRequest) (*SyncRepoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SyncRepo not implemented") -} -func (*UnimplementedAppManagerServer) CreateApp(ctx context.Context, req *CreateAppRequest) (*CreateAppResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateApp not implemented") -} -func (*UnimplementedAppManagerServer) ValidatePackage(ctx context.Context, req *ValidatePackageRequest) (*ValidatePackageResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ValidatePackage not implemented") -} -func (*UnimplementedAppManagerServer) GetAppStatistics(ctx context.Context, req *GetAppStatisticsRequest) (*GetAppStatisticsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAppStatistics not implemented") -} -func (*UnimplementedAppManagerServer) DescribeApps(ctx context.Context, req *DescribeAppsRequest) (*DescribeAppsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeApps not implemented") -} -func (*UnimplementedAppManagerServer) DescribeActiveApps(ctx context.Context, req *DescribeAppsRequest) (*DescribeAppsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeActiveApps not implemented") -} -func (*UnimplementedAppManagerServer) ModifyApp(ctx context.Context, req *ModifyAppRequest) (*ModifyAppResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ModifyApp not implemented") -} -func (*UnimplementedAppManagerServer) UploadAppAttachment(ctx context.Context, req *UploadAppAttachmentRequest) (*UploadAppAttachmentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UploadAppAttachment not implemented") -} -func (*UnimplementedAppManagerServer) DeleteApps(ctx context.Context, req *DeleteAppsRequest) (*DeleteAppsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteApps not implemented") -} -func (*UnimplementedAppManagerServer) CreateAppVersion(ctx context.Context, req *CreateAppVersionRequest) (*CreateAppVersionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateAppVersion not implemented") -} -func (*UnimplementedAppManagerServer) DescribeAppVersions(ctx context.Context, req *DescribeAppVersionsRequest) (*DescribeAppVersionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeAppVersions not implemented") -} -func (*UnimplementedAppManagerServer) DescribeActiveAppVersions(ctx context.Context, req *DescribeAppVersionsRequest) (*DescribeAppVersionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeActiveAppVersions not implemented") -} -func (*UnimplementedAppManagerServer) DescribeAppVersionAudits(ctx context.Context, req *DescribeAppVersionAuditsRequest) (*DescribeAppVersionAuditsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeAppVersionAudits not implemented") -} -func (*UnimplementedAppManagerServer) DescribeAppVersionReviews(ctx context.Context, req *DescribeAppVersionReviewsRequest) (*DescribeAppVersionReviewsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeAppVersionReviews not implemented") -} -func (*UnimplementedAppManagerServer) ModifyAppVersion(ctx context.Context, req *ModifyAppVersionRequest) (*ModifyAppVersionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ModifyAppVersion not implemented") -} -func (*UnimplementedAppManagerServer) GetAppVersionPackage(ctx context.Context, req *GetAppVersionPackageRequest) (*GetAppVersionPackageResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAppVersionPackage not implemented") -} -func (*UnimplementedAppManagerServer) GetAppVersionPackageFiles(ctx context.Context, req *GetAppVersionPackageFilesRequest) (*GetAppVersionPackageFilesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAppVersionPackageFiles not implemented") -} -func (*UnimplementedAppManagerServer) SubmitAppVersion(ctx context.Context, req *SubmitAppVersionRequest) (*SubmitAppVersionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitAppVersion not implemented") -} -func (*UnimplementedAppManagerServer) CancelAppVersion(ctx context.Context, req *CancelAppVersionRequest) (*CancelAppVersionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CancelAppVersion not implemented") -} -func (*UnimplementedAppManagerServer) ReleaseAppVersion(ctx context.Context, req *ReleaseAppVersionRequest) (*ReleaseAppVersionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ReleaseAppVersion not implemented") -} -func (*UnimplementedAppManagerServer) DeleteAppVersion(ctx context.Context, req *DeleteAppVersionRequest) (*DeleteAppVersionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteAppVersion not implemented") -} -func (*UnimplementedAppManagerServer) IsvReviewAppVersion(ctx context.Context, req *ReviewAppVersionRequest) (*ReviewAppVersionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method IsvReviewAppVersion not implemented") -} -func (*UnimplementedAppManagerServer) IsvPassAppVersion(ctx context.Context, req *PassAppVersionRequest) (*PassAppVersionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method IsvPassAppVersion not implemented") -} -func (*UnimplementedAppManagerServer) IsvRejectAppVersion(ctx context.Context, req *RejectAppVersionRequest) (*RejectAppVersionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method IsvRejectAppVersion not implemented") -} -func (*UnimplementedAppManagerServer) BusinessReviewAppVersion(ctx context.Context, req *ReviewAppVersionRequest) (*ReviewAppVersionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BusinessReviewAppVersion not implemented") -} -func (*UnimplementedAppManagerServer) BusinessPassAppVersion(ctx context.Context, req *PassAppVersionRequest) (*PassAppVersionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BusinessPassAppVersion not implemented") -} -func (*UnimplementedAppManagerServer) BusinessRejectAppVersion(ctx context.Context, req *RejectAppVersionRequest) (*RejectAppVersionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BusinessRejectAppVersion not implemented") -} -func (*UnimplementedAppManagerServer) TechnicalReviewAppVersion(ctx context.Context, req *ReviewAppVersionRequest) (*ReviewAppVersionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TechnicalReviewAppVersion not implemented") -} -func (*UnimplementedAppManagerServer) TechnicalPassAppVersion(ctx context.Context, req *PassAppVersionRequest) (*PassAppVersionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TechnicalPassAppVersion not implemented") -} -func (*UnimplementedAppManagerServer) TechnicalRejectAppVersion(ctx context.Context, req *RejectAppVersionRequest) (*RejectAppVersionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TechnicalRejectAppVersion not implemented") -} -func (*UnimplementedAppManagerServer) AdminPassAppVersion(ctx context.Context, req *PassAppVersionRequest) (*PassAppVersionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AdminPassAppVersion not implemented") -} -func (*UnimplementedAppManagerServer) AdminRejectAppVersion(ctx context.Context, req *RejectAppVersionRequest) (*RejectAppVersionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AdminRejectAppVersion not implemented") -} -func (*UnimplementedAppManagerServer) SuspendAppVersion(ctx context.Context, req *SuspendAppVersionRequest) (*SuspendAppVersionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SuspendAppVersion not implemented") -} -func (*UnimplementedAppManagerServer) RecoverAppVersion(ctx context.Context, req *RecoverAppVersionRequest) (*RecoverAppVersionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RecoverAppVersion not implemented") -} - -func RegisterAppManagerServer(s *grpc.Server, srv AppManagerServer) { - s.RegisterService(&_AppManager_serviceDesc, srv) -} - -func _AppManager_SyncRepo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SyncRepoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).SyncRepo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/SyncRepo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).SyncRepo(ctx, req.(*SyncRepoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_CreateApp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateAppRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).CreateApp(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/CreateApp", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).CreateApp(ctx, req.(*CreateAppRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_ValidatePackage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ValidatePackageRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).ValidatePackage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/ValidatePackage", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).ValidatePackage(ctx, req.(*ValidatePackageRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_GetAppStatistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAppStatisticsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).GetAppStatistics(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/GetAppStatistics", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).GetAppStatistics(ctx, req.(*GetAppStatisticsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_DescribeApps_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeAppsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).DescribeApps(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/DescribeApps", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).DescribeApps(ctx, req.(*DescribeAppsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_DescribeActiveApps_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeAppsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).DescribeActiveApps(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/DescribeActiveApps", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).DescribeActiveApps(ctx, req.(*DescribeAppsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_ModifyApp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ModifyAppRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).ModifyApp(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/ModifyApp", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).ModifyApp(ctx, req.(*ModifyAppRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_UploadAppAttachment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UploadAppAttachmentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).UploadAppAttachment(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/UploadAppAttachment", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).UploadAppAttachment(ctx, req.(*UploadAppAttachmentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_DeleteApps_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteAppsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).DeleteApps(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/DeleteApps", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).DeleteApps(ctx, req.(*DeleteAppsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_CreateAppVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateAppVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).CreateAppVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/CreateAppVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).CreateAppVersion(ctx, req.(*CreateAppVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_DescribeAppVersions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeAppVersionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).DescribeAppVersions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/DescribeAppVersions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).DescribeAppVersions(ctx, req.(*DescribeAppVersionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_DescribeActiveAppVersions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeAppVersionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).DescribeActiveAppVersions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/DescribeActiveAppVersions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).DescribeActiveAppVersions(ctx, req.(*DescribeAppVersionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_DescribeAppVersionAudits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeAppVersionAuditsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).DescribeAppVersionAudits(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/DescribeAppVersionAudits", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).DescribeAppVersionAudits(ctx, req.(*DescribeAppVersionAuditsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_DescribeAppVersionReviews_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeAppVersionReviewsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).DescribeAppVersionReviews(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/DescribeAppVersionReviews", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).DescribeAppVersionReviews(ctx, req.(*DescribeAppVersionReviewsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_ModifyAppVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ModifyAppVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).ModifyAppVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/ModifyAppVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).ModifyAppVersion(ctx, req.(*ModifyAppVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_GetAppVersionPackage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAppVersionPackageRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).GetAppVersionPackage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/GetAppVersionPackage", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).GetAppVersionPackage(ctx, req.(*GetAppVersionPackageRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_GetAppVersionPackageFiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAppVersionPackageFilesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).GetAppVersionPackageFiles(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/GetAppVersionPackageFiles", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).GetAppVersionPackageFiles(ctx, req.(*GetAppVersionPackageFilesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_SubmitAppVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SubmitAppVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).SubmitAppVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/SubmitAppVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).SubmitAppVersion(ctx, req.(*SubmitAppVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_CancelAppVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CancelAppVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).CancelAppVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/CancelAppVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).CancelAppVersion(ctx, req.(*CancelAppVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_ReleaseAppVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReleaseAppVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).ReleaseAppVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/ReleaseAppVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).ReleaseAppVersion(ctx, req.(*ReleaseAppVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_DeleteAppVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteAppVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).DeleteAppVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/DeleteAppVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).DeleteAppVersion(ctx, req.(*DeleteAppVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_IsvReviewAppVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReviewAppVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).IsvReviewAppVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/IsvReviewAppVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).IsvReviewAppVersion(ctx, req.(*ReviewAppVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_IsvPassAppVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PassAppVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).IsvPassAppVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/IsvPassAppVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).IsvPassAppVersion(ctx, req.(*PassAppVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_IsvRejectAppVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RejectAppVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).IsvRejectAppVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/IsvRejectAppVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).IsvRejectAppVersion(ctx, req.(*RejectAppVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_BusinessReviewAppVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReviewAppVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).BusinessReviewAppVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/BusinessReviewAppVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).BusinessReviewAppVersion(ctx, req.(*ReviewAppVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_BusinessPassAppVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PassAppVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).BusinessPassAppVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/BusinessPassAppVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).BusinessPassAppVersion(ctx, req.(*PassAppVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_BusinessRejectAppVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RejectAppVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).BusinessRejectAppVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/BusinessRejectAppVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).BusinessRejectAppVersion(ctx, req.(*RejectAppVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_TechnicalReviewAppVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReviewAppVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).TechnicalReviewAppVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/TechnicalReviewAppVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).TechnicalReviewAppVersion(ctx, req.(*ReviewAppVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_TechnicalPassAppVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PassAppVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).TechnicalPassAppVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/TechnicalPassAppVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).TechnicalPassAppVersion(ctx, req.(*PassAppVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_TechnicalRejectAppVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RejectAppVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).TechnicalRejectAppVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/TechnicalRejectAppVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).TechnicalRejectAppVersion(ctx, req.(*RejectAppVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_AdminPassAppVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PassAppVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).AdminPassAppVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/AdminPassAppVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).AdminPassAppVersion(ctx, req.(*PassAppVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_AdminRejectAppVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RejectAppVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).AdminRejectAppVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/AdminRejectAppVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).AdminRejectAppVersion(ctx, req.(*RejectAppVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_SuspendAppVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SuspendAppVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).SuspendAppVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/SuspendAppVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).SuspendAppVersion(ctx, req.(*SuspendAppVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppManager_RecoverAppVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RecoverAppVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppManagerServer).RecoverAppVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AppManager/RecoverAppVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppManagerServer).RecoverAppVersion(ctx, req.(*RecoverAppVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _AppManager_serviceDesc = grpc.ServiceDesc{ - ServiceName: "openpitrix.AppManager", - HandlerType: (*AppManagerServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SyncRepo", - Handler: _AppManager_SyncRepo_Handler, - }, - { - MethodName: "CreateApp", - Handler: _AppManager_CreateApp_Handler, - }, - { - MethodName: "ValidatePackage", - Handler: _AppManager_ValidatePackage_Handler, - }, - { - MethodName: "GetAppStatistics", - Handler: _AppManager_GetAppStatistics_Handler, - }, - { - MethodName: "DescribeApps", - Handler: _AppManager_DescribeApps_Handler, - }, - { - MethodName: "DescribeActiveApps", - Handler: _AppManager_DescribeActiveApps_Handler, - }, - { - MethodName: "ModifyApp", - Handler: _AppManager_ModifyApp_Handler, - }, - { - MethodName: "UploadAppAttachment", - Handler: _AppManager_UploadAppAttachment_Handler, - }, - { - MethodName: "DeleteApps", - Handler: _AppManager_DeleteApps_Handler, - }, - { - MethodName: "CreateAppVersion", - Handler: _AppManager_CreateAppVersion_Handler, - }, - { - MethodName: "DescribeAppVersions", - Handler: _AppManager_DescribeAppVersions_Handler, - }, - { - MethodName: "DescribeActiveAppVersions", - Handler: _AppManager_DescribeActiveAppVersions_Handler, - }, - { - MethodName: "DescribeAppVersionAudits", - Handler: _AppManager_DescribeAppVersionAudits_Handler, - }, - { - MethodName: "DescribeAppVersionReviews", - Handler: _AppManager_DescribeAppVersionReviews_Handler, - }, - { - MethodName: "ModifyAppVersion", - Handler: _AppManager_ModifyAppVersion_Handler, - }, - { - MethodName: "GetAppVersionPackage", - Handler: _AppManager_GetAppVersionPackage_Handler, - }, - { - MethodName: "GetAppVersionPackageFiles", - Handler: _AppManager_GetAppVersionPackageFiles_Handler, - }, - { - MethodName: "SubmitAppVersion", - Handler: _AppManager_SubmitAppVersion_Handler, - }, - { - MethodName: "CancelAppVersion", - Handler: _AppManager_CancelAppVersion_Handler, - }, - { - MethodName: "ReleaseAppVersion", - Handler: _AppManager_ReleaseAppVersion_Handler, - }, - { - MethodName: "DeleteAppVersion", - Handler: _AppManager_DeleteAppVersion_Handler, - }, - { - MethodName: "IsvReviewAppVersion", - Handler: _AppManager_IsvReviewAppVersion_Handler, - }, - { - MethodName: "IsvPassAppVersion", - Handler: _AppManager_IsvPassAppVersion_Handler, - }, - { - MethodName: "IsvRejectAppVersion", - Handler: _AppManager_IsvRejectAppVersion_Handler, - }, - { - MethodName: "BusinessReviewAppVersion", - Handler: _AppManager_BusinessReviewAppVersion_Handler, - }, - { - MethodName: "BusinessPassAppVersion", - Handler: _AppManager_BusinessPassAppVersion_Handler, - }, - { - MethodName: "BusinessRejectAppVersion", - Handler: _AppManager_BusinessRejectAppVersion_Handler, - }, - { - MethodName: "TechnicalReviewAppVersion", - Handler: _AppManager_TechnicalReviewAppVersion_Handler, - }, - { - MethodName: "TechnicalPassAppVersion", - Handler: _AppManager_TechnicalPassAppVersion_Handler, - }, - { - MethodName: "TechnicalRejectAppVersion", - Handler: _AppManager_TechnicalRejectAppVersion_Handler, - }, - { - MethodName: "AdminPassAppVersion", - Handler: _AppManager_AdminPassAppVersion_Handler, - }, - { - MethodName: "AdminRejectAppVersion", - Handler: _AppManager_AdminRejectAppVersion_Handler, - }, - { - MethodName: "SuspendAppVersion", - Handler: _AppManager_SuspendAppVersion_Handler, - }, - { - MethodName: "RecoverAppVersion", - Handler: _AppManager_RecoverAppVersion_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "app.proto", -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/app.pb.gw.go b/vendor/openpitrix.io/openpitrix/pkg/pb/app.pb.gw.go deleted file mode 100644 index 36fe702d3..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/app.pb.gw.go +++ /dev/null @@ -1,2635 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: app.proto - -/* -Package pb is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package pb - -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/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage - -func request_AppManager_CreateApp_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateAppRequest - 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.CreateApp(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_CreateApp_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateAppRequest - 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.CreateApp(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AppManager_ValidatePackage_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ValidatePackageRequest - 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.ValidatePackage(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_ValidatePackage_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ValidatePackageRequest - 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.ValidatePackage(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AppManager_GetAppStatistics_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAppStatisticsRequest - var metadata runtime.ServerMetadata - - msg, err := client.GetAppStatistics(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_GetAppStatistics_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAppStatisticsRequest - var metadata runtime.ServerMetadata - - msg, err := server.GetAppStatistics(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_AppManager_DescribeApps_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_AppManager_DescribeApps_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeAppsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AppManager_DescribeApps_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeApps(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_DescribeApps_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeAppsRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AppManager_DescribeApps_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeApps(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_AppManager_DescribeActiveApps_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_AppManager_DescribeActiveApps_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeAppsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AppManager_DescribeActiveApps_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeActiveApps(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_DescribeActiveApps_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeAppsRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AppManager_DescribeActiveApps_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeActiveApps(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AppManager_ModifyApp_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyAppRequest - 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.ModifyApp(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_ModifyApp_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyAppRequest - 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.ModifyApp(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AppManager_UploadAppAttachment_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UploadAppAttachmentRequest - 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.UploadAppAttachment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_UploadAppAttachment_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UploadAppAttachmentRequest - 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.UploadAppAttachment(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AppManager_DeleteApps_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteAppsRequest - 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.DeleteApps(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_DeleteApps_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteAppsRequest - 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.DeleteApps(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AppManager_CreateAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateAppVersionRequest - 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.CreateAppVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_CreateAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateAppVersionRequest - 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.CreateAppVersion(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_AppManager_DescribeAppVersions_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_AppManager_DescribeAppVersions_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeAppVersionsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AppManager_DescribeAppVersions_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeAppVersions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_DescribeAppVersions_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeAppVersionsRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AppManager_DescribeAppVersions_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeAppVersions(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_AppManager_DescribeActiveAppVersions_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_AppManager_DescribeActiveAppVersions_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeAppVersionsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AppManager_DescribeActiveAppVersions_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeActiveAppVersions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_DescribeActiveAppVersions_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeAppVersionsRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AppManager_DescribeActiveAppVersions_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeActiveAppVersions(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_AppManager_DescribeAppVersionAudits_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_AppManager_DescribeAppVersionAudits_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeAppVersionAuditsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AppManager_DescribeAppVersionAudits_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeAppVersionAudits(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_DescribeAppVersionAudits_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeAppVersionAuditsRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AppManager_DescribeAppVersionAudits_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeAppVersionAudits(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_AppManager_DescribeAppVersionReviews_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_AppManager_DescribeAppVersionReviews_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeAppVersionReviewsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AppManager_DescribeAppVersionReviews_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeAppVersionReviews(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_DescribeAppVersionReviews_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeAppVersionReviewsRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AppManager_DescribeAppVersionReviews_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeAppVersionReviews(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AppManager_ModifyAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyAppVersionRequest - 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.ModifyAppVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_ModifyAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyAppVersionRequest - 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.ModifyAppVersion(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_AppManager_GetAppVersionPackage_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_AppManager_GetAppVersionPackage_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAppVersionPackageRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AppManager_GetAppVersionPackage_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetAppVersionPackage(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_GetAppVersionPackage_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAppVersionPackageRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AppManager_GetAppVersionPackage_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetAppVersionPackage(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_AppManager_GetAppVersionPackageFiles_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_AppManager_GetAppVersionPackageFiles_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAppVersionPackageFilesRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AppManager_GetAppVersionPackageFiles_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetAppVersionPackageFiles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_GetAppVersionPackageFiles_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAppVersionPackageFilesRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AppManager_GetAppVersionPackageFiles_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetAppVersionPackageFiles(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AppManager_SubmitAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SubmitAppVersionRequest - 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.SubmitAppVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_SubmitAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SubmitAppVersionRequest - 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.SubmitAppVersion(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AppManager_CancelAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CancelAppVersionRequest - 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.CancelAppVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_CancelAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CancelAppVersionRequest - 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.CancelAppVersion(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AppManager_ReleaseAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ReleaseAppVersionRequest - 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.ReleaseAppVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_ReleaseAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ReleaseAppVersionRequest - 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.ReleaseAppVersion(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AppManager_DeleteAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteAppVersionRequest - 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.DeleteAppVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_DeleteAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteAppVersionRequest - 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.DeleteAppVersion(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AppManager_IsvReviewAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ReviewAppVersionRequest - 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.IsvReviewAppVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_IsvReviewAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ReviewAppVersionRequest - 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.IsvReviewAppVersion(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AppManager_IsvPassAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PassAppVersionRequest - 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.IsvPassAppVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_IsvPassAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PassAppVersionRequest - 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.IsvPassAppVersion(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AppManager_IsvRejectAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RejectAppVersionRequest - 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.IsvRejectAppVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_IsvRejectAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RejectAppVersionRequest - 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.IsvRejectAppVersion(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AppManager_BusinessReviewAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ReviewAppVersionRequest - 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.BusinessReviewAppVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_BusinessReviewAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ReviewAppVersionRequest - 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.BusinessReviewAppVersion(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AppManager_BusinessPassAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PassAppVersionRequest - 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.BusinessPassAppVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_BusinessPassAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PassAppVersionRequest - 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.BusinessPassAppVersion(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AppManager_BusinessRejectAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RejectAppVersionRequest - 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.BusinessRejectAppVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_BusinessRejectAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RejectAppVersionRequest - 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.BusinessRejectAppVersion(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AppManager_TechnicalReviewAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ReviewAppVersionRequest - 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.TechnicalReviewAppVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_TechnicalReviewAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ReviewAppVersionRequest - 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.TechnicalReviewAppVersion(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AppManager_TechnicalPassAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PassAppVersionRequest - 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.TechnicalPassAppVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_TechnicalPassAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PassAppVersionRequest - 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.TechnicalPassAppVersion(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AppManager_TechnicalRejectAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RejectAppVersionRequest - 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.TechnicalRejectAppVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_TechnicalRejectAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RejectAppVersionRequest - 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.TechnicalRejectAppVersion(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AppManager_AdminPassAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PassAppVersionRequest - 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.AdminPassAppVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_AdminPassAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PassAppVersionRequest - 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.AdminPassAppVersion(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AppManager_AdminRejectAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RejectAppVersionRequest - 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.AdminRejectAppVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_AdminRejectAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RejectAppVersionRequest - 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.AdminRejectAppVersion(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AppManager_SuspendAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SuspendAppVersionRequest - 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.SuspendAppVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_SuspendAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SuspendAppVersionRequest - 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.SuspendAppVersion(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AppManager_RecoverAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, client AppManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RecoverAppVersionRequest - 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.RecoverAppVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AppManager_RecoverAppVersion_0(ctx context.Context, marshaler runtime.Marshaler, server AppManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RecoverAppVersionRequest - 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.RecoverAppVersion(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterAppManagerHandlerServer registers the http handlers for service AppManager to "mux". -// UnaryRPC :call AppManagerServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterAppManagerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AppManagerServer) error { - - mux.Handle("POST", pattern_AppManager_CreateApp_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_CreateApp_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_CreateApp_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_ValidatePackage_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_ValidatePackage_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_ValidatePackage_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AppManager_GetAppStatistics_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_GetAppStatistics_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_GetAppStatistics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AppManager_DescribeApps_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_DescribeApps_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_DescribeApps_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AppManager_DescribeActiveApps_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_DescribeActiveApps_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_DescribeActiveApps_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_AppManager_ModifyApp_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_ModifyApp_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_ModifyApp_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_AppManager_UploadAppAttachment_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_UploadAppAttachment_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_UploadAppAttachment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_AppManager_DeleteApps_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_DeleteApps_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_DeleteApps_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_CreateAppVersion_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_CreateAppVersion_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_CreateAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AppManager_DescribeAppVersions_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_DescribeAppVersions_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_DescribeAppVersions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AppManager_DescribeActiveAppVersions_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_DescribeActiveAppVersions_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_DescribeActiveAppVersions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AppManager_DescribeAppVersionAudits_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_DescribeAppVersionAudits_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_DescribeAppVersionAudits_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AppManager_DescribeAppVersionReviews_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_DescribeAppVersionReviews_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_DescribeAppVersionReviews_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_AppManager_ModifyAppVersion_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_ModifyAppVersion_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_ModifyAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AppManager_GetAppVersionPackage_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_GetAppVersionPackage_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_GetAppVersionPackage_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AppManager_GetAppVersionPackageFiles_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_GetAppVersionPackageFiles_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_GetAppVersionPackageFiles_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_SubmitAppVersion_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_SubmitAppVersion_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_SubmitAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_CancelAppVersion_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_CancelAppVersion_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_CancelAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_ReleaseAppVersion_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_ReleaseAppVersion_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_ReleaseAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_DeleteAppVersion_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_DeleteAppVersion_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_DeleteAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_IsvReviewAppVersion_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_IsvReviewAppVersion_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_IsvReviewAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_IsvPassAppVersion_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_IsvPassAppVersion_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_IsvPassAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_IsvRejectAppVersion_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_IsvRejectAppVersion_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_IsvRejectAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_BusinessReviewAppVersion_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_BusinessReviewAppVersion_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_BusinessReviewAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_BusinessPassAppVersion_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_BusinessPassAppVersion_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_BusinessPassAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_BusinessRejectAppVersion_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_BusinessRejectAppVersion_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_BusinessRejectAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_TechnicalReviewAppVersion_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_TechnicalReviewAppVersion_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_TechnicalReviewAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_TechnicalPassAppVersion_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_TechnicalPassAppVersion_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_TechnicalPassAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_TechnicalRejectAppVersion_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_TechnicalRejectAppVersion_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_TechnicalRejectAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_AdminPassAppVersion_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_AdminPassAppVersion_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_AdminPassAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_AdminRejectAppVersion_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_AdminRejectAppVersion_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_AdminRejectAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_SuspendAppVersion_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_SuspendAppVersion_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_SuspendAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_RecoverAppVersion_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AppManager_RecoverAppVersion_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_RecoverAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterAppManagerHandlerFromEndpoint is same as RegisterAppManagerHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterAppManagerHandlerFromEndpoint(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 RegisterAppManagerHandler(ctx, mux, conn) -} - -// RegisterAppManagerHandler registers the http handlers for service AppManager to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterAppManagerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterAppManagerHandlerClient(ctx, mux, NewAppManagerClient(conn)) -} - -// RegisterAppManagerHandlerClient registers the http handlers for service AppManager -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AppManagerClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AppManagerClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "AppManagerClient" to call the correct interceptors. -func RegisterAppManagerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AppManagerClient) error { - - mux.Handle("POST", pattern_AppManager_CreateApp_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_AppManager_CreateApp_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_CreateApp_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_ValidatePackage_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_AppManager_ValidatePackage_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_ValidatePackage_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AppManager_GetAppStatistics_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_AppManager_GetAppStatistics_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_GetAppStatistics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AppManager_DescribeApps_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_AppManager_DescribeApps_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_DescribeApps_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AppManager_DescribeActiveApps_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_AppManager_DescribeActiveApps_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_DescribeActiveApps_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_AppManager_ModifyApp_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_AppManager_ModifyApp_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_ModifyApp_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_AppManager_UploadAppAttachment_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_AppManager_UploadAppAttachment_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_UploadAppAttachment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_AppManager_DeleteApps_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_AppManager_DeleteApps_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_DeleteApps_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_CreateAppVersion_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_AppManager_CreateAppVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_CreateAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AppManager_DescribeAppVersions_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_AppManager_DescribeAppVersions_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_DescribeAppVersions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AppManager_DescribeActiveAppVersions_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_AppManager_DescribeActiveAppVersions_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_DescribeActiveAppVersions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AppManager_DescribeAppVersionAudits_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_AppManager_DescribeAppVersionAudits_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_DescribeAppVersionAudits_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AppManager_DescribeAppVersionReviews_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_AppManager_DescribeAppVersionReviews_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_DescribeAppVersionReviews_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_AppManager_ModifyAppVersion_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_AppManager_ModifyAppVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_ModifyAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AppManager_GetAppVersionPackage_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_AppManager_GetAppVersionPackage_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_GetAppVersionPackage_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_AppManager_GetAppVersionPackageFiles_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_AppManager_GetAppVersionPackageFiles_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_GetAppVersionPackageFiles_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_SubmitAppVersion_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_AppManager_SubmitAppVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_SubmitAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_CancelAppVersion_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_AppManager_CancelAppVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_CancelAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_ReleaseAppVersion_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_AppManager_ReleaseAppVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_ReleaseAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_DeleteAppVersion_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_AppManager_DeleteAppVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_DeleteAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_IsvReviewAppVersion_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_AppManager_IsvReviewAppVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_IsvReviewAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_IsvPassAppVersion_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_AppManager_IsvPassAppVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_IsvPassAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_IsvRejectAppVersion_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_AppManager_IsvRejectAppVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_IsvRejectAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_BusinessReviewAppVersion_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_AppManager_BusinessReviewAppVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_BusinessReviewAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_BusinessPassAppVersion_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_AppManager_BusinessPassAppVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_BusinessPassAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_BusinessRejectAppVersion_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_AppManager_BusinessRejectAppVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_BusinessRejectAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_TechnicalReviewAppVersion_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_AppManager_TechnicalReviewAppVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_TechnicalReviewAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_TechnicalPassAppVersion_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_AppManager_TechnicalPassAppVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_TechnicalPassAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_TechnicalRejectAppVersion_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_AppManager_TechnicalRejectAppVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_TechnicalRejectAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_AdminPassAppVersion_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_AppManager_AdminPassAppVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_AdminPassAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_AdminRejectAppVersion_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_AppManager_AdminRejectAppVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_AdminRejectAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_SuspendAppVersion_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_AppManager_SuspendAppVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_SuspendAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_AppManager_RecoverAppVersion_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_AppManager_RecoverAppVersion_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AppManager_RecoverAppVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_AppManager_CreateApp_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "apps"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_ValidatePackage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "apps", "validate_package"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_GetAppStatistics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "apps", "statistics"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_DescribeApps_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "apps"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_DescribeActiveApps_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "active_apps"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_ModifyApp_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "apps"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_UploadAppAttachment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "app", "attachment"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_DeleteApps_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "apps"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_CreateAppVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "app_versions"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_DescribeAppVersions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "app_versions"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_DescribeActiveAppVersions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "active_app_versions"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_DescribeAppVersionAudits_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "app_version_audits"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_DescribeAppVersionReviews_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "app_version_reviews"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_ModifyAppVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "app_versions"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_GetAppVersionPackage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "app_version", "package"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_GetAppVersionPackageFiles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "app_version", "package", "files"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_SubmitAppVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "app_version", "action", "submit"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_CancelAppVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "app_version", "action", "cancel"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_ReleaseAppVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "app_version", "action", "release"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_DeleteAppVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "app_version", "action", "delete"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_IsvReviewAppVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "app_version", "action", "review", "isv"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_IsvPassAppVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "app_version", "action", "pass", "isv"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_IsvRejectAppVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "app_version", "action", "reject", "isv"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_BusinessReviewAppVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "app_version", "action", "review", "business"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_BusinessPassAppVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "app_version", "action", "pass", "business"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_BusinessRejectAppVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "app_version", "action", "reject", "business"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_TechnicalReviewAppVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "app_version", "action", "review", "technical"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_TechnicalPassAppVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "app_version", "action", "pass", "technical"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_TechnicalRejectAppVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "app_version", "action", "reject", "technical"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_AdminPassAppVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "app_version", "action", "pass", "admin"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_AdminRejectAppVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v1", "app_version", "action", "reject", "admin"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_SuspendAppVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "app_version", "action", "suspend"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_AppManager_RecoverAppVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "app_version", "action", "recover"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_AppManager_CreateApp_0 = runtime.ForwardResponseMessage - - forward_AppManager_ValidatePackage_0 = runtime.ForwardResponseMessage - - forward_AppManager_GetAppStatistics_0 = runtime.ForwardResponseMessage - - forward_AppManager_DescribeApps_0 = runtime.ForwardResponseMessage - - forward_AppManager_DescribeActiveApps_0 = runtime.ForwardResponseMessage - - forward_AppManager_ModifyApp_0 = runtime.ForwardResponseMessage - - forward_AppManager_UploadAppAttachment_0 = runtime.ForwardResponseMessage - - forward_AppManager_DeleteApps_0 = runtime.ForwardResponseMessage - - forward_AppManager_CreateAppVersion_0 = runtime.ForwardResponseMessage - - forward_AppManager_DescribeAppVersions_0 = runtime.ForwardResponseMessage - - forward_AppManager_DescribeActiveAppVersions_0 = runtime.ForwardResponseMessage - - forward_AppManager_DescribeAppVersionAudits_0 = runtime.ForwardResponseMessage - - forward_AppManager_DescribeAppVersionReviews_0 = runtime.ForwardResponseMessage - - forward_AppManager_ModifyAppVersion_0 = runtime.ForwardResponseMessage - - forward_AppManager_GetAppVersionPackage_0 = runtime.ForwardResponseMessage - - forward_AppManager_GetAppVersionPackageFiles_0 = runtime.ForwardResponseMessage - - forward_AppManager_SubmitAppVersion_0 = runtime.ForwardResponseMessage - - forward_AppManager_CancelAppVersion_0 = runtime.ForwardResponseMessage - - forward_AppManager_ReleaseAppVersion_0 = runtime.ForwardResponseMessage - - forward_AppManager_DeleteAppVersion_0 = runtime.ForwardResponseMessage - - forward_AppManager_IsvReviewAppVersion_0 = runtime.ForwardResponseMessage - - forward_AppManager_IsvPassAppVersion_0 = runtime.ForwardResponseMessage - - forward_AppManager_IsvRejectAppVersion_0 = runtime.ForwardResponseMessage - - forward_AppManager_BusinessReviewAppVersion_0 = runtime.ForwardResponseMessage - - forward_AppManager_BusinessPassAppVersion_0 = runtime.ForwardResponseMessage - - forward_AppManager_BusinessRejectAppVersion_0 = runtime.ForwardResponseMessage - - forward_AppManager_TechnicalReviewAppVersion_0 = runtime.ForwardResponseMessage - - forward_AppManager_TechnicalPassAppVersion_0 = runtime.ForwardResponseMessage - - forward_AppManager_TechnicalRejectAppVersion_0 = runtime.ForwardResponseMessage - - forward_AppManager_AdminPassAppVersion_0 = runtime.ForwardResponseMessage - - forward_AppManager_AdminRejectAppVersion_0 = runtime.ForwardResponseMessage - - forward_AppManager_SuspendAppVersion_0 = runtime.ForwardResponseMessage - - forward_AppManager_RecoverAppVersion_0 = runtime.ForwardResponseMessage -) diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/attachment.pb.go b/vendor/openpitrix.io/openpitrix/pkg/pb/attachment.pb.go deleted file mode 100644 index d159dffd3..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/attachment.pb.go +++ /dev/null @@ -1,1036 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: attachment.proto - -package pb - -import ( - context "context" - fmt "fmt" - math "math" - - proto "github.com/golang/protobuf/proto" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type GetAttachmentsRequest struct { - // required, attachment ids - AttachmentId []string `protobuf:"bytes,1,rep,name=attachment_id,json=attachmentId,proto3" json:"attachment_id,omitempty"` - // filename, attachment contain one more file - Filename []string `protobuf:"bytes,2,rep,name=filename,proto3" json:"filename,omitempty"` - // ignore the attachment file content, return the filenames directly - IgnoreContent bool `protobuf:"varint,3,opt,name=ignore_content,json=ignoreContent,proto3" json:"ignore_content,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetAttachmentsRequest) Reset() { *m = GetAttachmentsRequest{} } -func (m *GetAttachmentsRequest) String() string { return proto.CompactTextString(m) } -func (*GetAttachmentsRequest) ProtoMessage() {} -func (*GetAttachmentsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_50ce80bdd3ef17d6, []int{0} -} - -func (m *GetAttachmentsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetAttachmentsRequest.Unmarshal(m, b) -} -func (m *GetAttachmentsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetAttachmentsRequest.Marshal(b, m, deterministic) -} -func (m *GetAttachmentsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetAttachmentsRequest.Merge(m, src) -} -func (m *GetAttachmentsRequest) XXX_Size() int { - return xxx_messageInfo_GetAttachmentsRequest.Size(m) -} -func (m *GetAttachmentsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetAttachmentsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetAttachmentsRequest proto.InternalMessageInfo - -func (m *GetAttachmentsRequest) GetAttachmentId() []string { - if m != nil { - return m.AttachmentId - } - return nil -} - -func (m *GetAttachmentsRequest) GetFilename() []string { - if m != nil { - return m.Filename - } - return nil -} - -func (m *GetAttachmentsRequest) GetIgnoreContent() bool { - if m != nil { - return m.IgnoreContent - } - return false -} - -type GetAttachmentsResponse struct { - // attachment_id map to Attachment - Attachments map[string]*Attachment `protobuf:"bytes,1,rep,name=attachments,proto3" json:"attachments,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetAttachmentsResponse) Reset() { *m = GetAttachmentsResponse{} } -func (m *GetAttachmentsResponse) String() string { return proto.CompactTextString(m) } -func (*GetAttachmentsResponse) ProtoMessage() {} -func (*GetAttachmentsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_50ce80bdd3ef17d6, []int{1} -} - -func (m *GetAttachmentsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetAttachmentsResponse.Unmarshal(m, b) -} -func (m *GetAttachmentsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetAttachmentsResponse.Marshal(b, m, deterministic) -} -func (m *GetAttachmentsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetAttachmentsResponse.Merge(m, src) -} -func (m *GetAttachmentsResponse) XXX_Size() int { - return xxx_messageInfo_GetAttachmentsResponse.Size(m) -} -func (m *GetAttachmentsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetAttachmentsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetAttachmentsResponse proto.InternalMessageInfo - -func (m *GetAttachmentsResponse) GetAttachments() map[string]*Attachment { - if m != nil { - return m.Attachments - } - return nil -} - -type Attachment struct { - // attachment id - AttachmentId string `protobuf:"bytes,1,opt,name=attachment_id,json=attachmentId,proto3" json:"attachment_id,omitempty"` - // filename map to content - AttachmentContent map[string][]byte `protobuf:"bytes,2,rep,name=attachment_content,json=attachmentContent,proto3" json:"attachment_content,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // the time attachment create - CreateTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Attachment) Reset() { *m = Attachment{} } -func (m *Attachment) String() string { return proto.CompactTextString(m) } -func (*Attachment) ProtoMessage() {} -func (*Attachment) Descriptor() ([]byte, []int) { - return fileDescriptor_50ce80bdd3ef17d6, []int{2} -} - -func (m *Attachment) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Attachment.Unmarshal(m, b) -} -func (m *Attachment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Attachment.Marshal(b, m, deterministic) -} -func (m *Attachment) XXX_Merge(src proto.Message) { - xxx_messageInfo_Attachment.Merge(m, src) -} -func (m *Attachment) XXX_Size() int { - return xxx_messageInfo_Attachment.Size(m) -} -func (m *Attachment) XXX_DiscardUnknown() { - xxx_messageInfo_Attachment.DiscardUnknown(m) -} - -var xxx_messageInfo_Attachment proto.InternalMessageInfo - -func (m *Attachment) GetAttachmentId() string { - if m != nil { - return m.AttachmentId - } - return "" -} - -func (m *Attachment) GetAttachmentContent() map[string][]byte { - if m != nil { - return m.AttachmentContent - } - return nil -} - -func (m *Attachment) GetCreateTime() *timestamp.Timestamp { - if m != nil { - return m.CreateTime - } - return nil -} - -type CreateAttachmentRequest struct { - // required, filename map to content - AttachmentContent map[string][]byte `protobuf:"bytes,1,rep,name=attachment_content,json=attachmentContent,proto3" json:"attachment_content,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateAttachmentRequest) Reset() { *m = CreateAttachmentRequest{} } -func (m *CreateAttachmentRequest) String() string { return proto.CompactTextString(m) } -func (*CreateAttachmentRequest) ProtoMessage() {} -func (*CreateAttachmentRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_50ce80bdd3ef17d6, []int{3} -} - -func (m *CreateAttachmentRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateAttachmentRequest.Unmarshal(m, b) -} -func (m *CreateAttachmentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateAttachmentRequest.Marshal(b, m, deterministic) -} -func (m *CreateAttachmentRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateAttachmentRequest.Merge(m, src) -} -func (m *CreateAttachmentRequest) XXX_Size() int { - return xxx_messageInfo_CreateAttachmentRequest.Size(m) -} -func (m *CreateAttachmentRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateAttachmentRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateAttachmentRequest proto.InternalMessageInfo - -func (m *CreateAttachmentRequest) GetAttachmentContent() map[string][]byte { - if m != nil { - return m.AttachmentContent - } - return nil -} - -type CreateAttachmentResponse struct { - // attachment id - AttachmentId string `protobuf:"bytes,1,opt,name=attachment_id,json=attachmentId,proto3" json:"attachment_id,omitempty"` - // file name - Filename []string `protobuf:"bytes,2,rep,name=filename,proto3" json:"filename,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateAttachmentResponse) Reset() { *m = CreateAttachmentResponse{} } -func (m *CreateAttachmentResponse) String() string { return proto.CompactTextString(m) } -func (*CreateAttachmentResponse) ProtoMessage() {} -func (*CreateAttachmentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_50ce80bdd3ef17d6, []int{4} -} - -func (m *CreateAttachmentResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateAttachmentResponse.Unmarshal(m, b) -} -func (m *CreateAttachmentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateAttachmentResponse.Marshal(b, m, deterministic) -} -func (m *CreateAttachmentResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateAttachmentResponse.Merge(m, src) -} -func (m *CreateAttachmentResponse) XXX_Size() int { - return xxx_messageInfo_CreateAttachmentResponse.Size(m) -} -func (m *CreateAttachmentResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CreateAttachmentResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateAttachmentResponse proto.InternalMessageInfo - -func (m *CreateAttachmentResponse) GetAttachmentId() string { - if m != nil { - return m.AttachmentId - } - return "" -} - -func (m *CreateAttachmentResponse) GetFilename() []string { - if m != nil { - return m.Filename - } - return nil -} - -type AppendAttachmentRequest struct { - // required, attachment id - AttachmentId string `protobuf:"bytes,1,opt,name=attachment_id,json=attachmentId,proto3" json:"attachment_id,omitempty"` - // filename map to content - AttachmentContent map[string][]byte `protobuf:"bytes,2,rep,name=attachment_content,json=attachmentContent,proto3" json:"attachment_content,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AppendAttachmentRequest) Reset() { *m = AppendAttachmentRequest{} } -func (m *AppendAttachmentRequest) String() string { return proto.CompactTextString(m) } -func (*AppendAttachmentRequest) ProtoMessage() {} -func (*AppendAttachmentRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_50ce80bdd3ef17d6, []int{5} -} - -func (m *AppendAttachmentRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AppendAttachmentRequest.Unmarshal(m, b) -} -func (m *AppendAttachmentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AppendAttachmentRequest.Marshal(b, m, deterministic) -} -func (m *AppendAttachmentRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AppendAttachmentRequest.Merge(m, src) -} -func (m *AppendAttachmentRequest) XXX_Size() int { - return xxx_messageInfo_AppendAttachmentRequest.Size(m) -} -func (m *AppendAttachmentRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AppendAttachmentRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AppendAttachmentRequest proto.InternalMessageInfo - -func (m *AppendAttachmentRequest) GetAttachmentId() string { - if m != nil { - return m.AttachmentId - } - return "" -} - -func (m *AppendAttachmentRequest) GetAttachmentContent() map[string][]byte { - if m != nil { - return m.AttachmentContent - } - return nil -} - -type AppendAttachmentResponse struct { - // attachment id - AttachmentId string `protobuf:"bytes,1,opt,name=attachment_id,json=attachmentId,proto3" json:"attachment_id,omitempty"` - // filename, attachment contain one more file - Filename []string `protobuf:"bytes,2,rep,name=filename,proto3" json:"filename,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AppendAttachmentResponse) Reset() { *m = AppendAttachmentResponse{} } -func (m *AppendAttachmentResponse) String() string { return proto.CompactTextString(m) } -func (*AppendAttachmentResponse) ProtoMessage() {} -func (*AppendAttachmentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_50ce80bdd3ef17d6, []int{6} -} - -func (m *AppendAttachmentResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AppendAttachmentResponse.Unmarshal(m, b) -} -func (m *AppendAttachmentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AppendAttachmentResponse.Marshal(b, m, deterministic) -} -func (m *AppendAttachmentResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AppendAttachmentResponse.Merge(m, src) -} -func (m *AppendAttachmentResponse) XXX_Size() int { - return xxx_messageInfo_AppendAttachmentResponse.Size(m) -} -func (m *AppendAttachmentResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AppendAttachmentResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AppendAttachmentResponse proto.InternalMessageInfo - -func (m *AppendAttachmentResponse) GetAttachmentId() string { - if m != nil { - return m.AttachmentId - } - return "" -} - -func (m *AppendAttachmentResponse) GetFilename() []string { - if m != nil { - return m.Filename - } - return nil -} - -type ReplaceAttachmentRequest struct { - // required, id of attachment to replace - AttachmentId string `protobuf:"bytes,1,opt,name=attachment_id,json=attachmentId,proto3" json:"attachment_id,omitempty"` - // filename map to content - AttachmentContent map[string][]byte `protobuf:"bytes,2,rep,name=attachment_content,json=attachmentContent,proto3" json:"attachment_content,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ReplaceAttachmentRequest) Reset() { *m = ReplaceAttachmentRequest{} } -func (m *ReplaceAttachmentRequest) String() string { return proto.CompactTextString(m) } -func (*ReplaceAttachmentRequest) ProtoMessage() {} -func (*ReplaceAttachmentRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_50ce80bdd3ef17d6, []int{7} -} - -func (m *ReplaceAttachmentRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ReplaceAttachmentRequest.Unmarshal(m, b) -} -func (m *ReplaceAttachmentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ReplaceAttachmentRequest.Marshal(b, m, deterministic) -} -func (m *ReplaceAttachmentRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplaceAttachmentRequest.Merge(m, src) -} -func (m *ReplaceAttachmentRequest) XXX_Size() int { - return xxx_messageInfo_ReplaceAttachmentRequest.Size(m) -} -func (m *ReplaceAttachmentRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ReplaceAttachmentRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ReplaceAttachmentRequest proto.InternalMessageInfo - -func (m *ReplaceAttachmentRequest) GetAttachmentId() string { - if m != nil { - return m.AttachmentId - } - return "" -} - -func (m *ReplaceAttachmentRequest) GetAttachmentContent() map[string][]byte { - if m != nil { - return m.AttachmentContent - } - return nil -} - -type ReplaceAttachmentResponse struct { - // id of attachment replaced - AttachmentId string `protobuf:"bytes,1,opt,name=attachment_id,json=attachmentId,proto3" json:"attachment_id,omitempty"` - // filename, attachment contain one more file - Filename []string `protobuf:"bytes,2,rep,name=filename,proto3" json:"filename,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ReplaceAttachmentResponse) Reset() { *m = ReplaceAttachmentResponse{} } -func (m *ReplaceAttachmentResponse) String() string { return proto.CompactTextString(m) } -func (*ReplaceAttachmentResponse) ProtoMessage() {} -func (*ReplaceAttachmentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_50ce80bdd3ef17d6, []int{8} -} - -func (m *ReplaceAttachmentResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ReplaceAttachmentResponse.Unmarshal(m, b) -} -func (m *ReplaceAttachmentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ReplaceAttachmentResponse.Marshal(b, m, deterministic) -} -func (m *ReplaceAttachmentResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplaceAttachmentResponse.Merge(m, src) -} -func (m *ReplaceAttachmentResponse) XXX_Size() int { - return xxx_messageInfo_ReplaceAttachmentResponse.Size(m) -} -func (m *ReplaceAttachmentResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ReplaceAttachmentResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ReplaceAttachmentResponse proto.InternalMessageInfo - -func (m *ReplaceAttachmentResponse) GetAttachmentId() string { - if m != nil { - return m.AttachmentId - } - return "" -} - -func (m *ReplaceAttachmentResponse) GetFilename() []string { - if m != nil { - return m.Filename - } - return nil -} - -type DeleteAttachmentsRequest struct { - // required, ids of attachment to delete - AttachmentId []string `protobuf:"bytes,1,rep,name=attachment_id,json=attachmentId,proto3" json:"attachment_id,omitempty"` - // filename, attachment contain one more file - Filename []string `protobuf:"bytes,2,rep,name=filename,proto3" json:"filename,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteAttachmentsRequest) Reset() { *m = DeleteAttachmentsRequest{} } -func (m *DeleteAttachmentsRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteAttachmentsRequest) ProtoMessage() {} -func (*DeleteAttachmentsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_50ce80bdd3ef17d6, []int{9} -} - -func (m *DeleteAttachmentsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteAttachmentsRequest.Unmarshal(m, b) -} -func (m *DeleteAttachmentsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteAttachmentsRequest.Marshal(b, m, deterministic) -} -func (m *DeleteAttachmentsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteAttachmentsRequest.Merge(m, src) -} -func (m *DeleteAttachmentsRequest) XXX_Size() int { - return xxx_messageInfo_DeleteAttachmentsRequest.Size(m) -} -func (m *DeleteAttachmentsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteAttachmentsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteAttachmentsRequest proto.InternalMessageInfo - -func (m *DeleteAttachmentsRequest) GetAttachmentId() []string { - if m != nil { - return m.AttachmentId - } - return nil -} - -func (m *DeleteAttachmentsRequest) GetFilename() []string { - if m != nil { - return m.Filename - } - return nil -} - -type DeleteAttachmentsResponse struct { - // ids of attachment deleted - AttachmentId []string `protobuf:"bytes,1,rep,name=attachment_id,json=attachmentId,proto3" json:"attachment_id,omitempty"` - // filename, attachment contain one more file - Filename []string `protobuf:"bytes,2,rep,name=filename,proto3" json:"filename,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteAttachmentsResponse) Reset() { *m = DeleteAttachmentsResponse{} } -func (m *DeleteAttachmentsResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteAttachmentsResponse) ProtoMessage() {} -func (*DeleteAttachmentsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_50ce80bdd3ef17d6, []int{10} -} - -func (m *DeleteAttachmentsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteAttachmentsResponse.Unmarshal(m, b) -} -func (m *DeleteAttachmentsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteAttachmentsResponse.Marshal(b, m, deterministic) -} -func (m *DeleteAttachmentsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteAttachmentsResponse.Merge(m, src) -} -func (m *DeleteAttachmentsResponse) XXX_Size() int { - return xxx_messageInfo_DeleteAttachmentsResponse.Size(m) -} -func (m *DeleteAttachmentsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteAttachmentsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteAttachmentsResponse proto.InternalMessageInfo - -func (m *DeleteAttachmentsResponse) GetAttachmentId() []string { - if m != nil { - return m.AttachmentId - } - return nil -} - -func (m *DeleteAttachmentsResponse) GetFilename() []string { - if m != nil { - return m.Filename - } - return nil -} - -type GetAttachmentRequest struct { - // required, use attachment id to get attachment - AttachmentId string `protobuf:"bytes,1,opt,name=attachment_id,json=attachmentId,proto3" json:"attachment_id,omitempty"` - // filename, attachment contain one more file - Filename string `protobuf:"bytes,2,opt,name=filename,proto3" json:"filename,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetAttachmentRequest) Reset() { *m = GetAttachmentRequest{} } -func (m *GetAttachmentRequest) String() string { return proto.CompactTextString(m) } -func (*GetAttachmentRequest) ProtoMessage() {} -func (*GetAttachmentRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_50ce80bdd3ef17d6, []int{11} -} - -func (m *GetAttachmentRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetAttachmentRequest.Unmarshal(m, b) -} -func (m *GetAttachmentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetAttachmentRequest.Marshal(b, m, deterministic) -} -func (m *GetAttachmentRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetAttachmentRequest.Merge(m, src) -} -func (m *GetAttachmentRequest) XXX_Size() int { - return xxx_messageInfo_GetAttachmentRequest.Size(m) -} -func (m *GetAttachmentRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetAttachmentRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetAttachmentRequest proto.InternalMessageInfo - -func (m *GetAttachmentRequest) GetAttachmentId() string { - if m != nil { - return m.AttachmentId - } - return "" -} - -func (m *GetAttachmentRequest) GetFilename() string { - if m != nil { - return m.Filename - } - return "" -} - -type GetAttachmentResponse struct { - // file content of attachment - Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` - // tell server to pack file - Etag string `protobuf:"bytes,2,opt,name=etag,proto3" json:"etag,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetAttachmentResponse) Reset() { *m = GetAttachmentResponse{} } -func (m *GetAttachmentResponse) String() string { return proto.CompactTextString(m) } -func (*GetAttachmentResponse) ProtoMessage() {} -func (*GetAttachmentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_50ce80bdd3ef17d6, []int{12} -} - -func (m *GetAttachmentResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetAttachmentResponse.Unmarshal(m, b) -} -func (m *GetAttachmentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetAttachmentResponse.Marshal(b, m, deterministic) -} -func (m *GetAttachmentResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetAttachmentResponse.Merge(m, src) -} -func (m *GetAttachmentResponse) XXX_Size() int { - return xxx_messageInfo_GetAttachmentResponse.Size(m) -} -func (m *GetAttachmentResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetAttachmentResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetAttachmentResponse proto.InternalMessageInfo - -func (m *GetAttachmentResponse) GetContent() []byte { - if m != nil { - return m.Content - } - return nil -} - -func (m *GetAttachmentResponse) GetEtag() string { - if m != nil { - return m.Etag - } - return "" -} - -func init() { - proto.RegisterType((*GetAttachmentsRequest)(nil), "openpitrix.GetAttachmentsRequest") - proto.RegisterType((*GetAttachmentsResponse)(nil), "openpitrix.GetAttachmentsResponse") - proto.RegisterMapType((map[string]*Attachment)(nil), "openpitrix.GetAttachmentsResponse.AttachmentsEntry") - proto.RegisterType((*Attachment)(nil), "openpitrix.Attachment") - proto.RegisterMapType((map[string][]byte)(nil), "openpitrix.Attachment.AttachmentContentEntry") - proto.RegisterType((*CreateAttachmentRequest)(nil), "openpitrix.CreateAttachmentRequest") - proto.RegisterMapType((map[string][]byte)(nil), "openpitrix.CreateAttachmentRequest.AttachmentContentEntry") - proto.RegisterType((*CreateAttachmentResponse)(nil), "openpitrix.CreateAttachmentResponse") - proto.RegisterType((*AppendAttachmentRequest)(nil), "openpitrix.AppendAttachmentRequest") - proto.RegisterMapType((map[string][]byte)(nil), "openpitrix.AppendAttachmentRequest.AttachmentContentEntry") - proto.RegisterType((*AppendAttachmentResponse)(nil), "openpitrix.AppendAttachmentResponse") - proto.RegisterType((*ReplaceAttachmentRequest)(nil), "openpitrix.ReplaceAttachmentRequest") - proto.RegisterMapType((map[string][]byte)(nil), "openpitrix.ReplaceAttachmentRequest.AttachmentContentEntry") - proto.RegisterType((*ReplaceAttachmentResponse)(nil), "openpitrix.ReplaceAttachmentResponse") - proto.RegisterType((*DeleteAttachmentsRequest)(nil), "openpitrix.DeleteAttachmentsRequest") - proto.RegisterType((*DeleteAttachmentsResponse)(nil), "openpitrix.DeleteAttachmentsResponse") - proto.RegisterType((*GetAttachmentRequest)(nil), "openpitrix.GetAttachmentRequest") - proto.RegisterType((*GetAttachmentResponse)(nil), "openpitrix.GetAttachmentResponse") -} - -func init() { proto.RegisterFile("attachment.proto", fileDescriptor_50ce80bdd3ef17d6) } - -var fileDescriptor_50ce80bdd3ef17d6 = []byte{ - // 720 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xdf, 0x4e, 0x13, 0x4f, - 0x18, 0xcd, 0xb4, 0xfc, 0x7e, 0xc2, 0x57, 0xc0, 0x76, 0x82, 0xb0, 0x6e, 0x4c, 0x5c, 0x0a, 0x24, - 0xbd, 0x80, 0x6d, 0x2c, 0x31, 0x31, 0x70, 0x85, 0x40, 0x88, 0x17, 0xc6, 0x64, 0xfd, 0x43, 0x22, - 0x10, 0x1c, 0xda, 0x8f, 0x75, 0xb5, 0x9d, 0x5d, 0x77, 0xa7, 0x28, 0x57, 0x26, 0x3e, 0x02, 0x3e, - 0x83, 0x4f, 0xe1, 0x03, 0x98, 0x78, 0xeb, 0x2b, 0x78, 0xad, 0xf1, 0x0d, 0xcc, 0xfe, 0x69, 0x77, - 0xb6, 0xbb, 0x5b, 0x8a, 0x69, 0xf4, 0xaa, 0xbb, 0x33, 0xa7, 0xe7, 0x3b, 0xdf, 0x99, 0x33, 0xb3, - 0x03, 0x65, 0x26, 0x04, 0x6b, 0xbe, 0xec, 0x20, 0x17, 0xba, 0xe3, 0xda, 0xc2, 0xa6, 0x60, 0x3b, - 0xc8, 0x1d, 0x4b, 0xb8, 0xd6, 0x3b, 0xf5, 0xb6, 0x69, 0xdb, 0x66, 0x1b, 0xeb, 0xc1, 0xcc, 0x49, - 0xf7, 0xb4, 0x2e, 0xac, 0x0e, 0x7a, 0x82, 0x75, 0x9c, 0x10, 0xac, 0xde, 0x8a, 0x00, 0xcc, 0xb1, - 0xea, 0x8c, 0x73, 0x5b, 0x30, 0x61, 0xd9, 0xdc, 0x8b, 0x66, 0x57, 0x83, 0x9f, 0xe6, 0x9a, 0x89, - 0x7c, 0xcd, 0x7b, 0xcb, 0x4c, 0x13, 0xdd, 0xba, 0xed, 0x04, 0x88, 0x34, 0xba, 0xfa, 0x1e, 0x6e, - 0xec, 0xa1, 0xd8, 0xea, 0xeb, 0xf1, 0x0c, 0x7c, 0xd3, 0x45, 0x4f, 0xd0, 0x25, 0x98, 0x89, 0x55, - 0x1e, 0x5b, 0x2d, 0x85, 0x68, 0xc5, 0xda, 0x94, 0x31, 0x1d, 0x0f, 0x3e, 0x68, 0x51, 0x15, 0x26, - 0x4f, 0xad, 0x36, 0x72, 0xd6, 0x41, 0xa5, 0x10, 0xcc, 0xf7, 0xdf, 0xe9, 0x0a, 0xcc, 0x5a, 0x26, - 0xb7, 0x5d, 0x3c, 0x6e, 0xda, 0x5c, 0x20, 0x17, 0x4a, 0x51, 0x23, 0xb5, 0x49, 0x63, 0x26, 0x1c, - 0xdd, 0x0e, 0x07, 0xab, 0x5f, 0x08, 0xcc, 0x0f, 0x2a, 0xf0, 0x1c, 0x9b, 0x7b, 0x48, 0x9f, 0x42, - 0x29, 0xae, 0xe6, 0x05, 0x02, 0x4a, 0x8d, 0x75, 0x3d, 0xb6, 0x4a, 0xcf, 0xfe, 0xa3, 0x2e, 0x8d, - 0xed, 0x72, 0xe1, 0x9e, 0x1b, 0x32, 0x8f, 0xfa, 0x0c, 0xca, 0x83, 0x00, 0x5a, 0x86, 0xe2, 0x6b, - 0x3c, 0x57, 0x88, 0x46, 0x6a, 0x53, 0x86, 0xff, 0x48, 0x57, 0xe1, 0xbf, 0x33, 0xd6, 0xee, 0xfa, - 0x7d, 0x91, 0x5a, 0xa9, 0x31, 0x2f, 0x97, 0x8d, 0xff, 0x6e, 0x84, 0xa0, 0x8d, 0xc2, 0x3d, 0x52, - 0xbd, 0x28, 0x00, 0xc4, 0x33, 0x59, 0x06, 0x92, 0x94, 0x81, 0x87, 0x40, 0x25, 0x50, 0xcf, 0xa8, - 0x42, 0xd0, 0xe9, 0x5a, 0x76, 0x49, 0xe9, 0x31, 0xf2, 0x30, 0xec, 0xb1, 0xc2, 0x06, 0xc7, 0xe9, - 0x26, 0x94, 0x9a, 0x2e, 0x32, 0x81, 0xc7, 0x7e, 0x84, 0x02, 0xff, 0x4b, 0x0d, 0x55, 0x0f, 0xe3, - 0xa3, 0xf7, 0xf2, 0xa5, 0x3f, 0xe9, 0xe5, 0xcb, 0x80, 0x10, 0xee, 0x0f, 0xa8, 0x3b, 0x30, 0x9f, - 0x5d, 0x29, 0xc3, 0xac, 0x39, 0xd9, 0xac, 0x69, 0xd9, 0x94, 0xaf, 0x04, 0x16, 0xb6, 0x03, 0x52, - 0xc9, 0xb4, 0x28, 0x62, 0x56, 0x66, 0xf3, 0xe1, 0x32, 0x6f, 0xc8, 0xcd, 0xe7, 0x10, 0x8c, 0xee, - 0xc4, 0x98, 0x9a, 0x39, 0x00, 0x25, 0x2d, 0x25, 0x0a, 0xeb, 0x48, 0xcb, 0x3d, 0x64, 0xbf, 0x54, - 0x7f, 0x12, 0x58, 0xd8, 0x72, 0x1c, 0xe4, 0xad, 0xb4, 0x53, 0x23, 0x91, 0x5b, 0x43, 0xb2, 0x94, - 0xb0, 0x33, 0xa7, 0xca, 0xbf, 0xb0, 0x33, 0x2d, 0x65, 0x5c, 0x76, 0xfe, 0x22, 0xa0, 0x18, 0xe8, - 0xb4, 0x59, 0x13, 0xff, 0xd0, 0xcf, 0x57, 0x43, 0xfc, 0xdc, 0x94, 0xfd, 0xcc, 0x2b, 0xf3, 0xd7, - 0x0d, 0x3d, 0x84, 0x9b, 0x19, 0x5a, 0xc6, 0xe5, 0xe8, 0x01, 0x28, 0x3b, 0xd8, 0x46, 0x39, 0xfd, - 0x63, 0xfb, 0x5a, 0xf8, 0xd2, 0x33, 0xc8, 0xf3, 0xa5, 0x5f, 0x8d, 0x7d, 0x1f, 0xe6, 0x12, 0x9f, - 0x8a, 0x2b, 0xe5, 0x20, 0x49, 0x4c, 0x12, 0xc4, 0xbb, 0x03, 0x9f, 0xcf, 0xbe, 0x64, 0x05, 0xae, - 0xc5, 0x07, 0x9a, 0xbf, 0x4c, 0xbd, 0x57, 0x4a, 0x61, 0x02, 0x05, 0x33, 0x23, 0xaa, 0xe0, 0xb9, - 0xf1, 0xa3, 0x08, 0x95, 0x98, 0xe4, 0x21, 0xe3, 0xcc, 0x44, 0x97, 0x1e, 0x41, 0x79, 0xf0, 0xb8, - 0xa1, 0x4b, 0x23, 0x9c, 0x8b, 0xea, 0xf2, 0x70, 0x50, 0x24, 0xf1, 0x08, 0xca, 0x83, 0xdb, 0x2f, - 0x49, 0x9f, 0x73, 0x4e, 0x24, 0xe9, 0x73, 0x77, 0xf0, 0x0b, 0xa8, 0xa4, 0xc2, 0x48, 0x97, 0x47, - 0xd9, 0x37, 0xea, 0xca, 0x25, 0xa8, 0xa8, 0xc2, 0x3e, 0xcc, 0x26, 0x2f, 0x00, 0x74, 0x71, 0xd8, - 0xe5, 0x20, 0xe4, 0xae, 0x5e, 0x7e, 0x7f, 0xf0, 0xa5, 0xa7, 0xc2, 0x98, 0x94, 0x9e, 0xb7, 0x11, - 0x92, 0xd2, 0x73, 0x13, 0xdd, 0xf8, 0x4c, 0xe4, 0x05, 0x7f, 0x8c, 0xee, 0x99, 0xd5, 0x44, 0xfa, - 0x89, 0xc0, 0x4c, 0x42, 0x12, 0xd5, 0x72, 0xd5, 0xf6, 0x0a, 0x2e, 0x0e, 0x41, 0x84, 0xc5, 0xaa, - 0x8f, 0x2e, 0xb6, 0xee, 0xd2, 0xf5, 0x3d, 0x14, 0x5a, 0x9c, 0xeb, 0x55, 0xad, 0xeb, 0xa1, 0xf4, - 0xae, 0x59, 0x2d, 0x4d, 0xd8, 0x9a, 0x99, 0x00, 0x7d, 0xf8, 0xf6, 0xfd, 0x63, 0xa1, 0x42, 0xaf, - 0xd7, 0xcf, 0xee, 0xd4, 0xa5, 0x1b, 0xd4, 0xfd, 0x89, 0xe7, 0x05, 0xe7, 0xe4, 0xe4, 0xff, 0xe0, - 0x02, 0xb1, 0xfe, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xe8, 0x86, 0x4c, 0xd3, 0xce, 0x0a, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// AttachmentManagerClient is the client API for AttachmentManager service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type AttachmentManagerClient interface { - CreateAttachment(ctx context.Context, in *CreateAttachmentRequest, opts ...grpc.CallOption) (*CreateAttachmentResponse, error) - AppendAttachment(ctx context.Context, in *AppendAttachmentRequest, opts ...grpc.CallOption) (*AppendAttachmentResponse, error) - ReplaceAttachment(ctx context.Context, in *ReplaceAttachmentRequest, opts ...grpc.CallOption) (*ReplaceAttachmentResponse, error) - GetAttachments(ctx context.Context, in *GetAttachmentsRequest, opts ...grpc.CallOption) (*GetAttachmentsResponse, error) - DeleteAttachments(ctx context.Context, in *DeleteAttachmentsRequest, opts ...grpc.CallOption) (*DeleteAttachmentsResponse, error) -} - -type attachmentManagerClient struct { - cc *grpc.ClientConn -} - -func NewAttachmentManagerClient(cc *grpc.ClientConn) AttachmentManagerClient { - return &attachmentManagerClient{cc} -} - -func (c *attachmentManagerClient) CreateAttachment(ctx context.Context, in *CreateAttachmentRequest, opts ...grpc.CallOption) (*CreateAttachmentResponse, error) { - out := new(CreateAttachmentResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AttachmentManager/CreateAttachment", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *attachmentManagerClient) AppendAttachment(ctx context.Context, in *AppendAttachmentRequest, opts ...grpc.CallOption) (*AppendAttachmentResponse, error) { - out := new(AppendAttachmentResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AttachmentManager/AppendAttachment", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *attachmentManagerClient) ReplaceAttachment(ctx context.Context, in *ReplaceAttachmentRequest, opts ...grpc.CallOption) (*ReplaceAttachmentResponse, error) { - out := new(ReplaceAttachmentResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AttachmentManager/ReplaceAttachment", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *attachmentManagerClient) GetAttachments(ctx context.Context, in *GetAttachmentsRequest, opts ...grpc.CallOption) (*GetAttachmentsResponse, error) { - out := new(GetAttachmentsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AttachmentManager/GetAttachments", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *attachmentManagerClient) DeleteAttachments(ctx context.Context, in *DeleteAttachmentsRequest, opts ...grpc.CallOption) (*DeleteAttachmentsResponse, error) { - out := new(DeleteAttachmentsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AttachmentManager/DeleteAttachments", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// AttachmentManagerServer is the server API for AttachmentManager service. -type AttachmentManagerServer interface { - CreateAttachment(context.Context, *CreateAttachmentRequest) (*CreateAttachmentResponse, error) - AppendAttachment(context.Context, *AppendAttachmentRequest) (*AppendAttachmentResponse, error) - ReplaceAttachment(context.Context, *ReplaceAttachmentRequest) (*ReplaceAttachmentResponse, error) - GetAttachments(context.Context, *GetAttachmentsRequest) (*GetAttachmentsResponse, error) - DeleteAttachments(context.Context, *DeleteAttachmentsRequest) (*DeleteAttachmentsResponse, error) -} - -// UnimplementedAttachmentManagerServer can be embedded to have forward compatible implementations. -type UnimplementedAttachmentManagerServer struct { -} - -func (*UnimplementedAttachmentManagerServer) CreateAttachment(ctx context.Context, req *CreateAttachmentRequest) (*CreateAttachmentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateAttachment not implemented") -} -func (*UnimplementedAttachmentManagerServer) AppendAttachment(ctx context.Context, req *AppendAttachmentRequest) (*AppendAttachmentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AppendAttachment not implemented") -} -func (*UnimplementedAttachmentManagerServer) ReplaceAttachment(ctx context.Context, req *ReplaceAttachmentRequest) (*ReplaceAttachmentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ReplaceAttachment not implemented") -} -func (*UnimplementedAttachmentManagerServer) GetAttachments(ctx context.Context, req *GetAttachmentsRequest) (*GetAttachmentsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAttachments not implemented") -} -func (*UnimplementedAttachmentManagerServer) DeleteAttachments(ctx context.Context, req *DeleteAttachmentsRequest) (*DeleteAttachmentsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteAttachments not implemented") -} - -func RegisterAttachmentManagerServer(s *grpc.Server, srv AttachmentManagerServer) { - s.RegisterService(&_AttachmentManager_serviceDesc, srv) -} - -func _AttachmentManager_CreateAttachment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateAttachmentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AttachmentManagerServer).CreateAttachment(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AttachmentManager/CreateAttachment", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AttachmentManagerServer).CreateAttachment(ctx, req.(*CreateAttachmentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AttachmentManager_AppendAttachment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AppendAttachmentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AttachmentManagerServer).AppendAttachment(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AttachmentManager/AppendAttachment", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AttachmentManagerServer).AppendAttachment(ctx, req.(*AppendAttachmentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AttachmentManager_ReplaceAttachment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReplaceAttachmentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AttachmentManagerServer).ReplaceAttachment(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AttachmentManager/ReplaceAttachment", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AttachmentManagerServer).ReplaceAttachment(ctx, req.(*ReplaceAttachmentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AttachmentManager_GetAttachments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAttachmentsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AttachmentManagerServer).GetAttachments(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AttachmentManager/GetAttachments", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AttachmentManagerServer).GetAttachments(ctx, req.(*GetAttachmentsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _AttachmentManager_DeleteAttachments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteAttachmentsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AttachmentManagerServer).DeleteAttachments(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AttachmentManager/DeleteAttachments", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AttachmentManagerServer).DeleteAttachments(ctx, req.(*DeleteAttachmentsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _AttachmentManager_serviceDesc = grpc.ServiceDesc{ - ServiceName: "openpitrix.AttachmentManager", - HandlerType: (*AttachmentManagerServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateAttachment", - Handler: _AttachmentManager_CreateAttachment_Handler, - }, - { - MethodName: "AppendAttachment", - Handler: _AttachmentManager_AppendAttachment_Handler, - }, - { - MethodName: "ReplaceAttachment", - Handler: _AttachmentManager_ReplaceAttachment_Handler, - }, - { - MethodName: "GetAttachments", - Handler: _AttachmentManager_GetAttachments_Handler, - }, - { - MethodName: "DeleteAttachments", - Handler: _AttachmentManager_DeleteAttachments_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "attachment.proto", -} - -// AttachmentServiceClient is the client API for AttachmentService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type AttachmentServiceClient interface { - // Get attachment, use attachment id to get attachment - GetAttachment(ctx context.Context, in *GetAttachmentRequest, opts ...grpc.CallOption) (*GetAttachmentResponse, error) -} - -type attachmentServiceClient struct { - cc *grpc.ClientConn -} - -func NewAttachmentServiceClient(cc *grpc.ClientConn) AttachmentServiceClient { - return &attachmentServiceClient{cc} -} - -func (c *attachmentServiceClient) GetAttachment(ctx context.Context, in *GetAttachmentRequest, opts ...grpc.CallOption) (*GetAttachmentResponse, error) { - out := new(GetAttachmentResponse) - err := c.cc.Invoke(ctx, "/openpitrix.AttachmentService/GetAttachment", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// AttachmentServiceServer is the server API for AttachmentService service. -type AttachmentServiceServer interface { - // Get attachment, use attachment id to get attachment - GetAttachment(context.Context, *GetAttachmentRequest) (*GetAttachmentResponse, error) -} - -// UnimplementedAttachmentServiceServer can be embedded to have forward compatible implementations. -type UnimplementedAttachmentServiceServer struct { -} - -func (*UnimplementedAttachmentServiceServer) GetAttachment(ctx context.Context, req *GetAttachmentRequest) (*GetAttachmentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAttachment not implemented") -} - -func RegisterAttachmentServiceServer(s *grpc.Server, srv AttachmentServiceServer) { - s.RegisterService(&_AttachmentService_serviceDesc, srv) -} - -func _AttachmentService_GetAttachment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAttachmentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AttachmentServiceServer).GetAttachment(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.AttachmentService/GetAttachment", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AttachmentServiceServer).GetAttachment(ctx, req.(*GetAttachmentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _AttachmentService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "openpitrix.AttachmentService", - HandlerType: (*AttachmentServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetAttachment", - Handler: _AttachmentService_GetAttachment_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "attachment.proto", -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/attachment.pb.gw.go b/vendor/openpitrix.io/openpitrix/pkg/pb/attachment.pb.gw.go deleted file mode 100644 index cde4ef442..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/attachment.pb.gw.go +++ /dev/null @@ -1,162 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: attachment.proto - -/* -Package pb is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package pb - -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/status" -) - -// 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 ( - filter_AttachmentService_GetAttachment_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_AttachmentService_GetAttachment_0(ctx context.Context, marshaler runtime.Marshaler, client AttachmentServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAttachmentRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AttachmentService_GetAttachment_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetAttachment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AttachmentService_GetAttachment_0(ctx context.Context, marshaler runtime.Marshaler, server AttachmentServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAttachmentRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AttachmentService_GetAttachment_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetAttachment(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterAttachmentServiceHandlerServer registers the http handlers for service AttachmentService to "mux". -// UnaryRPC :call AttachmentServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterAttachmentServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AttachmentServiceServer) error { - - mux.Handle("GET", pattern_AttachmentService_GetAttachment_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AttachmentService_GetAttachment_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AttachmentService_GetAttachment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterAttachmentServiceHandlerFromEndpoint is same as RegisterAttachmentServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterAttachmentServiceHandlerFromEndpoint(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 RegisterAttachmentServiceHandler(ctx, mux, conn) -} - -// RegisterAttachmentServiceHandler registers the http handlers for service AttachmentService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterAttachmentServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterAttachmentServiceHandlerClient(ctx, mux, NewAttachmentServiceClient(conn)) -} - -// RegisterAttachmentServiceHandlerClient registers the http handlers for service AttachmentService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AttachmentServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AttachmentServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "AttachmentServiceClient" to call the correct interceptors. -func RegisterAttachmentServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AttachmentServiceClient) error { - - mux.Handle("GET", pattern_AttachmentService_GetAttachment_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_AttachmentService_GetAttachment_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AttachmentService_GetAttachment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_AttachmentService_GetAttachment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "attachments"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_AttachmentService_GetAttachment_0 = runtime.ForwardResponseMessage -) diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/category.pb.go b/vendor/openpitrix.io/openpitrix/pkg/pb/category.pb.go deleted file mode 100644 index 27aa838a4..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/category.pb.go +++ /dev/null @@ -1,884 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: category.proto - -package pb - -import ( - context "context" - fmt "fmt" - math "math" - - proto "github.com/golang/protobuf/proto" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type Category struct { - // category id - CategoryId *wrappers.StringValue `protobuf:"bytes,1,opt,name=category_id,json=categoryId,proto3" json:"category_id,omitempty"` - // category name,app belong to a category,eg.[AI|Firewall|cache|...] - Name *wrappers.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // the i18n of this category, json format, sample: {"zh_cn": "数据库", "en": "database"} - Locale *wrappers.StringValue `protobuf:"bytes,3,opt,name=locale,proto3" json:"locale,omitempty"` - // owner path, concat string group_path:user_id - OwnerPath *wrappers.StringValue `protobuf:"bytes,4,opt,name=owner_path,json=ownerPath,proto3" json:"owner_path,omitempty"` - // the time when category create - CreateTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // the time when category update - UpdateTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` - // category description - Description *wrappers.StringValue `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty"` - // category icon - Icon *wrappers.StringValue `protobuf:"bytes,8,opt,name=icon,proto3" json:"icon,omitempty"` - // owner - Owner *wrappers.StringValue `protobuf:"bytes,9,opt,name=owner,proto3" json:"owner,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Category) Reset() { *m = Category{} } -func (m *Category) String() string { return proto.CompactTextString(m) } -func (*Category) ProtoMessage() {} -func (*Category) Descriptor() ([]byte, []int) { - return fileDescriptor_1c6ef5ed29d8d1a1, []int{0} -} - -func (m *Category) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Category.Unmarshal(m, b) -} -func (m *Category) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Category.Marshal(b, m, deterministic) -} -func (m *Category) XXX_Merge(src proto.Message) { - xxx_messageInfo_Category.Merge(m, src) -} -func (m *Category) XXX_Size() int { - return xxx_messageInfo_Category.Size(m) -} -func (m *Category) XXX_DiscardUnknown() { - xxx_messageInfo_Category.DiscardUnknown(m) -} - -var xxx_messageInfo_Category proto.InternalMessageInfo - -func (m *Category) GetCategoryId() *wrappers.StringValue { - if m != nil { - return m.CategoryId - } - return nil -} - -func (m *Category) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *Category) GetLocale() *wrappers.StringValue { - if m != nil { - return m.Locale - } - return nil -} - -func (m *Category) GetOwnerPath() *wrappers.StringValue { - if m != nil { - return m.OwnerPath - } - return nil -} - -func (m *Category) GetCreateTime() *timestamp.Timestamp { - if m != nil { - return m.CreateTime - } - return nil -} - -func (m *Category) GetUpdateTime() *timestamp.Timestamp { - if m != nil { - return m.UpdateTime - } - return nil -} - -func (m *Category) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *Category) GetIcon() *wrappers.StringValue { - if m != nil { - return m.Icon - } - return nil -} - -func (m *Category) GetOwner() *wrappers.StringValue { - if m != nil { - return m.Owner - } - return nil -} - -type DescribeCategoriesRequest struct { - // query key, can fields with these fields(category_id, status, locale, owner, name), default return all categories - SearchWord *wrappers.StringValue `protobuf:"bytes,1,opt,name=search_word,json=searchWord,proto3" json:"search_word,omitempty"` - // sort key, order by sort_key, default create_time - SortKey *wrappers.StringValue `protobuf:"bytes,2,opt,name=sort_key,json=sortKey,proto3" json:"sort_key,omitempty"` - // value = 0 sort ASC, value = 1 sort DESC - Reverse *wrappers.BoolValue `protobuf:"bytes,3,opt,name=reverse,proto3" json:"reverse,omitempty"` - // data limit per page, default value 20, max value 200 - Limit uint32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` - // data offset, default 0 - Offset uint32 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` - // select column to display - DisplayColumns []string `protobuf:"bytes,6,rep,name=display_columns,json=displayColumns,proto3" json:"display_columns,omitempty"` - // category ids - CategoryId []string `protobuf:"bytes,7,rep,name=category_id,json=categoryId,proto3" json:"category_id,omitempty"` - // category name - Name []string `protobuf:"bytes,8,rep,name=name,proto3" json:"name,omitempty"` - // owner - Owner []string `protobuf:"bytes,9,rep,name=owner,proto3" json:"owner,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeCategoriesRequest) Reset() { *m = DescribeCategoriesRequest{} } -func (m *DescribeCategoriesRequest) String() string { return proto.CompactTextString(m) } -func (*DescribeCategoriesRequest) ProtoMessage() {} -func (*DescribeCategoriesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1c6ef5ed29d8d1a1, []int{1} -} - -func (m *DescribeCategoriesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeCategoriesRequest.Unmarshal(m, b) -} -func (m *DescribeCategoriesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeCategoriesRequest.Marshal(b, m, deterministic) -} -func (m *DescribeCategoriesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeCategoriesRequest.Merge(m, src) -} -func (m *DescribeCategoriesRequest) XXX_Size() int { - return xxx_messageInfo_DescribeCategoriesRequest.Size(m) -} -func (m *DescribeCategoriesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeCategoriesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeCategoriesRequest proto.InternalMessageInfo - -func (m *DescribeCategoriesRequest) GetSearchWord() *wrappers.StringValue { - if m != nil { - return m.SearchWord - } - return nil -} - -func (m *DescribeCategoriesRequest) GetSortKey() *wrappers.StringValue { - if m != nil { - return m.SortKey - } - return nil -} - -func (m *DescribeCategoriesRequest) GetReverse() *wrappers.BoolValue { - if m != nil { - return m.Reverse - } - return nil -} - -func (m *DescribeCategoriesRequest) GetLimit() uint32 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *DescribeCategoriesRequest) GetOffset() uint32 { - if m != nil { - return m.Offset - } - return 0 -} - -func (m *DescribeCategoriesRequest) GetDisplayColumns() []string { - if m != nil { - return m.DisplayColumns - } - return nil -} - -func (m *DescribeCategoriesRequest) GetCategoryId() []string { - if m != nil { - return m.CategoryId - } - return nil -} - -func (m *DescribeCategoriesRequest) GetName() []string { - if m != nil { - return m.Name - } - return nil -} - -func (m *DescribeCategoriesRequest) GetOwner() []string { - if m != nil { - return m.Owner - } - return nil -} - -type DescribeCategoriesResponse struct { - // total count of qualified category - TotalCount uint32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - // list of category - CategorySet []*Category `protobuf:"bytes,2,rep,name=category_set,json=categorySet,proto3" json:"category_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeCategoriesResponse) Reset() { *m = DescribeCategoriesResponse{} } -func (m *DescribeCategoriesResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeCategoriesResponse) ProtoMessage() {} -func (*DescribeCategoriesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1c6ef5ed29d8d1a1, []int{2} -} - -func (m *DescribeCategoriesResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeCategoriesResponse.Unmarshal(m, b) -} -func (m *DescribeCategoriesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeCategoriesResponse.Marshal(b, m, deterministic) -} -func (m *DescribeCategoriesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeCategoriesResponse.Merge(m, src) -} -func (m *DescribeCategoriesResponse) XXX_Size() int { - return xxx_messageInfo_DescribeCategoriesResponse.Size(m) -} -func (m *DescribeCategoriesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeCategoriesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeCategoriesResponse proto.InternalMessageInfo - -func (m *DescribeCategoriesResponse) GetTotalCount() uint32 { - if m != nil { - return m.TotalCount - } - return 0 -} - -func (m *DescribeCategoriesResponse) GetCategorySet() []*Category { - if m != nil { - return m.CategorySet - } - return nil -} - -type CreateCategoryRequest struct { - // required, category name - Name *wrappers.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // the i18n of this category, json format, sample: {"zh_cn": "数据库", "en": "database"} - Locale *wrappers.StringValue `protobuf:"bytes,3,opt,name=locale,proto3" json:"locale,omitempty"` - // category description - Description *wrappers.StringValue `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - // category icon - Icon *wrappers.BytesValue `protobuf:"bytes,5,opt,name=icon,proto3" json:"icon,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateCategoryRequest) Reset() { *m = CreateCategoryRequest{} } -func (m *CreateCategoryRequest) String() string { return proto.CompactTextString(m) } -func (*CreateCategoryRequest) ProtoMessage() {} -func (*CreateCategoryRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1c6ef5ed29d8d1a1, []int{3} -} - -func (m *CreateCategoryRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateCategoryRequest.Unmarshal(m, b) -} -func (m *CreateCategoryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateCategoryRequest.Marshal(b, m, deterministic) -} -func (m *CreateCategoryRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateCategoryRequest.Merge(m, src) -} -func (m *CreateCategoryRequest) XXX_Size() int { - return xxx_messageInfo_CreateCategoryRequest.Size(m) -} -func (m *CreateCategoryRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateCategoryRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateCategoryRequest proto.InternalMessageInfo - -func (m *CreateCategoryRequest) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *CreateCategoryRequest) GetLocale() *wrappers.StringValue { - if m != nil { - return m.Locale - } - return nil -} - -func (m *CreateCategoryRequest) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *CreateCategoryRequest) GetIcon() *wrappers.BytesValue { - if m != nil { - return m.Icon - } - return nil -} - -type CreateCategoryResponse struct { - // id of category created - CategoryId *wrappers.StringValue `protobuf:"bytes,1,opt,name=category_id,json=categoryId,proto3" json:"category_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateCategoryResponse) Reset() { *m = CreateCategoryResponse{} } -func (m *CreateCategoryResponse) String() string { return proto.CompactTextString(m) } -func (*CreateCategoryResponse) ProtoMessage() {} -func (*CreateCategoryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1c6ef5ed29d8d1a1, []int{4} -} - -func (m *CreateCategoryResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateCategoryResponse.Unmarshal(m, b) -} -func (m *CreateCategoryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateCategoryResponse.Marshal(b, m, deterministic) -} -func (m *CreateCategoryResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateCategoryResponse.Merge(m, src) -} -func (m *CreateCategoryResponse) XXX_Size() int { - return xxx_messageInfo_CreateCategoryResponse.Size(m) -} -func (m *CreateCategoryResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CreateCategoryResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateCategoryResponse proto.InternalMessageInfo - -func (m *CreateCategoryResponse) GetCategoryId() *wrappers.StringValue { - if m != nil { - return m.CategoryId - } - return nil -} - -type ModifyCategoryRequest struct { - // required, id of category to modify - CategoryId *wrappers.StringValue `protobuf:"bytes,1,opt,name=category_id,json=categoryId,proto3" json:"category_id,omitempty"` - // category name - Name *wrappers.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // the i18n of this category, json format, sample: {"zh_cn": "数据库", "en": "database"} - Locale *wrappers.StringValue `protobuf:"bytes,3,opt,name=locale,proto3" json:"locale,omitempty"` - // category description - Description *wrappers.StringValue `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - // category icon - Icon *wrappers.BytesValue `protobuf:"bytes,5,opt,name=icon,proto3" json:"icon,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyCategoryRequest) Reset() { *m = ModifyCategoryRequest{} } -func (m *ModifyCategoryRequest) String() string { return proto.CompactTextString(m) } -func (*ModifyCategoryRequest) ProtoMessage() {} -func (*ModifyCategoryRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1c6ef5ed29d8d1a1, []int{5} -} - -func (m *ModifyCategoryRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyCategoryRequest.Unmarshal(m, b) -} -func (m *ModifyCategoryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyCategoryRequest.Marshal(b, m, deterministic) -} -func (m *ModifyCategoryRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyCategoryRequest.Merge(m, src) -} -func (m *ModifyCategoryRequest) XXX_Size() int { - return xxx_messageInfo_ModifyCategoryRequest.Size(m) -} -func (m *ModifyCategoryRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyCategoryRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyCategoryRequest proto.InternalMessageInfo - -func (m *ModifyCategoryRequest) GetCategoryId() *wrappers.StringValue { - if m != nil { - return m.CategoryId - } - return nil -} - -func (m *ModifyCategoryRequest) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *ModifyCategoryRequest) GetLocale() *wrappers.StringValue { - if m != nil { - return m.Locale - } - return nil -} - -func (m *ModifyCategoryRequest) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *ModifyCategoryRequest) GetIcon() *wrappers.BytesValue { - if m != nil { - return m.Icon - } - return nil -} - -type ModifyCategoryResponse struct { - // id of category modified - CategoryId *wrappers.StringValue `protobuf:"bytes,1,opt,name=category_id,json=categoryId,proto3" json:"category_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyCategoryResponse) Reset() { *m = ModifyCategoryResponse{} } -func (m *ModifyCategoryResponse) String() string { return proto.CompactTextString(m) } -func (*ModifyCategoryResponse) ProtoMessage() {} -func (*ModifyCategoryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1c6ef5ed29d8d1a1, []int{6} -} - -func (m *ModifyCategoryResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyCategoryResponse.Unmarshal(m, b) -} -func (m *ModifyCategoryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyCategoryResponse.Marshal(b, m, deterministic) -} -func (m *ModifyCategoryResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyCategoryResponse.Merge(m, src) -} -func (m *ModifyCategoryResponse) XXX_Size() int { - return xxx_messageInfo_ModifyCategoryResponse.Size(m) -} -func (m *ModifyCategoryResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyCategoryResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyCategoryResponse proto.InternalMessageInfo - -func (m *ModifyCategoryResponse) GetCategoryId() *wrappers.StringValue { - if m != nil { - return m.CategoryId - } - return nil -} - -type DeleteCategoriesRequest struct { - // required, ids of category to delete - CategoryId []string `protobuf:"bytes,1,rep,name=category_id,json=categoryId,proto3" json:"category_id,omitempty"` - // if true force delete category - Force *wrappers.BoolValue `protobuf:"bytes,2,opt,name=force,proto3" json:"force,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteCategoriesRequest) Reset() { *m = DeleteCategoriesRequest{} } -func (m *DeleteCategoriesRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteCategoriesRequest) ProtoMessage() {} -func (*DeleteCategoriesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_1c6ef5ed29d8d1a1, []int{7} -} - -func (m *DeleteCategoriesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteCategoriesRequest.Unmarshal(m, b) -} -func (m *DeleteCategoriesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteCategoriesRequest.Marshal(b, m, deterministic) -} -func (m *DeleteCategoriesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteCategoriesRequest.Merge(m, src) -} -func (m *DeleteCategoriesRequest) XXX_Size() int { - return xxx_messageInfo_DeleteCategoriesRequest.Size(m) -} -func (m *DeleteCategoriesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteCategoriesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteCategoriesRequest proto.InternalMessageInfo - -func (m *DeleteCategoriesRequest) GetCategoryId() []string { - if m != nil { - return m.CategoryId - } - return nil -} - -func (m *DeleteCategoriesRequest) GetForce() *wrappers.BoolValue { - if m != nil { - return m.Force - } - return nil -} - -type DeleteCategoriesResponse struct { - // ids of category to deleted - CategoryId []string `protobuf:"bytes,1,rep,name=category_id,json=categoryId,proto3" json:"category_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteCategoriesResponse) Reset() { *m = DeleteCategoriesResponse{} } -func (m *DeleteCategoriesResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteCategoriesResponse) ProtoMessage() {} -func (*DeleteCategoriesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1c6ef5ed29d8d1a1, []int{8} -} - -func (m *DeleteCategoriesResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteCategoriesResponse.Unmarshal(m, b) -} -func (m *DeleteCategoriesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteCategoriesResponse.Marshal(b, m, deterministic) -} -func (m *DeleteCategoriesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteCategoriesResponse.Merge(m, src) -} -func (m *DeleteCategoriesResponse) XXX_Size() int { - return xxx_messageInfo_DeleteCategoriesResponse.Size(m) -} -func (m *DeleteCategoriesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteCategoriesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteCategoriesResponse proto.InternalMessageInfo - -func (m *DeleteCategoriesResponse) GetCategoryId() []string { - if m != nil { - return m.CategoryId - } - return nil -} - -func init() { - proto.RegisterType((*Category)(nil), "openpitrix.Category") - proto.RegisterType((*DescribeCategoriesRequest)(nil), "openpitrix.DescribeCategoriesRequest") - proto.RegisterType((*DescribeCategoriesResponse)(nil), "openpitrix.DescribeCategoriesResponse") - proto.RegisterType((*CreateCategoryRequest)(nil), "openpitrix.CreateCategoryRequest") - proto.RegisterType((*CreateCategoryResponse)(nil), "openpitrix.CreateCategoryResponse") - proto.RegisterType((*ModifyCategoryRequest)(nil), "openpitrix.ModifyCategoryRequest") - proto.RegisterType((*ModifyCategoryResponse)(nil), "openpitrix.ModifyCategoryResponse") - proto.RegisterType((*DeleteCategoriesRequest)(nil), "openpitrix.DeleteCategoriesRequest") - proto.RegisterType((*DeleteCategoriesResponse)(nil), "openpitrix.DeleteCategoriesResponse") -} - -func init() { proto.RegisterFile("category.proto", fileDescriptor_1c6ef5ed29d8d1a1) } - -var fileDescriptor_1c6ef5ed29d8d1a1 = []byte{ - // 878 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x54, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0x96, 0x1d, 0xdb, 0x49, 0x9e, 0x49, 0x52, 0xa6, 0x69, 0xbb, 0x35, 0x15, 0x19, 0x96, 0x5f, - 0xa1, 0x72, 0xec, 0x62, 0x8a, 0x2a, 0x11, 0x81, 0x94, 0xa4, 0x12, 0x42, 0xa8, 0x12, 0x72, 0x11, - 0x95, 0xb8, 0x58, 0x93, 0xdd, 0x67, 0x7b, 0xc4, 0x78, 0x67, 0x99, 0x99, 0x8d, 0xb1, 0xb8, 0x71, - 0xe0, 0xc8, 0x21, 0xf4, 0xff, 0xe0, 0xc8, 0x1f, 0xc2, 0xbf, 0xc0, 0x8d, 0x0b, 0x67, 0x4e, 0x68, - 0x67, 0x67, 0x1d, 0x7b, 0x6d, 0x1c, 0x23, 0x10, 0xa8, 0x27, 0x6b, 0xe7, 0x7d, 0x9f, 0xe7, 0x9b, - 0xf7, 0xbe, 0xef, 0xc1, 0x6e, 0xc0, 0x0c, 0x0e, 0xa4, 0x9a, 0xb4, 0x62, 0x25, 0x8d, 0x24, 0x20, - 0x63, 0x8c, 0x62, 0x6e, 0x14, 0xff, 0xa6, 0xf1, 0xea, 0x40, 0xca, 0x81, 0xc0, 0xb6, 0xad, 0x9c, - 0x27, 0xfd, 0xf6, 0x58, 0xb1, 0x38, 0x46, 0xa5, 0x33, 0x6c, 0xe3, 0xa0, 0x58, 0x37, 0x7c, 0x84, - 0xda, 0xb0, 0x51, 0xec, 0x00, 0xf7, 0x1c, 0x80, 0xc5, 0xbc, 0xcd, 0xa2, 0x48, 0x1a, 0x66, 0xb8, - 0x8c, 0x72, 0x7a, 0xd3, 0xfe, 0x04, 0x47, 0x03, 0x8c, 0x8e, 0xf4, 0x98, 0x0d, 0x06, 0xa8, 0xda, - 0x32, 0xb6, 0x88, 0x45, 0xb4, 0xff, 0x43, 0x05, 0xb6, 0xce, 0x9c, 0x56, 0xf2, 0x21, 0xd4, 0x73, - 0xdd, 0x3d, 0x1e, 0x7a, 0x25, 0x5a, 0x3a, 0xac, 0x77, 0xee, 0xb5, 0xb2, 0xeb, 0x5a, 0xb9, 0x9e, - 0xd6, 0x53, 0xa3, 0x78, 0x34, 0xf8, 0x82, 0x89, 0x04, 0xbb, 0x90, 0x13, 0x3e, 0x09, 0xc9, 0x03, - 0xa8, 0x44, 0x6c, 0x84, 0x5e, 0x79, 0x0d, 0x9e, 0x45, 0x92, 0x87, 0x50, 0x13, 0x32, 0x60, 0x02, - 0xbd, 0x8d, 0x35, 0x38, 0x0e, 0x4b, 0x8e, 0x01, 0xe4, 0x38, 0x42, 0xd5, 0x8b, 0x99, 0x19, 0x7a, - 0x95, 0x35, 0x98, 0xdb, 0x16, 0xff, 0x19, 0x33, 0x43, 0x72, 0x0c, 0xf5, 0x40, 0x21, 0x33, 0xd8, - 0x4b, 0xdb, 0xea, 0x55, 0x2d, 0xbb, 0xb1, 0xc0, 0xfe, 0x3c, 0xef, 0x79, 0x17, 0x32, 0x78, 0x7a, - 0x90, 0x92, 0x93, 0x38, 0x9c, 0x92, 0x6b, 0xd7, 0x93, 0x33, 0xb8, 0x25, 0x7f, 0x04, 0xf5, 0x10, - 0x75, 0xa0, 0xb8, 0x1d, 0x86, 0xb7, 0xb9, 0x86, 0xee, 0x59, 0x42, 0xda, 0x5e, 0x1e, 0xc8, 0xc8, - 0xdb, 0x5a, 0xa7, 0xbd, 0x29, 0x92, 0x74, 0xa0, 0x6a, 0x1f, 0xee, 0x6d, 0xaf, 0x41, 0xc9, 0xa0, - 0xfe, 0x6f, 0x65, 0xb8, 0xfb, 0xd8, 0xde, 0x7a, 0x8e, 0xce, 0x18, 0x1c, 0x75, 0x17, 0xbf, 0x4e, - 0x50, 0x9b, 0xd4, 0x21, 0x1a, 0x99, 0x0a, 0x86, 0xbd, 0xb1, 0x54, 0x6b, 0x3a, 0x24, 0x23, 0x3c, - 0x93, 0x2a, 0x24, 0x8f, 0x60, 0x4b, 0x4b, 0x65, 0x7a, 0x5f, 0xe1, 0x64, 0x2d, 0x97, 0x6c, 0xa6, - 0xe8, 0x4f, 0x71, 0x42, 0x1e, 0xc2, 0xa6, 0xc2, 0x0b, 0x54, 0x3a, 0x77, 0xca, 0x62, 0xd3, 0x4f, - 0xa5, 0x14, 0x8e, 0xe5, 0xa0, 0x64, 0x1f, 0xaa, 0x82, 0x8f, 0xb8, 0xb1, 0x1e, 0xd9, 0xe9, 0x66, - 0x1f, 0xe4, 0x36, 0xd4, 0x64, 0xbf, 0xaf, 0xd1, 0xd8, 0xe1, 0xef, 0x74, 0xdd, 0x17, 0x79, 0x1b, - 0xf6, 0x42, 0xae, 0x63, 0xc1, 0x26, 0xbd, 0x40, 0x8a, 0x64, 0x14, 0x69, 0xaf, 0x46, 0x37, 0x0e, - 0xb7, 0xbb, 0xbb, 0xee, 0xf8, 0x2c, 0x3b, 0x25, 0x07, 0xf3, 0x31, 0xd9, 0xb4, 0xa0, 0xd9, 0x20, - 0x10, 0x17, 0x84, 0x2d, 0x5b, 0xc9, 0xac, 0xbe, 0x7f, 0x35, 0x8b, 0xf4, 0xd0, 0x75, 0xfb, 0x02, - 0x1a, 0xcb, 0x9a, 0xad, 0x63, 0x19, 0x69, 0x4c, 0x2f, 0x32, 0xd2, 0x30, 0xd1, 0x0b, 0x64, 0x12, - 0x19, 0xdb, 0xed, 0x9d, 0x2e, 0xd8, 0xa3, 0xb3, 0xf4, 0x84, 0x3c, 0x82, 0x97, 0xa6, 0x4a, 0xd2, - 0x07, 0x95, 0xe9, 0xc6, 0x61, 0xbd, 0xb3, 0xdf, 0xba, 0xda, 0x36, 0xad, 0x3c, 0xdc, 0xdd, 0xa9, - 0xe6, 0xa7, 0x68, 0xfc, 0xdf, 0x4b, 0x70, 0xeb, 0xcc, 0xfa, 0x7a, 0x5a, 0x77, 0x13, 0xfe, 0xaf, - 0x42, 0x5c, 0x48, 0x43, 0xe5, 0xef, 0xa6, 0xa1, 0xed, 0xd2, 0x90, 0x05, 0xf8, 0x95, 0x45, 0x3b, - 0x4c, 0x0c, 0xea, 0x99, 0x30, 0xf8, 0xcf, 0xe0, 0x76, 0xf1, 0xc5, 0xae, 0xcd, 0xff, 0x6c, 0xed, - 0xf9, 0x3f, 0x95, 0xe1, 0xd6, 0x13, 0x19, 0xf2, 0xfe, 0xa4, 0xd8, 0xcb, 0x17, 0x64, 0x9f, 0xfe, - 0x1f, 0xa3, 0x28, 0x36, 0xec, 0xdf, 0x19, 0x85, 0x80, 0x3b, 0x8f, 0x51, 0xa0, 0x59, 0xb2, 0xb9, - 0x0e, 0x8a, 0xff, 0x5c, 0x0c, 0xed, 0x03, 0xa8, 0xf6, 0xa5, 0x0a, 0xf2, 0x76, 0xaf, 0x5a, 0x30, - 0x19, 0xd0, 0x3f, 0x06, 0x6f, 0xf1, 0xb6, 0xab, 0xe8, 0xae, 0xbc, 0xae, 0xf3, 0x73, 0x15, 0xf6, - 0xf2, 0xe7, 0x3f, 0x61, 0x11, 0x1b, 0xa0, 0x22, 0x7f, 0x94, 0x80, 0x2c, 0xae, 0x03, 0xf2, 0xe6, - 0x6c, 0x9e, 0xff, 0x72, 0x37, 0x37, 0xde, 0xba, 0x0e, 0x96, 0x49, 0xf3, 0x9f, 0x97, 0x2e, 0x4f, - 0xbe, 0x25, 0x93, 0x8f, 0xd1, 0xd0, 0x60, 0x5a, 0x6d, 0x52, 0x9d, 0xc4, 0xb1, 0x54, 0x86, 0xf6, - 0xb9, 0x30, 0xa8, 0xe8, 0x98, 0x9b, 0x21, 0x35, 0x43, 0xd4, 0x48, 0xfb, 0x1c, 0x45, 0xa8, 0x0f, - 0x67, 0xde, 0xd3, 0xa4, 0xda, 0x30, 0x93, 0xe8, 0x26, 0xcd, 0x2c, 0xd4, 0xa4, 0x76, 0x9d, 0x35, - 0x69, 0xea, 0xc2, 0x77, 0x9a, 0x34, 0xc4, 0x3e, 0x4b, 0x84, 0xa1, 0x0a, 0x4d, 0xa2, 0x22, 0xca, - 0x84, 0x98, 0xb9, 0xea, 0xbb, 0x5f, 0x7e, 0xfd, 0xb1, 0x7c, 0x83, 0xec, 0xb6, 0x2f, 0xde, 0x6d, - 0x5f, 0x9d, 0x92, 0xef, 0x4b, 0xb0, 0x3b, 0x1f, 0x50, 0xf2, 0xda, 0xdc, 0x22, 0x5b, 0xb6, 0xae, - 0x1a, 0xfe, 0x2a, 0x88, 0x7b, 0xf0, 0xd1, 0xe5, 0xc9, 0xcb, 0x64, 0x2f, 0x2b, 0xe6, 0x3a, 0x26, - 0x56, 0xc5, 0x4d, 0xbf, 0xa0, 0xe2, 0x83, 0xd2, 0x7d, 0x2b, 0x64, 0xde, 0x9e, 0xf3, 0x42, 0x96, - 0x66, 0x7d, 0x5e, 0xc8, 0x72, 0x77, 0x3b, 0x21, 0x59, 0xb1, 0x20, 0xa4, 0xb3, 0x44, 0xc8, 0xf3, - 0x12, 0xdc, 0x28, 0x1a, 0x8c, 0xbc, 0x3e, 0x3f, 0xe5, 0xa5, 0x66, 0x6f, 0xbc, 0xb1, 0x1a, 0xe4, - 0xe4, 0xbc, 0x7f, 0x79, 0x72, 0x97, 0xdc, 0x39, 0x65, 0x26, 0x18, 0xd2, 0xd0, 0x82, 0x8a, 0x53, - 0xba, 0x79, 0x7f, 0x51, 0xd6, 0x69, 0xe5, 0xcb, 0x72, 0x7c, 0x7e, 0x5e, 0xb3, 0xb9, 0x78, 0xef, - 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x15, 0x3d, 0x72, 0xea, 0x0a, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// CategoryManagerClient is the client API for CategoryManager service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type CategoryManagerClient interface { - // Get categories, support filter with these fields(category_id, status, locale, owner, name), default return all categories - DescribeCategories(ctx context.Context, in *DescribeCategoriesRequest, opts ...grpc.CallOption) (*DescribeCategoriesResponse, error) - // Create category - CreateCategory(ctx context.Context, in *CreateCategoryRequest, opts ...grpc.CallOption) (*CreateCategoryResponse, error) - // Modify category - ModifyCategory(ctx context.Context, in *ModifyCategoryRequest, opts ...grpc.CallOption) (*ModifyCategoryResponse, error) - // Batch delete categories - DeleteCategories(ctx context.Context, in *DeleteCategoriesRequest, opts ...grpc.CallOption) (*DeleteCategoriesResponse, error) -} - -type categoryManagerClient struct { - cc *grpc.ClientConn -} - -func NewCategoryManagerClient(cc *grpc.ClientConn) CategoryManagerClient { - return &categoryManagerClient{cc} -} - -func (c *categoryManagerClient) DescribeCategories(ctx context.Context, in *DescribeCategoriesRequest, opts ...grpc.CallOption) (*DescribeCategoriesResponse, error) { - out := new(DescribeCategoriesResponse) - err := c.cc.Invoke(ctx, "/openpitrix.CategoryManager/DescribeCategories", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *categoryManagerClient) CreateCategory(ctx context.Context, in *CreateCategoryRequest, opts ...grpc.CallOption) (*CreateCategoryResponse, error) { - out := new(CreateCategoryResponse) - err := c.cc.Invoke(ctx, "/openpitrix.CategoryManager/CreateCategory", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *categoryManagerClient) ModifyCategory(ctx context.Context, in *ModifyCategoryRequest, opts ...grpc.CallOption) (*ModifyCategoryResponse, error) { - out := new(ModifyCategoryResponse) - err := c.cc.Invoke(ctx, "/openpitrix.CategoryManager/ModifyCategory", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *categoryManagerClient) DeleteCategories(ctx context.Context, in *DeleteCategoriesRequest, opts ...grpc.CallOption) (*DeleteCategoriesResponse, error) { - out := new(DeleteCategoriesResponse) - err := c.cc.Invoke(ctx, "/openpitrix.CategoryManager/DeleteCategories", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// CategoryManagerServer is the server API for CategoryManager service. -type CategoryManagerServer interface { - // Get categories, support filter with these fields(category_id, status, locale, owner, name), default return all categories - DescribeCategories(context.Context, *DescribeCategoriesRequest) (*DescribeCategoriesResponse, error) - // Create category - CreateCategory(context.Context, *CreateCategoryRequest) (*CreateCategoryResponse, error) - // Modify category - ModifyCategory(context.Context, *ModifyCategoryRequest) (*ModifyCategoryResponse, error) - // Batch delete categories - DeleteCategories(context.Context, *DeleteCategoriesRequest) (*DeleteCategoriesResponse, error) -} - -// UnimplementedCategoryManagerServer can be embedded to have forward compatible implementations. -type UnimplementedCategoryManagerServer struct { -} - -func (*UnimplementedCategoryManagerServer) DescribeCategories(ctx context.Context, req *DescribeCategoriesRequest) (*DescribeCategoriesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeCategories not implemented") -} -func (*UnimplementedCategoryManagerServer) CreateCategory(ctx context.Context, req *CreateCategoryRequest) (*CreateCategoryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateCategory not implemented") -} -func (*UnimplementedCategoryManagerServer) ModifyCategory(ctx context.Context, req *ModifyCategoryRequest) (*ModifyCategoryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ModifyCategory not implemented") -} -func (*UnimplementedCategoryManagerServer) DeleteCategories(ctx context.Context, req *DeleteCategoriesRequest) (*DeleteCategoriesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteCategories not implemented") -} - -func RegisterCategoryManagerServer(s *grpc.Server, srv CategoryManagerServer) { - s.RegisterService(&_CategoryManager_serviceDesc, srv) -} - -func _CategoryManager_DescribeCategories_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeCategoriesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CategoryManagerServer).DescribeCategories(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.CategoryManager/DescribeCategories", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CategoryManagerServer).DescribeCategories(ctx, req.(*DescribeCategoriesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CategoryManager_CreateCategory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateCategoryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CategoryManagerServer).CreateCategory(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.CategoryManager/CreateCategory", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CategoryManagerServer).CreateCategory(ctx, req.(*CreateCategoryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CategoryManager_ModifyCategory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ModifyCategoryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CategoryManagerServer).ModifyCategory(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.CategoryManager/ModifyCategory", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CategoryManagerServer).ModifyCategory(ctx, req.(*ModifyCategoryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _CategoryManager_DeleteCategories_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteCategoriesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CategoryManagerServer).DeleteCategories(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.CategoryManager/DeleteCategories", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CategoryManagerServer).DeleteCategories(ctx, req.(*DeleteCategoriesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _CategoryManager_serviceDesc = grpc.ServiceDesc{ - ServiceName: "openpitrix.CategoryManager", - HandlerType: (*CategoryManagerServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "DescribeCategories", - Handler: _CategoryManager_DescribeCategories_Handler, - }, - { - MethodName: "CreateCategory", - Handler: _CategoryManager_CreateCategory_Handler, - }, - { - MethodName: "ModifyCategory", - Handler: _CategoryManager_ModifyCategory_Handler, - }, - { - MethodName: "DeleteCategories", - Handler: _CategoryManager_DeleteCategories_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "category.proto", -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/category.pb.gw.go b/vendor/openpitrix.io/openpitrix/pkg/pb/category.pb.gw.go deleted file mode 100644 index 4b6856b68..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/category.pb.gw.go +++ /dev/null @@ -1,396 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: category.proto - -/* -Package pb is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package pb - -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/status" -) - -// 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 ( - filter_CategoryManager_DescribeCategories_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_CategoryManager_DescribeCategories_0(ctx context.Context, marshaler runtime.Marshaler, client CategoryManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeCategoriesRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CategoryManager_DescribeCategories_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeCategories(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CategoryManager_DescribeCategories_0(ctx context.Context, marshaler runtime.Marshaler, server CategoryManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeCategoriesRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_CategoryManager_DescribeCategories_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeCategories(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CategoryManager_CreateCategory_0(ctx context.Context, marshaler runtime.Marshaler, client CategoryManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateCategoryRequest - 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.CreateCategory(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CategoryManager_CreateCategory_0(ctx context.Context, marshaler runtime.Marshaler, server CategoryManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateCategoryRequest - 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.CreateCategory(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CategoryManager_ModifyCategory_0(ctx context.Context, marshaler runtime.Marshaler, client CategoryManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyCategoryRequest - 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.ModifyCategory(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CategoryManager_ModifyCategory_0(ctx context.Context, marshaler runtime.Marshaler, server CategoryManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyCategoryRequest - 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.ModifyCategory(ctx, &protoReq) - return msg, metadata, err - -} - -func request_CategoryManager_DeleteCategories_0(ctx context.Context, marshaler runtime.Marshaler, client CategoryManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteCategoriesRequest - 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.DeleteCategories(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_CategoryManager_DeleteCategories_0(ctx context.Context, marshaler runtime.Marshaler, server CategoryManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteCategoriesRequest - 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.DeleteCategories(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterCategoryManagerHandlerServer registers the http handlers for service CategoryManager to "mux". -// UnaryRPC :call CategoryManagerServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterCategoryManagerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CategoryManagerServer) error { - - mux.Handle("GET", pattern_CategoryManager_DescribeCategories_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CategoryManager_DescribeCategories_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_CategoryManager_DescribeCategories_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_CategoryManager_CreateCategory_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CategoryManager_CreateCategory_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_CategoryManager_CreateCategory_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_CategoryManager_ModifyCategory_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CategoryManager_ModifyCategory_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_CategoryManager_ModifyCategory_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_CategoryManager_DeleteCategories_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_CategoryManager_DeleteCategories_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_CategoryManager_DeleteCategories_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterCategoryManagerHandlerFromEndpoint is same as RegisterCategoryManagerHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterCategoryManagerHandlerFromEndpoint(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 RegisterCategoryManagerHandler(ctx, mux, conn) -} - -// RegisterCategoryManagerHandler registers the http handlers for service CategoryManager to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterCategoryManagerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterCategoryManagerHandlerClient(ctx, mux, NewCategoryManagerClient(conn)) -} - -// RegisterCategoryManagerHandlerClient registers the http handlers for service CategoryManager -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CategoryManagerClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CategoryManagerClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "CategoryManagerClient" to call the correct interceptors. -func RegisterCategoryManagerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CategoryManagerClient) error { - - mux.Handle("GET", pattern_CategoryManager_DescribeCategories_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_CategoryManager_DescribeCategories_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_CategoryManager_DescribeCategories_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_CategoryManager_CreateCategory_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_CategoryManager_CreateCategory_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_CategoryManager_CreateCategory_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_CategoryManager_ModifyCategory_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_CategoryManager_ModifyCategory_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_CategoryManager_ModifyCategory_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_CategoryManager_DeleteCategories_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_CategoryManager_DeleteCategories_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_CategoryManager_DeleteCategories_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_CategoryManager_DescribeCategories_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "categories"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_CategoryManager_CreateCategory_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "categories"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_CategoryManager_ModifyCategory_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "categories"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_CategoryManager_DeleteCategories_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "categories"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_CategoryManager_DescribeCategories_0 = runtime.ForwardResponseMessage - - forward_CategoryManager_CreateCategory_0 = runtime.ForwardResponseMessage - - forward_CategoryManager_ModifyCategory_0 = runtime.ForwardResponseMessage - - forward_CategoryManager_DeleteCategories_0 = runtime.ForwardResponseMessage -) diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/cluster.pb.go b/vendor/openpitrix.io/openpitrix/pkg/pb/cluster.pb.go deleted file mode 100644 index e3a18b6c4..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/cluster.pb.go +++ /dev/null @@ -1,6745 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: cluster.proto - -package pb - -import ( - context "context" - fmt "fmt" - math "math" - - proto "github.com/golang/protobuf/proto" - empty "github.com/golang/protobuf/ptypes/empty" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type DescribeSubnetsRequest struct { - // required, id of runtime that contain subnet - RuntimeId *wrappers.StringValue `protobuf:"bytes,1,opt,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - // data limit per page, default value 20, max value 200 - Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` - // data offset, default 0 - Offset uint32 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"` - // subnet type - SubnetType *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=subnet_type,json=subnetType,proto3" json:"subnet_type,omitempty"` - // subnet ids - SubnetId []string `protobuf:"bytes,5,rep,name=subnet_id,json=subnetId,proto3" json:"subnet_id,omitempty"` - // zone eg.[pek3a|pek3b|...] - Zone []string `protobuf:"bytes,6,rep,name=zone,proto3" json:"zone,omitempty"` - // advanced param - AdvancedParam []string `protobuf:"bytes,7,rep,name=advanced_param,json=advancedParam,proto3" json:"advanced_param,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeSubnetsRequest) Reset() { *m = DescribeSubnetsRequest{} } -func (m *DescribeSubnetsRequest) String() string { return proto.CompactTextString(m) } -func (*DescribeSubnetsRequest) ProtoMessage() {} -func (*DescribeSubnetsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{0} -} - -func (m *DescribeSubnetsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeSubnetsRequest.Unmarshal(m, b) -} -func (m *DescribeSubnetsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeSubnetsRequest.Marshal(b, m, deterministic) -} -func (m *DescribeSubnetsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeSubnetsRequest.Merge(m, src) -} -func (m *DescribeSubnetsRequest) XXX_Size() int { - return xxx_messageInfo_DescribeSubnetsRequest.Size(m) -} -func (m *DescribeSubnetsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeSubnetsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeSubnetsRequest proto.InternalMessageInfo - -func (m *DescribeSubnetsRequest) GetRuntimeId() *wrappers.StringValue { - if m != nil { - return m.RuntimeId - } - return nil -} - -func (m *DescribeSubnetsRequest) GetLimit() uint32 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *DescribeSubnetsRequest) GetOffset() uint32 { - if m != nil { - return m.Offset - } - return 0 -} - -func (m *DescribeSubnetsRequest) GetSubnetType() *wrappers.UInt32Value { - if m != nil { - return m.SubnetType - } - return nil -} - -func (m *DescribeSubnetsRequest) GetSubnetId() []string { - if m != nil { - return m.SubnetId - } - return nil -} - -func (m *DescribeSubnetsRequest) GetZone() []string { - if m != nil { - return m.Zone - } - return nil -} - -func (m *DescribeSubnetsRequest) GetAdvancedParam() []string { - if m != nil { - return m.AdvancedParam - } - return nil -} - -type Subnet struct { - // subnet id - SubnetId *wrappers.StringValue `protobuf:"bytes,1,opt,name=subnet_id,json=subnetId,proto3" json:"subnet_id,omitempty"` - // subnet name - Name *wrappers.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // subnet zone - Zone *wrappers.StringValue `protobuf:"bytes,3,opt,name=zone,proto3" json:"zone,omitempty"` - // the time when subnet create - CreateTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // subnet description - Description *wrappers.StringValue `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - // instance ids, subnet belong to one more instance - InstanceId []string `protobuf:"bytes,6,rep,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` - // vpc id, a vpc contain one more subnet - VpcId *wrappers.StringValue `protobuf:"bytes,7,opt,name=vpc_id,json=vpcId,proto3" json:"vpc_id,omitempty"` - // subnet type - SubnetType *wrappers.UInt32Value `protobuf:"bytes,8,opt,name=subnet_type,json=subnetType,proto3" json:"subnet_type,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Subnet) Reset() { *m = Subnet{} } -func (m *Subnet) String() string { return proto.CompactTextString(m) } -func (*Subnet) ProtoMessage() {} -func (*Subnet) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{1} -} - -func (m *Subnet) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Subnet.Unmarshal(m, b) -} -func (m *Subnet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Subnet.Marshal(b, m, deterministic) -} -func (m *Subnet) XXX_Merge(src proto.Message) { - xxx_messageInfo_Subnet.Merge(m, src) -} -func (m *Subnet) XXX_Size() int { - return xxx_messageInfo_Subnet.Size(m) -} -func (m *Subnet) XXX_DiscardUnknown() { - xxx_messageInfo_Subnet.DiscardUnknown(m) -} - -var xxx_messageInfo_Subnet proto.InternalMessageInfo - -func (m *Subnet) GetSubnetId() *wrappers.StringValue { - if m != nil { - return m.SubnetId - } - return nil -} - -func (m *Subnet) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *Subnet) GetZone() *wrappers.StringValue { - if m != nil { - return m.Zone - } - return nil -} - -func (m *Subnet) GetCreateTime() *timestamp.Timestamp { - if m != nil { - return m.CreateTime - } - return nil -} - -func (m *Subnet) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *Subnet) GetInstanceId() []string { - if m != nil { - return m.InstanceId - } - return nil -} - -func (m *Subnet) GetVpcId() *wrappers.StringValue { - if m != nil { - return m.VpcId - } - return nil -} - -func (m *Subnet) GetSubnetType() *wrappers.UInt32Value { - if m != nil { - return m.SubnetType - } - return nil -} - -type DescribeSubnetsResponse struct { - // total count of subnet - TotalCount uint32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - // list of subnet - SubnetSet []*Subnet `protobuf:"bytes,2,rep,name=subnet_set,json=subnetSet,proto3" json:"subnet_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeSubnetsResponse) Reset() { *m = DescribeSubnetsResponse{} } -func (m *DescribeSubnetsResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeSubnetsResponse) ProtoMessage() {} -func (*DescribeSubnetsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{2} -} - -func (m *DescribeSubnetsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeSubnetsResponse.Unmarshal(m, b) -} -func (m *DescribeSubnetsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeSubnetsResponse.Marshal(b, m, deterministic) -} -func (m *DescribeSubnetsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeSubnetsResponse.Merge(m, src) -} -func (m *DescribeSubnetsResponse) XXX_Size() int { - return xxx_messageInfo_DescribeSubnetsResponse.Size(m) -} -func (m *DescribeSubnetsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeSubnetsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeSubnetsResponse proto.InternalMessageInfo - -func (m *DescribeSubnetsResponse) GetTotalCount() uint32 { - if m != nil { - return m.TotalCount - } - return 0 -} - -func (m *DescribeSubnetsResponse) GetSubnetSet() []*Subnet { - if m != nil { - return m.SubnetSet - } - return nil -} - -type DeleteClusterInRuntimeRequest struct { - RuntimeId []string `protobuf:"bytes,1,rep,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteClusterInRuntimeRequest) Reset() { *m = DeleteClusterInRuntimeRequest{} } -func (m *DeleteClusterInRuntimeRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteClusterInRuntimeRequest) ProtoMessage() {} -func (*DeleteClusterInRuntimeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{3} -} - -func (m *DeleteClusterInRuntimeRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteClusterInRuntimeRequest.Unmarshal(m, b) -} -func (m *DeleteClusterInRuntimeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteClusterInRuntimeRequest.Marshal(b, m, deterministic) -} -func (m *DeleteClusterInRuntimeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteClusterInRuntimeRequest.Merge(m, src) -} -func (m *DeleteClusterInRuntimeRequest) XXX_Size() int { - return xxx_messageInfo_DeleteClusterInRuntimeRequest.Size(m) -} -func (m *DeleteClusterInRuntimeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteClusterInRuntimeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteClusterInRuntimeRequest proto.InternalMessageInfo - -func (m *DeleteClusterInRuntimeRequest) GetRuntimeId() []string { - if m != nil { - return m.RuntimeId - } - return nil -} - -type DeleteClusterInRuntimeResponse struct { - RuntimeId []string `protobuf:"bytes,1,rep,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteClusterInRuntimeResponse) Reset() { *m = DeleteClusterInRuntimeResponse{} } -func (m *DeleteClusterInRuntimeResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteClusterInRuntimeResponse) ProtoMessage() {} -func (*DeleteClusterInRuntimeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{4} -} - -func (m *DeleteClusterInRuntimeResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteClusterInRuntimeResponse.Unmarshal(m, b) -} -func (m *DeleteClusterInRuntimeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteClusterInRuntimeResponse.Marshal(b, m, deterministic) -} -func (m *DeleteClusterInRuntimeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteClusterInRuntimeResponse.Merge(m, src) -} -func (m *DeleteClusterInRuntimeResponse) XXX_Size() int { - return xxx_messageInfo_DeleteClusterInRuntimeResponse.Size(m) -} -func (m *DeleteClusterInRuntimeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteClusterInRuntimeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteClusterInRuntimeResponse proto.InternalMessageInfo - -func (m *DeleteClusterInRuntimeResponse) GetRuntimeId() []string { - if m != nil { - return m.RuntimeId - } - return nil -} - -type MigrateClusterInRuntimeRequest struct { - FromRuntimeId string `protobuf:"bytes,1,opt,name=from_runtime_id,json=fromRuntimeId,proto3" json:"from_runtime_id,omitempty"` - ToRuntimeId string `protobuf:"bytes,2,opt,name=to_runtime_id,json=toRuntimeId,proto3" json:"to_runtime_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MigrateClusterInRuntimeRequest) Reset() { *m = MigrateClusterInRuntimeRequest{} } -func (m *MigrateClusterInRuntimeRequest) String() string { return proto.CompactTextString(m) } -func (*MigrateClusterInRuntimeRequest) ProtoMessage() {} -func (*MigrateClusterInRuntimeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{5} -} - -func (m *MigrateClusterInRuntimeRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MigrateClusterInRuntimeRequest.Unmarshal(m, b) -} -func (m *MigrateClusterInRuntimeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MigrateClusterInRuntimeRequest.Marshal(b, m, deterministic) -} -func (m *MigrateClusterInRuntimeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_MigrateClusterInRuntimeRequest.Merge(m, src) -} -func (m *MigrateClusterInRuntimeRequest) XXX_Size() int { - return xxx_messageInfo_MigrateClusterInRuntimeRequest.Size(m) -} -func (m *MigrateClusterInRuntimeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_MigrateClusterInRuntimeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_MigrateClusterInRuntimeRequest proto.InternalMessageInfo - -func (m *MigrateClusterInRuntimeRequest) GetFromRuntimeId() string { - if m != nil { - return m.FromRuntimeId - } - return "" -} - -func (m *MigrateClusterInRuntimeRequest) GetToRuntimeId() string { - if m != nil { - return m.ToRuntimeId - } - return "" -} - -type MigrateClusterInRuntimeResponse struct { - FromRuntimeId string `protobuf:"bytes,1,opt,name=from_runtime_id,json=fromRuntimeId,proto3" json:"from_runtime_id,omitempty"` - ToRuntimeId string `protobuf:"bytes,2,opt,name=to_runtime_id,json=toRuntimeId,proto3" json:"to_runtime_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MigrateClusterInRuntimeResponse) Reset() { *m = MigrateClusterInRuntimeResponse{} } -func (m *MigrateClusterInRuntimeResponse) String() string { return proto.CompactTextString(m) } -func (*MigrateClusterInRuntimeResponse) ProtoMessage() {} -func (*MigrateClusterInRuntimeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{6} -} - -func (m *MigrateClusterInRuntimeResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MigrateClusterInRuntimeResponse.Unmarshal(m, b) -} -func (m *MigrateClusterInRuntimeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MigrateClusterInRuntimeResponse.Marshal(b, m, deterministic) -} -func (m *MigrateClusterInRuntimeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MigrateClusterInRuntimeResponse.Merge(m, src) -} -func (m *MigrateClusterInRuntimeResponse) XXX_Size() int { - return xxx_messageInfo_MigrateClusterInRuntimeResponse.Size(m) -} -func (m *MigrateClusterInRuntimeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MigrateClusterInRuntimeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MigrateClusterInRuntimeResponse proto.InternalMessageInfo - -func (m *MigrateClusterInRuntimeResponse) GetFromRuntimeId() string { - if m != nil { - return m.FromRuntimeId - } - return "" -} - -func (m *MigrateClusterInRuntimeResponse) GetToRuntimeId() string { - if m != nil { - return m.ToRuntimeId - } - return "" -} - -type CreateClusterRequest struct { - // required, id of app to run in cluster - AppId *wrappers.StringValue `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - // required, id of app version - VersionId *wrappers.StringValue `protobuf:"bytes,2,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - // required, id of runtime - RuntimeId *wrappers.StringValue `protobuf:"bytes,3,opt,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - // required, conf a json string, include cpu, memory info of cluster - Conf *wrappers.StringValue `protobuf:"bytes,4,opt,name=conf,proto3" json:"conf,omitempty"` - // advanced param - AdvancedParam []string `protobuf:"bytes,5,rep,name=advanced_param,json=advancedParam,proto3" json:"advanced_param,omitempty"` - // kubernetes namespace - Zone *wrappers.StringValue `protobuf:"bytes,6,opt,name=zone,proto3" json:"zone,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateClusterRequest) Reset() { *m = CreateClusterRequest{} } -func (m *CreateClusterRequest) String() string { return proto.CompactTextString(m) } -func (*CreateClusterRequest) ProtoMessage() {} -func (*CreateClusterRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{7} -} - -func (m *CreateClusterRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateClusterRequest.Unmarshal(m, b) -} -func (m *CreateClusterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateClusterRequest.Marshal(b, m, deterministic) -} -func (m *CreateClusterRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateClusterRequest.Merge(m, src) -} -func (m *CreateClusterRequest) XXX_Size() int { - return xxx_messageInfo_CreateClusterRequest.Size(m) -} -func (m *CreateClusterRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateClusterRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateClusterRequest proto.InternalMessageInfo - -func (m *CreateClusterRequest) GetAppId() *wrappers.StringValue { - if m != nil { - return m.AppId - } - return nil -} - -func (m *CreateClusterRequest) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -func (m *CreateClusterRequest) GetRuntimeId() *wrappers.StringValue { - if m != nil { - return m.RuntimeId - } - return nil -} - -func (m *CreateClusterRequest) GetConf() *wrappers.StringValue { - if m != nil { - return m.Conf - } - return nil -} - -func (m *CreateClusterRequest) GetAdvancedParam() []string { - if m != nil { - return m.AdvancedParam - } - return nil -} - -func (m *CreateClusterRequest) GetZone() *wrappers.StringValue { - if m != nil { - return m.Zone - } - return nil -} - -type CreateClusterResponse struct { - // id of cluster created - ClusterId *wrappers.StringValue `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // id of job - JobId *wrappers.StringValue `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateClusterResponse) Reset() { *m = CreateClusterResponse{} } -func (m *CreateClusterResponse) String() string { return proto.CompactTextString(m) } -func (*CreateClusterResponse) ProtoMessage() {} -func (*CreateClusterResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{8} -} - -func (m *CreateClusterResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateClusterResponse.Unmarshal(m, b) -} -func (m *CreateClusterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateClusterResponse.Marshal(b, m, deterministic) -} -func (m *CreateClusterResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateClusterResponse.Merge(m, src) -} -func (m *CreateClusterResponse) XXX_Size() int { - return xxx_messageInfo_CreateClusterResponse.Size(m) -} -func (m *CreateClusterResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CreateClusterResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateClusterResponse proto.InternalMessageInfo - -func (m *CreateClusterResponse) GetClusterId() *wrappers.StringValue { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *CreateClusterResponse) GetJobId() *wrappers.StringValue { - if m != nil { - return m.JobId - } - return nil -} - -type ModifyClusterRequest struct { - // required, cluster to modify - Cluster *Cluster `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"` - // list of cluster node - ClusterNodeSet []*ClusterNode `protobuf:"bytes,2,rep,name=cluster_node_set,json=clusterNodeSet,proto3" json:"cluster_node_set,omitempty"` - // list of cluster role - ClusterRoleSet []*ClusterRole `protobuf:"bytes,3,rep,name=cluster_role_set,json=clusterRoleSet,proto3" json:"cluster_role_set,omitempty"` - // list of cluster link - ClusterLinkSet []*ClusterLink `protobuf:"bytes,4,rep,name=cluster_link_set,json=clusterLinkSet,proto3" json:"cluster_link_set,omitempty"` - // list of cluster common - ClusterCommonSet []*ClusterCommon `protobuf:"bytes,5,rep,name=cluster_common_set,json=clusterCommonSet,proto3" json:"cluster_common_set,omitempty"` - // list of cluster loadbalancer - ClusterLoadbalancerSet []*ClusterLoadbalancer `protobuf:"bytes,6,rep,name=cluster_loadbalancer_set,json=clusterLoadbalancerSet,proto3" json:"cluster_loadbalancer_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyClusterRequest) Reset() { *m = ModifyClusterRequest{} } -func (m *ModifyClusterRequest) String() string { return proto.CompactTextString(m) } -func (*ModifyClusterRequest) ProtoMessage() {} -func (*ModifyClusterRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{9} -} - -func (m *ModifyClusterRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyClusterRequest.Unmarshal(m, b) -} -func (m *ModifyClusterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyClusterRequest.Marshal(b, m, deterministic) -} -func (m *ModifyClusterRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyClusterRequest.Merge(m, src) -} -func (m *ModifyClusterRequest) XXX_Size() int { - return xxx_messageInfo_ModifyClusterRequest.Size(m) -} -func (m *ModifyClusterRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyClusterRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyClusterRequest proto.InternalMessageInfo - -func (m *ModifyClusterRequest) GetCluster() *Cluster { - if m != nil { - return m.Cluster - } - return nil -} - -func (m *ModifyClusterRequest) GetClusterNodeSet() []*ClusterNode { - if m != nil { - return m.ClusterNodeSet - } - return nil -} - -func (m *ModifyClusterRequest) GetClusterRoleSet() []*ClusterRole { - if m != nil { - return m.ClusterRoleSet - } - return nil -} - -func (m *ModifyClusterRequest) GetClusterLinkSet() []*ClusterLink { - if m != nil { - return m.ClusterLinkSet - } - return nil -} - -func (m *ModifyClusterRequest) GetClusterCommonSet() []*ClusterCommon { - if m != nil { - return m.ClusterCommonSet - } - return nil -} - -func (m *ModifyClusterRequest) GetClusterLoadbalancerSet() []*ClusterLoadbalancer { - if m != nil { - return m.ClusterLoadbalancerSet - } - return nil -} - -type ModifyClusterResponse struct { - // id of cluster modified - ClusterId *wrappers.StringValue `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyClusterResponse) Reset() { *m = ModifyClusterResponse{} } -func (m *ModifyClusterResponse) String() string { return proto.CompactTextString(m) } -func (*ModifyClusterResponse) ProtoMessage() {} -func (*ModifyClusterResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{10} -} - -func (m *ModifyClusterResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyClusterResponse.Unmarshal(m, b) -} -func (m *ModifyClusterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyClusterResponse.Marshal(b, m, deterministic) -} -func (m *ModifyClusterResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyClusterResponse.Merge(m, src) -} -func (m *ModifyClusterResponse) XXX_Size() int { - return xxx_messageInfo_ModifyClusterResponse.Size(m) -} -func (m *ModifyClusterResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyClusterResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyClusterResponse proto.InternalMessageInfo - -func (m *ModifyClusterResponse) GetClusterId() *wrappers.StringValue { - if m != nil { - return m.ClusterId - } - return nil -} - -type ModifyClusterNodeRequest struct { - // required, cluster node to modify - ClusterNode *ClusterNode `protobuf:"bytes,1,opt,name=cluster_node,json=clusterNode,proto3" json:"cluster_node,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyClusterNodeRequest) Reset() { *m = ModifyClusterNodeRequest{} } -func (m *ModifyClusterNodeRequest) String() string { return proto.CompactTextString(m) } -func (*ModifyClusterNodeRequest) ProtoMessage() {} -func (*ModifyClusterNodeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{11} -} - -func (m *ModifyClusterNodeRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyClusterNodeRequest.Unmarshal(m, b) -} -func (m *ModifyClusterNodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyClusterNodeRequest.Marshal(b, m, deterministic) -} -func (m *ModifyClusterNodeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyClusterNodeRequest.Merge(m, src) -} -func (m *ModifyClusterNodeRequest) XXX_Size() int { - return xxx_messageInfo_ModifyClusterNodeRequest.Size(m) -} -func (m *ModifyClusterNodeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyClusterNodeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyClusterNodeRequest proto.InternalMessageInfo - -func (m *ModifyClusterNodeRequest) GetClusterNode() *ClusterNode { - if m != nil { - return m.ClusterNode - } - return nil -} - -type ModifyClusterNodeResponse struct { - // id of cluster node modified - NodeId *wrappers.StringValue `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyClusterNodeResponse) Reset() { *m = ModifyClusterNodeResponse{} } -func (m *ModifyClusterNodeResponse) String() string { return proto.CompactTextString(m) } -func (*ModifyClusterNodeResponse) ProtoMessage() {} -func (*ModifyClusterNodeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{12} -} - -func (m *ModifyClusterNodeResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyClusterNodeResponse.Unmarshal(m, b) -} -func (m *ModifyClusterNodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyClusterNodeResponse.Marshal(b, m, deterministic) -} -func (m *ModifyClusterNodeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyClusterNodeResponse.Merge(m, src) -} -func (m *ModifyClusterNodeResponse) XXX_Size() int { - return xxx_messageInfo_ModifyClusterNodeResponse.Size(m) -} -func (m *ModifyClusterNodeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyClusterNodeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyClusterNodeResponse proto.InternalMessageInfo - -func (m *ModifyClusterNodeResponse) GetNodeId() *wrappers.StringValue { - if m != nil { - return m.NodeId - } - return nil -} - -type ModifyClusterAttributesRequest struct { - // required, id of cluster to modify - ClusterId *wrappers.StringValue `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // cluster name - Name *wrappers.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // cluster description - Description *wrappers.StringValue `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyClusterAttributesRequest) Reset() { *m = ModifyClusterAttributesRequest{} } -func (m *ModifyClusterAttributesRequest) String() string { return proto.CompactTextString(m) } -func (*ModifyClusterAttributesRequest) ProtoMessage() {} -func (*ModifyClusterAttributesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{13} -} - -func (m *ModifyClusterAttributesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyClusterAttributesRequest.Unmarshal(m, b) -} -func (m *ModifyClusterAttributesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyClusterAttributesRequest.Marshal(b, m, deterministic) -} -func (m *ModifyClusterAttributesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyClusterAttributesRequest.Merge(m, src) -} -func (m *ModifyClusterAttributesRequest) XXX_Size() int { - return xxx_messageInfo_ModifyClusterAttributesRequest.Size(m) -} -func (m *ModifyClusterAttributesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyClusterAttributesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyClusterAttributesRequest proto.InternalMessageInfo - -func (m *ModifyClusterAttributesRequest) GetClusterId() *wrappers.StringValue { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *ModifyClusterAttributesRequest) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *ModifyClusterAttributesRequest) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -type ModifyClusterAttributesResponse struct { - // id of cluster modified - ClusterId *wrappers.StringValue `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyClusterAttributesResponse) Reset() { *m = ModifyClusterAttributesResponse{} } -func (m *ModifyClusterAttributesResponse) String() string { return proto.CompactTextString(m) } -func (*ModifyClusterAttributesResponse) ProtoMessage() {} -func (*ModifyClusterAttributesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{14} -} - -func (m *ModifyClusterAttributesResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyClusterAttributesResponse.Unmarshal(m, b) -} -func (m *ModifyClusterAttributesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyClusterAttributesResponse.Marshal(b, m, deterministic) -} -func (m *ModifyClusterAttributesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyClusterAttributesResponse.Merge(m, src) -} -func (m *ModifyClusterAttributesResponse) XXX_Size() int { - return xxx_messageInfo_ModifyClusterAttributesResponse.Size(m) -} -func (m *ModifyClusterAttributesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyClusterAttributesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyClusterAttributesResponse proto.InternalMessageInfo - -func (m *ModifyClusterAttributesResponse) GetClusterId() *wrappers.StringValue { - if m != nil { - return m.ClusterId - } - return nil -} - -type ModifyClusterNodeAttributesRequest struct { - // required, id of cluster node to modify - NodeId *wrappers.StringValue `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - // node name - Name *wrappers.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyClusterNodeAttributesRequest) Reset() { *m = ModifyClusterNodeAttributesRequest{} } -func (m *ModifyClusterNodeAttributesRequest) String() string { return proto.CompactTextString(m) } -func (*ModifyClusterNodeAttributesRequest) ProtoMessage() {} -func (*ModifyClusterNodeAttributesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{15} -} - -func (m *ModifyClusterNodeAttributesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyClusterNodeAttributesRequest.Unmarshal(m, b) -} -func (m *ModifyClusterNodeAttributesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyClusterNodeAttributesRequest.Marshal(b, m, deterministic) -} -func (m *ModifyClusterNodeAttributesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyClusterNodeAttributesRequest.Merge(m, src) -} -func (m *ModifyClusterNodeAttributesRequest) XXX_Size() int { - return xxx_messageInfo_ModifyClusterNodeAttributesRequest.Size(m) -} -func (m *ModifyClusterNodeAttributesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyClusterNodeAttributesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyClusterNodeAttributesRequest proto.InternalMessageInfo - -func (m *ModifyClusterNodeAttributesRequest) GetNodeId() *wrappers.StringValue { - if m != nil { - return m.NodeId - } - return nil -} - -func (m *ModifyClusterNodeAttributesRequest) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -type ModifyClusterNodeAttributesResponse struct { - // id of cluster node modified - NodeId *wrappers.StringValue `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyClusterNodeAttributesResponse) Reset() { *m = ModifyClusterNodeAttributesResponse{} } -func (m *ModifyClusterNodeAttributesResponse) String() string { return proto.CompactTextString(m) } -func (*ModifyClusterNodeAttributesResponse) ProtoMessage() {} -func (*ModifyClusterNodeAttributesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{16} -} - -func (m *ModifyClusterNodeAttributesResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyClusterNodeAttributesResponse.Unmarshal(m, b) -} -func (m *ModifyClusterNodeAttributesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyClusterNodeAttributesResponse.Marshal(b, m, deterministic) -} -func (m *ModifyClusterNodeAttributesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyClusterNodeAttributesResponse.Merge(m, src) -} -func (m *ModifyClusterNodeAttributesResponse) XXX_Size() int { - return xxx_messageInfo_ModifyClusterNodeAttributesResponse.Size(m) -} -func (m *ModifyClusterNodeAttributesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyClusterNodeAttributesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyClusterNodeAttributesResponse proto.InternalMessageInfo - -func (m *ModifyClusterNodeAttributesResponse) GetNodeId() *wrappers.StringValue { - if m != nil { - return m.NodeId - } - return nil -} - -type AddTableClusterNodesRequest struct { - // required, list of node to add to cluster - ClusterNodeSet []*ClusterNode `protobuf:"bytes,1,rep,name=cluster_node_set,json=clusterNodeSet,proto3" json:"cluster_node_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AddTableClusterNodesRequest) Reset() { *m = AddTableClusterNodesRequest{} } -func (m *AddTableClusterNodesRequest) String() string { return proto.CompactTextString(m) } -func (*AddTableClusterNodesRequest) ProtoMessage() {} -func (*AddTableClusterNodesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{17} -} - -func (m *AddTableClusterNodesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AddTableClusterNodesRequest.Unmarshal(m, b) -} -func (m *AddTableClusterNodesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AddTableClusterNodesRequest.Marshal(b, m, deterministic) -} -func (m *AddTableClusterNodesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddTableClusterNodesRequest.Merge(m, src) -} -func (m *AddTableClusterNodesRequest) XXX_Size() int { - return xxx_messageInfo_AddTableClusterNodesRequest.Size(m) -} -func (m *AddTableClusterNodesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AddTableClusterNodesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AddTableClusterNodesRequest proto.InternalMessageInfo - -func (m *AddTableClusterNodesRequest) GetClusterNodeSet() []*ClusterNode { - if m != nil { - return m.ClusterNodeSet - } - return nil -} - -type DeleteTableClusterNodesRequest struct { - // required, list of node to delete from cluster - NodeId []string `protobuf:"bytes,1,rep,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteTableClusterNodesRequest) Reset() { *m = DeleteTableClusterNodesRequest{} } -func (m *DeleteTableClusterNodesRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteTableClusterNodesRequest) ProtoMessage() {} -func (*DeleteTableClusterNodesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{18} -} - -func (m *DeleteTableClusterNodesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteTableClusterNodesRequest.Unmarshal(m, b) -} -func (m *DeleteTableClusterNodesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteTableClusterNodesRequest.Marshal(b, m, deterministic) -} -func (m *DeleteTableClusterNodesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteTableClusterNodesRequest.Merge(m, src) -} -func (m *DeleteTableClusterNodesRequest) XXX_Size() int { - return xxx_messageInfo_DeleteTableClusterNodesRequest.Size(m) -} -func (m *DeleteTableClusterNodesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteTableClusterNodesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteTableClusterNodesRequest proto.InternalMessageInfo - -func (m *DeleteTableClusterNodesRequest) GetNodeId() []string { - if m != nil { - return m.NodeId - } - return nil -} - -type DeleteClustersRequest struct { - // required, ids of clusters to delete - ClusterId []string `protobuf:"bytes,1,rep,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // advanced param - AdvancedParam []string `protobuf:"bytes,2,rep,name=advanced_param,json=advancedParam,proto3" json:"advanced_param,omitempty"` - // whether force delete clusters or not - Force *wrappers.BoolValue `protobuf:"bytes,3,opt,name=force,proto3" json:"force,omitempty"` - // timeout(s), when delete clusters - GracePeriod uint32 `protobuf:"varint,4,opt,name=grace_period,json=gracePeriod,proto3" json:"grace_period,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteClustersRequest) Reset() { *m = DeleteClustersRequest{} } -func (m *DeleteClustersRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteClustersRequest) ProtoMessage() {} -func (*DeleteClustersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{19} -} - -func (m *DeleteClustersRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteClustersRequest.Unmarshal(m, b) -} -func (m *DeleteClustersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteClustersRequest.Marshal(b, m, deterministic) -} -func (m *DeleteClustersRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteClustersRequest.Merge(m, src) -} -func (m *DeleteClustersRequest) XXX_Size() int { - return xxx_messageInfo_DeleteClustersRequest.Size(m) -} -func (m *DeleteClustersRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteClustersRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteClustersRequest proto.InternalMessageInfo - -func (m *DeleteClustersRequest) GetClusterId() []string { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *DeleteClustersRequest) GetAdvancedParam() []string { - if m != nil { - return m.AdvancedParam - } - return nil -} - -func (m *DeleteClustersRequest) GetForce() *wrappers.BoolValue { - if m != nil { - return m.Force - } - return nil -} - -func (m *DeleteClustersRequest) GetGracePeriod() uint32 { - if m != nil { - return m.GracePeriod - } - return 0 -} - -type DeleteClustersResponse struct { - // ids of clusters deleted - ClusterId []string `protobuf:"bytes,1,rep,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // ids of jobs - JobId []string `protobuf:"bytes,2,rep,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteClustersResponse) Reset() { *m = DeleteClustersResponse{} } -func (m *DeleteClustersResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteClustersResponse) ProtoMessage() {} -func (*DeleteClustersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{20} -} - -func (m *DeleteClustersResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteClustersResponse.Unmarshal(m, b) -} -func (m *DeleteClustersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteClustersResponse.Marshal(b, m, deterministic) -} -func (m *DeleteClustersResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteClustersResponse.Merge(m, src) -} -func (m *DeleteClustersResponse) XXX_Size() int { - return xxx_messageInfo_DeleteClustersResponse.Size(m) -} -func (m *DeleteClustersResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteClustersResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteClustersResponse proto.InternalMessageInfo - -func (m *DeleteClustersResponse) GetClusterId() []string { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *DeleteClustersResponse) GetJobId() []string { - if m != nil { - return m.JobId - } - return nil -} - -type UpgradeClusterRequest struct { - // required, id of cluster to upgrade - ClusterId *wrappers.StringValue `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // app version id - VersionId *wrappers.StringValue `protobuf:"bytes,2,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - // advanced param - AdvancedParam []string `protobuf:"bytes,3,rep,name=advanced_param,json=advancedParam,proto3" json:"advanced_param,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UpgradeClusterRequest) Reset() { *m = UpgradeClusterRequest{} } -func (m *UpgradeClusterRequest) String() string { return proto.CompactTextString(m) } -func (*UpgradeClusterRequest) ProtoMessage() {} -func (*UpgradeClusterRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{21} -} - -func (m *UpgradeClusterRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UpgradeClusterRequest.Unmarshal(m, b) -} -func (m *UpgradeClusterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UpgradeClusterRequest.Marshal(b, m, deterministic) -} -func (m *UpgradeClusterRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpgradeClusterRequest.Merge(m, src) -} -func (m *UpgradeClusterRequest) XXX_Size() int { - return xxx_messageInfo_UpgradeClusterRequest.Size(m) -} -func (m *UpgradeClusterRequest) XXX_DiscardUnknown() { - xxx_messageInfo_UpgradeClusterRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_UpgradeClusterRequest proto.InternalMessageInfo - -func (m *UpgradeClusterRequest) GetClusterId() *wrappers.StringValue { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *UpgradeClusterRequest) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -func (m *UpgradeClusterRequest) GetAdvancedParam() []string { - if m != nil { - return m.AdvancedParam - } - return nil -} - -type UpgradeClusterResponse struct { - // id of cluster upgraded - ClusterId *wrappers.StringValue `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // job id - JobId *wrappers.StringValue `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UpgradeClusterResponse) Reset() { *m = UpgradeClusterResponse{} } -func (m *UpgradeClusterResponse) String() string { return proto.CompactTextString(m) } -func (*UpgradeClusterResponse) ProtoMessage() {} -func (*UpgradeClusterResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{22} -} - -func (m *UpgradeClusterResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UpgradeClusterResponse.Unmarshal(m, b) -} -func (m *UpgradeClusterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UpgradeClusterResponse.Marshal(b, m, deterministic) -} -func (m *UpgradeClusterResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpgradeClusterResponse.Merge(m, src) -} -func (m *UpgradeClusterResponse) XXX_Size() int { - return xxx_messageInfo_UpgradeClusterResponse.Size(m) -} -func (m *UpgradeClusterResponse) XXX_DiscardUnknown() { - xxx_messageInfo_UpgradeClusterResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_UpgradeClusterResponse proto.InternalMessageInfo - -func (m *UpgradeClusterResponse) GetClusterId() *wrappers.StringValue { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *UpgradeClusterResponse) GetJobId() *wrappers.StringValue { - if m != nil { - return m.JobId - } - return nil -} - -type RollbackClusterRequest struct { - // required, id of cluster to rollback - ClusterId *wrappers.StringValue `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // advanced param - AdvancedParam []string `protobuf:"bytes,2,rep,name=advanced_param,json=advancedParam,proto3" json:"advanced_param,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RollbackClusterRequest) Reset() { *m = RollbackClusterRequest{} } -func (m *RollbackClusterRequest) String() string { return proto.CompactTextString(m) } -func (*RollbackClusterRequest) ProtoMessage() {} -func (*RollbackClusterRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{23} -} - -func (m *RollbackClusterRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RollbackClusterRequest.Unmarshal(m, b) -} -func (m *RollbackClusterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RollbackClusterRequest.Marshal(b, m, deterministic) -} -func (m *RollbackClusterRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RollbackClusterRequest.Merge(m, src) -} -func (m *RollbackClusterRequest) XXX_Size() int { - return xxx_messageInfo_RollbackClusterRequest.Size(m) -} -func (m *RollbackClusterRequest) XXX_DiscardUnknown() { - xxx_messageInfo_RollbackClusterRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_RollbackClusterRequest proto.InternalMessageInfo - -func (m *RollbackClusterRequest) GetClusterId() *wrappers.StringValue { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *RollbackClusterRequest) GetAdvancedParam() []string { - if m != nil { - return m.AdvancedParam - } - return nil -} - -type RollbackClusterResponse struct { - // id of cluster to rollbacked - ClusterId *wrappers.StringValue `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // job id - JobId *wrappers.StringValue `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RollbackClusterResponse) Reset() { *m = RollbackClusterResponse{} } -func (m *RollbackClusterResponse) String() string { return proto.CompactTextString(m) } -func (*RollbackClusterResponse) ProtoMessage() {} -func (*RollbackClusterResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{24} -} - -func (m *RollbackClusterResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RollbackClusterResponse.Unmarshal(m, b) -} -func (m *RollbackClusterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RollbackClusterResponse.Marshal(b, m, deterministic) -} -func (m *RollbackClusterResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RollbackClusterResponse.Merge(m, src) -} -func (m *RollbackClusterResponse) XXX_Size() int { - return xxx_messageInfo_RollbackClusterResponse.Size(m) -} -func (m *RollbackClusterResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RollbackClusterResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_RollbackClusterResponse proto.InternalMessageInfo - -func (m *RollbackClusterResponse) GetClusterId() *wrappers.StringValue { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *RollbackClusterResponse) GetJobId() *wrappers.StringValue { - if m != nil { - return m.JobId - } - return nil -} - -type RoleResource struct { - // role.eg:[mysql|wordpress] - Role *wrappers.StringValue `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` - // number of cpu - Cpu *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=cpu,proto3" json:"cpu,omitempty"` - // number of gpu - Gpu *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=gpu,proto3" json:"gpu,omitempty"` - // size of memory - Memory *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=memory,proto3" json:"memory,omitempty"` - // size of instance - InstanceSize *wrappers.UInt32Value `protobuf:"bytes,5,opt,name=instance_size,json=instanceSize,proto3" json:"instance_size,omitempty"` - // size of storage - StorageSize *wrappers.UInt32Value `protobuf:"bytes,6,opt,name=storage_size,json=storageSize,proto3" json:"storage_size,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RoleResource) Reset() { *m = RoleResource{} } -func (m *RoleResource) String() string { return proto.CompactTextString(m) } -func (*RoleResource) ProtoMessage() {} -func (*RoleResource) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{25} -} - -func (m *RoleResource) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RoleResource.Unmarshal(m, b) -} -func (m *RoleResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RoleResource.Marshal(b, m, deterministic) -} -func (m *RoleResource) XXX_Merge(src proto.Message) { - xxx_messageInfo_RoleResource.Merge(m, src) -} -func (m *RoleResource) XXX_Size() int { - return xxx_messageInfo_RoleResource.Size(m) -} -func (m *RoleResource) XXX_DiscardUnknown() { - xxx_messageInfo_RoleResource.DiscardUnknown(m) -} - -var xxx_messageInfo_RoleResource proto.InternalMessageInfo - -func (m *RoleResource) GetRole() *wrappers.StringValue { - if m != nil { - return m.Role - } - return nil -} - -func (m *RoleResource) GetCpu() *wrappers.UInt32Value { - if m != nil { - return m.Cpu - } - return nil -} - -func (m *RoleResource) GetGpu() *wrappers.UInt32Value { - if m != nil { - return m.Gpu - } - return nil -} - -func (m *RoleResource) GetMemory() *wrappers.UInt32Value { - if m != nil { - return m.Memory - } - return nil -} - -func (m *RoleResource) GetInstanceSize() *wrappers.UInt32Value { - if m != nil { - return m.InstanceSize - } - return nil -} - -func (m *RoleResource) GetStorageSize() *wrappers.UInt32Value { - if m != nil { - return m.StorageSize - } - return nil -} - -type ResizeClusterRequest struct { - // required, id of cluster to resize - ClusterId *wrappers.StringValue `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // list of role resource - RoleResource []*RoleResource `protobuf:"bytes,2,rep,name=role_resource,json=roleResource,proto3" json:"role_resource,omitempty"` - // advanced param - AdvancedParam []string `protobuf:"bytes,5,rep,name=advanced_param,json=advancedParam,proto3" json:"advanced_param,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ResizeClusterRequest) Reset() { *m = ResizeClusterRequest{} } -func (m *ResizeClusterRequest) String() string { return proto.CompactTextString(m) } -func (*ResizeClusterRequest) ProtoMessage() {} -func (*ResizeClusterRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{26} -} - -func (m *ResizeClusterRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ResizeClusterRequest.Unmarshal(m, b) -} -func (m *ResizeClusterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ResizeClusterRequest.Marshal(b, m, deterministic) -} -func (m *ResizeClusterRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResizeClusterRequest.Merge(m, src) -} -func (m *ResizeClusterRequest) XXX_Size() int { - return xxx_messageInfo_ResizeClusterRequest.Size(m) -} -func (m *ResizeClusterRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ResizeClusterRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ResizeClusterRequest proto.InternalMessageInfo - -func (m *ResizeClusterRequest) GetClusterId() *wrappers.StringValue { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *ResizeClusterRequest) GetRoleResource() []*RoleResource { - if m != nil { - return m.RoleResource - } - return nil -} - -func (m *ResizeClusterRequest) GetAdvancedParam() []string { - if m != nil { - return m.AdvancedParam - } - return nil -} - -type ResizeClusterResponse struct { - // id of cluster resized - ClusterId *wrappers.StringValue `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // job id - JobId *wrappers.StringValue `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ResizeClusterResponse) Reset() { *m = ResizeClusterResponse{} } -func (m *ResizeClusterResponse) String() string { return proto.CompactTextString(m) } -func (*ResizeClusterResponse) ProtoMessage() {} -func (*ResizeClusterResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{27} -} - -func (m *ResizeClusterResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ResizeClusterResponse.Unmarshal(m, b) -} -func (m *ResizeClusterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ResizeClusterResponse.Marshal(b, m, deterministic) -} -func (m *ResizeClusterResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResizeClusterResponse.Merge(m, src) -} -func (m *ResizeClusterResponse) XXX_Size() int { - return xxx_messageInfo_ResizeClusterResponse.Size(m) -} -func (m *ResizeClusterResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ResizeClusterResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ResizeClusterResponse proto.InternalMessageInfo - -func (m *ResizeClusterResponse) GetClusterId() *wrappers.StringValue { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *ResizeClusterResponse) GetJobId() *wrappers.StringValue { - if m != nil { - return m.JobId - } - return nil -} - -type AddClusterNodesRequest struct { - // required, id of cluster to add node - ClusterId *wrappers.StringValue `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // required, role eg:[mysql|wordpress|...] - Role *wrappers.StringValue `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` - // number of node added to cluster - NodeCount *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=node_count,json=nodeCount,proto3" json:"node_count,omitempty"` - // advanced param - AdvancedParam []string `protobuf:"bytes,4,rep,name=advanced_param,json=advancedParam,proto3" json:"advanced_param,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AddClusterNodesRequest) Reset() { *m = AddClusterNodesRequest{} } -func (m *AddClusterNodesRequest) String() string { return proto.CompactTextString(m) } -func (*AddClusterNodesRequest) ProtoMessage() {} -func (*AddClusterNodesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{28} -} - -func (m *AddClusterNodesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AddClusterNodesRequest.Unmarshal(m, b) -} -func (m *AddClusterNodesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AddClusterNodesRequest.Marshal(b, m, deterministic) -} -func (m *AddClusterNodesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddClusterNodesRequest.Merge(m, src) -} -func (m *AddClusterNodesRequest) XXX_Size() int { - return xxx_messageInfo_AddClusterNodesRequest.Size(m) -} -func (m *AddClusterNodesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AddClusterNodesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AddClusterNodesRequest proto.InternalMessageInfo - -func (m *AddClusterNodesRequest) GetClusterId() *wrappers.StringValue { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *AddClusterNodesRequest) GetRole() *wrappers.StringValue { - if m != nil { - return m.Role - } - return nil -} - -func (m *AddClusterNodesRequest) GetNodeCount() *wrappers.UInt32Value { - if m != nil { - return m.NodeCount - } - return nil -} - -func (m *AddClusterNodesRequest) GetAdvancedParam() []string { - if m != nil { - return m.AdvancedParam - } - return nil -} - -type AddClusterNodesResponse struct { - // id of cluster added node - ClusterId *wrappers.StringValue `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // id of job of add node to cluster - JobId *wrappers.StringValue `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AddClusterNodesResponse) Reset() { *m = AddClusterNodesResponse{} } -func (m *AddClusterNodesResponse) String() string { return proto.CompactTextString(m) } -func (*AddClusterNodesResponse) ProtoMessage() {} -func (*AddClusterNodesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{29} -} - -func (m *AddClusterNodesResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AddClusterNodesResponse.Unmarshal(m, b) -} -func (m *AddClusterNodesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AddClusterNodesResponse.Marshal(b, m, deterministic) -} -func (m *AddClusterNodesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddClusterNodesResponse.Merge(m, src) -} -func (m *AddClusterNodesResponse) XXX_Size() int { - return xxx_messageInfo_AddClusterNodesResponse.Size(m) -} -func (m *AddClusterNodesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AddClusterNodesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AddClusterNodesResponse proto.InternalMessageInfo - -func (m *AddClusterNodesResponse) GetClusterId() *wrappers.StringValue { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *AddClusterNodesResponse) GetJobId() *wrappers.StringValue { - if m != nil { - return m.JobId - } - return nil -} - -type DeleteClusterNodesRequest struct { - // required, id of cluster to delete node - ClusterId *wrappers.StringValue `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // required, node ids - NodeId []string `protobuf:"bytes,2,rep,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - // advanced param - AdvancedParam []string `protobuf:"bytes,3,rep,name=advanced_param,json=advancedParam,proto3" json:"advanced_param,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteClusterNodesRequest) Reset() { *m = DeleteClusterNodesRequest{} } -func (m *DeleteClusterNodesRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteClusterNodesRequest) ProtoMessage() {} -func (*DeleteClusterNodesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{30} -} - -func (m *DeleteClusterNodesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteClusterNodesRequest.Unmarshal(m, b) -} -func (m *DeleteClusterNodesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteClusterNodesRequest.Marshal(b, m, deterministic) -} -func (m *DeleteClusterNodesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteClusterNodesRequest.Merge(m, src) -} -func (m *DeleteClusterNodesRequest) XXX_Size() int { - return xxx_messageInfo_DeleteClusterNodesRequest.Size(m) -} -func (m *DeleteClusterNodesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteClusterNodesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteClusterNodesRequest proto.InternalMessageInfo - -func (m *DeleteClusterNodesRequest) GetClusterId() *wrappers.StringValue { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *DeleteClusterNodesRequest) GetNodeId() []string { - if m != nil { - return m.NodeId - } - return nil -} - -func (m *DeleteClusterNodesRequest) GetAdvancedParam() []string { - if m != nil { - return m.AdvancedParam - } - return nil -} - -type DeleteClusterNodesResponse struct { - // id of cluster deleted node - ClusterId *wrappers.StringValue `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // job id - JobId *wrappers.StringValue `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteClusterNodesResponse) Reset() { *m = DeleteClusterNodesResponse{} } -func (m *DeleteClusterNodesResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteClusterNodesResponse) ProtoMessage() {} -func (*DeleteClusterNodesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{31} -} - -func (m *DeleteClusterNodesResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteClusterNodesResponse.Unmarshal(m, b) -} -func (m *DeleteClusterNodesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteClusterNodesResponse.Marshal(b, m, deterministic) -} -func (m *DeleteClusterNodesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteClusterNodesResponse.Merge(m, src) -} -func (m *DeleteClusterNodesResponse) XXX_Size() int { - return xxx_messageInfo_DeleteClusterNodesResponse.Size(m) -} -func (m *DeleteClusterNodesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteClusterNodesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteClusterNodesResponse proto.InternalMessageInfo - -func (m *DeleteClusterNodesResponse) GetClusterId() *wrappers.StringValue { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *DeleteClusterNodesResponse) GetJobId() *wrappers.StringValue { - if m != nil { - return m.JobId - } - return nil -} - -type UpdateClusterEnvRequest struct { - // id of cluster to update env - ClusterId *wrappers.StringValue `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // env - Env *wrappers.StringValue `protobuf:"bytes,2,opt,name=env,proto3" json:"env,omitempty"` - // advanced param - AdvancedParam []string `protobuf:"bytes,3,rep,name=advanced_param,json=advancedParam,proto3" json:"advanced_param,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UpdateClusterEnvRequest) Reset() { *m = UpdateClusterEnvRequest{} } -func (m *UpdateClusterEnvRequest) String() string { return proto.CompactTextString(m) } -func (*UpdateClusterEnvRequest) ProtoMessage() {} -func (*UpdateClusterEnvRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{32} -} - -func (m *UpdateClusterEnvRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UpdateClusterEnvRequest.Unmarshal(m, b) -} -func (m *UpdateClusterEnvRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UpdateClusterEnvRequest.Marshal(b, m, deterministic) -} -func (m *UpdateClusterEnvRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpdateClusterEnvRequest.Merge(m, src) -} -func (m *UpdateClusterEnvRequest) XXX_Size() int { - return xxx_messageInfo_UpdateClusterEnvRequest.Size(m) -} -func (m *UpdateClusterEnvRequest) XXX_DiscardUnknown() { - xxx_messageInfo_UpdateClusterEnvRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_UpdateClusterEnvRequest proto.InternalMessageInfo - -func (m *UpdateClusterEnvRequest) GetClusterId() *wrappers.StringValue { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *UpdateClusterEnvRequest) GetEnv() *wrappers.StringValue { - if m != nil { - return m.Env - } - return nil -} - -func (m *UpdateClusterEnvRequest) GetAdvancedParam() []string { - if m != nil { - return m.AdvancedParam - } - return nil -} - -type UpdateClusterEnvResponse struct { - // id of cluster to updated env - ClusterId *wrappers.StringValue `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // job id - JobId *wrappers.StringValue `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UpdateClusterEnvResponse) Reset() { *m = UpdateClusterEnvResponse{} } -func (m *UpdateClusterEnvResponse) String() string { return proto.CompactTextString(m) } -func (*UpdateClusterEnvResponse) ProtoMessage() {} -func (*UpdateClusterEnvResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{33} -} - -func (m *UpdateClusterEnvResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UpdateClusterEnvResponse.Unmarshal(m, b) -} -func (m *UpdateClusterEnvResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UpdateClusterEnvResponse.Marshal(b, m, deterministic) -} -func (m *UpdateClusterEnvResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpdateClusterEnvResponse.Merge(m, src) -} -func (m *UpdateClusterEnvResponse) XXX_Size() int { - return xxx_messageInfo_UpdateClusterEnvResponse.Size(m) -} -func (m *UpdateClusterEnvResponse) XXX_DiscardUnknown() { - xxx_messageInfo_UpdateClusterEnvResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_UpdateClusterEnvResponse proto.InternalMessageInfo - -func (m *UpdateClusterEnvResponse) GetClusterId() *wrappers.StringValue { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *UpdateClusterEnvResponse) GetJobId() *wrappers.StringValue { - if m != nil { - return m.JobId - } - return nil -} - -type ClusterCommon struct { - // cluster id - ClusterId *wrappers.StringValue `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // cluster role - Role *wrappers.StringValue `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` - // bound of server id(index number), some service(zookeeper) need the index to be bounded - ServerIdUpperBound *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=server_id_upper_bound,json=serverIdUpperBound,proto3" json:"server_id_upper_bound,omitempty"` - // action of cluster support.eg.[change_vxnet|scale_horizontal] - AdvancedActions *wrappers.StringValue `protobuf:"bytes,4,opt,name=advanced_actions,json=advancedActions,proto3" json:"advanced_actions,omitempty"` - // init service config, a json string - InitService *wrappers.StringValue `protobuf:"bytes,5,opt,name=init_service,json=initService,proto3" json:"init_service,omitempty"` - // start service config, a json string - StartService *wrappers.StringValue `protobuf:"bytes,6,opt,name=start_service,json=startService,proto3" json:"start_service,omitempty"` - // stop service config, a json string - StopService *wrappers.StringValue `protobuf:"bytes,7,opt,name=stop_service,json=stopService,proto3" json:"stop_service,omitempty"` - // scale out service config, a json string - ScaleOutService *wrappers.StringValue `protobuf:"bytes,8,opt,name=scale_out_service,json=scaleOutService,proto3" json:"scale_out_service,omitempty"` - // scale in service config, a json string - ScaleInService *wrappers.StringValue `protobuf:"bytes,9,opt,name=scale_in_service,json=scaleInService,proto3" json:"scale_in_service,omitempty"` - // restart service config, a json string - RestartService *wrappers.StringValue `protobuf:"bytes,10,opt,name=restart_service,json=restartService,proto3" json:"restart_service,omitempty"` - // destroy service config, a json string - DestroyService *wrappers.StringValue `protobuf:"bytes,11,opt,name=destroy_service,json=destroyService,proto3" json:"destroy_service,omitempty"` - // upgrade service config, a json string - UpgradeService *wrappers.StringValue `protobuf:"bytes,12,opt,name=upgrade_service,json=upgradeService,proto3" json:"upgrade_service,omitempty"` - // custom service config, a json string - CustomService *wrappers.StringValue `protobuf:"bytes,13,opt,name=custom_service,json=customService,proto3" json:"custom_service,omitempty"` - // backup service config, a json string - BackupService *wrappers.StringValue `protobuf:"bytes,14,opt,name=backup_service,json=backupService,proto3" json:"backup_service,omitempty"` - // restore service config, a json string - RestoreService *wrappers.StringValue `protobuf:"bytes,15,opt,name=restore_service,json=restoreService,proto3" json:"restore_service,omitempty"` - // delete snapshot service config, a json string - DeleteSnapshotService *wrappers.StringValue `protobuf:"bytes,16,opt,name=delete_snapshot_service,json=deleteSnapshotService,proto3" json:"delete_snapshot_service,omitempty"` - // health check config,a json string - HealthCheck *wrappers.StringValue `protobuf:"bytes,17,opt,name=health_check,json=healthCheck,proto3" json:"health_check,omitempty"` - // monitor config,a json string - Monitor *wrappers.StringValue `protobuf:"bytes,18,opt,name=monitor,proto3" json:"monitor,omitempty"` - Passphraseless *wrappers.StringValue `protobuf:"bytes,19,opt,name=passphraseless,proto3" json:"passphraseless,omitempty"` - // vertical scaling policy.eg.[parallel|sequential] - VerticalScalingPolicy *wrappers.StringValue `protobuf:"bytes,20,opt,name=vertical_scaling_policy,json=verticalScalingPolicy,proto3" json:"vertical_scaling_policy,omitempty"` - // agent install or not - AgentInstalled *wrappers.BoolValue `protobuf:"bytes,21,opt,name=agent_installed,json=agentInstalled,proto3" json:"agent_installed,omitempty"` - // custom metadata script, a json string - CustomMetadataScript *wrappers.StringValue `protobuf:"bytes,22,opt,name=custom_metadata_script,json=customMetadataScript,proto3" json:"custom_metadata_script,omitempty"` - // image id - ImageId *wrappers.StringValue `protobuf:"bytes,23,opt,name=image_id,json=imageId,proto3" json:"image_id,omitempty"` - // policy of backup - BackupPolicy *wrappers.StringValue `protobuf:"bytes,24,opt,name=backup_policy,json=backupPolicy,proto3" json:"backup_policy,omitempty"` - // support incremental backup or not - IncrementalBackupSupported *wrappers.BoolValue `protobuf:"bytes,25,opt,name=incremental_backup_supported,json=incrementalBackupSupported,proto3" json:"incremental_backup_supported,omitempty"` - // hypervisor.eg.[docker|kvm|...] - Hypervisor *wrappers.StringValue `protobuf:"bytes,26,opt,name=hypervisor,proto3" json:"hypervisor,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ClusterCommon) Reset() { *m = ClusterCommon{} } -func (m *ClusterCommon) String() string { return proto.CompactTextString(m) } -func (*ClusterCommon) ProtoMessage() {} -func (*ClusterCommon) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{34} -} - -func (m *ClusterCommon) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ClusterCommon.Unmarshal(m, b) -} -func (m *ClusterCommon) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ClusterCommon.Marshal(b, m, deterministic) -} -func (m *ClusterCommon) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterCommon.Merge(m, src) -} -func (m *ClusterCommon) XXX_Size() int { - return xxx_messageInfo_ClusterCommon.Size(m) -} -func (m *ClusterCommon) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterCommon.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterCommon proto.InternalMessageInfo - -func (m *ClusterCommon) GetClusterId() *wrappers.StringValue { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *ClusterCommon) GetRole() *wrappers.StringValue { - if m != nil { - return m.Role - } - return nil -} - -func (m *ClusterCommon) GetServerIdUpperBound() *wrappers.UInt32Value { - if m != nil { - return m.ServerIdUpperBound - } - return nil -} - -func (m *ClusterCommon) GetAdvancedActions() *wrappers.StringValue { - if m != nil { - return m.AdvancedActions - } - return nil -} - -func (m *ClusterCommon) GetInitService() *wrappers.StringValue { - if m != nil { - return m.InitService - } - return nil -} - -func (m *ClusterCommon) GetStartService() *wrappers.StringValue { - if m != nil { - return m.StartService - } - return nil -} - -func (m *ClusterCommon) GetStopService() *wrappers.StringValue { - if m != nil { - return m.StopService - } - return nil -} - -func (m *ClusterCommon) GetScaleOutService() *wrappers.StringValue { - if m != nil { - return m.ScaleOutService - } - return nil -} - -func (m *ClusterCommon) GetScaleInService() *wrappers.StringValue { - if m != nil { - return m.ScaleInService - } - return nil -} - -func (m *ClusterCommon) GetRestartService() *wrappers.StringValue { - if m != nil { - return m.RestartService - } - return nil -} - -func (m *ClusterCommon) GetDestroyService() *wrappers.StringValue { - if m != nil { - return m.DestroyService - } - return nil -} - -func (m *ClusterCommon) GetUpgradeService() *wrappers.StringValue { - if m != nil { - return m.UpgradeService - } - return nil -} - -func (m *ClusterCommon) GetCustomService() *wrappers.StringValue { - if m != nil { - return m.CustomService - } - return nil -} - -func (m *ClusterCommon) GetBackupService() *wrappers.StringValue { - if m != nil { - return m.BackupService - } - return nil -} - -func (m *ClusterCommon) GetRestoreService() *wrappers.StringValue { - if m != nil { - return m.RestoreService - } - return nil -} - -func (m *ClusterCommon) GetDeleteSnapshotService() *wrappers.StringValue { - if m != nil { - return m.DeleteSnapshotService - } - return nil -} - -func (m *ClusterCommon) GetHealthCheck() *wrappers.StringValue { - if m != nil { - return m.HealthCheck - } - return nil -} - -func (m *ClusterCommon) GetMonitor() *wrappers.StringValue { - if m != nil { - return m.Monitor - } - return nil -} - -func (m *ClusterCommon) GetPassphraseless() *wrappers.StringValue { - if m != nil { - return m.Passphraseless - } - return nil -} - -func (m *ClusterCommon) GetVerticalScalingPolicy() *wrappers.StringValue { - if m != nil { - return m.VerticalScalingPolicy - } - return nil -} - -func (m *ClusterCommon) GetAgentInstalled() *wrappers.BoolValue { - if m != nil { - return m.AgentInstalled - } - return nil -} - -func (m *ClusterCommon) GetCustomMetadataScript() *wrappers.StringValue { - if m != nil { - return m.CustomMetadataScript - } - return nil -} - -func (m *ClusterCommon) GetImageId() *wrappers.StringValue { - if m != nil { - return m.ImageId - } - return nil -} - -func (m *ClusterCommon) GetBackupPolicy() *wrappers.StringValue { - if m != nil { - return m.BackupPolicy - } - return nil -} - -func (m *ClusterCommon) GetIncrementalBackupSupported() *wrappers.BoolValue { - if m != nil { - return m.IncrementalBackupSupported - } - return nil -} - -func (m *ClusterCommon) GetHypervisor() *wrappers.StringValue { - if m != nil { - return m.Hypervisor - } - return nil -} - -type ClusterNode struct { - // cluster node(cluster contain one more node) id - NodeId *wrappers.StringValue `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - // cluster id - ClusterId *wrappers.StringValue `protobuf:"bytes,2,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // name, default empty - Name *wrappers.StringValue `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - // instance id - InstanceId *wrappers.StringValue `protobuf:"bytes,4,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` - // volume id, if mount volume - VolumeId *wrappers.StringValue `protobuf:"bytes,5,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` - // device - Device *wrappers.StringValue `protobuf:"bytes,6,opt,name=device,proto3" json:"device,omitempty"` - // subnet id - SubnetId *wrappers.StringValue `protobuf:"bytes,7,opt,name=subnet_id,json=subnetId,proto3" json:"subnet_id,omitempty"` - // private ip - PrivateIp *wrappers.StringValue `protobuf:"bytes,8,opt,name=private_ip,json=privateIp,proto3" json:"private_ip,omitempty"` - // elastic ip, if attach ip - Eip *wrappers.StringValue `protobuf:"bytes,9,opt,name=eip,proto3" json:"eip,omitempty"` - // server id - ServerId *wrappers.UInt32Value `protobuf:"bytes,10,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"` - // role eg.[wordpress|mysql|...] - Role *wrappers.StringValue `protobuf:"bytes,11,opt,name=role,proto3" json:"role,omitempty"` - // status eg.[active|used|enabled|disabled|deleted|stopped|ceased|successful|failed] - Status *wrappers.StringValue `protobuf:"bytes,12,opt,name=status,proto3" json:"status,omitempty"` - // transition status eg.[creating|deleting|upgrading|updating|rollbacking|stopping|starting|recovering|ceasing|resizing|scaling] - TransitionStatus *wrappers.StringValue `protobuf:"bytes,13,opt,name=transition_status,json=transitionStatus,proto3" json:"transition_status,omitempty"` - // group id - GroupId *wrappers.UInt32Value `protobuf:"bytes,14,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // own path, concat string group_path:user_id - OwnerPath *wrappers.StringValue `protobuf:"bytes,15,opt,name=owner_path,json=ownerPath,proto3" json:"owner_path,omitempty"` - // global server id - GlobalServerId *wrappers.UInt32Value `protobuf:"bytes,16,opt,name=global_server_id,json=globalServerId,proto3" json:"global_server_id,omitempty"` - // custom metadata - CustomMetadata *wrappers.StringValue `protobuf:"bytes,17,opt,name=custom_metadata,json=customMetadata,proto3" json:"custom_metadata,omitempty"` - // public key - PubKey *wrappers.StringValue `protobuf:"bytes,18,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` - // health status default empty eg.[healthy|unhealthy|""] - HealthStatus *wrappers.StringValue `protobuf:"bytes,19,opt,name=health_status,json=healthStatus,proto3" json:"health_status,omitempty"` - // backup or not - IsBackup *wrappers.BoolValue `protobuf:"bytes,20,opt,name=is_backup,json=isBackup,proto3" json:"is_backup,omitempty"` - // auto backup or not - AutoBackup *wrappers.BoolValue `protobuf:"bytes,21,opt,name=auto_backup,json=autoBackup,proto3" json:"auto_backup,omitempty"` - // the time when cluster node create - CreateTime *timestamp.Timestamp `protobuf:"bytes,22,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // record cluster node status changed time - StatusTime *timestamp.Timestamp `protobuf:"bytes,23,opt,name=status_time,json=statusTime,proto3" json:"status_time,omitempty"` - // host id - HostId *wrappers.StringValue `protobuf:"bytes,24,opt,name=host_id,json=hostId,proto3" json:"host_id,omitempty"` - // host ip - HostIp *wrappers.StringValue `protobuf:"bytes,25,opt,name=host_ip,json=hostIp,proto3" json:"host_ip,omitempty"` - // cluster role - ClusterRole *ClusterRole `protobuf:"bytes,26,opt,name=cluster_role,json=clusterRole,proto3" json:"cluster_role,omitempty"` - // cluster common info - ClusterCommon *ClusterCommon `protobuf:"bytes,27,opt,name=cluster_common,json=clusterCommon,proto3" json:"cluster_common,omitempty"` - // list of ssh key pair id - KeyPairId []string `protobuf:"bytes,28,rep,name=key_pair_id,json=keyPairId,proto3" json:"key_pair_id,omitempty"` - // owner - Owner *wrappers.StringValue `protobuf:"bytes,29,opt,name=owner,proto3" json:"owner,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ClusterNode) Reset() { *m = ClusterNode{} } -func (m *ClusterNode) String() string { return proto.CompactTextString(m) } -func (*ClusterNode) ProtoMessage() {} -func (*ClusterNode) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{35} -} - -func (m *ClusterNode) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ClusterNode.Unmarshal(m, b) -} -func (m *ClusterNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ClusterNode.Marshal(b, m, deterministic) -} -func (m *ClusterNode) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterNode.Merge(m, src) -} -func (m *ClusterNode) XXX_Size() int { - return xxx_messageInfo_ClusterNode.Size(m) -} -func (m *ClusterNode) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterNode.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterNode proto.InternalMessageInfo - -func (m *ClusterNode) GetNodeId() *wrappers.StringValue { - if m != nil { - return m.NodeId - } - return nil -} - -func (m *ClusterNode) GetClusterId() *wrappers.StringValue { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *ClusterNode) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *ClusterNode) GetInstanceId() *wrappers.StringValue { - if m != nil { - return m.InstanceId - } - return nil -} - -func (m *ClusterNode) GetVolumeId() *wrappers.StringValue { - if m != nil { - return m.VolumeId - } - return nil -} - -func (m *ClusterNode) GetDevice() *wrappers.StringValue { - if m != nil { - return m.Device - } - return nil -} - -func (m *ClusterNode) GetSubnetId() *wrappers.StringValue { - if m != nil { - return m.SubnetId - } - return nil -} - -func (m *ClusterNode) GetPrivateIp() *wrappers.StringValue { - if m != nil { - return m.PrivateIp - } - return nil -} - -func (m *ClusterNode) GetEip() *wrappers.StringValue { - if m != nil { - return m.Eip - } - return nil -} - -func (m *ClusterNode) GetServerId() *wrappers.UInt32Value { - if m != nil { - return m.ServerId - } - return nil -} - -func (m *ClusterNode) GetRole() *wrappers.StringValue { - if m != nil { - return m.Role - } - return nil -} - -func (m *ClusterNode) GetStatus() *wrappers.StringValue { - if m != nil { - return m.Status - } - return nil -} - -func (m *ClusterNode) GetTransitionStatus() *wrappers.StringValue { - if m != nil { - return m.TransitionStatus - } - return nil -} - -func (m *ClusterNode) GetGroupId() *wrappers.UInt32Value { - if m != nil { - return m.GroupId - } - return nil -} - -func (m *ClusterNode) GetOwnerPath() *wrappers.StringValue { - if m != nil { - return m.OwnerPath - } - return nil -} - -func (m *ClusterNode) GetGlobalServerId() *wrappers.UInt32Value { - if m != nil { - return m.GlobalServerId - } - return nil -} - -func (m *ClusterNode) GetCustomMetadata() *wrappers.StringValue { - if m != nil { - return m.CustomMetadata - } - return nil -} - -func (m *ClusterNode) GetPubKey() *wrappers.StringValue { - if m != nil { - return m.PubKey - } - return nil -} - -func (m *ClusterNode) GetHealthStatus() *wrappers.StringValue { - if m != nil { - return m.HealthStatus - } - return nil -} - -func (m *ClusterNode) GetIsBackup() *wrappers.BoolValue { - if m != nil { - return m.IsBackup - } - return nil -} - -func (m *ClusterNode) GetAutoBackup() *wrappers.BoolValue { - if m != nil { - return m.AutoBackup - } - return nil -} - -func (m *ClusterNode) GetCreateTime() *timestamp.Timestamp { - if m != nil { - return m.CreateTime - } - return nil -} - -func (m *ClusterNode) GetStatusTime() *timestamp.Timestamp { - if m != nil { - return m.StatusTime - } - return nil -} - -func (m *ClusterNode) GetHostId() *wrappers.StringValue { - if m != nil { - return m.HostId - } - return nil -} - -func (m *ClusterNode) GetHostIp() *wrappers.StringValue { - if m != nil { - return m.HostIp - } - return nil -} - -func (m *ClusterNode) GetClusterRole() *ClusterRole { - if m != nil { - return m.ClusterRole - } - return nil -} - -func (m *ClusterNode) GetClusterCommon() *ClusterCommon { - if m != nil { - return m.ClusterCommon - } - return nil -} - -func (m *ClusterNode) GetKeyPairId() []string { - if m != nil { - return m.KeyPairId - } - return nil -} - -func (m *ClusterNode) GetOwner() *wrappers.StringValue { - if m != nil { - return m.Owner - } - return nil -} - -type ClusterRole struct { - // cluster id - ClusterId *wrappers.StringValue `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // role.eg.[wordpress|mysql|...] - Role *wrappers.StringValue `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` - // number of cpu - Cpu *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=cpu,proto3" json:"cpu,omitempty"` - // number of gpu - Gpu *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=gpu,proto3" json:"gpu,omitempty"` - // size of memory - Memory *wrappers.UInt32Value `protobuf:"bytes,5,opt,name=memory,proto3" json:"memory,omitempty"` - // size of instance - InstanceSize *wrappers.UInt32Value `protobuf:"bytes,6,opt,name=instance_size,json=instanceSize,proto3" json:"instance_size,omitempty"` - // size of storage - StorageSize *wrappers.UInt32Value `protobuf:"bytes,7,opt,name=storage_size,json=storageSize,proto3" json:"storage_size,omitempty"` - // mount point, a dir.eg.[/data] - MountPoint *wrappers.StringValue `protobuf:"bytes,8,opt,name=mount_point,json=mountPoint,proto3" json:"mount_point,omitempty"` - // mount_options - MountOptions *wrappers.StringValue `protobuf:"bytes,9,opt,name=mount_options,json=mountOptions,proto3" json:"mount_options,omitempty"` - // file system eg.[ext|ext4|...] - FileSystem *wrappers.StringValue `protobuf:"bytes,10,opt,name=file_system,json=fileSystem,proto3" json:"file_system,omitempty"` - // env of cluster - Env *wrappers.StringValue `protobuf:"bytes,11,opt,name=env,proto3" json:"env,omitempty"` - // number of replica - Replicas *wrappers.UInt32Value `protobuf:"bytes,12,opt,name=replicas,proto3" json:"replicas,omitempty"` - // number of replica on ready - ReadyReplicas *wrappers.UInt32Value `protobuf:"bytes,13,opt,name=ready_replicas,json=readyReplicas,proto3" json:"ready_replicas,omitempty"` - // api version - ApiVersion *wrappers.StringValue `protobuf:"bytes,14,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ClusterRole) Reset() { *m = ClusterRole{} } -func (m *ClusterRole) String() string { return proto.CompactTextString(m) } -func (*ClusterRole) ProtoMessage() {} -func (*ClusterRole) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{36} -} - -func (m *ClusterRole) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ClusterRole.Unmarshal(m, b) -} -func (m *ClusterRole) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ClusterRole.Marshal(b, m, deterministic) -} -func (m *ClusterRole) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterRole.Merge(m, src) -} -func (m *ClusterRole) XXX_Size() int { - return xxx_messageInfo_ClusterRole.Size(m) -} -func (m *ClusterRole) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterRole.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterRole proto.InternalMessageInfo - -func (m *ClusterRole) GetClusterId() *wrappers.StringValue { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *ClusterRole) GetRole() *wrappers.StringValue { - if m != nil { - return m.Role - } - return nil -} - -func (m *ClusterRole) GetCpu() *wrappers.UInt32Value { - if m != nil { - return m.Cpu - } - return nil -} - -func (m *ClusterRole) GetGpu() *wrappers.UInt32Value { - if m != nil { - return m.Gpu - } - return nil -} - -func (m *ClusterRole) GetMemory() *wrappers.UInt32Value { - if m != nil { - return m.Memory - } - return nil -} - -func (m *ClusterRole) GetInstanceSize() *wrappers.UInt32Value { - if m != nil { - return m.InstanceSize - } - return nil -} - -func (m *ClusterRole) GetStorageSize() *wrappers.UInt32Value { - if m != nil { - return m.StorageSize - } - return nil -} - -func (m *ClusterRole) GetMountPoint() *wrappers.StringValue { - if m != nil { - return m.MountPoint - } - return nil -} - -func (m *ClusterRole) GetMountOptions() *wrappers.StringValue { - if m != nil { - return m.MountOptions - } - return nil -} - -func (m *ClusterRole) GetFileSystem() *wrappers.StringValue { - if m != nil { - return m.FileSystem - } - return nil -} - -func (m *ClusterRole) GetEnv() *wrappers.StringValue { - if m != nil { - return m.Env - } - return nil -} - -func (m *ClusterRole) GetReplicas() *wrappers.UInt32Value { - if m != nil { - return m.Replicas - } - return nil -} - -func (m *ClusterRole) GetReadyReplicas() *wrappers.UInt32Value { - if m != nil { - return m.ReadyReplicas - } - return nil -} - -func (m *ClusterRole) GetApiVersion() *wrappers.StringValue { - if m != nil { - return m.ApiVersion - } - return nil -} - -type ClusterLoadbalancer struct { - // cluster id - ClusterId *wrappers.StringValue `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // role of balancer - Role *wrappers.StringValue `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` - // listener id - LoadbalancerListenerId *wrappers.StringValue `protobuf:"bytes,3,opt,name=loadbalancer_listener_id,json=loadbalancerListenerId,proto3" json:"loadbalancer_listener_id,omitempty"` - // port - LoadbalancerPort *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=loadbalancer_port,json=loadbalancerPort,proto3" json:"loadbalancer_port,omitempty"` - // policy id - LoadbalancerPolicyId *wrappers.StringValue `protobuf:"bytes,5,opt,name=loadbalancer_policy_id,json=loadbalancerPolicyId,proto3" json:"loadbalancer_policy_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ClusterLoadbalancer) Reset() { *m = ClusterLoadbalancer{} } -func (m *ClusterLoadbalancer) String() string { return proto.CompactTextString(m) } -func (*ClusterLoadbalancer) ProtoMessage() {} -func (*ClusterLoadbalancer) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{37} -} - -func (m *ClusterLoadbalancer) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ClusterLoadbalancer.Unmarshal(m, b) -} -func (m *ClusterLoadbalancer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ClusterLoadbalancer.Marshal(b, m, deterministic) -} -func (m *ClusterLoadbalancer) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterLoadbalancer.Merge(m, src) -} -func (m *ClusterLoadbalancer) XXX_Size() int { - return xxx_messageInfo_ClusterLoadbalancer.Size(m) -} -func (m *ClusterLoadbalancer) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterLoadbalancer.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterLoadbalancer proto.InternalMessageInfo - -func (m *ClusterLoadbalancer) GetClusterId() *wrappers.StringValue { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *ClusterLoadbalancer) GetRole() *wrappers.StringValue { - if m != nil { - return m.Role - } - return nil -} - -func (m *ClusterLoadbalancer) GetLoadbalancerListenerId() *wrappers.StringValue { - if m != nil { - return m.LoadbalancerListenerId - } - return nil -} - -func (m *ClusterLoadbalancer) GetLoadbalancerPort() *wrappers.UInt32Value { - if m != nil { - return m.LoadbalancerPort - } - return nil -} - -func (m *ClusterLoadbalancer) GetLoadbalancerPolicyId() *wrappers.StringValue { - if m != nil { - return m.LoadbalancerPolicyId - } - return nil -} - -type ClusterLink struct { - // cluster id - ClusterId *wrappers.StringValue `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // cluster link name eg.[mysql|wordpress|...] - Name *wrappers.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // external cluster id - ExternalClusterId *wrappers.StringValue `protobuf:"bytes,3,opt,name=external_cluster_id,json=externalClusterId,proto3" json:"external_cluster_id,omitempty"` - // owner path, concat string group_path:user_id - OwnerPath *wrappers.StringValue `protobuf:"bytes,4,opt,name=owner_path,json=ownerPath,proto3" json:"owner_path,omitempty"` - // owner - Owner *wrappers.StringValue `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ClusterLink) Reset() { *m = ClusterLink{} } -func (m *ClusterLink) String() string { return proto.CompactTextString(m) } -func (*ClusterLink) ProtoMessage() {} -func (*ClusterLink) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{38} -} - -func (m *ClusterLink) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ClusterLink.Unmarshal(m, b) -} -func (m *ClusterLink) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ClusterLink.Marshal(b, m, deterministic) -} -func (m *ClusterLink) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClusterLink.Merge(m, src) -} -func (m *ClusterLink) XXX_Size() int { - return xxx_messageInfo_ClusterLink.Size(m) -} -func (m *ClusterLink) XXX_DiscardUnknown() { - xxx_messageInfo_ClusterLink.DiscardUnknown(m) -} - -var xxx_messageInfo_ClusterLink proto.InternalMessageInfo - -func (m *ClusterLink) GetClusterId() *wrappers.StringValue { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *ClusterLink) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *ClusterLink) GetExternalClusterId() *wrappers.StringValue { - if m != nil { - return m.ExternalClusterId - } - return nil -} - -func (m *ClusterLink) GetOwnerPath() *wrappers.StringValue { - if m != nil { - return m.OwnerPath - } - return nil -} - -func (m *ClusterLink) GetOwner() *wrappers.StringValue { - if m != nil { - return m.Owner - } - return nil -} - -type Cluster struct { - // cluster id - ClusterId *wrappers.StringValue `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // cluster name - Name *wrappers.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // cluster description - Description *wrappers.StringValue `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - // id of app run in cluster - AppId *wrappers.StringValue `protobuf:"bytes,4,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - // id of version of app run in cluster - VersionId *wrappers.StringValue `protobuf:"bytes,5,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - // subnet id, cluster run in a subnet - SubnetId *wrappers.StringValue `protobuf:"bytes,6,opt,name=subnet_id,json=subnetId,proto3" json:"subnet_id,omitempty"` - // vpc id, a vpc contain one more subnet - VpcId *wrappers.StringValue `protobuf:"bytes,7,opt,name=vpc_id,json=vpcId,proto3" json:"vpc_id,omitempty"` - // frontgate id, a proxy for vpc to communicate - FrontgateId *wrappers.StringValue `protobuf:"bytes,8,opt,name=frontgate_id,json=frontgateId,proto3" json:"frontgate_id,omitempty"` - // cluster type, frontgate or normal cluster - ClusterType *wrappers.UInt32Value `protobuf:"bytes,9,opt,name=cluster_type,json=clusterType,proto3" json:"cluster_type,omitempty"` - // endpoint of cluster - Endpoints *wrappers.StringValue `protobuf:"bytes,10,opt,name=endpoints,proto3" json:"endpoints,omitempty"` - // cluster status eg.[active|used|enabled|disabled|deleted|stopped|ceased] - Status *wrappers.StringValue `protobuf:"bytes,11,opt,name=status,proto3" json:"status,omitempty"` - // cluster transition status eg.[creating|deleting|upgrading|updating|rollbacking|stopping|starting|recovering|ceasing|resizing|scaling] - TransitionStatus *wrappers.StringValue `protobuf:"bytes,12,opt,name=transition_status,json=transitionStatus,proto3" json:"transition_status,omitempty"` - // metadata root access - MetadataRootAccess *wrappers.BoolValue `protobuf:"bytes,13,opt,name=metadata_root_access,json=metadataRootAccess,proto3" json:"metadata_root_access,omitempty"` - // owner path, concat string group_path:user_id - OwnerPath *wrappers.StringValue `protobuf:"bytes,14,opt,name=owner_path,json=ownerPath,proto3" json:"owner_path,omitempty"` - // global uuid - GlobalUuid *wrappers.StringValue `protobuf:"bytes,15,opt,name=global_uuid,json=globalUuid,proto3" json:"global_uuid,omitempty"` - // upgrade status, unused - UpgradeStatus *wrappers.StringValue `protobuf:"bytes,16,opt,name=upgrade_status,json=upgradeStatus,proto3" json:"upgrade_status,omitempty"` - // cluster upgraded time - UpgradeTime *timestamp.Timestamp `protobuf:"bytes,17,opt,name=upgrade_time,json=upgradeTime,proto3" json:"upgrade_time,omitempty"` - // cluster runtime id - RuntimeId *wrappers.StringValue `protobuf:"bytes,18,opt,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - // the time when cluster create - CreateTime *timestamp.Timestamp `protobuf:"bytes,19,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // record status changed time - StatusTime *timestamp.Timestamp `protobuf:"bytes,20,opt,name=status_time,json=statusTime,proto3" json:"status_time,omitempty"` - AdditionalInfo *wrappers.StringValue `protobuf:"bytes,21,opt,name=additional_info,json=additionalInfo,proto3" json:"additional_info,omitempty"` - // cluster env - Env *wrappers.StringValue `protobuf:"bytes,22,opt,name=env,proto3" json:"env,omitempty"` - // cluster used to debug or not - Debug *wrappers.BoolValue `protobuf:"bytes,23,opt,name=debug,proto3" json:"debug,omitempty"` - // zone of cluster eg.[pek3a|pek3b] - Zone *wrappers.StringValue `protobuf:"bytes,24,opt,name=zone,proto3" json:"zone,omitempty"` - // list of cluster node - ClusterNodeSet []*ClusterNode `protobuf:"bytes,25,rep,name=cluster_node_set,json=clusterNodeSet,proto3" json:"cluster_node_set,omitempty"` - // list of cluster role - ClusterRoleSet []*ClusterRole `protobuf:"bytes,26,rep,name=cluster_role_set,json=clusterRoleSet,proto3" json:"cluster_role_set,omitempty"` - // list of cluster link - ClusterLinkSet []*ClusterLink `protobuf:"bytes,27,rep,name=cluster_link_set,json=clusterLinkSet,proto3" json:"cluster_link_set,omitempty"` - // list of cluster common - ClusterCommonSet []*ClusterCommon `protobuf:"bytes,28,rep,name=cluster_common_set,json=clusterCommonSet,proto3" json:"cluster_common_set,omitempty"` - // lister of cluster loadbalancer - ClusterLoadbalancerSet []*ClusterLoadbalancer `protobuf:"bytes,29,rep,name=cluster_loadbalancer_set,json=clusterLoadbalancerSet,proto3" json:"cluster_loadbalancer_set,omitempty"` - // owner - Owner *wrappers.StringValue `protobuf:"bytes,30,opt,name=owner,proto3" json:"owner,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Cluster) Reset() { *m = Cluster{} } -func (m *Cluster) String() string { return proto.CompactTextString(m) } -func (*Cluster) ProtoMessage() {} -func (*Cluster) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{39} -} - -func (m *Cluster) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Cluster.Unmarshal(m, b) -} -func (m *Cluster) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Cluster.Marshal(b, m, deterministic) -} -func (m *Cluster) XXX_Merge(src proto.Message) { - xxx_messageInfo_Cluster.Merge(m, src) -} -func (m *Cluster) XXX_Size() int { - return xxx_messageInfo_Cluster.Size(m) -} -func (m *Cluster) XXX_DiscardUnknown() { - xxx_messageInfo_Cluster.DiscardUnknown(m) -} - -var xxx_messageInfo_Cluster proto.InternalMessageInfo - -func (m *Cluster) GetClusterId() *wrappers.StringValue { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *Cluster) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *Cluster) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *Cluster) GetAppId() *wrappers.StringValue { - if m != nil { - return m.AppId - } - return nil -} - -func (m *Cluster) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -func (m *Cluster) GetSubnetId() *wrappers.StringValue { - if m != nil { - return m.SubnetId - } - return nil -} - -func (m *Cluster) GetVpcId() *wrappers.StringValue { - if m != nil { - return m.VpcId - } - return nil -} - -func (m *Cluster) GetFrontgateId() *wrappers.StringValue { - if m != nil { - return m.FrontgateId - } - return nil -} - -func (m *Cluster) GetClusterType() *wrappers.UInt32Value { - if m != nil { - return m.ClusterType - } - return nil -} - -func (m *Cluster) GetEndpoints() *wrappers.StringValue { - if m != nil { - return m.Endpoints - } - return nil -} - -func (m *Cluster) GetStatus() *wrappers.StringValue { - if m != nil { - return m.Status - } - return nil -} - -func (m *Cluster) GetTransitionStatus() *wrappers.StringValue { - if m != nil { - return m.TransitionStatus - } - return nil -} - -func (m *Cluster) GetMetadataRootAccess() *wrappers.BoolValue { - if m != nil { - return m.MetadataRootAccess - } - return nil -} - -func (m *Cluster) GetOwnerPath() *wrappers.StringValue { - if m != nil { - return m.OwnerPath - } - return nil -} - -func (m *Cluster) GetGlobalUuid() *wrappers.StringValue { - if m != nil { - return m.GlobalUuid - } - return nil -} - -func (m *Cluster) GetUpgradeStatus() *wrappers.StringValue { - if m != nil { - return m.UpgradeStatus - } - return nil -} - -func (m *Cluster) GetUpgradeTime() *timestamp.Timestamp { - if m != nil { - return m.UpgradeTime - } - return nil -} - -func (m *Cluster) GetRuntimeId() *wrappers.StringValue { - if m != nil { - return m.RuntimeId - } - return nil -} - -func (m *Cluster) GetCreateTime() *timestamp.Timestamp { - if m != nil { - return m.CreateTime - } - return nil -} - -func (m *Cluster) GetStatusTime() *timestamp.Timestamp { - if m != nil { - return m.StatusTime - } - return nil -} - -func (m *Cluster) GetAdditionalInfo() *wrappers.StringValue { - if m != nil { - return m.AdditionalInfo - } - return nil -} - -func (m *Cluster) GetEnv() *wrappers.StringValue { - if m != nil { - return m.Env - } - return nil -} - -func (m *Cluster) GetDebug() *wrappers.BoolValue { - if m != nil { - return m.Debug - } - return nil -} - -func (m *Cluster) GetZone() *wrappers.StringValue { - if m != nil { - return m.Zone - } - return nil -} - -func (m *Cluster) GetClusterNodeSet() []*ClusterNode { - if m != nil { - return m.ClusterNodeSet - } - return nil -} - -func (m *Cluster) GetClusterRoleSet() []*ClusterRole { - if m != nil { - return m.ClusterRoleSet - } - return nil -} - -func (m *Cluster) GetClusterLinkSet() []*ClusterLink { - if m != nil { - return m.ClusterLinkSet - } - return nil -} - -func (m *Cluster) GetClusterCommonSet() []*ClusterCommon { - if m != nil { - return m.ClusterCommonSet - } - return nil -} - -func (m *Cluster) GetClusterLoadbalancerSet() []*ClusterLoadbalancer { - if m != nil { - return m.ClusterLoadbalancerSet - } - return nil -} - -func (m *Cluster) GetOwner() *wrappers.StringValue { - if m != nil { - return m.Owner - } - return nil -} - -type DescribeClustersRequest struct { - // cluster ids - ClusterId []string `protobuf:"bytes,1,rep,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // app ids - AppId []string `protobuf:"bytes,2,rep,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - // version ids - VersionId []string `protobuf:"bytes,3,rep,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - // cluster status eg.[active|used|enabled|disabled|deleted|stopped|ceased] - Status []string `protobuf:"bytes,4,rep,name=status,proto3" json:"status,omitempty"` - // runtime ids - RuntimeId []string `protobuf:"bytes,5,rep,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - // frontgate ids - FrontgateId []string `protobuf:"bytes,6,rep,name=frontgate_id,json=frontgateId,proto3" json:"frontgate_id,omitempty"` - // external cluster id - ExternalClusterId *wrappers.StringValue `protobuf:"bytes,7,opt,name=external_cluster_id,json=externalClusterId,proto3" json:"external_cluster_id,omitempty"` - // data limit per page, default value 20, max value 200 - Limit uint32 `protobuf:"varint,8,opt,name=limit,proto3" json:"limit,omitempty"` - // data offset, default 0 - Offset uint32 `protobuf:"varint,9,opt,name=offset,proto3" json:"offset,omitempty"` - // query key, support these fields(cluster_id, app_id, version_id, status, runtime_id, frontgate_id, owner, cluster_type) - SearchWord *wrappers.StringValue `protobuf:"bytes,10,opt,name=search_word,json=searchWord,proto3" json:"search_word,omitempty"` - // sort key, order by sort_key, default create_time - SortKey *wrappers.StringValue `protobuf:"bytes,11,opt,name=sort_key,json=sortKey,proto3" json:"sort_key,omitempty"` - // value = 0 sort ASC, value = 1 sort DESC - Reverse *wrappers.BoolValue `protobuf:"bytes,12,opt,name=reverse,proto3" json:"reverse,omitempty"` - // owner - Owner []string `protobuf:"bytes,13,rep,name=owner,proto3" json:"owner,omitempty"` - // cluster type, frontgate or normal cluster - ClusterType *wrappers.StringValue `protobuf:"bytes,14,opt,name=cluster_type,json=clusterType,proto3" json:"cluster_type,omitempty"` - // get cluster detail info or not - WithDetail *wrappers.BoolValue `protobuf:"bytes,15,opt,name=with_detail,json=withDetail,proto3" json:"with_detail,omitempty"` - // cluster created duration eg.[1 day] - CreatedDate *wrappers.UInt32Value `protobuf:"bytes,16,opt,name=created_date,json=createdDate,proto3" json:"created_date,omitempty"` - // select column to display - DisplayColumns []string `protobuf:"bytes,17,rep,name=display_columns,json=displayColumns,proto3" json:"display_columns,omitempty"` - // namespace - Zone []string `protobuf:"bytes,18,rep,name=zone,proto3" json:"zone,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeClustersRequest) Reset() { *m = DescribeClustersRequest{} } -func (m *DescribeClustersRequest) String() string { return proto.CompactTextString(m) } -func (*DescribeClustersRequest) ProtoMessage() {} -func (*DescribeClustersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{40} -} - -func (m *DescribeClustersRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeClustersRequest.Unmarshal(m, b) -} -func (m *DescribeClustersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeClustersRequest.Marshal(b, m, deterministic) -} -func (m *DescribeClustersRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeClustersRequest.Merge(m, src) -} -func (m *DescribeClustersRequest) XXX_Size() int { - return xxx_messageInfo_DescribeClustersRequest.Size(m) -} -func (m *DescribeClustersRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeClustersRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeClustersRequest proto.InternalMessageInfo - -func (m *DescribeClustersRequest) GetClusterId() []string { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *DescribeClustersRequest) GetAppId() []string { - if m != nil { - return m.AppId - } - return nil -} - -func (m *DescribeClustersRequest) GetVersionId() []string { - if m != nil { - return m.VersionId - } - return nil -} - -func (m *DescribeClustersRequest) GetStatus() []string { - if m != nil { - return m.Status - } - return nil -} - -func (m *DescribeClustersRequest) GetRuntimeId() []string { - if m != nil { - return m.RuntimeId - } - return nil -} - -func (m *DescribeClustersRequest) GetFrontgateId() []string { - if m != nil { - return m.FrontgateId - } - return nil -} - -func (m *DescribeClustersRequest) GetExternalClusterId() *wrappers.StringValue { - if m != nil { - return m.ExternalClusterId - } - return nil -} - -func (m *DescribeClustersRequest) GetLimit() uint32 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *DescribeClustersRequest) GetOffset() uint32 { - if m != nil { - return m.Offset - } - return 0 -} - -func (m *DescribeClustersRequest) GetSearchWord() *wrappers.StringValue { - if m != nil { - return m.SearchWord - } - return nil -} - -func (m *DescribeClustersRequest) GetSortKey() *wrappers.StringValue { - if m != nil { - return m.SortKey - } - return nil -} - -func (m *DescribeClustersRequest) GetReverse() *wrappers.BoolValue { - if m != nil { - return m.Reverse - } - return nil -} - -func (m *DescribeClustersRequest) GetOwner() []string { - if m != nil { - return m.Owner - } - return nil -} - -func (m *DescribeClustersRequest) GetClusterType() *wrappers.StringValue { - if m != nil { - return m.ClusterType - } - return nil -} - -func (m *DescribeClustersRequest) GetWithDetail() *wrappers.BoolValue { - if m != nil { - return m.WithDetail - } - return nil -} - -func (m *DescribeClustersRequest) GetCreatedDate() *wrappers.UInt32Value { - if m != nil { - return m.CreatedDate - } - return nil -} - -func (m *DescribeClustersRequest) GetDisplayColumns() []string { - if m != nil { - return m.DisplayColumns - } - return nil -} - -func (m *DescribeClustersRequest) GetZone() []string { - if m != nil { - return m.Zone - } - return nil -} - -type DescribeClustersResponse struct { - // total count of qualified cluster - TotalCount uint32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - // list of cluster - ClusterSet []*Cluster `protobuf:"bytes,2,rep,name=cluster_set,json=clusterSet,proto3" json:"cluster_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeClustersResponse) Reset() { *m = DescribeClustersResponse{} } -func (m *DescribeClustersResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeClustersResponse) ProtoMessage() {} -func (*DescribeClustersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{41} -} - -func (m *DescribeClustersResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeClustersResponse.Unmarshal(m, b) -} -func (m *DescribeClustersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeClustersResponse.Marshal(b, m, deterministic) -} -func (m *DescribeClustersResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeClustersResponse.Merge(m, src) -} -func (m *DescribeClustersResponse) XXX_Size() int { - return xxx_messageInfo_DescribeClustersResponse.Size(m) -} -func (m *DescribeClustersResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeClustersResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeClustersResponse proto.InternalMessageInfo - -func (m *DescribeClustersResponse) GetTotalCount() uint32 { - if m != nil { - return m.TotalCount - } - return 0 -} - -func (m *DescribeClustersResponse) GetClusterSet() []*Cluster { - if m != nil { - return m.ClusterSet - } - return nil -} - -type DescribeAppClustersRequest struct { - // app ids - AppId []string `protobuf:"bytes,1,rep,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - // status eg.[active|used|enabled|disabled|deleted|stopped|ceased] - Status []string `protobuf:"bytes,2,rep,name=status,proto3" json:"status,omitempty"` - // data limit per page, default value 20, max value 200 - Limit uint32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` - // data offset, default 0 - Offset uint32 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"` - // query key, support these fields(cluster_id, app_id, version_id, status, runtime_id, frontgate_id, owner, cluster_type) - SearchWord *wrappers.StringValue `protobuf:"bytes,5,opt,name=search_word,json=searchWord,proto3" json:"search_word,omitempty"` - // sort key, order by sort_key, default create_time - SortKey *wrappers.StringValue `protobuf:"bytes,6,opt,name=sort_key,json=sortKey,proto3" json:"sort_key,omitempty"` - // value = 0 sort ASC, value = 1 sort DESC - Reverse *wrappers.BoolValue `protobuf:"bytes,7,opt,name=reverse,proto3" json:"reverse,omitempty"` - // owner - Owner []string `protobuf:"bytes,8,rep,name=owner,proto3" json:"owner,omitempty"` - // get cluster with detail - WithDetail *wrappers.BoolValue `protobuf:"bytes,9,opt,name=with_detail,json=withDetail,proto3" json:"with_detail,omitempty"` - // cluster created duration eg.[1 day] - CreatedDate *wrappers.UInt32Value `protobuf:"bytes,10,opt,name=created_date,json=createdDate,proto3" json:"created_date,omitempty"` - // select columns to display - DisplayColumns []string `protobuf:"bytes,11,rep,name=display_columns,json=displayColumns,proto3" json:"display_columns,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeAppClustersRequest) Reset() { *m = DescribeAppClustersRequest{} } -func (m *DescribeAppClustersRequest) String() string { return proto.CompactTextString(m) } -func (*DescribeAppClustersRequest) ProtoMessage() {} -func (*DescribeAppClustersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{42} -} - -func (m *DescribeAppClustersRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeAppClustersRequest.Unmarshal(m, b) -} -func (m *DescribeAppClustersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeAppClustersRequest.Marshal(b, m, deterministic) -} -func (m *DescribeAppClustersRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeAppClustersRequest.Merge(m, src) -} -func (m *DescribeAppClustersRequest) XXX_Size() int { - return xxx_messageInfo_DescribeAppClustersRequest.Size(m) -} -func (m *DescribeAppClustersRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeAppClustersRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeAppClustersRequest proto.InternalMessageInfo - -func (m *DescribeAppClustersRequest) GetAppId() []string { - if m != nil { - return m.AppId - } - return nil -} - -func (m *DescribeAppClustersRequest) GetStatus() []string { - if m != nil { - return m.Status - } - return nil -} - -func (m *DescribeAppClustersRequest) GetLimit() uint32 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *DescribeAppClustersRequest) GetOffset() uint32 { - if m != nil { - return m.Offset - } - return 0 -} - -func (m *DescribeAppClustersRequest) GetSearchWord() *wrappers.StringValue { - if m != nil { - return m.SearchWord - } - return nil -} - -func (m *DescribeAppClustersRequest) GetSortKey() *wrappers.StringValue { - if m != nil { - return m.SortKey - } - return nil -} - -func (m *DescribeAppClustersRequest) GetReverse() *wrappers.BoolValue { - if m != nil { - return m.Reverse - } - return nil -} - -func (m *DescribeAppClustersRequest) GetOwner() []string { - if m != nil { - return m.Owner - } - return nil -} - -func (m *DescribeAppClustersRequest) GetWithDetail() *wrappers.BoolValue { - if m != nil { - return m.WithDetail - } - return nil -} - -func (m *DescribeAppClustersRequest) GetCreatedDate() *wrappers.UInt32Value { - if m != nil { - return m.CreatedDate - } - return nil -} - -func (m *DescribeAppClustersRequest) GetDisplayColumns() []string { - if m != nil { - return m.DisplayColumns - } - return nil -} - -type DescribeAppClustersResponse struct { - // total count of cluster of app - TotalCount uint32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - // list of cluster - ClusterSet []*Cluster `protobuf:"bytes,2,rep,name=cluster_set,json=clusterSet,proto3" json:"cluster_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeAppClustersResponse) Reset() { *m = DescribeAppClustersResponse{} } -func (m *DescribeAppClustersResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeAppClustersResponse) ProtoMessage() {} -func (*DescribeAppClustersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{43} -} - -func (m *DescribeAppClustersResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeAppClustersResponse.Unmarshal(m, b) -} -func (m *DescribeAppClustersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeAppClustersResponse.Marshal(b, m, deterministic) -} -func (m *DescribeAppClustersResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeAppClustersResponse.Merge(m, src) -} -func (m *DescribeAppClustersResponse) XXX_Size() int { - return xxx_messageInfo_DescribeAppClustersResponse.Size(m) -} -func (m *DescribeAppClustersResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeAppClustersResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeAppClustersResponse proto.InternalMessageInfo - -func (m *DescribeAppClustersResponse) GetTotalCount() uint32 { - if m != nil { - return m.TotalCount - } - return 0 -} - -func (m *DescribeAppClustersResponse) GetClusterSet() []*Cluster { - if m != nil { - return m.ClusterSet - } - return nil -} - -type DescribeClusterNodesRequest struct { - // cluster id - ClusterId *wrappers.StringValue `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // node ids - NodeId []string `protobuf:"bytes,2,rep,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - // status eg.[active|used|enabled|disabled|deleted|stopped|ceased] - Status []string `protobuf:"bytes,3,rep,name=status,proto3" json:"status,omitempty"` - // data limit per page, default value 20, max value 200 - Limit uint32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` - // data offset, default 0 - Offset uint32 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` - // query key, support these fields(cluster_id, node_id, status, owner) - SearchWord *wrappers.StringValue `protobuf:"bytes,6,opt,name=search_word,json=searchWord,proto3" json:"search_word,omitempty"` - // sort key, order by sort_key, default create_time - SortKey *wrappers.StringValue `protobuf:"bytes,7,opt,name=sort_key,json=sortKey,proto3" json:"sort_key,omitempty"` - // value = 0 sort ASC, value = 1 sort DESC - Reverse *wrappers.BoolValue `protobuf:"bytes,8,opt,name=reverse,proto3" json:"reverse,omitempty"` - // owner - Owner []string `protobuf:"bytes,9,rep,name=owner,proto3" json:"owner,omitempty"` - // select columns to display - DisplayColumns []string `protobuf:"bytes,10,rep,name=display_columns,json=displayColumns,proto3" json:"display_columns,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeClusterNodesRequest) Reset() { *m = DescribeClusterNodesRequest{} } -func (m *DescribeClusterNodesRequest) String() string { return proto.CompactTextString(m) } -func (*DescribeClusterNodesRequest) ProtoMessage() {} -func (*DescribeClusterNodesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{44} -} - -func (m *DescribeClusterNodesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeClusterNodesRequest.Unmarshal(m, b) -} -func (m *DescribeClusterNodesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeClusterNodesRequest.Marshal(b, m, deterministic) -} -func (m *DescribeClusterNodesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeClusterNodesRequest.Merge(m, src) -} -func (m *DescribeClusterNodesRequest) XXX_Size() int { - return xxx_messageInfo_DescribeClusterNodesRequest.Size(m) -} -func (m *DescribeClusterNodesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeClusterNodesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeClusterNodesRequest proto.InternalMessageInfo - -func (m *DescribeClusterNodesRequest) GetClusterId() *wrappers.StringValue { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *DescribeClusterNodesRequest) GetNodeId() []string { - if m != nil { - return m.NodeId - } - return nil -} - -func (m *DescribeClusterNodesRequest) GetStatus() []string { - if m != nil { - return m.Status - } - return nil -} - -func (m *DescribeClusterNodesRequest) GetLimit() uint32 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *DescribeClusterNodesRequest) GetOffset() uint32 { - if m != nil { - return m.Offset - } - return 0 -} - -func (m *DescribeClusterNodesRequest) GetSearchWord() *wrappers.StringValue { - if m != nil { - return m.SearchWord - } - return nil -} - -func (m *DescribeClusterNodesRequest) GetSortKey() *wrappers.StringValue { - if m != nil { - return m.SortKey - } - return nil -} - -func (m *DescribeClusterNodesRequest) GetReverse() *wrappers.BoolValue { - if m != nil { - return m.Reverse - } - return nil -} - -func (m *DescribeClusterNodesRequest) GetOwner() []string { - if m != nil { - return m.Owner - } - return nil -} - -func (m *DescribeClusterNodesRequest) GetDisplayColumns() []string { - if m != nil { - return m.DisplayColumns - } - return nil -} - -type DescribeClusterNodesResponse struct { - // total count of node in the cluster - TotalCount uint32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - // list of cluster node - ClusterNodeSet []*ClusterNode `protobuf:"bytes,2,rep,name=cluster_node_set,json=clusterNodeSet,proto3" json:"cluster_node_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeClusterNodesResponse) Reset() { *m = DescribeClusterNodesResponse{} } -func (m *DescribeClusterNodesResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeClusterNodesResponse) ProtoMessage() {} -func (*DescribeClusterNodesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{45} -} - -func (m *DescribeClusterNodesResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeClusterNodesResponse.Unmarshal(m, b) -} -func (m *DescribeClusterNodesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeClusterNodesResponse.Marshal(b, m, deterministic) -} -func (m *DescribeClusterNodesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeClusterNodesResponse.Merge(m, src) -} -func (m *DescribeClusterNodesResponse) XXX_Size() int { - return xxx_messageInfo_DescribeClusterNodesResponse.Size(m) -} -func (m *DescribeClusterNodesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeClusterNodesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeClusterNodesResponse proto.InternalMessageInfo - -func (m *DescribeClusterNodesResponse) GetTotalCount() uint32 { - if m != nil { - return m.TotalCount - } - return 0 -} - -func (m *DescribeClusterNodesResponse) GetClusterNodeSet() []*ClusterNode { - if m != nil { - return m.ClusterNodeSet - } - return nil -} - -type StopClustersRequest struct { - // required, ids of cluster to stop - ClusterId []string `protobuf:"bytes,1,rep,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // advanced param - AdvancedParam []string `protobuf:"bytes,2,rep,name=advanced_param,json=advancedParam,proto3" json:"advanced_param,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *StopClustersRequest) Reset() { *m = StopClustersRequest{} } -func (m *StopClustersRequest) String() string { return proto.CompactTextString(m) } -func (*StopClustersRequest) ProtoMessage() {} -func (*StopClustersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{46} -} - -func (m *StopClustersRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StopClustersRequest.Unmarshal(m, b) -} -func (m *StopClustersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StopClustersRequest.Marshal(b, m, deterministic) -} -func (m *StopClustersRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_StopClustersRequest.Merge(m, src) -} -func (m *StopClustersRequest) XXX_Size() int { - return xxx_messageInfo_StopClustersRequest.Size(m) -} -func (m *StopClustersRequest) XXX_DiscardUnknown() { - xxx_messageInfo_StopClustersRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_StopClustersRequest proto.InternalMessageInfo - -func (m *StopClustersRequest) GetClusterId() []string { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *StopClustersRequest) GetAdvancedParam() []string { - if m != nil { - return m.AdvancedParam - } - return nil -} - -type StopClustersResponse struct { - // ids of clusters stopped - ClusterId []string `protobuf:"bytes,1,rep,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // job ids - JobId []string `protobuf:"bytes,2,rep,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *StopClustersResponse) Reset() { *m = StopClustersResponse{} } -func (m *StopClustersResponse) String() string { return proto.CompactTextString(m) } -func (*StopClustersResponse) ProtoMessage() {} -func (*StopClustersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{47} -} - -func (m *StopClustersResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StopClustersResponse.Unmarshal(m, b) -} -func (m *StopClustersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StopClustersResponse.Marshal(b, m, deterministic) -} -func (m *StopClustersResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_StopClustersResponse.Merge(m, src) -} -func (m *StopClustersResponse) XXX_Size() int { - return xxx_messageInfo_StopClustersResponse.Size(m) -} -func (m *StopClustersResponse) XXX_DiscardUnknown() { - xxx_messageInfo_StopClustersResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_StopClustersResponse proto.InternalMessageInfo - -func (m *StopClustersResponse) GetClusterId() []string { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *StopClustersResponse) GetJobId() []string { - if m != nil { - return m.JobId - } - return nil -} - -type StartClustersRequest struct { - // required, ids of cluster to start - ClusterId []string `protobuf:"bytes,1,rep,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // advanced param - AdvancedParam []string `protobuf:"bytes,2,rep,name=advanced_param,json=advancedParam,proto3" json:"advanced_param,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *StartClustersRequest) Reset() { *m = StartClustersRequest{} } -func (m *StartClustersRequest) String() string { return proto.CompactTextString(m) } -func (*StartClustersRequest) ProtoMessage() {} -func (*StartClustersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{48} -} - -func (m *StartClustersRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StartClustersRequest.Unmarshal(m, b) -} -func (m *StartClustersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StartClustersRequest.Marshal(b, m, deterministic) -} -func (m *StartClustersRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_StartClustersRequest.Merge(m, src) -} -func (m *StartClustersRequest) XXX_Size() int { - return xxx_messageInfo_StartClustersRequest.Size(m) -} -func (m *StartClustersRequest) XXX_DiscardUnknown() { - xxx_messageInfo_StartClustersRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_StartClustersRequest proto.InternalMessageInfo - -func (m *StartClustersRequest) GetClusterId() []string { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *StartClustersRequest) GetAdvancedParam() []string { - if m != nil { - return m.AdvancedParam - } - return nil -} - -type StartClustersResponse struct { - // ids of clusters started - ClusterId []string `protobuf:"bytes,1,rep,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // job ids - JobId []string `protobuf:"bytes,2,rep,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *StartClustersResponse) Reset() { *m = StartClustersResponse{} } -func (m *StartClustersResponse) String() string { return proto.CompactTextString(m) } -func (*StartClustersResponse) ProtoMessage() {} -func (*StartClustersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{49} -} - -func (m *StartClustersResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StartClustersResponse.Unmarshal(m, b) -} -func (m *StartClustersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StartClustersResponse.Marshal(b, m, deterministic) -} -func (m *StartClustersResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_StartClustersResponse.Merge(m, src) -} -func (m *StartClustersResponse) XXX_Size() int { - return xxx_messageInfo_StartClustersResponse.Size(m) -} -func (m *StartClustersResponse) XXX_DiscardUnknown() { - xxx_messageInfo_StartClustersResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_StartClustersResponse proto.InternalMessageInfo - -func (m *StartClustersResponse) GetClusterId() []string { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *StartClustersResponse) GetJobId() []string { - if m != nil { - return m.JobId - } - return nil -} - -type RecoverClustersRequest struct { - // required, ids of clusters to recover - ClusterId []string `protobuf:"bytes,1,rep,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // advanced param - AdvancedParam []string `protobuf:"bytes,2,rep,name=advanced_param,json=advancedParam,proto3" json:"advanced_param,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RecoverClustersRequest) Reset() { *m = RecoverClustersRequest{} } -func (m *RecoverClustersRequest) String() string { return proto.CompactTextString(m) } -func (*RecoverClustersRequest) ProtoMessage() {} -func (*RecoverClustersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{50} -} - -func (m *RecoverClustersRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RecoverClustersRequest.Unmarshal(m, b) -} -func (m *RecoverClustersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RecoverClustersRequest.Marshal(b, m, deterministic) -} -func (m *RecoverClustersRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RecoverClustersRequest.Merge(m, src) -} -func (m *RecoverClustersRequest) XXX_Size() int { - return xxx_messageInfo_RecoverClustersRequest.Size(m) -} -func (m *RecoverClustersRequest) XXX_DiscardUnknown() { - xxx_messageInfo_RecoverClustersRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_RecoverClustersRequest proto.InternalMessageInfo - -func (m *RecoverClustersRequest) GetClusterId() []string { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *RecoverClustersRequest) GetAdvancedParam() []string { - if m != nil { - return m.AdvancedParam - } - return nil -} - -type RecoverClustersResponse struct { - // ids of cluster recovered - ClusterId []string `protobuf:"bytes,1,rep,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // ids of job of recover cluster - JobId []string `protobuf:"bytes,2,rep,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RecoverClustersResponse) Reset() { *m = RecoverClustersResponse{} } -func (m *RecoverClustersResponse) String() string { return proto.CompactTextString(m) } -func (*RecoverClustersResponse) ProtoMessage() {} -func (*RecoverClustersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{51} -} - -func (m *RecoverClustersResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RecoverClustersResponse.Unmarshal(m, b) -} -func (m *RecoverClustersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RecoverClustersResponse.Marshal(b, m, deterministic) -} -func (m *RecoverClustersResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RecoverClustersResponse.Merge(m, src) -} -func (m *RecoverClustersResponse) XXX_Size() int { - return xxx_messageInfo_RecoverClustersResponse.Size(m) -} -func (m *RecoverClustersResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RecoverClustersResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_RecoverClustersResponse proto.InternalMessageInfo - -func (m *RecoverClustersResponse) GetClusterId() []string { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *RecoverClustersResponse) GetJobId() []string { - if m != nil { - return m.JobId - } - return nil -} - -type CeaseClustersRequest struct { - // required, ids of cluster to cease - ClusterId []string `protobuf:"bytes,1,rep,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // advanced param - AdvancedParam []string `protobuf:"bytes,2,rep,name=advanced_param,json=advancedParam,proto3" json:"advanced_param,omitempty"` - // whether force delete clusters or not - Force *wrappers.BoolValue `protobuf:"bytes,3,opt,name=force,proto3" json:"force,omitempty"` - // timeout(s), when delete clusters - GracePeriod uint32 `protobuf:"varint,4,opt,name=grace_period,json=gracePeriod,proto3" json:"grace_period,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CeaseClustersRequest) Reset() { *m = CeaseClustersRequest{} } -func (m *CeaseClustersRequest) String() string { return proto.CompactTextString(m) } -func (*CeaseClustersRequest) ProtoMessage() {} -func (*CeaseClustersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{52} -} - -func (m *CeaseClustersRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CeaseClustersRequest.Unmarshal(m, b) -} -func (m *CeaseClustersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CeaseClustersRequest.Marshal(b, m, deterministic) -} -func (m *CeaseClustersRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CeaseClustersRequest.Merge(m, src) -} -func (m *CeaseClustersRequest) XXX_Size() int { - return xxx_messageInfo_CeaseClustersRequest.Size(m) -} -func (m *CeaseClustersRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CeaseClustersRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CeaseClustersRequest proto.InternalMessageInfo - -func (m *CeaseClustersRequest) GetClusterId() []string { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *CeaseClustersRequest) GetAdvancedParam() []string { - if m != nil { - return m.AdvancedParam - } - return nil -} - -func (m *CeaseClustersRequest) GetForce() *wrappers.BoolValue { - if m != nil { - return m.Force - } - return nil -} - -func (m *CeaseClustersRequest) GetGracePeriod() uint32 { - if m != nil { - return m.GracePeriod - } - return 0 -} - -type CeaseClustersResponse struct { - // ids of cluster ceased - ClusterId []string `protobuf:"bytes,1,rep,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // ids of job of cease cluster - JobId []string `protobuf:"bytes,2,rep,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CeaseClustersResponse) Reset() { *m = CeaseClustersResponse{} } -func (m *CeaseClustersResponse) String() string { return proto.CompactTextString(m) } -func (*CeaseClustersResponse) ProtoMessage() {} -func (*CeaseClustersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{53} -} - -func (m *CeaseClustersResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CeaseClustersResponse.Unmarshal(m, b) -} -func (m *CeaseClustersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CeaseClustersResponse.Marshal(b, m, deterministic) -} -func (m *CeaseClustersResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CeaseClustersResponse.Merge(m, src) -} -func (m *CeaseClustersResponse) XXX_Size() int { - return xxx_messageInfo_CeaseClustersResponse.Size(m) -} -func (m *CeaseClustersResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CeaseClustersResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CeaseClustersResponse proto.InternalMessageInfo - -func (m *CeaseClustersResponse) GetClusterId() []string { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *CeaseClustersResponse) GetJobId() []string { - if m != nil { - return m.JobId - } - return nil -} - -type GetClusterStatisticsRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetClusterStatisticsRequest) Reset() { *m = GetClusterStatisticsRequest{} } -func (m *GetClusterStatisticsRequest) String() string { return proto.CompactTextString(m) } -func (*GetClusterStatisticsRequest) ProtoMessage() {} -func (*GetClusterStatisticsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{54} -} - -func (m *GetClusterStatisticsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetClusterStatisticsRequest.Unmarshal(m, b) -} -func (m *GetClusterStatisticsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetClusterStatisticsRequest.Marshal(b, m, deterministic) -} -func (m *GetClusterStatisticsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetClusterStatisticsRequest.Merge(m, src) -} -func (m *GetClusterStatisticsRequest) XXX_Size() int { - return xxx_messageInfo_GetClusterStatisticsRequest.Size(m) -} -func (m *GetClusterStatisticsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetClusterStatisticsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetClusterStatisticsRequest proto.InternalMessageInfo - -type GetClusterStatisticsResponse struct { - // cluster create time range map to cluster count, max length is 14 - LastTwoWeekCreated map[string]uint32 `protobuf:"bytes,1,rep,name=last_two_week_created,json=lastTwoWeekCreated,proto3" json:"last_two_week_created,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - // runtime id map to cluster count, max length is 10 - TopTenRuntimes map[string]uint32 `protobuf:"bytes,2,rep,name=top_ten_runtimes,json=topTenRuntimes,proto3" json:"top_ten_runtimes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - // number of cluster - ClusterCount uint32 `protobuf:"varint,3,opt,name=cluster_count,json=clusterCount,proto3" json:"cluster_count,omitempty"` - // number of runtime - RuntimeCount uint32 `protobuf:"varint,4,opt,name=runtime_count,json=runtimeCount,proto3" json:"runtime_count,omitempty"` - // app id map to cluster count, max length is 10 - TopTenApps map[string]uint32 `protobuf:"bytes,5,rep,name=top_ten_apps,json=topTenApps,proto3" json:"top_ten_apps,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetClusterStatisticsResponse) Reset() { *m = GetClusterStatisticsResponse{} } -func (m *GetClusterStatisticsResponse) String() string { return proto.CompactTextString(m) } -func (*GetClusterStatisticsResponse) ProtoMessage() {} -func (*GetClusterStatisticsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{55} -} - -func (m *GetClusterStatisticsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetClusterStatisticsResponse.Unmarshal(m, b) -} -func (m *GetClusterStatisticsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetClusterStatisticsResponse.Marshal(b, m, deterministic) -} -func (m *GetClusterStatisticsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetClusterStatisticsResponse.Merge(m, src) -} -func (m *GetClusterStatisticsResponse) XXX_Size() int { - return xxx_messageInfo_GetClusterStatisticsResponse.Size(m) -} -func (m *GetClusterStatisticsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetClusterStatisticsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetClusterStatisticsResponse proto.InternalMessageInfo - -func (m *GetClusterStatisticsResponse) GetLastTwoWeekCreated() map[string]uint32 { - if m != nil { - return m.LastTwoWeekCreated - } - return nil -} - -func (m *GetClusterStatisticsResponse) GetTopTenRuntimes() map[string]uint32 { - if m != nil { - return m.TopTenRuntimes - } - return nil -} - -func (m *GetClusterStatisticsResponse) GetClusterCount() uint32 { - if m != nil { - return m.ClusterCount - } - return 0 -} - -func (m *GetClusterStatisticsResponse) GetRuntimeCount() uint32 { - if m != nil { - return m.RuntimeCount - } - return 0 -} - -func (m *GetClusterStatisticsResponse) GetTopTenApps() map[string]uint32 { - if m != nil { - return m.TopTenApps - } - return nil -} - -type KeyPair struct { - // ssh key pair id - KeyPairId *wrappers.StringValue `protobuf:"bytes,1,opt,name=key_pair_id,json=keyPairId,proto3" json:"key_pair_id,omitempty"` - // key pair name - Name *wrappers.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // key pair description - Description *wrappers.StringValue `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - // public key - PubKey *wrappers.StringValue `protobuf:"bytes,4,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` - // owner path, concat string group_path:user_id - OwnerPath *wrappers.StringValue `protobuf:"bytes,5,opt,name=owner_path,json=ownerPath,proto3" json:"owner_path,omitempty"` - // the time when key pair create - CreateTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // record status changed time - StatusTime *timestamp.Timestamp `protobuf:"bytes,7,opt,name=status_time,json=statusTime,proto3" json:"status_time,omitempty"` - // list of node used the keypair - NodeId []string `protobuf:"bytes,8,rep,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - // owner - Owner *wrappers.StringValue `protobuf:"bytes,9,opt,name=owner,proto3" json:"owner,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *KeyPair) Reset() { *m = KeyPair{} } -func (m *KeyPair) String() string { return proto.CompactTextString(m) } -func (*KeyPair) ProtoMessage() {} -func (*KeyPair) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{56} -} - -func (m *KeyPair) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_KeyPair.Unmarshal(m, b) -} -func (m *KeyPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_KeyPair.Marshal(b, m, deterministic) -} -func (m *KeyPair) XXX_Merge(src proto.Message) { - xxx_messageInfo_KeyPair.Merge(m, src) -} -func (m *KeyPair) XXX_Size() int { - return xxx_messageInfo_KeyPair.Size(m) -} -func (m *KeyPair) XXX_DiscardUnknown() { - xxx_messageInfo_KeyPair.DiscardUnknown(m) -} - -var xxx_messageInfo_KeyPair proto.InternalMessageInfo - -func (m *KeyPair) GetKeyPairId() *wrappers.StringValue { - if m != nil { - return m.KeyPairId - } - return nil -} - -func (m *KeyPair) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *KeyPair) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *KeyPair) GetPubKey() *wrappers.StringValue { - if m != nil { - return m.PubKey - } - return nil -} - -func (m *KeyPair) GetOwnerPath() *wrappers.StringValue { - if m != nil { - return m.OwnerPath - } - return nil -} - -func (m *KeyPair) GetCreateTime() *timestamp.Timestamp { - if m != nil { - return m.CreateTime - } - return nil -} - -func (m *KeyPair) GetStatusTime() *timestamp.Timestamp { - if m != nil { - return m.StatusTime - } - return nil -} - -func (m *KeyPair) GetNodeId() []string { - if m != nil { - return m.NodeId - } - return nil -} - -func (m *KeyPair) GetOwner() *wrappers.StringValue { - if m != nil { - return m.Owner - } - return nil -} - -type CreateKeyPairRequest struct { - // keypair name - Name *wrappers.StringValue `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // keypair description - Description *wrappers.StringValue `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - // public key - PubKey *wrappers.StringValue `protobuf:"bytes,3,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateKeyPairRequest) Reset() { *m = CreateKeyPairRequest{} } -func (m *CreateKeyPairRequest) String() string { return proto.CompactTextString(m) } -func (*CreateKeyPairRequest) ProtoMessage() {} -func (*CreateKeyPairRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{57} -} - -func (m *CreateKeyPairRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateKeyPairRequest.Unmarshal(m, b) -} -func (m *CreateKeyPairRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateKeyPairRequest.Marshal(b, m, deterministic) -} -func (m *CreateKeyPairRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateKeyPairRequest.Merge(m, src) -} -func (m *CreateKeyPairRequest) XXX_Size() int { - return xxx_messageInfo_CreateKeyPairRequest.Size(m) -} -func (m *CreateKeyPairRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateKeyPairRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateKeyPairRequest proto.InternalMessageInfo - -func (m *CreateKeyPairRequest) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *CreateKeyPairRequest) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *CreateKeyPairRequest) GetPubKey() *wrappers.StringValue { - if m != nil { - return m.PubKey - } - return nil -} - -type CreateKeyPairResponse struct { - // id of key pair created - KeyPairId *wrappers.StringValue `protobuf:"bytes,1,opt,name=key_pair_id,json=keyPairId,proto3" json:"key_pair_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateKeyPairResponse) Reset() { *m = CreateKeyPairResponse{} } -func (m *CreateKeyPairResponse) String() string { return proto.CompactTextString(m) } -func (*CreateKeyPairResponse) ProtoMessage() {} -func (*CreateKeyPairResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{58} -} - -func (m *CreateKeyPairResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateKeyPairResponse.Unmarshal(m, b) -} -func (m *CreateKeyPairResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateKeyPairResponse.Marshal(b, m, deterministic) -} -func (m *CreateKeyPairResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateKeyPairResponse.Merge(m, src) -} -func (m *CreateKeyPairResponse) XXX_Size() int { - return xxx_messageInfo_CreateKeyPairResponse.Size(m) -} -func (m *CreateKeyPairResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CreateKeyPairResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateKeyPairResponse proto.InternalMessageInfo - -func (m *CreateKeyPairResponse) GetKeyPairId() *wrappers.StringValue { - if m != nil { - return m.KeyPairId - } - return nil -} - -type DescribeKeyPairsRequest struct { - // key pair id - KeyPairId *wrappers.StringValue `protobuf:"bytes,1,opt,name=key_pair_id,json=keyPairId,proto3" json:"key_pair_id,omitempty"` - // key pair name - Name *wrappers.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // key pair description - Description *wrappers.StringValue `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - // public key - PubKey *wrappers.StringValue `protobuf:"bytes,4,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` - // owner - Owner []string `protobuf:"bytes,5,rep,name=owner,proto3" json:"owner,omitempty"` - // query key, can filter with these fields(key_pair_id, name, owner) - SearchWord *wrappers.StringValue `protobuf:"bytes,6,opt,name=search_word,json=searchWord,proto3" json:"search_word,omitempty"` - // data limit per page, default value 20, max value 200 - Limit uint32 `protobuf:"varint,7,opt,name=limit,proto3" json:"limit,omitempty"` - // data offset, default 0 - Offset uint32 `protobuf:"varint,8,opt,name=offset,proto3" json:"offset,omitempty"` - // select columns to display - DisplayColumns []string `protobuf:"bytes,9,rep,name=display_columns,json=displayColumns,proto3" json:"display_columns,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeKeyPairsRequest) Reset() { *m = DescribeKeyPairsRequest{} } -func (m *DescribeKeyPairsRequest) String() string { return proto.CompactTextString(m) } -func (*DescribeKeyPairsRequest) ProtoMessage() {} -func (*DescribeKeyPairsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{59} -} - -func (m *DescribeKeyPairsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeKeyPairsRequest.Unmarshal(m, b) -} -func (m *DescribeKeyPairsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeKeyPairsRequest.Marshal(b, m, deterministic) -} -func (m *DescribeKeyPairsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeKeyPairsRequest.Merge(m, src) -} -func (m *DescribeKeyPairsRequest) XXX_Size() int { - return xxx_messageInfo_DescribeKeyPairsRequest.Size(m) -} -func (m *DescribeKeyPairsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeKeyPairsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeKeyPairsRequest proto.InternalMessageInfo - -func (m *DescribeKeyPairsRequest) GetKeyPairId() *wrappers.StringValue { - if m != nil { - return m.KeyPairId - } - return nil -} - -func (m *DescribeKeyPairsRequest) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *DescribeKeyPairsRequest) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *DescribeKeyPairsRequest) GetPubKey() *wrappers.StringValue { - if m != nil { - return m.PubKey - } - return nil -} - -func (m *DescribeKeyPairsRequest) GetOwner() []string { - if m != nil { - return m.Owner - } - return nil -} - -func (m *DescribeKeyPairsRequest) GetSearchWord() *wrappers.StringValue { - if m != nil { - return m.SearchWord - } - return nil -} - -func (m *DescribeKeyPairsRequest) GetLimit() uint32 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *DescribeKeyPairsRequest) GetOffset() uint32 { - if m != nil { - return m.Offset - } - return 0 -} - -func (m *DescribeKeyPairsRequest) GetDisplayColumns() []string { - if m != nil { - return m.DisplayColumns - } - return nil -} - -type DescribeKeyPairsResponse struct { - // total count of qualified key pair - TotalCount uint32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - // list of key pair - KeyPairSet []*KeyPair `protobuf:"bytes,2,rep,name=key_pair_set,json=keyPairSet,proto3" json:"key_pair_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeKeyPairsResponse) Reset() { *m = DescribeKeyPairsResponse{} } -func (m *DescribeKeyPairsResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeKeyPairsResponse) ProtoMessage() {} -func (*DescribeKeyPairsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{60} -} - -func (m *DescribeKeyPairsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeKeyPairsResponse.Unmarshal(m, b) -} -func (m *DescribeKeyPairsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeKeyPairsResponse.Marshal(b, m, deterministic) -} -func (m *DescribeKeyPairsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeKeyPairsResponse.Merge(m, src) -} -func (m *DescribeKeyPairsResponse) XXX_Size() int { - return xxx_messageInfo_DescribeKeyPairsResponse.Size(m) -} -func (m *DescribeKeyPairsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeKeyPairsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeKeyPairsResponse proto.InternalMessageInfo - -func (m *DescribeKeyPairsResponse) GetTotalCount() uint32 { - if m != nil { - return m.TotalCount - } - return 0 -} - -func (m *DescribeKeyPairsResponse) GetKeyPairSet() []*KeyPair { - if m != nil { - return m.KeyPairSet - } - return nil -} - -type DeleteKeyPairsRequest struct { - // required, ids of key pairs to delete - KeyPairId []string `protobuf:"bytes,1,rep,name=key_pair_id,json=keyPairId,proto3" json:"key_pair_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteKeyPairsRequest) Reset() { *m = DeleteKeyPairsRequest{} } -func (m *DeleteKeyPairsRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteKeyPairsRequest) ProtoMessage() {} -func (*DeleteKeyPairsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{61} -} - -func (m *DeleteKeyPairsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteKeyPairsRequest.Unmarshal(m, b) -} -func (m *DeleteKeyPairsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteKeyPairsRequest.Marshal(b, m, deterministic) -} -func (m *DeleteKeyPairsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteKeyPairsRequest.Merge(m, src) -} -func (m *DeleteKeyPairsRequest) XXX_Size() int { - return xxx_messageInfo_DeleteKeyPairsRequest.Size(m) -} -func (m *DeleteKeyPairsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteKeyPairsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteKeyPairsRequest proto.InternalMessageInfo - -func (m *DeleteKeyPairsRequest) GetKeyPairId() []string { - if m != nil { - return m.KeyPairId - } - return nil -} - -type DeleteKeyPairsResponse struct { - // ids of key pairs deleted - KeyPairId []string `protobuf:"bytes,1,rep,name=key_pair_id,json=keyPairId,proto3" json:"key_pair_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteKeyPairsResponse) Reset() { *m = DeleteKeyPairsResponse{} } -func (m *DeleteKeyPairsResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteKeyPairsResponse) ProtoMessage() {} -func (*DeleteKeyPairsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{62} -} - -func (m *DeleteKeyPairsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteKeyPairsResponse.Unmarshal(m, b) -} -func (m *DeleteKeyPairsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteKeyPairsResponse.Marshal(b, m, deterministic) -} -func (m *DeleteKeyPairsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteKeyPairsResponse.Merge(m, src) -} -func (m *DeleteKeyPairsResponse) XXX_Size() int { - return xxx_messageInfo_DeleteKeyPairsResponse.Size(m) -} -func (m *DeleteKeyPairsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteKeyPairsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteKeyPairsResponse proto.InternalMessageInfo - -func (m *DeleteKeyPairsResponse) GetKeyPairId() []string { - if m != nil { - return m.KeyPairId - } - return nil -} - -type AttachKeyPairsRequest struct { - // ids of key pairs to attach - KeyPairId []string `protobuf:"bytes,1,rep,name=key_pair_id,json=keyPairId,proto3" json:"key_pair_id,omitempty"` - // ids of node to attached - NodeId []string `protobuf:"bytes,2,rep,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AttachKeyPairsRequest) Reset() { *m = AttachKeyPairsRequest{} } -func (m *AttachKeyPairsRequest) String() string { return proto.CompactTextString(m) } -func (*AttachKeyPairsRequest) ProtoMessage() {} -func (*AttachKeyPairsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{63} -} - -func (m *AttachKeyPairsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AttachKeyPairsRequest.Unmarshal(m, b) -} -func (m *AttachKeyPairsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AttachKeyPairsRequest.Marshal(b, m, deterministic) -} -func (m *AttachKeyPairsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AttachKeyPairsRequest.Merge(m, src) -} -func (m *AttachKeyPairsRequest) XXX_Size() int { - return xxx_messageInfo_AttachKeyPairsRequest.Size(m) -} -func (m *AttachKeyPairsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AttachKeyPairsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AttachKeyPairsRequest proto.InternalMessageInfo - -func (m *AttachKeyPairsRequest) GetKeyPairId() []string { - if m != nil { - return m.KeyPairId - } - return nil -} - -func (m *AttachKeyPairsRequest) GetNodeId() []string { - if m != nil { - return m.NodeId - } - return nil -} - -type AttachKeyPairsResponse struct { - // ids of jobs of attach key pair - JobId []string `protobuf:"bytes,1,rep,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AttachKeyPairsResponse) Reset() { *m = AttachKeyPairsResponse{} } -func (m *AttachKeyPairsResponse) String() string { return proto.CompactTextString(m) } -func (*AttachKeyPairsResponse) ProtoMessage() {} -func (*AttachKeyPairsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{64} -} - -func (m *AttachKeyPairsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AttachKeyPairsResponse.Unmarshal(m, b) -} -func (m *AttachKeyPairsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AttachKeyPairsResponse.Marshal(b, m, deterministic) -} -func (m *AttachKeyPairsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AttachKeyPairsResponse.Merge(m, src) -} -func (m *AttachKeyPairsResponse) XXX_Size() int { - return xxx_messageInfo_AttachKeyPairsResponse.Size(m) -} -func (m *AttachKeyPairsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AttachKeyPairsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AttachKeyPairsResponse proto.InternalMessageInfo - -func (m *AttachKeyPairsResponse) GetJobId() []string { - if m != nil { - return m.JobId - } - return nil -} - -type DetachKeyPairsRequest struct { - // ids of key pairs to detach - KeyPairId []string `protobuf:"bytes,1,rep,name=key_pair_id,json=keyPairId,proto3" json:"key_pair_id,omitempty"` - // ids of nodes to detached - NodeId []string `protobuf:"bytes,2,rep,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DetachKeyPairsRequest) Reset() { *m = DetachKeyPairsRequest{} } -func (m *DetachKeyPairsRequest) String() string { return proto.CompactTextString(m) } -func (*DetachKeyPairsRequest) ProtoMessage() {} -func (*DetachKeyPairsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{65} -} - -func (m *DetachKeyPairsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DetachKeyPairsRequest.Unmarshal(m, b) -} -func (m *DetachKeyPairsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DetachKeyPairsRequest.Marshal(b, m, deterministic) -} -func (m *DetachKeyPairsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DetachKeyPairsRequest.Merge(m, src) -} -func (m *DetachKeyPairsRequest) XXX_Size() int { - return xxx_messageInfo_DetachKeyPairsRequest.Size(m) -} -func (m *DetachKeyPairsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DetachKeyPairsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DetachKeyPairsRequest proto.InternalMessageInfo - -func (m *DetachKeyPairsRequest) GetKeyPairId() []string { - if m != nil { - return m.KeyPairId - } - return nil -} - -func (m *DetachKeyPairsRequest) GetNodeId() []string { - if m != nil { - return m.NodeId - } - return nil -} - -type DetachKeyPairsResponse struct { - // ids of jobs of detach key pair - JobId []string `protobuf:"bytes,1,rep,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DetachKeyPairsResponse) Reset() { *m = DetachKeyPairsResponse{} } -func (m *DetachKeyPairsResponse) String() string { return proto.CompactTextString(m) } -func (*DetachKeyPairsResponse) ProtoMessage() {} -func (*DetachKeyPairsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{66} -} - -func (m *DetachKeyPairsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DetachKeyPairsResponse.Unmarshal(m, b) -} -func (m *DetachKeyPairsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DetachKeyPairsResponse.Marshal(b, m, deterministic) -} -func (m *DetachKeyPairsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DetachKeyPairsResponse.Merge(m, src) -} -func (m *DetachKeyPairsResponse) XXX_Size() int { - return xxx_messageInfo_DetachKeyPairsResponse.Size(m) -} -func (m *DetachKeyPairsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DetachKeyPairsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DetachKeyPairsResponse proto.InternalMessageInfo - -func (m *DetachKeyPairsResponse) GetJobId() []string { - if m != nil { - return m.JobId - } - return nil -} - -type NodeKeyPair struct { - // id of node with key pair - NodeId *wrappers.StringValue `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - // id of key pair in node - KeyPairId *wrappers.StringValue `protobuf:"bytes,2,opt,name=key_pair_id,json=keyPairId,proto3" json:"key_pair_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *NodeKeyPair) Reset() { *m = NodeKeyPair{} } -func (m *NodeKeyPair) String() string { return proto.CompactTextString(m) } -func (*NodeKeyPair) ProtoMessage() {} -func (*NodeKeyPair) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{67} -} - -func (m *NodeKeyPair) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NodeKeyPair.Unmarshal(m, b) -} -func (m *NodeKeyPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NodeKeyPair.Marshal(b, m, deterministic) -} -func (m *NodeKeyPair) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeKeyPair.Merge(m, src) -} -func (m *NodeKeyPair) XXX_Size() int { - return xxx_messageInfo_NodeKeyPair.Size(m) -} -func (m *NodeKeyPair) XXX_DiscardUnknown() { - xxx_messageInfo_NodeKeyPair.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeKeyPair proto.InternalMessageInfo - -func (m *NodeKeyPair) GetNodeId() *wrappers.StringValue { - if m != nil { - return m.NodeId - } - return nil -} - -func (m *NodeKeyPair) GetKeyPairId() *wrappers.StringValue { - if m != nil { - return m.KeyPairId - } - return nil -} - -type AddNodeKeyPairsRequest struct { - // list of node with key pair to add - NodeKeyPair []*NodeKeyPair `protobuf:"bytes,1,rep,name=node_key_pair,json=nodeKeyPair,proto3" json:"node_key_pair,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AddNodeKeyPairsRequest) Reset() { *m = AddNodeKeyPairsRequest{} } -func (m *AddNodeKeyPairsRequest) String() string { return proto.CompactTextString(m) } -func (*AddNodeKeyPairsRequest) ProtoMessage() {} -func (*AddNodeKeyPairsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{68} -} - -func (m *AddNodeKeyPairsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AddNodeKeyPairsRequest.Unmarshal(m, b) -} -func (m *AddNodeKeyPairsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AddNodeKeyPairsRequest.Marshal(b, m, deterministic) -} -func (m *AddNodeKeyPairsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddNodeKeyPairsRequest.Merge(m, src) -} -func (m *AddNodeKeyPairsRequest) XXX_Size() int { - return xxx_messageInfo_AddNodeKeyPairsRequest.Size(m) -} -func (m *AddNodeKeyPairsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AddNodeKeyPairsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AddNodeKeyPairsRequest proto.InternalMessageInfo - -func (m *AddNodeKeyPairsRequest) GetNodeKeyPair() []*NodeKeyPair { - if m != nil { - return m.NodeKeyPair - } - return nil -} - -type AddNodeKeyPairsResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AddNodeKeyPairsResponse) Reset() { *m = AddNodeKeyPairsResponse{} } -func (m *AddNodeKeyPairsResponse) String() string { return proto.CompactTextString(m) } -func (*AddNodeKeyPairsResponse) ProtoMessage() {} -func (*AddNodeKeyPairsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{69} -} - -func (m *AddNodeKeyPairsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AddNodeKeyPairsResponse.Unmarshal(m, b) -} -func (m *AddNodeKeyPairsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AddNodeKeyPairsResponse.Marshal(b, m, deterministic) -} -func (m *AddNodeKeyPairsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddNodeKeyPairsResponse.Merge(m, src) -} -func (m *AddNodeKeyPairsResponse) XXX_Size() int { - return xxx_messageInfo_AddNodeKeyPairsResponse.Size(m) -} -func (m *AddNodeKeyPairsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AddNodeKeyPairsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AddNodeKeyPairsResponse proto.InternalMessageInfo - -type DeleteNodeKeyPairsRequest struct { - // list of node with key pair to delete - NodeKeyPair []*NodeKeyPair `protobuf:"bytes,1,rep,name=node_key_pair,json=nodeKeyPair,proto3" json:"node_key_pair,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteNodeKeyPairsRequest) Reset() { *m = DeleteNodeKeyPairsRequest{} } -func (m *DeleteNodeKeyPairsRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteNodeKeyPairsRequest) ProtoMessage() {} -func (*DeleteNodeKeyPairsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{70} -} - -func (m *DeleteNodeKeyPairsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteNodeKeyPairsRequest.Unmarshal(m, b) -} -func (m *DeleteNodeKeyPairsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteNodeKeyPairsRequest.Marshal(b, m, deterministic) -} -func (m *DeleteNodeKeyPairsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteNodeKeyPairsRequest.Merge(m, src) -} -func (m *DeleteNodeKeyPairsRequest) XXX_Size() int { - return xxx_messageInfo_DeleteNodeKeyPairsRequest.Size(m) -} -func (m *DeleteNodeKeyPairsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteNodeKeyPairsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteNodeKeyPairsRequest proto.InternalMessageInfo - -func (m *DeleteNodeKeyPairsRequest) GetNodeKeyPair() []*NodeKeyPair { - if m != nil { - return m.NodeKeyPair - } - return nil -} - -type DeleteNodeKeyPairsResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteNodeKeyPairsResponse) Reset() { *m = DeleteNodeKeyPairsResponse{} } -func (m *DeleteNodeKeyPairsResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteNodeKeyPairsResponse) ProtoMessage() {} -func (*DeleteNodeKeyPairsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3cfb3b8ec240c376, []int{71} -} - -func (m *DeleteNodeKeyPairsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteNodeKeyPairsResponse.Unmarshal(m, b) -} -func (m *DeleteNodeKeyPairsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteNodeKeyPairsResponse.Marshal(b, m, deterministic) -} -func (m *DeleteNodeKeyPairsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteNodeKeyPairsResponse.Merge(m, src) -} -func (m *DeleteNodeKeyPairsResponse) XXX_Size() int { - return xxx_messageInfo_DeleteNodeKeyPairsResponse.Size(m) -} -func (m *DeleteNodeKeyPairsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteNodeKeyPairsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteNodeKeyPairsResponse proto.InternalMessageInfo - -func init() { - proto.RegisterType((*DescribeSubnetsRequest)(nil), "openpitrix.DescribeSubnetsRequest") - proto.RegisterType((*Subnet)(nil), "openpitrix.Subnet") - proto.RegisterType((*DescribeSubnetsResponse)(nil), "openpitrix.DescribeSubnetsResponse") - proto.RegisterType((*DeleteClusterInRuntimeRequest)(nil), "openpitrix.DeleteClusterInRuntimeRequest") - proto.RegisterType((*DeleteClusterInRuntimeResponse)(nil), "openpitrix.DeleteClusterInRuntimeResponse") - proto.RegisterType((*MigrateClusterInRuntimeRequest)(nil), "openpitrix.MigrateClusterInRuntimeRequest") - proto.RegisterType((*MigrateClusterInRuntimeResponse)(nil), "openpitrix.MigrateClusterInRuntimeResponse") - proto.RegisterType((*CreateClusterRequest)(nil), "openpitrix.CreateClusterRequest") - proto.RegisterType((*CreateClusterResponse)(nil), "openpitrix.CreateClusterResponse") - proto.RegisterType((*ModifyClusterRequest)(nil), "openpitrix.ModifyClusterRequest") - proto.RegisterType((*ModifyClusterResponse)(nil), "openpitrix.ModifyClusterResponse") - proto.RegisterType((*ModifyClusterNodeRequest)(nil), "openpitrix.ModifyClusterNodeRequest") - proto.RegisterType((*ModifyClusterNodeResponse)(nil), "openpitrix.ModifyClusterNodeResponse") - proto.RegisterType((*ModifyClusterAttributesRequest)(nil), "openpitrix.ModifyClusterAttributesRequest") - proto.RegisterType((*ModifyClusterAttributesResponse)(nil), "openpitrix.ModifyClusterAttributesResponse") - proto.RegisterType((*ModifyClusterNodeAttributesRequest)(nil), "openpitrix.ModifyClusterNodeAttributesRequest") - proto.RegisterType((*ModifyClusterNodeAttributesResponse)(nil), "openpitrix.ModifyClusterNodeAttributesResponse") - proto.RegisterType((*AddTableClusterNodesRequest)(nil), "openpitrix.AddTableClusterNodesRequest") - proto.RegisterType((*DeleteTableClusterNodesRequest)(nil), "openpitrix.DeleteTableClusterNodesRequest") - proto.RegisterType((*DeleteClustersRequest)(nil), "openpitrix.DeleteClustersRequest") - proto.RegisterType((*DeleteClustersResponse)(nil), "openpitrix.DeleteClustersResponse") - proto.RegisterType((*UpgradeClusterRequest)(nil), "openpitrix.UpgradeClusterRequest") - proto.RegisterType((*UpgradeClusterResponse)(nil), "openpitrix.UpgradeClusterResponse") - proto.RegisterType((*RollbackClusterRequest)(nil), "openpitrix.RollbackClusterRequest") - proto.RegisterType((*RollbackClusterResponse)(nil), "openpitrix.RollbackClusterResponse") - proto.RegisterType((*RoleResource)(nil), "openpitrix.RoleResource") - proto.RegisterType((*ResizeClusterRequest)(nil), "openpitrix.ResizeClusterRequest") - proto.RegisterType((*ResizeClusterResponse)(nil), "openpitrix.ResizeClusterResponse") - proto.RegisterType((*AddClusterNodesRequest)(nil), "openpitrix.AddClusterNodesRequest") - proto.RegisterType((*AddClusterNodesResponse)(nil), "openpitrix.AddClusterNodesResponse") - proto.RegisterType((*DeleteClusterNodesRequest)(nil), "openpitrix.DeleteClusterNodesRequest") - proto.RegisterType((*DeleteClusterNodesResponse)(nil), "openpitrix.DeleteClusterNodesResponse") - proto.RegisterType((*UpdateClusterEnvRequest)(nil), "openpitrix.UpdateClusterEnvRequest") - proto.RegisterType((*UpdateClusterEnvResponse)(nil), "openpitrix.UpdateClusterEnvResponse") - proto.RegisterType((*ClusterCommon)(nil), "openpitrix.ClusterCommon") - proto.RegisterType((*ClusterNode)(nil), "openpitrix.ClusterNode") - proto.RegisterType((*ClusterRole)(nil), "openpitrix.ClusterRole") - proto.RegisterType((*ClusterLoadbalancer)(nil), "openpitrix.ClusterLoadbalancer") - proto.RegisterType((*ClusterLink)(nil), "openpitrix.ClusterLink") - proto.RegisterType((*Cluster)(nil), "openpitrix.Cluster") - proto.RegisterType((*DescribeClustersRequest)(nil), "openpitrix.DescribeClustersRequest") - proto.RegisterType((*DescribeClustersResponse)(nil), "openpitrix.DescribeClustersResponse") - proto.RegisterType((*DescribeAppClustersRequest)(nil), "openpitrix.DescribeAppClustersRequest") - proto.RegisterType((*DescribeAppClustersResponse)(nil), "openpitrix.DescribeAppClustersResponse") - proto.RegisterType((*DescribeClusterNodesRequest)(nil), "openpitrix.DescribeClusterNodesRequest") - proto.RegisterType((*DescribeClusterNodesResponse)(nil), "openpitrix.DescribeClusterNodesResponse") - proto.RegisterType((*StopClustersRequest)(nil), "openpitrix.StopClustersRequest") - proto.RegisterType((*StopClustersResponse)(nil), "openpitrix.StopClustersResponse") - proto.RegisterType((*StartClustersRequest)(nil), "openpitrix.StartClustersRequest") - proto.RegisterType((*StartClustersResponse)(nil), "openpitrix.StartClustersResponse") - proto.RegisterType((*RecoverClustersRequest)(nil), "openpitrix.RecoverClustersRequest") - proto.RegisterType((*RecoverClustersResponse)(nil), "openpitrix.RecoverClustersResponse") - proto.RegisterType((*CeaseClustersRequest)(nil), "openpitrix.CeaseClustersRequest") - proto.RegisterType((*CeaseClustersResponse)(nil), "openpitrix.CeaseClustersResponse") - proto.RegisterType((*GetClusterStatisticsRequest)(nil), "openpitrix.GetClusterStatisticsRequest") - proto.RegisterType((*GetClusterStatisticsResponse)(nil), "openpitrix.GetClusterStatisticsResponse") - proto.RegisterMapType((map[string]uint32)(nil), "openpitrix.GetClusterStatisticsResponse.LastTwoWeekCreatedEntry") - proto.RegisterMapType((map[string]uint32)(nil), "openpitrix.GetClusterStatisticsResponse.TopTenAppsEntry") - proto.RegisterMapType((map[string]uint32)(nil), "openpitrix.GetClusterStatisticsResponse.TopTenRuntimesEntry") - proto.RegisterType((*KeyPair)(nil), "openpitrix.KeyPair") - proto.RegisterType((*CreateKeyPairRequest)(nil), "openpitrix.CreateKeyPairRequest") - proto.RegisterType((*CreateKeyPairResponse)(nil), "openpitrix.CreateKeyPairResponse") - proto.RegisterType((*DescribeKeyPairsRequest)(nil), "openpitrix.DescribeKeyPairsRequest") - proto.RegisterType((*DescribeKeyPairsResponse)(nil), "openpitrix.DescribeKeyPairsResponse") - proto.RegisterType((*DeleteKeyPairsRequest)(nil), "openpitrix.DeleteKeyPairsRequest") - proto.RegisterType((*DeleteKeyPairsResponse)(nil), "openpitrix.DeleteKeyPairsResponse") - proto.RegisterType((*AttachKeyPairsRequest)(nil), "openpitrix.AttachKeyPairsRequest") - proto.RegisterType((*AttachKeyPairsResponse)(nil), "openpitrix.AttachKeyPairsResponse") - proto.RegisterType((*DetachKeyPairsRequest)(nil), "openpitrix.DetachKeyPairsRequest") - proto.RegisterType((*DetachKeyPairsResponse)(nil), "openpitrix.DetachKeyPairsResponse") - proto.RegisterType((*NodeKeyPair)(nil), "openpitrix.NodeKeyPair") - proto.RegisterType((*AddNodeKeyPairsRequest)(nil), "openpitrix.AddNodeKeyPairsRequest") - proto.RegisterType((*AddNodeKeyPairsResponse)(nil), "openpitrix.AddNodeKeyPairsResponse") - proto.RegisterType((*DeleteNodeKeyPairsRequest)(nil), "openpitrix.DeleteNodeKeyPairsRequest") - proto.RegisterType((*DeleteNodeKeyPairsResponse)(nil), "openpitrix.DeleteNodeKeyPairsResponse") -} - -func init() { proto.RegisterFile("cluster.proto", fileDescriptor_3cfb3b8ec240c376) } - -var fileDescriptor_3cfb3b8ec240c376 = []byte{ - // 4950 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5c, 0x4d, 0x6c, 0x24, 0xc7, - 0x75, 0x76, 0xcf, 0x90, 0x43, 0xf2, 0x0d, 0x67, 0xc8, 0x2d, 0xfe, 0xcd, 0x0e, 0xb9, 0xbb, 0xb3, - 0xbd, 0x96, 0xb4, 0x56, 0xa8, 0x5d, 0x69, 0x25, 0x59, 0x3f, 0xab, 0xb5, 0x34, 0xe2, 0x6e, 0xe4, - 0x89, 0x76, 0xa5, 0xc5, 0x70, 0x57, 0x72, 0x14, 0xc5, 0xed, 0xe6, 0x74, 0x71, 0xd8, 0x66, 0x4f, - 0x77, 0xab, 0xbb, 0x86, 0x6b, 0x0a, 0x39, 0x09, 0x41, 0x7e, 0x6c, 0x27, 0x80, 0x19, 0x24, 0x70, - 0x7e, 0x10, 0x20, 0x08, 0x62, 0x38, 0x41, 0x84, 0xd8, 0x02, 0x02, 0x44, 0xc8, 0x21, 0xa7, 0xf8, - 0x12, 0x20, 0x09, 0x90, 0x4b, 0xe0, 0x53, 0x0e, 0x3e, 0x39, 0xd7, 0xdc, 0x72, 0x09, 0xea, 0xa7, - 0x7f, 0xaa, 0xa7, 0x67, 0x58, 0xc3, 0xa1, 0x76, 0x65, 0xe4, 0x44, 0x4e, 0xf7, 0x7b, 0xaf, 0xbe, - 0x7e, 0xf5, 0xea, 0xbd, 0x57, 0x55, 0xaf, 0x0a, 0x2a, 0x1d, 0xa7, 0x1f, 0x12, 0x1c, 0x5c, 0xf1, - 0x03, 0x8f, 0x78, 0x08, 0x3c, 0x1f, 0xbb, 0xbe, 0x4d, 0x02, 0xfb, 0x5b, 0xf5, 0xf5, 0xae, 0xe7, - 0x75, 0x1d, 0x7c, 0x95, 0xbd, 0xd9, 0xe9, 0xef, 0x5e, 0xc5, 0x3d, 0x9f, 0x1c, 0x72, 0xc2, 0xfa, - 0xf9, 0xec, 0xcb, 0x07, 0x81, 0xe9, 0xfb, 0x38, 0x08, 0xc5, 0xfb, 0x0b, 0xd9, 0xf7, 0xc4, 0xee, - 0xe1, 0x90, 0x98, 0x3d, 0x5f, 0x10, 0x6c, 0x08, 0x02, 0xd3, 0xb7, 0xaf, 0x9a, 0xae, 0xeb, 0x11, - 0x93, 0xd8, 0x9e, 0x1b, 0xb1, 0x6f, 0xb2, 0x3f, 0x9d, 0xa7, 0xba, 0xd8, 0x7d, 0x2a, 0x7c, 0x60, - 0x76, 0xbb, 0x38, 0xb8, 0xea, 0xf9, 0x8c, 0x62, 0x90, 0x5a, 0xff, 0x93, 0x02, 0xac, 0xde, 0xc4, - 0x61, 0x27, 0xb0, 0x77, 0xf0, 0x76, 0x7f, 0xc7, 0xc5, 0x24, 0x6c, 0xe3, 0x0f, 0xfa, 0x38, 0x24, - 0xe8, 0x3a, 0x40, 0xd0, 0x77, 0x69, 0xe3, 0x86, 0x6d, 0xd5, 0xb4, 0x86, 0x76, 0xb9, 0x7c, 0x6d, - 0xe3, 0x0a, 0x6f, 0xfb, 0x4a, 0x04, 0xee, 0xca, 0x36, 0x09, 0x6c, 0xb7, 0xfb, 0x8e, 0xe9, 0xf4, - 0x71, 0x7b, 0x4e, 0xd0, 0xb7, 0x2c, 0xb4, 0x0c, 0xd3, 0x8e, 0xdd, 0xb3, 0x49, 0xad, 0xd0, 0xd0, - 0x2e, 0x57, 0xda, 0xfc, 0x07, 0x5a, 0x85, 0x92, 0xb7, 0xbb, 0x1b, 0x62, 0x52, 0x2b, 0xb2, 0xc7, - 0xe2, 0x17, 0xba, 0x01, 0xe5, 0x90, 0x35, 0x6e, 0x90, 0x43, 0x1f, 0xd7, 0xa6, 0x86, 0xb4, 0x75, - 0xbf, 0xe5, 0x92, 0x67, 0xaf, 0xf1, 0xb6, 0x80, 0x33, 0xdc, 0x3b, 0xf4, 0x31, 0x5a, 0x87, 0x39, - 0xc1, 0x6e, 0x5b, 0xb5, 0xe9, 0x46, 0xf1, 0xf2, 0x5c, 0x7b, 0x96, 0x3f, 0x68, 0x59, 0x08, 0xc1, - 0xd4, 0x87, 0x9e, 0x8b, 0x6b, 0x25, 0xf6, 0x9c, 0xfd, 0x8f, 0x1e, 0x83, 0xaa, 0x69, 0x1d, 0x98, - 0x6e, 0x07, 0x5b, 0x86, 0x6f, 0x06, 0x66, 0xaf, 0x36, 0xc3, 0xde, 0x56, 0xa2, 0xa7, 0x77, 0xe9, - 0x43, 0xfd, 0xd3, 0x22, 0x94, 0xb8, 0x52, 0xd0, 0x4b, 0xe9, 0x26, 0x54, 0x74, 0x91, 0x00, 0x78, - 0x1a, 0xa6, 0x5c, 0xb3, 0x87, 0x99, 0x26, 0x8e, 0xe3, 0x62, 0x94, 0x94, 0x83, 0x41, 0x2e, 0xaa, - 0x70, 0xb0, 0x0f, 0xba, 0x0e, 0xe5, 0x4e, 0x80, 0x4d, 0x82, 0x0d, 0xaa, 0x7f, 0xa1, 0xc0, 0xfa, - 0x00, 0xe3, 0xbd, 0xc8, 0x92, 0xda, 0xc0, 0xc9, 0xe9, 0x03, 0xf4, 0x15, 0x28, 0x5b, 0xcc, 0x04, - 0x98, 0x95, 0xd4, 0xa6, 0x15, 0x5a, 0x4d, 0x33, 0xa0, 0x0b, 0x50, 0xb6, 0xdd, 0x90, 0x50, 0xc5, - 0x51, 0xed, 0x70, 0x45, 0x43, 0xf4, 0xa8, 0x65, 0xa1, 0x67, 0xa1, 0x74, 0xe0, 0x77, 0xe8, 0xbb, - 0x19, 0x05, 0xd9, 0xd3, 0x07, 0x7e, 0xa7, 0x65, 0x65, 0x6d, 0x62, 0x76, 0x3c, 0x9b, 0xd0, 0x7b, - 0xb0, 0x36, 0x60, 0xd7, 0xa1, 0xef, 0xb9, 0x21, 0xa6, 0x78, 0x89, 0x47, 0x4c, 0xc7, 0xe8, 0x78, - 0x7d, 0x97, 0xb0, 0xde, 0xac, 0xb4, 0x81, 0x3d, 0xda, 0xa2, 0x4f, 0xd0, 0x33, 0x20, 0x24, 0x19, - 0xd4, 0x54, 0x0b, 0x8d, 0xe2, 0xe5, 0xf2, 0x35, 0x74, 0x25, 0x19, 0xdf, 0x57, 0xb8, 0xc4, 0xb6, - 0x30, 0x89, 0x6d, 0x4c, 0xf4, 0xaf, 0xc0, 0xb9, 0x9b, 0xd8, 0xc1, 0x04, 0x6f, 0x71, 0xa7, 0xd0, - 0x72, 0xdb, 0x7c, 0x2c, 0x44, 0xa3, 0xe9, 0x5c, 0x66, 0x34, 0x51, 0x1d, 0x25, 0xe3, 0x45, 0x7f, - 0x15, 0xce, 0x0f, 0xe3, 0x17, 0xa8, 0x8f, 0x11, 0xe0, 0xc0, 0xf9, 0x3b, 0x76, 0x37, 0x30, 0x87, - 0x23, 0x78, 0x1c, 0x16, 0x76, 0x03, 0xaf, 0x67, 0x64, 0x06, 0xf5, 0x5c, 0xbb, 0x42, 0x1f, 0xb7, - 0xe3, 0xa1, 0xab, 0x43, 0x85, 0x78, 0x69, 0xaa, 0x02, 0xa3, 0x2a, 0x13, 0x2f, 0xa6, 0xd1, 0x7b, - 0x70, 0x61, 0x68, 0x6b, 0x02, 0xef, 0x69, 0x36, 0xf7, 0xef, 0x05, 0x58, 0xde, 0x62, 0x06, 0x2b, - 0x9a, 0x8b, 0xbe, 0xe9, 0x59, 0x28, 0x99, 0xbe, 0xaf, 0x3a, 0x26, 0xa7, 0x4d, 0xdf, 0x6f, 0x59, - 0xd4, 0xb1, 0x1d, 0xe0, 0x20, 0xb4, 0x3d, 0x37, 0x6a, 0xee, 0x58, 0xc7, 0x26, 0xe8, 0x39, 0x73, - 0x0a, 0x6b, 0x71, 0x3c, 0xaf, 0xf8, 0x34, 0x4c, 0x75, 0x3c, 0x77, 0x77, 0xa8, 0x83, 0x93, 0x06, - 0x36, 0xa5, 0xcc, 0xf1, 0x54, 0xd3, 0x39, 0x9e, 0x2a, 0xf6, 0x18, 0x25, 0x55, 0x8f, 0xa1, 0xff, - 0xae, 0x06, 0x2b, 0x19, 0x95, 0x8a, 0x8e, 0xbb, 0x0e, 0x20, 0x22, 0x9b, 0xb2, 0xdf, 0x17, 0xf4, - 0x7c, 0xa8, 0x7f, 0xd3, 0xdb, 0x51, 0xd5, 0xeb, 0xf4, 0x37, 0xbd, 0x9d, 0x96, 0xa5, 0x7f, 0x52, - 0x84, 0xe5, 0x3b, 0x9e, 0x65, 0xef, 0x1e, 0x66, 0xba, 0xf7, 0x29, 0x98, 0x11, 0xa2, 0x05, 0x8e, - 0xa5, 0xf4, 0x28, 0x8c, 0x88, 0x23, 0x1a, 0xd4, 0x84, 0xc5, 0x08, 0xb9, 0xeb, 0x59, 0x38, 0x35, - 0x7a, 0xd7, 0x72, 0xf8, 0xde, 0xf2, 0x2c, 0xdc, 0xae, 0x76, 0x92, 0x1f, 0xdb, 0x98, 0xa4, 0x45, - 0x04, 0x9e, 0xc3, 0x45, 0x14, 0x87, 0x8a, 0x68, 0x7b, 0x4e, 0x22, 0x82, 0xfe, 0xc8, 0x88, 0x70, - 0x6c, 0x77, 0x9f, 0x89, 0x98, 0x1a, 0x2a, 0xe2, 0xb6, 0xed, 0xee, 0xc7, 0x22, 0xe8, 0x0f, 0x2a, - 0xe2, 0x0d, 0x40, 0x91, 0x88, 0x8e, 0xd7, 0xeb, 0x79, 0x2e, 0x13, 0x32, 0xcd, 0x84, 0x9c, 0xcd, - 0x11, 0xb2, 0xc5, 0x88, 0xda, 0x51, 0xbb, 0xfc, 0x27, 0x15, 0xf4, 0xab, 0x50, 0x8b, 0xb1, 0x78, - 0xa6, 0xb5, 0x63, 0x3a, 0xd4, 0x68, 0x02, 0x26, 0xae, 0xc4, 0xc4, 0x5d, 0xc8, 0xc3, 0x94, 0x22, - 0x6d, 0xaf, 0x76, 0x06, 0x1f, 0x52, 0x8f, 0x77, 0x0f, 0x56, 0x32, 0x7d, 0x76, 0x0a, 0xf6, 0xa3, - 0xbf, 0x03, 0x35, 0x49, 0x2a, 0xeb, 0x24, 0x61, 0x0d, 0x2f, 0xc3, 0x7c, 0xba, 0x7b, 0x85, 0xe8, - 0xa1, 0x5d, 0x5b, 0x4e, 0x75, 0xad, 0xde, 0x86, 0xb3, 0x39, 0x72, 0x05, 0xe2, 0xe7, 0x61, 0x86, - 0xd9, 0x8b, 0x22, 0xdc, 0x12, 0x25, 0x6e, 0x59, 0xfa, 0xbf, 0x69, 0x70, 0x5e, 0x12, 0xda, 0x24, - 0x24, 0xb0, 0x77, 0xfa, 0x04, 0xa7, 0x73, 0xa8, 0x93, 0x8f, 0xa5, 0xf1, 0x13, 0x87, 0x4c, 0x24, - 0x2f, 0x8e, 0x19, 0xc9, 0xf5, 0xaf, 0xc3, 0x85, 0xa1, 0x1f, 0x74, 0x1a, 0xbd, 0xfb, 0x7b, 0x1a, - 0xe8, 0x03, 0xdd, 0x30, 0xa8, 0xb5, 0x93, 0xf5, 0xc7, 0xf8, 0xfa, 0xd2, 0xdf, 0x87, 0x4b, 0x23, - 0xe1, 0x4c, 0x66, 0x1f, 0xdf, 0x80, 0xf5, 0xa6, 0x65, 0xdd, 0x33, 0x77, 0x1c, 0x9c, 0x92, 0x1f, - 0x7f, 0x65, 0x9e, 0xb7, 0xd2, 0xc6, 0xf2, 0x56, 0xfa, 0x4b, 0x51, 0xd6, 0x30, 0xb4, 0x91, 0xb5, - 0x34, 0x74, 0x1a, 0x38, 0x22, 0x70, 0x9f, 0x68, 0xb0, 0x22, 0x65, 0x1c, 0x61, 0x2a, 0x53, 0x91, - 0x7a, 0x98, 0x25, 0x1a, 0x89, 0x55, 0x0e, 0x46, 0xa4, 0x42, 0x7e, 0x44, 0x9a, 0xde, 0xf5, 0x82, - 0x4e, 0x94, 0xc4, 0x0e, 0xe6, 0xa2, 0xaf, 0x7b, 0x9e, 0x23, 0xa2, 0x00, 0x23, 0x44, 0x17, 0x61, - 0xbe, 0x1b, 0x98, 0x1d, 0x6c, 0xf8, 0x38, 0xb0, 0x3d, 0x8b, 0x05, 0xc9, 0x4a, 0xbb, 0xcc, 0x9e, - 0xdd, 0x65, 0x8f, 0xf4, 0xb7, 0xe8, 0x64, 0x45, 0xc6, 0x9c, 0x64, 0x47, 0xa3, 0x40, 0xaf, 0xa4, - 0xc2, 0x12, 0x7d, 0x25, 0x02, 0xcf, 0x3f, 0x68, 0xb0, 0x72, 0xdf, 0xef, 0x06, 0xa6, 0x95, 0x4d, - 0x2c, 0x26, 0x1a, 0xb8, 0x13, 0x25, 0x18, 0x83, 0xfa, 0x2d, 0xe6, 0xcd, 0x4d, 0xbe, 0xad, 0xc1, - 0x6a, 0x16, 0xfa, 0x23, 0x0b, 0xe0, 0xbf, 0x01, 0xab, 0x6d, 0xcf, 0x71, 0x76, 0xcc, 0xce, 0xfe, - 0x69, 0xea, 0x51, 0xcd, 0xd4, 0xf4, 0xef, 0x68, 0xb0, 0x36, 0xd0, 0xfc, 0x23, 0xd3, 0xc5, 0x4f, - 0x0b, 0x30, 0xcf, 0xf2, 0x02, 0x1c, 0x7a, 0x7d, 0x6a, 0xd7, 0x4f, 0xc3, 0x14, 0x4d, 0x25, 0x94, - 0x1a, 0x67, 0x94, 0xe8, 0x0a, 0x14, 0x3b, 0x7e, 0x7f, 0x68, 0xa3, 0xe9, 0x29, 0x0f, 0x25, 0xa4, - 0xf4, 0x5d, 0xbf, 0x3f, 0xd4, 0xdd, 0x4b, 0xf4, 0x5d, 0xbf, 0x8f, 0x9e, 0x83, 0x52, 0x0f, 0xf7, - 0xbc, 0xe0, 0x50, 0x69, 0xa6, 0x2d, 0x68, 0x51, 0x13, 0x2a, 0xf1, 0x34, 0x2f, 0xb4, 0x3f, 0xc4, - 0x43, 0x27, 0x8a, 0x69, 0xe6, 0xf9, 0x88, 0x65, 0xdb, 0xfe, 0x10, 0xa3, 0x57, 0x61, 0x3e, 0x24, - 0x5e, 0x60, 0x76, 0x85, 0x84, 0x92, 0x82, 0x84, 0xb2, 0xe0, 0xa0, 0x02, 0xf4, 0x4f, 0x35, 0x58, - 0x6e, 0x63, 0xca, 0x7b, 0x9a, 0x76, 0x76, 0x03, 0x2a, 0x2c, 0xd9, 0x0b, 0x44, 0x97, 0x89, 0xa4, - 0xb1, 0x96, 0x76, 0xc3, 0xe9, 0x2e, 0x6d, 0xcf, 0x07, 0xe9, 0x0e, 0x56, 0xcb, 0xd1, 0x59, 0xc6, - 0x9d, 0xc1, 0xfe, 0xc8, 0x8c, 0xf4, 0xbf, 0x35, 0x58, 0x6d, 0x5a, 0x56, 0x5e, 0xc4, 0x98, 0x34, - 0x65, 0x61, 0xb6, 0x5e, 0x50, 0xb6, 0xf5, 0xeb, 0x00, 0x2c, 0x40, 0xf1, 0xb9, 0xb8, 0x8a, 0x09, - 0xcf, 0x51, 0x7a, 0x3e, 0x51, 0x1f, 0xd4, 0xfc, 0xd4, 0x30, 0x07, 0x31, 0xf0, 0xb5, 0x8f, 0x4c, - 0xf7, 0xdf, 0xd7, 0xe0, 0xac, 0x14, 0xc5, 0x4e, 0x4f, 0xfd, 0xa9, 0x68, 0x5f, 0x48, 0x47, 0x7b, - 0xd5, 0xa0, 0xf2, 0xfb, 0x1a, 0xd4, 0xf3, 0xa0, 0x3d, 0x32, 0x5d, 0x7d, 0xac, 0xc1, 0xda, 0x7d, - 0xdf, 0x4a, 0x66, 0xa9, 0xb7, 0xdc, 0x83, 0x53, 0xd1, 0xd4, 0x15, 0x28, 0x62, 0xf7, 0x40, 0x09, - 0x0a, 0x25, 0x54, 0x55, 0xe0, 0x77, 0x35, 0xa8, 0x0d, 0xe2, 0x7d, 0x64, 0xea, 0xfb, 0x71, 0x15, - 0x2a, 0xd2, 0x14, 0xf1, 0x61, 0x8f, 0xee, 0xb7, 0x61, 0x25, 0xc4, 0xc1, 0x01, 0x6b, 0xcd, 0xe8, - 0xfb, 0x3e, 0x0e, 0x8c, 0x1d, 0xaf, 0xef, 0x5a, 0x4a, 0x03, 0x1d, 0x71, 0xd6, 0x96, 0x75, 0x9f, - 0x32, 0xbe, 0x4e, 0xf9, 0xd0, 0x1b, 0xb0, 0x18, 0xf7, 0x83, 0xd9, 0x61, 0x2b, 0xd9, 0x4a, 0xab, - 0x29, 0x0b, 0x11, 0x57, 0x93, 0x33, 0xd1, 0x50, 0x64, 0xbb, 0x36, 0x31, 0x68, 0x1b, 0x76, 0x07, - 0xab, 0xad, 0x7a, 0x52, 0x8e, 0x6d, 0xce, 0x40, 0xc3, 0x61, 0x48, 0xcc, 0x20, 0x91, 0xa0, 0xb2, - 0xf6, 0x32, 0xcf, 0x58, 0x22, 0x11, 0x3c, 0x1c, 0xfa, 0xb1, 0x04, 0x95, 0xd5, 0x51, 0x1a, 0x0e, - 0xfd, 0x48, 0xc0, 0x57, 0xe1, 0x4c, 0xd8, 0x31, 0x1d, 0x6c, 0x78, 0xfd, 0x04, 0xc7, 0xac, 0x8a, - 0x3a, 0x18, 0xdb, 0xdb, 0xfd, 0x18, 0xca, 0x2f, 0xc3, 0x22, 0x97, 0x64, 0xbb, 0xb1, 0xa0, 0x39, - 0x05, 0x41, 0x55, 0xc6, 0xd5, 0x72, 0x23, 0x39, 0xb7, 0x60, 0x21, 0xc0, 0xb2, 0x5e, 0x40, 0x45, - 0x8c, 0x60, 0x4a, 0x89, 0xb1, 0x70, 0x48, 0x02, 0xef, 0x30, 0x16, 0x53, 0x56, 0x11, 0x23, 0x98, - 0x52, 0x62, 0xfa, 0x3c, 0x47, 0x8e, 0xc5, 0xcc, 0xab, 0x88, 0x11, 0x4c, 0x91, 0x98, 0x2d, 0xa8, - 0x76, 0xfa, 0x21, 0xf1, 0x7a, 0xb1, 0x94, 0x8a, 0x82, 0x94, 0x0a, 0xe7, 0x49, 0x09, 0xa1, 0x09, - 0x6a, 0x3f, 0xe9, 0xee, 0xaa, 0x8a, 0x10, 0xce, 0x93, 0x51, 0xaf, 0x17, 0x24, 0x1f, 0xb4, 0xa0, - 0xaa, 0x5e, 0x2f, 0x88, 0x3f, 0xe8, 0x1e, 0xac, 0x59, 0xcc, 0xcd, 0x1b, 0xa1, 0x6b, 0xfa, 0xe1, - 0x9e, 0x97, 0xf4, 0xd6, 0xa2, 0x82, 0xb8, 0x15, 0xce, 0xbc, 0x2d, 0x78, 0x53, 0xe6, 0xbc, 0x87, - 0x4d, 0x87, 0xec, 0x19, 0x9d, 0x3d, 0xdc, 0xd9, 0xaf, 0x9d, 0x51, 0x31, 0x67, 0xce, 0xb1, 0x45, - 0x19, 0xd0, 0x97, 0x61, 0xa6, 0xe7, 0xb9, 0x36, 0xf1, 0x82, 0x1a, 0x52, 0xe0, 0x8d, 0x88, 0xd1, - 0x4d, 0xa8, 0xfa, 0x66, 0x18, 0xfa, 0x7b, 0x81, 0x19, 0x62, 0x07, 0x87, 0x61, 0x6d, 0x49, 0x45, - 0x29, 0x32, 0x0f, 0x55, 0xca, 0x01, 0x0e, 0x88, 0xdd, 0x31, 0x1d, 0x83, 0x5a, 0xb5, 0xed, 0x76, - 0x0d, 0xdf, 0x73, 0xec, 0xce, 0x61, 0x6d, 0x59, 0x45, 0x29, 0x11, 0xf3, 0x36, 0xe7, 0xbd, 0xcb, - 0x58, 0xd1, 0x16, 0x2c, 0x98, 0x5d, 0xec, 0x12, 0x83, 0x25, 0xc2, 0x8e, 0x83, 0xad, 0xda, 0xca, - 0xb1, 0x33, 0xe2, 0x2a, 0x63, 0x69, 0x45, 0x1c, 0xa8, 0x0d, 0xab, 0xc2, 0x00, 0x7b, 0x98, 0x98, - 0x96, 0x49, 0x4c, 0x83, 0x2f, 0xda, 0xd4, 0x56, 0x15, 0x90, 0x2d, 0x73, 0xde, 0x3b, 0x82, 0x75, - 0x9b, 0x71, 0xa2, 0x17, 0x60, 0xd6, 0xee, 0xd1, 0x4c, 0xdc, 0xb6, 0x6a, 0x6b, 0x2a, 0xda, 0x66, - 0xd4, 0x2d, 0x8b, 0x3a, 0x3e, 0x61, 0xc8, 0x42, 0x3b, 0x35, 0x15, 0xc7, 0xc7, 0x59, 0x84, 0x52, - 0xde, 0x87, 0x0d, 0xdb, 0xed, 0x04, 0xb8, 0x87, 0x5d, 0x62, 0x3a, 0x46, 0x34, 0x2e, 0xfa, 0xbe, - 0xef, 0x05, 0x04, 0x5b, 0xb5, 0xb3, 0xc7, 0x6a, 0xa8, 0x9e, 0xe2, 0x7f, 0x9d, 0x0f, 0x91, 0x88, - 0x1b, 0xbd, 0x02, 0xb0, 0x77, 0xe8, 0x53, 0xa3, 0x0c, 0xbd, 0xa0, 0x56, 0x57, 0x40, 0x97, 0xa2, - 0xd7, 0x7f, 0x58, 0x81, 0x72, 0x2a, 0xfb, 0x39, 0xe9, 0x62, 0x94, 0x1c, 0x68, 0x0b, 0x27, 0x5b, - 0xf9, 0x2b, 0x2a, 0xaf, 0xfc, 0xdd, 0x90, 0xf7, 0xe0, 0x54, 0x42, 0x62, 0x7a, 0x87, 0xee, 0x25, - 0x98, 0x3b, 0xf0, 0x9c, 0x3e, 0xdf, 0xd4, 0x50, 0x09, 0x85, 0xb3, 0x9c, 0xbc, 0x65, 0xd1, 0xc9, - 0xa4, 0x85, 0x95, 0x03, 0xa0, 0xa0, 0x95, 0xf7, 0x53, 0x67, 0xc6, 0xda, 0x4f, 0xbd, 0x0e, 0xe0, - 0x07, 0xf6, 0x81, 0x49, 0xb0, 0x61, 0xfb, 0x4a, 0xd1, 0x6e, 0x4e, 0xd0, 0xb7, 0x7c, 0x96, 0xf7, - 0xd9, 0xbe, 0x52, 0x68, 0xa3, 0x84, 0x0c, 0x67, 0x94, 0xc0, 0x0c, 0x8d, 0x64, 0xe9, 0xa4, 0x65, - 0x36, 0x4a, 0x5a, 0xe2, 0x6c, 0xa9, 0xac, 0x9c, 0x2d, 0x3d, 0x07, 0xa5, 0x90, 0x98, 0xa4, 0x1f, - 0x2a, 0x45, 0x29, 0x41, 0x8b, 0x5a, 0x70, 0x86, 0x04, 0xa6, 0x1b, 0xda, 0x34, 0xb1, 0x31, 0x84, - 0x00, 0x95, 0x00, 0xb5, 0x98, 0xb0, 0x6d, 0x73, 0x51, 0x2f, 0xc0, 0x6c, 0x37, 0xf0, 0xfa, 0x6c, - 0x43, 0xad, 0xaa, 0xf0, 0xb1, 0x33, 0x8c, 0x9a, 0xf7, 0x89, 0xf7, 0xc0, 0xc5, 0x81, 0xe1, 0x9b, - 0x64, 0x4f, 0x29, 0x24, 0xcd, 0x31, 0xfa, 0xbb, 0x26, 0xd9, 0xa3, 0xb9, 0x47, 0xd7, 0xf1, 0x76, - 0xa8, 0xdb, 0x8d, 0x55, 0xbd, 0xa8, 0xd0, 0x7a, 0x95, 0x73, 0x6d, 0x47, 0x0a, 0xbf, 0x05, 0x0b, - 0x19, 0x2f, 0xa9, 0x14, 0x82, 0xaa, 0xb2, 0x7b, 0xa4, 0x03, 0xde, 0xef, 0xef, 0x18, 0xfb, 0xf8, - 0x50, 0x29, 0x0a, 0x95, 0xfc, 0xfe, 0xce, 0x9b, 0x98, 0x2d, 0x8f, 0x88, 0xe8, 0x27, 0xba, 0x40, - 0x25, 0x06, 0x89, 0x80, 0x19, 0xab, 0x7f, 0xce, 0x0e, 0x85, 0x37, 0x14, 0x31, 0x67, 0x94, 0x0f, - 0x9c, 0xb5, 0x43, 0xee, 0xfa, 0xd0, 0x75, 0x28, 0x9b, 0x7d, 0xe2, 0x45, 0xac, 0xc7, 0x07, 0x18, - 0xa0, 0xe4, 0x09, 0x73, 0xba, 0x76, 0x60, 0x75, 0xac, 0xda, 0x81, 0xeb, 0x50, 0xe6, 0x9f, 0xcb, - 0x99, 0xd7, 0x8e, 0x67, 0xe6, 0xe4, 0x8c, 0xf9, 0x79, 0x98, 0xd9, 0xf3, 0x42, 0xe6, 0x02, 0x54, - 0x62, 0x48, 0x89, 0x12, 0xb7, 0xac, 0x84, 0xcd, 0x17, 0x81, 0x42, 0x85, 0xcd, 0x4f, 0x6f, 0x1f, - 0xb1, 0x71, 0x59, 0x1f, 0xba, 0x7d, 0xc4, 0xd6, 0x7a, 0xca, 0xa9, 0x6d, 0x3d, 0xf4, 0x1a, 0x54, - 0xe5, 0x0d, 0xb9, 0xda, 0x3a, 0xe3, 0x1e, 0xb1, 0x19, 0x57, 0x91, 0x36, 0xe3, 0xd0, 0x79, 0x28, - 0xef, 0xe3, 0x43, 0xc3, 0x37, 0x6d, 0x66, 0xdf, 0x1b, 0x7c, 0x85, 0x7a, 0x1f, 0x1f, 0xde, 0x35, - 0x6d, 0x6a, 0xbc, 0xd7, 0x60, 0x9a, 0x8d, 0x88, 0xda, 0x39, 0x95, 0xe9, 0x1d, 0x23, 0xd5, 0xff, - 0xb9, 0x14, 0x87, 0xaa, 0xb6, 0x58, 0x4b, 0x79, 0x98, 0x93, 0x3b, 0xb1, 0x4c, 0x59, 0x1c, 0x73, - 0x99, 0x72, 0x6a, 0xfc, 0x65, 0xca, 0xe9, 0x49, 0x96, 0x29, 0x4b, 0x13, 0x2f, 0x53, 0xce, 0x8c, - 0xb9, 0x4c, 0x49, 0xa3, 0x71, 0xcf, 0xeb, 0xbb, 0xc4, 0xf0, 0x3d, 0xdb, 0x25, 0x4a, 0x31, 0x0a, - 0x18, 0xc3, 0x5d, 0x4a, 0x4f, 0x3f, 0x81, 0xb3, 0x8b, 0xba, 0x2d, 0xa5, 0x70, 0x35, 0xcf, 0x58, - 0xde, 0xe6, 0x1c, 0x14, 0xc1, 0xae, 0xed, 0x60, 0x23, 0x3c, 0x0c, 0x09, 0xee, 0x29, 0xcd, 0xc1, - 0x80, 0x32, 0x6c, 0x33, 0xfa, 0x68, 0x79, 0xa4, 0xac, 0xba, 0x3c, 0xf2, 0x22, 0xcc, 0x06, 0xd8, - 0x77, 0xec, 0x8e, 0x39, 0x3c, 0x76, 0x49, 0x51, 0x32, 0xa2, 0xa6, 0xd3, 0xa2, 0x00, 0x9b, 0xd6, - 0xa1, 0x11, 0xf3, 0x57, 0x14, 0xf8, 0x2b, 0x8c, 0xa7, 0x1d, 0x09, 0xb9, 0x01, 0x65, 0xd3, 0xb7, - 0x0d, 0xb1, 0x89, 0xa2, 0x34, 0xb1, 0x02, 0xd3, 0xb7, 0xdf, 0xe1, 0xf4, 0xfa, 0xff, 0x16, 0x60, - 0x29, 0x67, 0xeb, 0xfb, 0x61, 0x8f, 0xa7, 0x77, 0xa0, 0x26, 0x6d, 0xd2, 0x3b, 0x76, 0x48, 0xb0, - 0xcb, 0x1b, 0x57, 0xc9, 0x04, 0x57, 0xd3, 0xdc, 0xb7, 0x05, 0x73, 0xcb, 0xa2, 0x09, 0x82, 0x24, - 0x97, 0xa6, 0xc9, 0x4a, 0xa3, 0x70, 0x31, 0xcd, 0x76, 0xd7, 0x0b, 0x08, 0x9d, 0x88, 0x64, 0x44, - 0xd1, 0x7c, 0x5e, 0x35, 0x69, 0x5c, 0x96, 0xe5, 0x51, 0xd6, 0x96, 0xa5, 0xff, 0x63, 0x21, 0xf6, - 0x62, 0xb7, 0x6d, 0x77, 0xff, 0x61, 0xef, 0x99, 0xdf, 0x86, 0x25, 0xfc, 0x2d, 0x82, 0x03, 0xd7, - 0x74, 0x8c, 0x54, 0xbb, 0x2a, 0x0a, 0x3f, 0x13, 0x31, 0x6e, 0xa5, 0xb7, 0xfe, 0x52, 0x89, 0xd0, - 0xd4, 0x78, 0x89, 0x50, 0x1c, 0x03, 0xa6, 0xd5, 0x63, 0xc0, 0x4f, 0xab, 0x30, 0x23, 0x9a, 0xff, - 0x05, 0xab, 0x36, 0x48, 0x15, 0x6f, 0x4d, 0x9d, 0xb4, 0x78, 0x6b, 0x7a, 0xbc, 0xbd, 0x55, 0x69, - 0xd6, 0x51, 0x1a, 0x6b, 0xd6, 0x71, 0xa2, 0x1a, 0xc6, 0x57, 0x61, 0x7e, 0x37, 0xf0, 0x5c, 0xd2, - 0x65, 0x93, 0x15, 0x4b, 0x29, 0x10, 0x94, 0x63, 0x0e, 0x2e, 0x20, 0xea, 0x51, 0x56, 0x05, 0x39, - 0xa7, 0x12, 0x89, 0x04, 0x07, 0x2b, 0x8d, 0x7d, 0x19, 0xe6, 0xb0, 0x6b, 0xb1, 0x30, 0x14, 0x2a, - 0x45, 0x81, 0x84, 0x3c, 0x35, 0x1d, 0x29, 0x4f, 0x3a, 0x1d, 0x99, 0x3f, 0xd1, 0x74, 0xe4, 0x36, - 0x2c, 0xc7, 0xeb, 0x1d, 0x81, 0xe7, 0x11, 0xc3, 0xec, 0x74, 0x70, 0x18, 0x45, 0x88, 0x51, 0xf9, - 0x2d, 0x8a, 0xf8, 0xda, 0x9e, 0x47, 0x9a, 0x8c, 0x2b, 0x33, 0x34, 0xab, 0xe3, 0x0d, 0xcd, 0x1b, - 0x50, 0x16, 0x73, 0x94, 0x7e, 0xdf, 0xb6, 0x94, 0x66, 0x38, 0xc0, 0x19, 0xee, 0xf7, 0x6d, 0x8b, - 0x46, 0xb9, 0x78, 0x21, 0x92, 0x6b, 0x44, 0x65, 0x9d, 0xad, 0x12, 0xad, 0x43, 0x72, 0x75, 0xdc, - 0x80, 0xf9, 0x48, 0x08, 0x4b, 0xb6, 0xcf, 0x1c, 0x9b, 0x6c, 0x97, 0x05, 0xbd, 0x48, 0xd5, 0xd3, - 0x95, 0x8b, 0x68, 0xbc, 0xca, 0xc5, 0xcc, 0x24, 0x61, 0x69, 0x92, 0x49, 0xc2, 0xf2, 0x58, 0x93, - 0x84, 0x5b, 0xb0, 0x60, 0x5a, 0x16, 0x33, 0x0b, 0xd3, 0x31, 0x6c, 0x77, 0xd7, 0x13, 0xf3, 0x9b, - 0x63, 0x66, 0x75, 0x09, 0x53, 0xcb, 0xdd, 0xf5, 0xa2, 0x8c, 0x66, 0x55, 0x35, 0xa3, 0x79, 0x1a, - 0xa6, 0x2d, 0xbc, 0xd3, 0xef, 0x0e, 0x9d, 0xd2, 0xa4, 0xea, 0x57, 0x18, 0x61, 0x5c, 0x83, 0x59, - 0x53, 0xae, 0xda, 0xce, 0xab, 0x00, 0x3a, 0x3b, 0x79, 0xbd, 0x62, 0x7d, 0xf2, 0x7a, 0xc5, 0xf5, - 0xd3, 0xa8, 0x57, 0xdc, 0x38, 0xdd, 0x7a, 0xc5, 0x73, 0x13, 0xd5, 0x2b, 0x26, 0xc1, 0xf5, 0xbc, - 0x7a, 0x70, 0xfd, 0xcd, 0x52, 0x52, 0x45, 0x3e, 0x66, 0x99, 0xd4, 0x4a, 0x1c, 0xdc, 0x44, 0xc5, - 0x11, 0x0f, 0x5f, 0xe7, 0xa4, 0xf0, 0xc5, 0xf7, 0x10, 0x53, 0x01, 0x6a, 0x35, 0x76, 0xb9, 0x7c, - 0x23, 0x3b, 0x72, 0xaa, 0x72, 0xf1, 0xf7, 0x74, 0xa6, 0xf8, 0x1b, 0x5d, 0xcc, 0xc4, 0x19, 0x5e, - 0x82, 0x2f, 0x45, 0x92, 0x21, 0x69, 0xce, 0xcc, 0xc9, 0xd2, 0x9c, 0xf8, 0x78, 0xc7, 0x6c, 0xfe, - 0xf1, 0x8e, 0xb9, 0x81, 0xe3, 0x1d, 0xd8, 0x0c, 0x3a, 0x7b, 0xc6, 0x03, 0x2f, 0xb0, 0xd4, 0x26, - 0x23, 0x9c, 0xe1, 0x5d, 0x2f, 0xb0, 0xd0, 0x0b, 0x30, 0x1b, 0x7a, 0x01, 0x61, 0x2b, 0x32, 0x2a, - 0x91, 0x68, 0x86, 0x52, 0xbf, 0x89, 0x0f, 0xd1, 0x73, 0x30, 0x13, 0x60, 0xaa, 0xdc, 0x68, 0xdb, - 0x67, 0xd4, 0x28, 0x8e, 0x48, 0xe9, 0xb7, 0x71, 0x43, 0xa9, 0xf0, 0x8e, 0x63, 0x3f, 0x06, 0x22, - 0xb1, 0x4a, 0xfc, 0x90, 0x22, 0xf1, 0x75, 0x28, 0x3f, 0xb0, 0xc9, 0x9e, 0x61, 0x61, 0x62, 0xda, - 0x8e, 0x88, 0x20, 0x23, 0xd7, 0x68, 0x28, 0xf9, 0x4d, 0x46, 0xcd, 0x5a, 0x67, 0xfe, 0xd4, 0x32, - 0x2c, 0x93, 0x60, 0xa5, 0xe5, 0x31, 0xe1, 0xb0, 0xad, 0x9b, 0x26, 0xc1, 0xe8, 0x09, 0x58, 0xb0, - 0xec, 0xd0, 0x77, 0xcc, 0x43, 0xa3, 0xe3, 0x39, 0xfd, 0x9e, 0x1b, 0xd6, 0xce, 0xb0, 0xcf, 0xab, - 0x8a, 0xc7, 0x5b, 0xfc, 0x69, 0x7c, 0x5c, 0x06, 0x25, 0xc7, 0x65, 0xf4, 0x0f, 0xa0, 0x36, 0x38, - 0x0a, 0x54, 0x0f, 0x53, 0x3c, 0x07, 0x91, 0x1a, 0x52, 0xf5, 0xd8, 0xb9, 0x75, 0xdc, 0xd1, 0x78, - 0xda, 0xc6, 0x44, 0xff, 0x59, 0x11, 0xea, 0x51, 0x9b, 0x4d, 0xdf, 0xcf, 0x0e, 0xbe, 0x95, 0x54, - 0xdd, 0x7f, 0x6a, 0x74, 0x25, 0xc3, 0xa7, 0x20, 0x0d, 0x9f, 0xd8, 0x5c, 0x8b, 0xf9, 0xe6, 0x3a, - 0x35, 0xca, 0x5c, 0xa7, 0x27, 0x30, 0xd7, 0xd2, 0x09, 0xcd, 0x75, 0xe6, 0x04, 0xe6, 0x3a, 0x9b, - 0x36, 0xd7, 0x8c, 0xb5, 0xcd, 0x4d, 0x64, 0x6d, 0x70, 0x0a, 0xd6, 0x56, 0xce, 0xb3, 0x36, 0x9d, - 0xc0, 0x7a, 0x6e, 0x2f, 0x7f, 0xb6, 0xc6, 0xf5, 0x83, 0x62, 0xd2, 0xec, 0xc3, 0xab, 0xc1, 0x49, - 0x8c, 0xb3, 0x98, 0x6f, 0x9c, 0x53, 0xf9, 0xc6, 0x39, 0x3d, 0xca, 0x38, 0x4b, 0x13, 0x18, 0xe7, - 0xcc, 0x09, 0x8d, 0x73, 0xf6, 0x04, 0xc6, 0x39, 0x97, 0x36, 0xce, 0x1c, 0xf3, 0x80, 0x5c, 0xf3, - 0xf8, 0x48, 0x83, 0x8d, 0xfc, 0x8e, 0x52, 0x35, 0x90, 0xc9, 0x8f, 0x84, 0xe8, 0xbf, 0x06, 0x4b, - 0xdb, 0xc4, 0xf3, 0x3f, 0x93, 0x32, 0x69, 0xfd, 0x36, 0x2c, 0xcb, 0xc2, 0x27, 0xaa, 0x67, 0x7e, - 0x9f, 0x4a, 0x33, 0x03, 0xf2, 0xd9, 0x60, 0xbd, 0x03, 0x2b, 0x19, 0xe9, 0x13, 0x81, 0xfd, 0x3a, - 0xac, 0xb6, 0x71, 0xc7, 0x3b, 0xc0, 0xc1, 0x67, 0x03, 0xf7, 0x6d, 0x58, 0x1b, 0x90, 0x3f, 0x11, - 0xe0, 0x1f, 0x6b, 0xb0, 0xbc, 0x85, 0xcd, 0xf0, 0x17, 0xa9, 0x62, 0xfe, 0x0e, 0xac, 0x64, 0x20, - 0x4f, 0xa4, 0x82, 0x73, 0xb0, 0xfe, 0x06, 0x8e, 0x0c, 0x80, 0x4e, 0x4b, 0xed, 0x90, 0xd8, 0x9d, - 0x48, 0x11, 0xfa, 0xcf, 0xa7, 0x60, 0x23, 0xff, 0xbd, 0x68, 0x35, 0x84, 0x15, 0xc7, 0x0c, 0x89, - 0x41, 0x1e, 0x78, 0xc6, 0x03, 0x8c, 0xf7, 0x0d, 0x11, 0x35, 0xc4, 0xc1, 0x87, 0xd7, 0xd2, 0x63, - 0x72, 0x94, 0xa0, 0x2b, 0xb7, 0xcd, 0x90, 0xdc, 0x7b, 0xe0, 0xbd, 0x8b, 0xf1, 0x3e, 0x3f, 0xc5, - 0x66, 0xdd, 0x72, 0x49, 0x70, 0xd8, 0x46, 0xce, 0xc0, 0x0b, 0xb4, 0x0b, 0x8b, 0xc4, 0xf3, 0x0d, - 0x82, 0xdd, 0xe8, 0x98, 0x61, 0x28, 0x7c, 0xc0, 0x2b, 0xca, 0xed, 0xdd, 0xf3, 0xfc, 0x7b, 0x38, - 0x3a, 0xe3, 0x18, 0xf2, 0xb6, 0xaa, 0x44, 0x7a, 0x88, 0x2e, 0xc5, 0x47, 0xc2, 0x53, 0xd5, 0xac, - 0x95, 0xf6, 0x7c, 0x3c, 0xcb, 0xa1, 0x0e, 0xe9, 0x12, 0x54, 0xa2, 0x4c, 0x9e, 0x13, 0xf1, 0x4e, - 0x9b, 0x17, 0x0f, 0x39, 0xd1, 0x7b, 0x30, 0x1f, 0x21, 0x36, 0x7d, 0x3f, 0x14, 0x27, 0xbf, 0x5e, - 0x1c, 0x13, 0x6d, 0xd3, 0xf7, 0x05, 0x52, 0x20, 0xf1, 0x83, 0xfa, 0x2d, 0x58, 0x1b, 0xa2, 0x3c, - 0xb4, 0x08, 0x45, 0x1a, 0x17, 0xf8, 0x31, 0x4d, 0xfa, 0x2f, 0xf5, 0xdf, 0x07, 0xd4, 0xe2, 0xa2, - 0x63, 0xdc, 0xec, 0xc7, 0xcb, 0x85, 0x17, 0xb5, 0x7a, 0x13, 0x96, 0x72, 0x74, 0x32, 0x96, 0x88, - 0x1b, 0xb0, 0x90, 0x01, 0x3a, 0x0e, 0xbb, 0xfe, 0x3f, 0x45, 0x98, 0x79, 0x93, 0xef, 0x9f, 0xa1, - 0x57, 0xe4, 0xdd, 0x35, 0xa5, 0x90, 0x9d, 0xec, 0xbd, 0x3d, 0xfc, 0xa5, 0xcf, 0xd4, 0x1e, 0xf3, - 0xd4, 0x18, 0x7b, 0xcc, 0xf2, 0x12, 0xd6, 0xf4, 0x78, 0x4b, 0x58, 0x99, 0x25, 0x9c, 0xd2, 0x24, - 0x4b, 0x38, 0x33, 0x63, 0x2d, 0xe1, 0xa4, 0x52, 0xa2, 0x59, 0x29, 0x25, 0xba, 0x96, 0xa4, 0x07, - 0xca, 0x73, 0xf2, 0x7f, 0xd2, 0xa2, 0xb3, 0xc0, 0xa2, 0xf3, 0x23, 0x2f, 0x1c, 0xf5, 0xa2, 0x76, - 0xd2, 0x5e, 0x2c, 0x4c, 0xd0, 0x8b, 0x45, 0xf5, 0x5e, 0xd4, 0xef, 0x47, 0x27, 0x6f, 0xe3, 0x0f, - 0x10, 0xde, 0x71, 0x22, 0x2b, 0xd6, 0xff, 0xb6, 0x98, 0x2c, 0x56, 0x08, 0xc9, 0x71, 0x84, 0xfa, - 0x7f, 0x32, 0x3e, 0x96, 0x93, 0x0d, 0x94, 0x54, 0xba, 0x39, 0x61, 0xca, 0x1c, 0xe7, 0xe7, 0x33, - 0xf9, 0xf9, 0xf9, 0xac, 0x94, 0x9f, 0xe7, 0xe4, 0xb6, 0x73, 0xb9, 0xb9, 0x6d, 0x90, 0x4c, 0xaa, - 0x93, 0xde, 0x52, 0x4d, 0x6b, 0x9f, 0x87, 0xf9, 0xb8, 0x3f, 0x87, 0x4c, 0x7c, 0x22, 0xe3, 0x02, - 0xd1, 0x8f, 0x34, 0x95, 0x7d, 0x21, 0x3a, 0xf3, 0x97, 0xb5, 0x8f, 0xf3, 0x59, 0xfb, 0x90, 0xab, - 0x13, 0xf4, 0x17, 0xa3, 0x83, 0x77, 0x03, 0x50, 0x8f, 0xe3, 0xbc, 0x0b, 0x2b, 0x4d, 0x42, 0xcc, - 0xce, 0xde, 0x98, 0x4d, 0x0e, 0x9d, 0x47, 0xe9, 0x57, 0x61, 0x35, 0x2b, 0x51, 0x60, 0x49, 0x92, - 0x16, 0x2d, 0x9d, 0xb4, 0xdc, 0xa5, 0x5f, 0x7d, 0xda, 0x10, 0xb2, 0x12, 0x47, 0x43, 0xf8, 0x48, - 0x83, 0x32, 0x9d, 0x4f, 0x44, 0xf1, 0xea, 0x84, 0x45, 0x85, 0x99, 0x61, 0x5c, 0x18, 0xcf, 0x41, - 0xdc, 0x67, 0x67, 0x7e, 0x52, 0x30, 0x52, 0x13, 0xde, 0x0a, 0x83, 0x13, 0x09, 0xcf, 0x3b, 0x87, - 0x9a, 0xe2, 0x6b, 0x97, 0xdd, 0xe4, 0x87, 0x7e, 0x96, 0x1d, 0xae, 0x91, 0xc5, 0x72, 0x6d, 0xe8, - 0x5f, 0x8b, 0x4e, 0xba, 0x9c, 0x7a, 0xa3, 0x1b, 0xd1, 0x41, 0x95, 0xbc, 0x76, 0xaf, 0xfd, 0xd6, - 0x53, 0x50, 0x15, 0xd9, 0xd1, 0x1d, 0xd3, 0x35, 0xbb, 0x38, 0x40, 0xef, 0xc1, 0x42, 0x06, 0x25, - 0xd2, 0xd3, 0x2d, 0xe5, 0x6b, 0xa6, 0x7e, 0x69, 0x24, 0x8d, 0xe8, 0xf4, 0x0e, 0xa0, 0x41, 0x30, - 0xe8, 0xb1, 0x34, 0xeb, 0x50, 0x35, 0xd4, 0x1f, 0x3f, 0x8e, 0x4c, 0x34, 0xf2, 0x1d, 0x0d, 0x2a, - 0x52, 0xd8, 0x40, 0x0d, 0x69, 0x06, 0x9b, 0x13, 0x12, 0xeb, 0x17, 0x47, 0x50, 0x88, 0x2e, 0x7a, - 0xfe, 0xa8, 0x79, 0x06, 0x2d, 0xf0, 0x77, 0x8d, 0x7d, 0x7c, 0xd8, 0xa0, 0x5d, 0xf1, 0xd1, 0x7f, - 0xfc, 0xec, 0x0f, 0x0a, 0xeb, 0xfa, 0xea, 0xd5, 0x83, 0x67, 0xae, 0x8a, 0xec, 0x35, 0xbc, 0x1a, - 0xf5, 0x53, 0xf8, 0xb2, 0xf6, 0x24, 0xfa, 0xb9, 0x06, 0x8b, 0x59, 0xf7, 0x85, 0x2e, 0xc9, 0x9f, - 0x92, 0x1b, 0x8a, 0xea, 0x5f, 0x1c, 0x4d, 0x24, 0x60, 0x7d, 0x5b, 0x3b, 0x6a, 0xda, 0xa8, 0xfb, - 0x06, 0x26, 0x31, 0xa8, 0x70, 0xb3, 0x21, 0x2a, 0x84, 0x1b, 0xbb, 0xb6, 0x43, 0x70, 0xd0, 0x78, - 0x60, 0x93, 0xbd, 0x06, 0xd9, 0xc3, 0x21, 0x6e, 0xec, 0xda, 0xd8, 0xb1, 0xc2, 0xcb, 0xa9, 0xd1, - 0xb1, 0xd9, 0xa0, 0x91, 0x68, 0xb3, 0xc1, 0x62, 0xc0, 0x97, 0x36, 0x1b, 0x16, 0xde, 0x35, 0xfb, - 0x0e, 0x69, 0x04, 0x98, 0xf4, 0x03, 0xb7, 0x61, 0x3a, 0x4e, 0x22, 0x99, 0x7d, 0x6f, 0x0d, 0x0d, - 0xf9, 0x5e, 0xf4, 0x87, 0x1a, 0x54, 0x65, 0xf7, 0x87, 0x2e, 0x0e, 0xf6, 0x5a, 0xf6, 0x43, 0xf5, - 0x51, 0x24, 0xe2, 0x33, 0x5f, 0x39, 0x6a, 0xd6, 0xd0, 0xea, 0xeb, 0x26, 0xe9, 0xec, 0x35, 0x78, - 0x51, 0x7d, 0x06, 0xd4, 0xfa, 0x93, 0x23, 0x3a, 0xe1, 0x2f, 0x35, 0xa8, 0xca, 0xae, 0x50, 0xc6, - 0x95, 0xeb, 0x78, 0x65, 0x5c, 0xf9, 0x9e, 0x54, 0xff, 0x95, 0xa3, 0x66, 0x03, 0x9d, 0xe7, 0xb8, - 0x4c, 0x46, 0x92, 0xe0, 0x6a, 0x10, 0xaf, 0x41, 0x87, 0x22, 0xc3, 0x77, 0x51, 0xdf, 0xc8, 0xc5, - 0x77, 0x95, 0x73, 0x51, 0x94, 0x7f, 0xc5, 0xb4, 0x37, 0x1c, 0x65, 0xae, 0x6f, 0xce, 0x6a, 0x2f, - 0x17, 0xe5, 0xed, 0xa3, 0xa6, 0x8e, 0x1a, 0x91, 0xf6, 0x32, 0x28, 0x77, 0x03, 0xaf, 0xa7, 0x80, - 0x93, 0xf3, 0x51, 0x9c, 0xbf, 0xa3, 0xc1, 0x42, 0xe6, 0xca, 0x20, 0xa4, 0xe7, 0x19, 0xab, 0x7c, - 0x4f, 0x56, 0xfd, 0xd2, 0x48, 0x1a, 0x01, 0x75, 0xf3, 0xa8, 0x59, 0x41, 0x65, 0x6a, 0xce, 0xbc, - 0xa2, 0x80, 0xf7, 0xee, 0x2a, 0x5a, 0x96, 0x50, 0x89, 0x77, 0xe8, 0xb7, 0xe3, 0xb1, 0x1e, 0x95, - 0x76, 0xe4, 0x8c, 0x75, 0xf9, 0x04, 0x6c, 0xde, 0x58, 0xcf, 0x9c, 0x33, 0xd5, 0x9f, 0x39, 0x6a, - 0x2e, 0xa2, 0xaa, 0x18, 0xeb, 0xa2, 0x51, 0x6e, 0xfa, 0xfa, 0x92, 0x84, 0x83, 0x27, 0xfe, 0x54, - 0x29, 0xdf, 0xd7, 0x00, 0x71, 0x86, 0x9b, 0x78, 0xa7, 0xdf, 0x3d, 0x55, 0x38, 0x37, 0x8e, 0x9a, - 0xab, 0x48, 0xe4, 0xf2, 0x0d, 0xb6, 0x87, 0x2a, 0x81, 0x3a, 0xaf, 0x9f, 0xa5, 0xa0, 0xd8, 0x0b, - 0x23, 0x07, 0xda, 0x3d, 0xa8, 0x48, 0x97, 0x37, 0xc8, 0xa0, 0xf2, 0xee, 0x93, 0x91, 0x41, 0xe5, - 0xdf, 0x5e, 0xf2, 0x0d, 0x38, 0x33, 0x70, 0x25, 0x04, 0xfa, 0xe2, 0x50, 0xbe, 0xd4, 0xfd, 0x24, - 0xf5, 0xc7, 0x8e, 0xa1, 0x12, 0x2d, 0xfc, 0x48, 0x83, 0xb5, 0x21, 0xb7, 0x6c, 0xa0, 0x27, 0x87, - 0x8a, 0x18, 0xb8, 0x25, 0xa3, 0xfe, 0x4b, 0x4a, 0xb4, 0x89, 0xa3, 0x59, 0x47, 0xe2, 0x0a, 0x94, - 0x48, 0xcb, 0x74, 0x64, 0x0b, 0xba, 0x5c, 0x2b, 0xe8, 0x31, 0x6a, 0xaa, 0xea, 0x7f, 0xd5, 0x60, - 0x7d, 0xc4, 0x45, 0x19, 0xe8, 0xca, 0xc8, 0x2f, 0x1f, 0x84, 0x7e, 0x55, 0x99, 0x5e, 0xc0, 0x7f, - 0xeb, 0xa8, 0xf9, 0x04, 0x7a, 0x4c, 0xc0, 0xa7, 0x83, 0x3a, 0x85, 0xbd, 0x61, 0xbb, 0x34, 0x08, - 0xe4, 0xd9, 0x4e, 0xe6, 0x53, 0xd8, 0x12, 0x30, 0xf3, 0x9c, 0xef, 0xc2, 0x72, 0xde, 0xd5, 0x1c, - 0xe8, 0x89, 0x4c, 0xb8, 0x1f, 0x76, 0xaf, 0x46, 0x7d, 0x75, 0x20, 0xe9, 0xba, 0xd5, 0xf3, 0xc9, - 0x21, 0xfa, 0x75, 0x3a, 0x07, 0xcb, 0xbd, 0x91, 0x43, 0xee, 0xdb, 0xd1, 0xd7, 0x76, 0x0c, 0x15, - 0xff, 0xbd, 0x38, 0x12, 0x45, 0x0b, 0x7a, 0x79, 0x91, 0x28, 0xb3, 0x3e, 0x99, 0x17, 0x89, 0xb2, - 0xeb, 0x81, 0xfa, 0x8b, 0x47, 0xcd, 0x35, 0xb4, 0x22, 0x45, 0xa2, 0x48, 0x7b, 0xb9, 0xc6, 0xc1, - 0x69, 0xa8, 0x2e, 0xbf, 0xab, 0x41, 0x55, 0xbe, 0x89, 0x42, 0xc6, 0x94, 0x7b, 0xc1, 0x86, 0x8c, - 0x29, 0xff, 0x22, 0x0b, 0xfd, 0x59, 0x96, 0x9b, 0x88, 0x97, 0x52, 0xff, 0x9e, 0xd5, 0x65, 0xc7, - 0x29, 0xea, 0x5c, 0x28, 0x9c, 0xef, 0x69, 0xb0, 0x90, 0xb9, 0x0d, 0x42, 0x76, 0xe3, 0xf9, 0x37, - 0x55, 0xc8, 0x6e, 0x7c, 0xc8, 0x75, 0x12, 0x34, 0x5b, 0x42, 0x68, 0x31, 0x7a, 0x2b, 0x41, 0xaa, - 0xeb, 0x2b, 0x12, 0xa4, 0x40, 0x10, 0x51, 0x4c, 0xd4, 0x9f, 0x4b, 0x47, 0xff, 0x65, 0x5f, 0x95, - 0x77, 0xa3, 0x81, 0xec, 0xab, 0x72, 0xef, 0x0d, 0x10, 0xfe, 0x9c, 0xbf, 0x1b, 0xe9, 0xcf, 0x03, - 0x46, 0x42, 0x91, 0xfc, 0x99, 0xc6, 0xf2, 0x60, 0xc9, 0x30, 0xb3, 0x79, 0x70, 0x9e, 0x41, 0x5e, - 0x1a, 0x49, 0x23, 0xf0, 0xbc, 0x76, 0xd4, 0xdc, 0x40, 0x75, 0x91, 0x35, 0x58, 0x16, 0x1b, 0xa8, - 0x2c, 0x5d, 0x48, 0x63, 0xcb, 0xa6, 0x95, 0xa6, 0x65, 0x25, 0xe3, 0xf2, 0x63, 0x2d, 0x4a, 0xa5, - 0x25, 0x84, 0x8f, 0x0d, 0x35, 0x60, 0x09, 0xe4, 0xe3, 0xc7, 0x91, 0x09, 0x9c, 0x5f, 0x3d, 0x6a, - 0x5e, 0x44, 0x17, 0x24, 0x5b, 0xe7, 0x50, 0x59, 0xce, 0x30, 0xca, 0x8f, 0x88, 0x53, 0x93, 0x31, - 0xde, 0x3f, 0xd5, 0x60, 0x31, 0x7b, 0xde, 0x5b, 0x4e, 0x83, 0x87, 0x9c, 0x5e, 0x97, 0xd3, 0xe0, - 0x61, 0x47, 0xc6, 0xa9, 0xdb, 0x5e, 0x43, 0x2b, 0xfc, 0x75, 0x03, 0xbb, 0x07, 0x0d, 0x6f, 0x57, - 0xc2, 0xb7, 0x71, 0x6d, 0x2d, 0x33, 0x0e, 0x28, 0xa5, 0x81, 0xdd, 0x03, 0x8a, 0xee, 0x8f, 0x0b, - 0x49, 0x92, 0x1e, 0xfb, 0x8b, 0xdc, 0x74, 0x25, 0xeb, 0x31, 0xbe, 0x38, 0x9a, 0x48, 0xa0, 0xfb, - 0x54, 0x3b, 0x6a, 0xfe, 0x85, 0x86, 0xfe, 0x5c, 0xa3, 0x79, 0x4d, 0x84, 0x61, 0xb3, 0xd1, 0x31, - 0xdd, 0xe1, 0x19, 0x7a, 0xb2, 0xe9, 0xb0, 0xd9, 0xe0, 0x5b, 0xf8, 0x9b, 0x8d, 0xa4, 0x22, 0x66, - 0xb3, 0xc1, 0x97, 0x0d, 0x37, 0x1b, 0x49, 0xb9, 0xcb, 0x66, 0x23, 0x5d, 0xdb, 0x22, 0x12, 0xfa, - 0xcd, 0x46, 0xba, 0x1a, 0x23, 0x3f, 0xbd, 0x97, 0xfc, 0x57, 0x15, 0xcd, 0xa7, 0x35, 0x85, 0x7e, - 0x54, 0x80, 0x95, 0xe8, 0xc3, 0xd2, 0xa9, 0xcd, 0xa9, 0x2a, 0xe8, 0x5f, 0xb4, 0xa3, 0xe6, 0xc7, - 0x1a, 0xfa, 0x1b, 0xa6, 0x20, 0x29, 0xc3, 0xf9, 0x1c, 0xa9, 0x49, 0xc6, 0xc5, 0x94, 0xb5, 0x8c, - 0xd0, 0x60, 0xea, 0x85, 0xfe, 0xae, 0x00, 0x4b, 0x39, 0xbb, 0xf5, 0xe8, 0xf1, 0x3c, 0x5d, 0x0c, - 0x16, 0x6d, 0xd4, 0x9f, 0x38, 0x96, 0x4e, 0xa8, 0xed, 0x27, 0xda, 0x51, 0xf3, 0xaf, 0x35, 0xf4, - 0x03, 0xa6, 0x36, 0xd3, 0xf7, 0x3f, 0x87, 0x4a, 0x4b, 0xa3, 0x62, 0x2a, 0x5b, 0x42, 0x67, 0x64, - 0xb7, 0xe6, 0xfb, 0x21, 0xfa, 0x49, 0x21, 0x59, 0xe4, 0x63, 0x46, 0xf6, 0x99, 0xaa, 0xed, 0x3f, - 0xb5, 0xa3, 0xe6, 0xdf, 0x6b, 0xe8, 0x93, 0x94, 0xb5, 0x7d, 0x3e, 0x95, 0x37, 0x88, 0x8d, 0x07, - 0x75, 0xb4, 0x96, 0x93, 0xf0, 0x33, 0x45, 0xfe, 0x97, 0x06, 0xcb, 0x79, 0x85, 0x00, 0xe8, 0x89, - 0x11, 0xe3, 0x50, 0x8a, 0x0d, 0x97, 0x8f, 0x27, 0x14, 0x6a, 0xec, 0x1f, 0x35, 0xbf, 0x86, 0xde, - 0xa1, 0x3a, 0xe4, 0x41, 0xc1, 0x76, 0x23, 0x98, 0x63, 0x68, 0x50, 0xac, 0xee, 0x25, 0x6a, 0xe3, - 0xcb, 0x10, 0xe9, 0xd1, 0x15, 0x7f, 0x21, 0x6b, 0x86, 0xe6, 0x08, 0xf3, 0xe9, 0x52, 0x00, 0x24, - 0x55, 0x3a, 0xe6, 0x54, 0x20, 0xd4, 0x1b, 0xc3, 0x09, 0xc4, 0xa7, 0x3c, 0x77, 0xd4, 0x5c, 0x41, - 0x4b, 0x3c, 0xd0, 0x85, 0xc4, 0xcb, 0xe8, 0x7b, 0x55, 0x97, 0x4d, 0x96, 0x52, 0x88, 0x84, 0xae, - 0x22, 0x6d, 0xf4, 0xa3, 0x4c, 0x4b, 0x83, 0x15, 0x06, 0x72, 0xb6, 0x92, 0x5b, 0x25, 0xa0, 0x7f, - 0x99, 0x4d, 0xf7, 0x22, 0x30, 0x66, 0x40, 0x64, 0x34, 0x6b, 0x3a, 0xca, 0xa0, 0x31, 0x03, 0x42, - 0xe1, 0xfc, 0x11, 0x4d, 0xe8, 0xe4, 0x8d, 0xfc, 0x4c, 0x42, 0x97, 0x5b, 0x45, 0x90, 0x49, 0xe8, - 0xf2, 0x2b, 0x01, 0xf4, 0x97, 0x53, 0x0b, 0x30, 0x01, 0xa7, 0xc9, 0x18, 0x65, 0x26, 0xd3, 0x14, - 0x44, 0x91, 0x9e, 0xa4, 0xcd, 0xf5, 0xcc, 0xb4, 0x38, 0xa7, 0x54, 0x20, 0x33, 0x2d, 0xce, 0xdb, - 0x99, 0x97, 0xf4, 0xd4, 0xa1, 0x14, 0xa3, 0xf5, 0xc4, 0x48, 0x28, 0x9c, 0x1f, 0x6a, 0xb0, 0x9c, - 0xb7, 0x2b, 0x2c, 0x8f, 0x91, 0x11, 0xdb, 0xf7, 0xf2, 0x18, 0x19, 0xb5, 0xc1, 0x4c, 0xa7, 0xee, - 0xeb, 0xe8, 0x2c, 0x5b, 0xce, 0x88, 0x5f, 0x66, 0x73, 0x13, 0x31, 0x9c, 0xd3, 0x1d, 0x1a, 0x21, - 0xfa, 0x20, 0x73, 0x8f, 0x5f, 0x7c, 0x7b, 0x30, 0xfa, 0xd2, 0xd0, 0x14, 0x2e, 0x7b, 0x9f, 0x71, - 0xfd, 0x49, 0x15, 0x52, 0x81, 0xf7, 0x0b, 0x88, 0xc0, 0xda, 0x90, 0x1b, 0x8b, 0x33, 0x93, 0xee, - 0x91, 0x97, 0x28, 0x67, 0x26, 0xdd, 0xa3, 0xaf, 0x40, 0xd6, 0xbf, 0xf0, 0xfa, 0xd4, 0x7b, 0x05, - 0x7f, 0x67, 0xa7, 0xc4, 0x66, 0x71, 0xcf, 0xfe, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0xa6, - 0x56, 0x00, 0x32, 0x5e, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// ClusterManagerClient is the client API for ClusterManager service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ClusterManagerClient interface { - AddNodeKeyPairs(ctx context.Context, in *AddNodeKeyPairsRequest, opts ...grpc.CallOption) (*AddNodeKeyPairsResponse, error) - DeleteNodeKeyPairs(ctx context.Context, in *DeleteNodeKeyPairsRequest, opts ...grpc.CallOption) (*DeleteNodeKeyPairsResponse, error) - // Create key pair - CreateKeyPair(ctx context.Context, in *CreateKeyPairRequest, opts ...grpc.CallOption) (*CreateKeyPairResponse, error) - // Get key pairs, support filter with these fields(key_pair_id, name, owner), default return all key pairs - DescribeKeyPairs(ctx context.Context, in *DescribeKeyPairsRequest, opts ...grpc.CallOption) (*DescribeKeyPairsResponse, error) - // Batch delete key pairs - DeleteKeyPairs(ctx context.Context, in *DeleteKeyPairsRequest, opts ...grpc.CallOption) (*DeleteKeyPairsResponse, error) - // Batch attach key pairs to node - AttachKeyPairs(ctx context.Context, in *AttachKeyPairsRequest, opts ...grpc.CallOption) (*AttachKeyPairsResponse, error) - //Batch detach key pairs from node - DetachKeyPairs(ctx context.Context, in *DetachKeyPairsRequest, opts ...grpc.CallOption) (*DetachKeyPairsResponse, error) - // Get subnets - DescribeSubnets(ctx context.Context, in *DescribeSubnetsRequest, opts ...grpc.CallOption) (*DescribeSubnetsResponse, error) - // Create cluster - CreateCluster(ctx context.Context, in *CreateClusterRequest, opts ...grpc.CallOption) (*CreateClusterResponse, error) - // Create debug cluster - CreateDebugCluster(ctx context.Context, in *CreateClusterRequest, opts ...grpc.CallOption) (*CreateClusterResponse, error) - ModifyCluster(ctx context.Context, in *ModifyClusterRequest, opts ...grpc.CallOption) (*ModifyClusterResponse, error) - ModifyClusterNode(ctx context.Context, in *ModifyClusterNodeRequest, opts ...grpc.CallOption) (*ModifyClusterNodeResponse, error) - // Modify cluster attributes - ModifyClusterAttributes(ctx context.Context, in *ModifyClusterAttributesRequest, opts ...grpc.CallOption) (*ModifyClusterAttributesResponse, error) - // Modify node attributes in the cluster - ModifyClusterNodeAttributes(ctx context.Context, in *ModifyClusterNodeAttributesRequest, opts ...grpc.CallOption) (*ModifyClusterNodeAttributesResponse, error) - AddTableClusterNodes(ctx context.Context, in *AddTableClusterNodesRequest, opts ...grpc.CallOption) (*empty.Empty, error) - DeleteTableClusterNodes(ctx context.Context, in *DeleteTableClusterNodesRequest, opts ...grpc.CallOption) (*empty.Empty, error) - // Batch delete clusters - DeleteClusters(ctx context.Context, in *DeleteClustersRequest, opts ...grpc.CallOption) (*DeleteClustersResponse, error) - // Upgrade cluster - UpgradeCluster(ctx context.Context, in *UpgradeClusterRequest, opts ...grpc.CallOption) (*UpgradeClusterResponse, error) - // Rollback cluster - RollbackCluster(ctx context.Context, in *RollbackClusterRequest, opts ...grpc.CallOption) (*RollbackClusterResponse, error) - // Resize cluster - ResizeCluster(ctx context.Context, in *ResizeClusterRequest, opts ...grpc.CallOption) (*ResizeClusterResponse, error) - // Batch add nodes to cluster - AddClusterNodes(ctx context.Context, in *AddClusterNodesRequest, opts ...grpc.CallOption) (*AddClusterNodesResponse, error) - // Batch delete nodes from cluster - DeleteClusterNodes(ctx context.Context, in *DeleteClusterNodesRequest, opts ...grpc.CallOption) (*DeleteClusterNodesResponse, error) - // Update env of cluster - UpdateClusterEnv(ctx context.Context, in *UpdateClusterEnvRequest, opts ...grpc.CallOption) (*UpdateClusterEnvResponse, error) - // Get clusters, can filter with these fields(cluster_id, app_id, version_id, status, runtime_id, frontgate_id, owner, cluster_type), default return all clusters - DescribeClusters(ctx context.Context, in *DescribeClustersRequest, opts ...grpc.CallOption) (*DescribeClustersResponse, error) - // Get debug clusters, can filter with these fields(cluster_id, app_id, version_id, status, runtime_id, frontgate_id, owner, cluster_type), default return all debug clusters - DescribeDebugClusters(ctx context.Context, in *DescribeClustersRequest, opts ...grpc.CallOption) (*DescribeClustersResponse, error) - // Get app clusters, can filter with these fields(cluster_id, app_id, version_id, status, runtime_id, frontgate_id, owner, cluster_type), default return all app clusters - DescribeAppClusters(ctx context.Context, in *DescribeAppClustersRequest, opts ...grpc.CallOption) (*DescribeAppClustersResponse, error) - // Get debug app clusters, can filter with these fields(cluster_id, app_id, version_id, status, runtime_id, frontgate_id, owner, cluster_type), default return all debug app clusters - DescribeDebugAppClusters(ctx context.Context, in *DescribeAppClustersRequest, opts ...grpc.CallOption) (*DescribeAppClustersResponse, error) - // Get nodes in cluster, can filter with these fields(cluster_id, node_id, status, owner) - DescribeClusterNodes(ctx context.Context, in *DescribeClusterNodesRequest, opts ...grpc.CallOption) (*DescribeClusterNodesResponse, error) - // Batch stop clusters - StopClusters(ctx context.Context, in *StopClustersRequest, opts ...grpc.CallOption) (*StopClustersResponse, error) - // Batch start cluster - StartClusters(ctx context.Context, in *StartClustersRequest, opts ...grpc.CallOption) (*StartClustersResponse, error) - // Batch recover clusters - RecoverClusters(ctx context.Context, in *RecoverClustersRequest, opts ...grpc.CallOption) (*RecoverClustersResponse, error) - // Batch cease clusters - CeaseClusters(ctx context.Context, in *CeaseClustersRequest, opts ...grpc.CallOption) (*CeaseClustersResponse, error) - // Get statistics of cluster - GetClusterStatistics(ctx context.Context, in *GetClusterStatisticsRequest, opts ...grpc.CallOption) (*GetClusterStatisticsResponse, error) - // for kubesphere - DeleteClusterInRuntime(ctx context.Context, in *DeleteClusterInRuntimeRequest, opts ...grpc.CallOption) (*DeleteClusterInRuntimeResponse, error) - MigrateClusterInRuntime(ctx context.Context, in *MigrateClusterInRuntimeRequest, opts ...grpc.CallOption) (*MigrateClusterInRuntimeResponse, error) -} - -type clusterManagerClient struct { - cc *grpc.ClientConn -} - -func NewClusterManagerClient(cc *grpc.ClientConn) ClusterManagerClient { - return &clusterManagerClient{cc} -} - -func (c *clusterManagerClient) AddNodeKeyPairs(ctx context.Context, in *AddNodeKeyPairsRequest, opts ...grpc.CallOption) (*AddNodeKeyPairsResponse, error) { - out := new(AddNodeKeyPairsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/AddNodeKeyPairs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) DeleteNodeKeyPairs(ctx context.Context, in *DeleteNodeKeyPairsRequest, opts ...grpc.CallOption) (*DeleteNodeKeyPairsResponse, error) { - out := new(DeleteNodeKeyPairsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/DeleteNodeKeyPairs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) CreateKeyPair(ctx context.Context, in *CreateKeyPairRequest, opts ...grpc.CallOption) (*CreateKeyPairResponse, error) { - out := new(CreateKeyPairResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/CreateKeyPair", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) DescribeKeyPairs(ctx context.Context, in *DescribeKeyPairsRequest, opts ...grpc.CallOption) (*DescribeKeyPairsResponse, error) { - out := new(DescribeKeyPairsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/DescribeKeyPairs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) DeleteKeyPairs(ctx context.Context, in *DeleteKeyPairsRequest, opts ...grpc.CallOption) (*DeleteKeyPairsResponse, error) { - out := new(DeleteKeyPairsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/DeleteKeyPairs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) AttachKeyPairs(ctx context.Context, in *AttachKeyPairsRequest, opts ...grpc.CallOption) (*AttachKeyPairsResponse, error) { - out := new(AttachKeyPairsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/AttachKeyPairs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) DetachKeyPairs(ctx context.Context, in *DetachKeyPairsRequest, opts ...grpc.CallOption) (*DetachKeyPairsResponse, error) { - out := new(DetachKeyPairsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/DetachKeyPairs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) DescribeSubnets(ctx context.Context, in *DescribeSubnetsRequest, opts ...grpc.CallOption) (*DescribeSubnetsResponse, error) { - out := new(DescribeSubnetsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/DescribeSubnets", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) CreateCluster(ctx context.Context, in *CreateClusterRequest, opts ...grpc.CallOption) (*CreateClusterResponse, error) { - out := new(CreateClusterResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/CreateCluster", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) CreateDebugCluster(ctx context.Context, in *CreateClusterRequest, opts ...grpc.CallOption) (*CreateClusterResponse, error) { - out := new(CreateClusterResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/CreateDebugCluster", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) ModifyCluster(ctx context.Context, in *ModifyClusterRequest, opts ...grpc.CallOption) (*ModifyClusterResponse, error) { - out := new(ModifyClusterResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/ModifyCluster", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) ModifyClusterNode(ctx context.Context, in *ModifyClusterNodeRequest, opts ...grpc.CallOption) (*ModifyClusterNodeResponse, error) { - out := new(ModifyClusterNodeResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/ModifyClusterNode", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) ModifyClusterAttributes(ctx context.Context, in *ModifyClusterAttributesRequest, opts ...grpc.CallOption) (*ModifyClusterAttributesResponse, error) { - out := new(ModifyClusterAttributesResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/ModifyClusterAttributes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) ModifyClusterNodeAttributes(ctx context.Context, in *ModifyClusterNodeAttributesRequest, opts ...grpc.CallOption) (*ModifyClusterNodeAttributesResponse, error) { - out := new(ModifyClusterNodeAttributesResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/ModifyClusterNodeAttributes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) AddTableClusterNodes(ctx context.Context, in *AddTableClusterNodesRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/AddTableClusterNodes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) DeleteTableClusterNodes(ctx context.Context, in *DeleteTableClusterNodesRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/DeleteTableClusterNodes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) DeleteClusters(ctx context.Context, in *DeleteClustersRequest, opts ...grpc.CallOption) (*DeleteClustersResponse, error) { - out := new(DeleteClustersResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/DeleteClusters", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) UpgradeCluster(ctx context.Context, in *UpgradeClusterRequest, opts ...grpc.CallOption) (*UpgradeClusterResponse, error) { - out := new(UpgradeClusterResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/UpgradeCluster", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) RollbackCluster(ctx context.Context, in *RollbackClusterRequest, opts ...grpc.CallOption) (*RollbackClusterResponse, error) { - out := new(RollbackClusterResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/RollbackCluster", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) ResizeCluster(ctx context.Context, in *ResizeClusterRequest, opts ...grpc.CallOption) (*ResizeClusterResponse, error) { - out := new(ResizeClusterResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/ResizeCluster", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) AddClusterNodes(ctx context.Context, in *AddClusterNodesRequest, opts ...grpc.CallOption) (*AddClusterNodesResponse, error) { - out := new(AddClusterNodesResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/AddClusterNodes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) DeleteClusterNodes(ctx context.Context, in *DeleteClusterNodesRequest, opts ...grpc.CallOption) (*DeleteClusterNodesResponse, error) { - out := new(DeleteClusterNodesResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/DeleteClusterNodes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) UpdateClusterEnv(ctx context.Context, in *UpdateClusterEnvRequest, opts ...grpc.CallOption) (*UpdateClusterEnvResponse, error) { - out := new(UpdateClusterEnvResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/UpdateClusterEnv", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) DescribeClusters(ctx context.Context, in *DescribeClustersRequest, opts ...grpc.CallOption) (*DescribeClustersResponse, error) { - out := new(DescribeClustersResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/DescribeClusters", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) DescribeDebugClusters(ctx context.Context, in *DescribeClustersRequest, opts ...grpc.CallOption) (*DescribeClustersResponse, error) { - out := new(DescribeClustersResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/DescribeDebugClusters", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) DescribeAppClusters(ctx context.Context, in *DescribeAppClustersRequest, opts ...grpc.CallOption) (*DescribeAppClustersResponse, error) { - out := new(DescribeAppClustersResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/DescribeAppClusters", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) DescribeDebugAppClusters(ctx context.Context, in *DescribeAppClustersRequest, opts ...grpc.CallOption) (*DescribeAppClustersResponse, error) { - out := new(DescribeAppClustersResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/DescribeDebugAppClusters", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) DescribeClusterNodes(ctx context.Context, in *DescribeClusterNodesRequest, opts ...grpc.CallOption) (*DescribeClusterNodesResponse, error) { - out := new(DescribeClusterNodesResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/DescribeClusterNodes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) StopClusters(ctx context.Context, in *StopClustersRequest, opts ...grpc.CallOption) (*StopClustersResponse, error) { - out := new(StopClustersResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/StopClusters", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) StartClusters(ctx context.Context, in *StartClustersRequest, opts ...grpc.CallOption) (*StartClustersResponse, error) { - out := new(StartClustersResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/StartClusters", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) RecoverClusters(ctx context.Context, in *RecoverClustersRequest, opts ...grpc.CallOption) (*RecoverClustersResponse, error) { - out := new(RecoverClustersResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/RecoverClusters", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) CeaseClusters(ctx context.Context, in *CeaseClustersRequest, opts ...grpc.CallOption) (*CeaseClustersResponse, error) { - out := new(CeaseClustersResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/CeaseClusters", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) GetClusterStatistics(ctx context.Context, in *GetClusterStatisticsRequest, opts ...grpc.CallOption) (*GetClusterStatisticsResponse, error) { - out := new(GetClusterStatisticsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/GetClusterStatistics", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) DeleteClusterInRuntime(ctx context.Context, in *DeleteClusterInRuntimeRequest, opts ...grpc.CallOption) (*DeleteClusterInRuntimeResponse, error) { - out := new(DeleteClusterInRuntimeResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/DeleteClusterInRuntime", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *clusterManagerClient) MigrateClusterInRuntime(ctx context.Context, in *MigrateClusterInRuntimeRequest, opts ...grpc.CallOption) (*MigrateClusterInRuntimeResponse, error) { - out := new(MigrateClusterInRuntimeResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ClusterManager/MigrateClusterInRuntime", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ClusterManagerServer is the server API for ClusterManager service. -type ClusterManagerServer interface { - AddNodeKeyPairs(context.Context, *AddNodeKeyPairsRequest) (*AddNodeKeyPairsResponse, error) - DeleteNodeKeyPairs(context.Context, *DeleteNodeKeyPairsRequest) (*DeleteNodeKeyPairsResponse, error) - // Create key pair - CreateKeyPair(context.Context, *CreateKeyPairRequest) (*CreateKeyPairResponse, error) - // Get key pairs, support filter with these fields(key_pair_id, name, owner), default return all key pairs - DescribeKeyPairs(context.Context, *DescribeKeyPairsRequest) (*DescribeKeyPairsResponse, error) - // Batch delete key pairs - DeleteKeyPairs(context.Context, *DeleteKeyPairsRequest) (*DeleteKeyPairsResponse, error) - // Batch attach key pairs to node - AttachKeyPairs(context.Context, *AttachKeyPairsRequest) (*AttachKeyPairsResponse, error) - //Batch detach key pairs from node - DetachKeyPairs(context.Context, *DetachKeyPairsRequest) (*DetachKeyPairsResponse, error) - // Get subnets - DescribeSubnets(context.Context, *DescribeSubnetsRequest) (*DescribeSubnetsResponse, error) - // Create cluster - CreateCluster(context.Context, *CreateClusterRequest) (*CreateClusterResponse, error) - // Create debug cluster - CreateDebugCluster(context.Context, *CreateClusterRequest) (*CreateClusterResponse, error) - ModifyCluster(context.Context, *ModifyClusterRequest) (*ModifyClusterResponse, error) - ModifyClusterNode(context.Context, *ModifyClusterNodeRequest) (*ModifyClusterNodeResponse, error) - // Modify cluster attributes - ModifyClusterAttributes(context.Context, *ModifyClusterAttributesRequest) (*ModifyClusterAttributesResponse, error) - // Modify node attributes in the cluster - ModifyClusterNodeAttributes(context.Context, *ModifyClusterNodeAttributesRequest) (*ModifyClusterNodeAttributesResponse, error) - AddTableClusterNodes(context.Context, *AddTableClusterNodesRequest) (*empty.Empty, error) - DeleteTableClusterNodes(context.Context, *DeleteTableClusterNodesRequest) (*empty.Empty, error) - // Batch delete clusters - DeleteClusters(context.Context, *DeleteClustersRequest) (*DeleteClustersResponse, error) - // Upgrade cluster - UpgradeCluster(context.Context, *UpgradeClusterRequest) (*UpgradeClusterResponse, error) - // Rollback cluster - RollbackCluster(context.Context, *RollbackClusterRequest) (*RollbackClusterResponse, error) - // Resize cluster - ResizeCluster(context.Context, *ResizeClusterRequest) (*ResizeClusterResponse, error) - // Batch add nodes to cluster - AddClusterNodes(context.Context, *AddClusterNodesRequest) (*AddClusterNodesResponse, error) - // Batch delete nodes from cluster - DeleteClusterNodes(context.Context, *DeleteClusterNodesRequest) (*DeleteClusterNodesResponse, error) - // Update env of cluster - UpdateClusterEnv(context.Context, *UpdateClusterEnvRequest) (*UpdateClusterEnvResponse, error) - // Get clusters, can filter with these fields(cluster_id, app_id, version_id, status, runtime_id, frontgate_id, owner, cluster_type), default return all clusters - DescribeClusters(context.Context, *DescribeClustersRequest) (*DescribeClustersResponse, error) - // Get debug clusters, can filter with these fields(cluster_id, app_id, version_id, status, runtime_id, frontgate_id, owner, cluster_type), default return all debug clusters - DescribeDebugClusters(context.Context, *DescribeClustersRequest) (*DescribeClustersResponse, error) - // Get app clusters, can filter with these fields(cluster_id, app_id, version_id, status, runtime_id, frontgate_id, owner, cluster_type), default return all app clusters - DescribeAppClusters(context.Context, *DescribeAppClustersRequest) (*DescribeAppClustersResponse, error) - // Get debug app clusters, can filter with these fields(cluster_id, app_id, version_id, status, runtime_id, frontgate_id, owner, cluster_type), default return all debug app clusters - DescribeDebugAppClusters(context.Context, *DescribeAppClustersRequest) (*DescribeAppClustersResponse, error) - // Get nodes in cluster, can filter with these fields(cluster_id, node_id, status, owner) - DescribeClusterNodes(context.Context, *DescribeClusterNodesRequest) (*DescribeClusterNodesResponse, error) - // Batch stop clusters - StopClusters(context.Context, *StopClustersRequest) (*StopClustersResponse, error) - // Batch start cluster - StartClusters(context.Context, *StartClustersRequest) (*StartClustersResponse, error) - // Batch recover clusters - RecoverClusters(context.Context, *RecoverClustersRequest) (*RecoverClustersResponse, error) - // Batch cease clusters - CeaseClusters(context.Context, *CeaseClustersRequest) (*CeaseClustersResponse, error) - // Get statistics of cluster - GetClusterStatistics(context.Context, *GetClusterStatisticsRequest) (*GetClusterStatisticsResponse, error) - // for kubesphere - DeleteClusterInRuntime(context.Context, *DeleteClusterInRuntimeRequest) (*DeleteClusterInRuntimeResponse, error) - MigrateClusterInRuntime(context.Context, *MigrateClusterInRuntimeRequest) (*MigrateClusterInRuntimeResponse, error) -} - -// UnimplementedClusterManagerServer can be embedded to have forward compatible implementations. -type UnimplementedClusterManagerServer struct { -} - -func (*UnimplementedClusterManagerServer) AddNodeKeyPairs(ctx context.Context, req *AddNodeKeyPairsRequest) (*AddNodeKeyPairsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddNodeKeyPairs not implemented") -} -func (*UnimplementedClusterManagerServer) DeleteNodeKeyPairs(ctx context.Context, req *DeleteNodeKeyPairsRequest) (*DeleteNodeKeyPairsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteNodeKeyPairs not implemented") -} -func (*UnimplementedClusterManagerServer) CreateKeyPair(ctx context.Context, req *CreateKeyPairRequest) (*CreateKeyPairResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateKeyPair not implemented") -} -func (*UnimplementedClusterManagerServer) DescribeKeyPairs(ctx context.Context, req *DescribeKeyPairsRequest) (*DescribeKeyPairsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeKeyPairs not implemented") -} -func (*UnimplementedClusterManagerServer) DeleteKeyPairs(ctx context.Context, req *DeleteKeyPairsRequest) (*DeleteKeyPairsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteKeyPairs not implemented") -} -func (*UnimplementedClusterManagerServer) AttachKeyPairs(ctx context.Context, req *AttachKeyPairsRequest) (*AttachKeyPairsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AttachKeyPairs not implemented") -} -func (*UnimplementedClusterManagerServer) DetachKeyPairs(ctx context.Context, req *DetachKeyPairsRequest) (*DetachKeyPairsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DetachKeyPairs not implemented") -} -func (*UnimplementedClusterManagerServer) DescribeSubnets(ctx context.Context, req *DescribeSubnetsRequest) (*DescribeSubnetsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeSubnets not implemented") -} -func (*UnimplementedClusterManagerServer) CreateCluster(ctx context.Context, req *CreateClusterRequest) (*CreateClusterResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateCluster not implemented") -} -func (*UnimplementedClusterManagerServer) CreateDebugCluster(ctx context.Context, req *CreateClusterRequest) (*CreateClusterResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateDebugCluster not implemented") -} -func (*UnimplementedClusterManagerServer) ModifyCluster(ctx context.Context, req *ModifyClusterRequest) (*ModifyClusterResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ModifyCluster not implemented") -} -func (*UnimplementedClusterManagerServer) ModifyClusterNode(ctx context.Context, req *ModifyClusterNodeRequest) (*ModifyClusterNodeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ModifyClusterNode not implemented") -} -func (*UnimplementedClusterManagerServer) ModifyClusterAttributes(ctx context.Context, req *ModifyClusterAttributesRequest) (*ModifyClusterAttributesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ModifyClusterAttributes not implemented") -} -func (*UnimplementedClusterManagerServer) ModifyClusterNodeAttributes(ctx context.Context, req *ModifyClusterNodeAttributesRequest) (*ModifyClusterNodeAttributesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ModifyClusterNodeAttributes not implemented") -} -func (*UnimplementedClusterManagerServer) AddTableClusterNodes(ctx context.Context, req *AddTableClusterNodesRequest) (*empty.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddTableClusterNodes not implemented") -} -func (*UnimplementedClusterManagerServer) DeleteTableClusterNodes(ctx context.Context, req *DeleteTableClusterNodesRequest) (*empty.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteTableClusterNodes not implemented") -} -func (*UnimplementedClusterManagerServer) DeleteClusters(ctx context.Context, req *DeleteClustersRequest) (*DeleteClustersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteClusters not implemented") -} -func (*UnimplementedClusterManagerServer) UpgradeCluster(ctx context.Context, req *UpgradeClusterRequest) (*UpgradeClusterResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpgradeCluster not implemented") -} -func (*UnimplementedClusterManagerServer) RollbackCluster(ctx context.Context, req *RollbackClusterRequest) (*RollbackClusterResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RollbackCluster not implemented") -} -func (*UnimplementedClusterManagerServer) ResizeCluster(ctx context.Context, req *ResizeClusterRequest) (*ResizeClusterResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ResizeCluster not implemented") -} -func (*UnimplementedClusterManagerServer) AddClusterNodes(ctx context.Context, req *AddClusterNodesRequest) (*AddClusterNodesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddClusterNodes not implemented") -} -func (*UnimplementedClusterManagerServer) DeleteClusterNodes(ctx context.Context, req *DeleteClusterNodesRequest) (*DeleteClusterNodesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteClusterNodes not implemented") -} -func (*UnimplementedClusterManagerServer) UpdateClusterEnv(ctx context.Context, req *UpdateClusterEnvRequest) (*UpdateClusterEnvResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateClusterEnv not implemented") -} -func (*UnimplementedClusterManagerServer) DescribeClusters(ctx context.Context, req *DescribeClustersRequest) (*DescribeClustersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeClusters not implemented") -} -func (*UnimplementedClusterManagerServer) DescribeDebugClusters(ctx context.Context, req *DescribeClustersRequest) (*DescribeClustersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeDebugClusters not implemented") -} -func (*UnimplementedClusterManagerServer) DescribeAppClusters(ctx context.Context, req *DescribeAppClustersRequest) (*DescribeAppClustersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeAppClusters not implemented") -} -func (*UnimplementedClusterManagerServer) DescribeDebugAppClusters(ctx context.Context, req *DescribeAppClustersRequest) (*DescribeAppClustersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeDebugAppClusters not implemented") -} -func (*UnimplementedClusterManagerServer) DescribeClusterNodes(ctx context.Context, req *DescribeClusterNodesRequest) (*DescribeClusterNodesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeClusterNodes not implemented") -} -func (*UnimplementedClusterManagerServer) StopClusters(ctx context.Context, req *StopClustersRequest) (*StopClustersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method StopClusters not implemented") -} -func (*UnimplementedClusterManagerServer) StartClusters(ctx context.Context, req *StartClustersRequest) (*StartClustersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method StartClusters not implemented") -} -func (*UnimplementedClusterManagerServer) RecoverClusters(ctx context.Context, req *RecoverClustersRequest) (*RecoverClustersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RecoverClusters not implemented") -} -func (*UnimplementedClusterManagerServer) CeaseClusters(ctx context.Context, req *CeaseClustersRequest) (*CeaseClustersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CeaseClusters not implemented") -} -func (*UnimplementedClusterManagerServer) GetClusterStatistics(ctx context.Context, req *GetClusterStatisticsRequest) (*GetClusterStatisticsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetClusterStatistics not implemented") -} -func (*UnimplementedClusterManagerServer) DeleteClusterInRuntime(ctx context.Context, req *DeleteClusterInRuntimeRequest) (*DeleteClusterInRuntimeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteClusterInRuntime not implemented") -} -func (*UnimplementedClusterManagerServer) MigrateClusterInRuntime(ctx context.Context, req *MigrateClusterInRuntimeRequest) (*MigrateClusterInRuntimeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method MigrateClusterInRuntime not implemented") -} - -func RegisterClusterManagerServer(s *grpc.Server, srv ClusterManagerServer) { - s.RegisterService(&_ClusterManager_serviceDesc, srv) -} - -func _ClusterManager_AddNodeKeyPairs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddNodeKeyPairsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).AddNodeKeyPairs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/AddNodeKeyPairs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).AddNodeKeyPairs(ctx, req.(*AddNodeKeyPairsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_DeleteNodeKeyPairs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteNodeKeyPairsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).DeleteNodeKeyPairs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/DeleteNodeKeyPairs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).DeleteNodeKeyPairs(ctx, req.(*DeleteNodeKeyPairsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_CreateKeyPair_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateKeyPairRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).CreateKeyPair(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/CreateKeyPair", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).CreateKeyPair(ctx, req.(*CreateKeyPairRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_DescribeKeyPairs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeKeyPairsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).DescribeKeyPairs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/DescribeKeyPairs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).DescribeKeyPairs(ctx, req.(*DescribeKeyPairsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_DeleteKeyPairs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteKeyPairsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).DeleteKeyPairs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/DeleteKeyPairs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).DeleteKeyPairs(ctx, req.(*DeleteKeyPairsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_AttachKeyPairs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AttachKeyPairsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).AttachKeyPairs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/AttachKeyPairs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).AttachKeyPairs(ctx, req.(*AttachKeyPairsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_DetachKeyPairs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DetachKeyPairsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).DetachKeyPairs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/DetachKeyPairs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).DetachKeyPairs(ctx, req.(*DetachKeyPairsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_DescribeSubnets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeSubnetsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).DescribeSubnets(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/DescribeSubnets", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).DescribeSubnets(ctx, req.(*DescribeSubnetsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_CreateCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateClusterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).CreateCluster(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/CreateCluster", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).CreateCluster(ctx, req.(*CreateClusterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_CreateDebugCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateClusterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).CreateDebugCluster(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/CreateDebugCluster", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).CreateDebugCluster(ctx, req.(*CreateClusterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_ModifyCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ModifyClusterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).ModifyCluster(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/ModifyCluster", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).ModifyCluster(ctx, req.(*ModifyClusterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_ModifyClusterNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ModifyClusterNodeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).ModifyClusterNode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/ModifyClusterNode", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).ModifyClusterNode(ctx, req.(*ModifyClusterNodeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_ModifyClusterAttributes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ModifyClusterAttributesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).ModifyClusterAttributes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/ModifyClusterAttributes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).ModifyClusterAttributes(ctx, req.(*ModifyClusterAttributesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_ModifyClusterNodeAttributes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ModifyClusterNodeAttributesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).ModifyClusterNodeAttributes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/ModifyClusterNodeAttributes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).ModifyClusterNodeAttributes(ctx, req.(*ModifyClusterNodeAttributesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_AddTableClusterNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddTableClusterNodesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).AddTableClusterNodes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/AddTableClusterNodes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).AddTableClusterNodes(ctx, req.(*AddTableClusterNodesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_DeleteTableClusterNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteTableClusterNodesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).DeleteTableClusterNodes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/DeleteTableClusterNodes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).DeleteTableClusterNodes(ctx, req.(*DeleteTableClusterNodesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_DeleteClusters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteClustersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).DeleteClusters(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/DeleteClusters", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).DeleteClusters(ctx, req.(*DeleteClustersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_UpgradeCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpgradeClusterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).UpgradeCluster(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/UpgradeCluster", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).UpgradeCluster(ctx, req.(*UpgradeClusterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_RollbackCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RollbackClusterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).RollbackCluster(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/RollbackCluster", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).RollbackCluster(ctx, req.(*RollbackClusterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_ResizeCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ResizeClusterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).ResizeCluster(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/ResizeCluster", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).ResizeCluster(ctx, req.(*ResizeClusterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_AddClusterNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddClusterNodesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).AddClusterNodes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/AddClusterNodes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).AddClusterNodes(ctx, req.(*AddClusterNodesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_DeleteClusterNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteClusterNodesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).DeleteClusterNodes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/DeleteClusterNodes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).DeleteClusterNodes(ctx, req.(*DeleteClusterNodesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_UpdateClusterEnv_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateClusterEnvRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).UpdateClusterEnv(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/UpdateClusterEnv", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).UpdateClusterEnv(ctx, req.(*UpdateClusterEnvRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_DescribeClusters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeClustersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).DescribeClusters(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/DescribeClusters", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).DescribeClusters(ctx, req.(*DescribeClustersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_DescribeDebugClusters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeClustersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).DescribeDebugClusters(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/DescribeDebugClusters", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).DescribeDebugClusters(ctx, req.(*DescribeClustersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_DescribeAppClusters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeAppClustersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).DescribeAppClusters(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/DescribeAppClusters", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).DescribeAppClusters(ctx, req.(*DescribeAppClustersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_DescribeDebugAppClusters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeAppClustersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).DescribeDebugAppClusters(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/DescribeDebugAppClusters", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).DescribeDebugAppClusters(ctx, req.(*DescribeAppClustersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_DescribeClusterNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeClusterNodesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).DescribeClusterNodes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/DescribeClusterNodes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).DescribeClusterNodes(ctx, req.(*DescribeClusterNodesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_StopClusters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StopClustersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).StopClusters(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/StopClusters", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).StopClusters(ctx, req.(*StopClustersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_StartClusters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StartClustersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).StartClusters(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/StartClusters", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).StartClusters(ctx, req.(*StartClustersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_RecoverClusters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RecoverClustersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).RecoverClusters(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/RecoverClusters", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).RecoverClusters(ctx, req.(*RecoverClustersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_CeaseClusters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CeaseClustersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).CeaseClusters(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/CeaseClusters", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).CeaseClusters(ctx, req.(*CeaseClustersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_GetClusterStatistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetClusterStatisticsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).GetClusterStatistics(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/GetClusterStatistics", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).GetClusterStatistics(ctx, req.(*GetClusterStatisticsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_DeleteClusterInRuntime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteClusterInRuntimeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).DeleteClusterInRuntime(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/DeleteClusterInRuntime", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).DeleteClusterInRuntime(ctx, req.(*DeleteClusterInRuntimeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ClusterManager_MigrateClusterInRuntime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MigrateClusterInRuntimeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ClusterManagerServer).MigrateClusterInRuntime(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ClusterManager/MigrateClusterInRuntime", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ClusterManagerServer).MigrateClusterInRuntime(ctx, req.(*MigrateClusterInRuntimeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ClusterManager_serviceDesc = grpc.ServiceDesc{ - ServiceName: "openpitrix.ClusterManager", - HandlerType: (*ClusterManagerServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "AddNodeKeyPairs", - Handler: _ClusterManager_AddNodeKeyPairs_Handler, - }, - { - MethodName: "DeleteNodeKeyPairs", - Handler: _ClusterManager_DeleteNodeKeyPairs_Handler, - }, - { - MethodName: "CreateKeyPair", - Handler: _ClusterManager_CreateKeyPair_Handler, - }, - { - MethodName: "DescribeKeyPairs", - Handler: _ClusterManager_DescribeKeyPairs_Handler, - }, - { - MethodName: "DeleteKeyPairs", - Handler: _ClusterManager_DeleteKeyPairs_Handler, - }, - { - MethodName: "AttachKeyPairs", - Handler: _ClusterManager_AttachKeyPairs_Handler, - }, - { - MethodName: "DetachKeyPairs", - Handler: _ClusterManager_DetachKeyPairs_Handler, - }, - { - MethodName: "DescribeSubnets", - Handler: _ClusterManager_DescribeSubnets_Handler, - }, - { - MethodName: "CreateCluster", - Handler: _ClusterManager_CreateCluster_Handler, - }, - { - MethodName: "CreateDebugCluster", - Handler: _ClusterManager_CreateDebugCluster_Handler, - }, - { - MethodName: "ModifyCluster", - Handler: _ClusterManager_ModifyCluster_Handler, - }, - { - MethodName: "ModifyClusterNode", - Handler: _ClusterManager_ModifyClusterNode_Handler, - }, - { - MethodName: "ModifyClusterAttributes", - Handler: _ClusterManager_ModifyClusterAttributes_Handler, - }, - { - MethodName: "ModifyClusterNodeAttributes", - Handler: _ClusterManager_ModifyClusterNodeAttributes_Handler, - }, - { - MethodName: "AddTableClusterNodes", - Handler: _ClusterManager_AddTableClusterNodes_Handler, - }, - { - MethodName: "DeleteTableClusterNodes", - Handler: _ClusterManager_DeleteTableClusterNodes_Handler, - }, - { - MethodName: "DeleteClusters", - Handler: _ClusterManager_DeleteClusters_Handler, - }, - { - MethodName: "UpgradeCluster", - Handler: _ClusterManager_UpgradeCluster_Handler, - }, - { - MethodName: "RollbackCluster", - Handler: _ClusterManager_RollbackCluster_Handler, - }, - { - MethodName: "ResizeCluster", - Handler: _ClusterManager_ResizeCluster_Handler, - }, - { - MethodName: "AddClusterNodes", - Handler: _ClusterManager_AddClusterNodes_Handler, - }, - { - MethodName: "DeleteClusterNodes", - Handler: _ClusterManager_DeleteClusterNodes_Handler, - }, - { - MethodName: "UpdateClusterEnv", - Handler: _ClusterManager_UpdateClusterEnv_Handler, - }, - { - MethodName: "DescribeClusters", - Handler: _ClusterManager_DescribeClusters_Handler, - }, - { - MethodName: "DescribeDebugClusters", - Handler: _ClusterManager_DescribeDebugClusters_Handler, - }, - { - MethodName: "DescribeAppClusters", - Handler: _ClusterManager_DescribeAppClusters_Handler, - }, - { - MethodName: "DescribeDebugAppClusters", - Handler: _ClusterManager_DescribeDebugAppClusters_Handler, - }, - { - MethodName: "DescribeClusterNodes", - Handler: _ClusterManager_DescribeClusterNodes_Handler, - }, - { - MethodName: "StopClusters", - Handler: _ClusterManager_StopClusters_Handler, - }, - { - MethodName: "StartClusters", - Handler: _ClusterManager_StartClusters_Handler, - }, - { - MethodName: "RecoverClusters", - Handler: _ClusterManager_RecoverClusters_Handler, - }, - { - MethodName: "CeaseClusters", - Handler: _ClusterManager_CeaseClusters_Handler, - }, - { - MethodName: "GetClusterStatistics", - Handler: _ClusterManager_GetClusterStatistics_Handler, - }, - { - MethodName: "DeleteClusterInRuntime", - Handler: _ClusterManager_DeleteClusterInRuntime_Handler, - }, - { - MethodName: "MigrateClusterInRuntime", - Handler: _ClusterManager_MigrateClusterInRuntime_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cluster.proto", -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/cluster.pb.gw.go b/vendor/openpitrix.io/openpitrix/pkg/pb/cluster.pb.gw.go deleted file mode 100644 index 38bf77e41..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/cluster.pb.gw.go +++ /dev/null @@ -1,2168 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: cluster.proto - -/* -Package pb is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package pb - -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/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage - -func request_ClusterManager_CreateKeyPair_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateKeyPairRequest - 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.CreateKeyPair(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ClusterManager_CreateKeyPair_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateKeyPairRequest - 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.CreateKeyPair(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_ClusterManager_DescribeKeyPairs_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_ClusterManager_DescribeKeyPairs_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeKeyPairsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ClusterManager_DescribeKeyPairs_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeKeyPairs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ClusterManager_DescribeKeyPairs_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeKeyPairsRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_ClusterManager_DescribeKeyPairs_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeKeyPairs(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ClusterManager_DeleteKeyPairs_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteKeyPairsRequest - 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.DeleteKeyPairs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ClusterManager_DeleteKeyPairs_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteKeyPairsRequest - 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.DeleteKeyPairs(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ClusterManager_AttachKeyPairs_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AttachKeyPairsRequest - 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.AttachKeyPairs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ClusterManager_AttachKeyPairs_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AttachKeyPairsRequest - 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.AttachKeyPairs(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ClusterManager_DetachKeyPairs_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DetachKeyPairsRequest - 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.DetachKeyPairs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ClusterManager_DetachKeyPairs_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DetachKeyPairsRequest - 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.DetachKeyPairs(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_ClusterManager_DescribeSubnets_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_ClusterManager_DescribeSubnets_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeSubnetsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ClusterManager_DescribeSubnets_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeSubnets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ClusterManager_DescribeSubnets_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeSubnetsRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_ClusterManager_DescribeSubnets_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeSubnets(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ClusterManager_CreateCluster_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateClusterRequest - 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.CreateCluster(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ClusterManager_CreateCluster_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateClusterRequest - 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.CreateCluster(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ClusterManager_CreateDebugCluster_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateClusterRequest - 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.CreateDebugCluster(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ClusterManager_CreateDebugCluster_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateClusterRequest - 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.CreateDebugCluster(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ClusterManager_ModifyClusterAttributes_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyClusterAttributesRequest - 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.ModifyClusterAttributes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ClusterManager_ModifyClusterAttributes_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyClusterAttributesRequest - 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.ModifyClusterAttributes(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ClusterManager_ModifyClusterNodeAttributes_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyClusterNodeAttributesRequest - 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.ModifyClusterNodeAttributes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ClusterManager_ModifyClusterNodeAttributes_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyClusterNodeAttributesRequest - 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.ModifyClusterNodeAttributes(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ClusterManager_DeleteClusters_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteClustersRequest - 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.DeleteClusters(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ClusterManager_DeleteClusters_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteClustersRequest - 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.DeleteClusters(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ClusterManager_UpgradeCluster_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpgradeClusterRequest - 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.UpgradeCluster(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ClusterManager_UpgradeCluster_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpgradeClusterRequest - 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.UpgradeCluster(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ClusterManager_RollbackCluster_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RollbackClusterRequest - 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.RollbackCluster(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ClusterManager_RollbackCluster_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RollbackClusterRequest - 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.RollbackCluster(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ClusterManager_ResizeCluster_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ResizeClusterRequest - 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.ResizeCluster(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ClusterManager_ResizeCluster_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ResizeClusterRequest - 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.ResizeCluster(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ClusterManager_AddClusterNodes_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddClusterNodesRequest - 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.AddClusterNodes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ClusterManager_AddClusterNodes_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddClusterNodesRequest - 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.AddClusterNodes(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ClusterManager_DeleteClusterNodes_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteClusterNodesRequest - 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.DeleteClusterNodes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ClusterManager_DeleteClusterNodes_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteClusterNodesRequest - 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.DeleteClusterNodes(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ClusterManager_UpdateClusterEnv_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateClusterEnvRequest - 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.UpdateClusterEnv(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ClusterManager_UpdateClusterEnv_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateClusterEnvRequest - 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.UpdateClusterEnv(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_ClusterManager_DescribeClusters_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_ClusterManager_DescribeClusters_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeClustersRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ClusterManager_DescribeClusters_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeClusters(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ClusterManager_DescribeClusters_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeClustersRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_ClusterManager_DescribeClusters_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeClusters(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_ClusterManager_DescribeDebugClusters_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_ClusterManager_DescribeDebugClusters_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeClustersRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ClusterManager_DescribeDebugClusters_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeDebugClusters(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ClusterManager_DescribeDebugClusters_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeClustersRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_ClusterManager_DescribeDebugClusters_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeDebugClusters(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_ClusterManager_DescribeAppClusters_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_ClusterManager_DescribeAppClusters_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeAppClustersRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ClusterManager_DescribeAppClusters_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeAppClusters(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ClusterManager_DescribeAppClusters_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeAppClustersRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_ClusterManager_DescribeAppClusters_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeAppClusters(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_ClusterManager_DescribeDebugAppClusters_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_ClusterManager_DescribeDebugAppClusters_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeAppClustersRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ClusterManager_DescribeDebugAppClusters_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeDebugAppClusters(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ClusterManager_DescribeDebugAppClusters_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeAppClustersRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_ClusterManager_DescribeDebugAppClusters_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeDebugAppClusters(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_ClusterManager_DescribeClusterNodes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_ClusterManager_DescribeClusterNodes_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeClusterNodesRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ClusterManager_DescribeClusterNodes_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeClusterNodes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ClusterManager_DescribeClusterNodes_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeClusterNodesRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_ClusterManager_DescribeClusterNodes_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeClusterNodes(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ClusterManager_StopClusters_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq StopClustersRequest - 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.StopClusters(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ClusterManager_StopClusters_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq StopClustersRequest - 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.StopClusters(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ClusterManager_StartClusters_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq StartClustersRequest - 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.StartClusters(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ClusterManager_StartClusters_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq StartClustersRequest - 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.StartClusters(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ClusterManager_RecoverClusters_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RecoverClustersRequest - 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.RecoverClusters(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ClusterManager_RecoverClusters_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RecoverClustersRequest - 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.RecoverClusters(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ClusterManager_CeaseClusters_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CeaseClustersRequest - 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.CeaseClusters(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ClusterManager_CeaseClusters_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CeaseClustersRequest - 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.CeaseClusters(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ClusterManager_GetClusterStatistics_0(ctx context.Context, marshaler runtime.Marshaler, client ClusterManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetClusterStatisticsRequest - var metadata runtime.ServerMetadata - - msg, err := client.GetClusterStatistics(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ClusterManager_GetClusterStatistics_0(ctx context.Context, marshaler runtime.Marshaler, server ClusterManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetClusterStatisticsRequest - var metadata runtime.ServerMetadata - - msg, err := server.GetClusterStatistics(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterClusterManagerHandlerServer registers the http handlers for service ClusterManager to "mux". -// UnaryRPC :call ClusterManagerServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterClusterManagerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ClusterManagerServer) error { - - mux.Handle("POST", pattern_ClusterManager_CreateKeyPair_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ClusterManager_CreateKeyPair_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_CreateKeyPair_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ClusterManager_DescribeKeyPairs_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ClusterManager_DescribeKeyPairs_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_DescribeKeyPairs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_ClusterManager_DeleteKeyPairs_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ClusterManager_DeleteKeyPairs_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_DeleteKeyPairs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_AttachKeyPairs_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ClusterManager_AttachKeyPairs_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_AttachKeyPairs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_DetachKeyPairs_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ClusterManager_DetachKeyPairs_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_DetachKeyPairs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ClusterManager_DescribeSubnets_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ClusterManager_DescribeSubnets_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_DescribeSubnets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_CreateCluster_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ClusterManager_CreateCluster_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_CreateCluster_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_CreateDebugCluster_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ClusterManager_CreateDebugCluster_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_CreateDebugCluster_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_ModifyClusterAttributes_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ClusterManager_ModifyClusterAttributes_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_ModifyClusterAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_ModifyClusterNodeAttributes_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ClusterManager_ModifyClusterNodeAttributes_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_ModifyClusterNodeAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_DeleteClusters_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ClusterManager_DeleteClusters_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_DeleteClusters_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_UpgradeCluster_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ClusterManager_UpgradeCluster_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_UpgradeCluster_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_RollbackCluster_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ClusterManager_RollbackCluster_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_RollbackCluster_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_ResizeCluster_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ClusterManager_ResizeCluster_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_ResizeCluster_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_AddClusterNodes_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ClusterManager_AddClusterNodes_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_AddClusterNodes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_DeleteClusterNodes_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ClusterManager_DeleteClusterNodes_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_DeleteClusterNodes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_ClusterManager_UpdateClusterEnv_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ClusterManager_UpdateClusterEnv_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_UpdateClusterEnv_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ClusterManager_DescribeClusters_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ClusterManager_DescribeClusters_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_DescribeClusters_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ClusterManager_DescribeDebugClusters_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ClusterManager_DescribeDebugClusters_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_DescribeDebugClusters_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ClusterManager_DescribeAppClusters_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ClusterManager_DescribeAppClusters_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_DescribeAppClusters_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ClusterManager_DescribeDebugAppClusters_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ClusterManager_DescribeDebugAppClusters_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_DescribeDebugAppClusters_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ClusterManager_DescribeClusterNodes_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ClusterManager_DescribeClusterNodes_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_DescribeClusterNodes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_StopClusters_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ClusterManager_StopClusters_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_StopClusters_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_StartClusters_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ClusterManager_StartClusters_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_StartClusters_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_RecoverClusters_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ClusterManager_RecoverClusters_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_RecoverClusters_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_CeaseClusters_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ClusterManager_CeaseClusters_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_CeaseClusters_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ClusterManager_GetClusterStatistics_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ClusterManager_GetClusterStatistics_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_GetClusterStatistics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterClusterManagerHandlerFromEndpoint is same as RegisterClusterManagerHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterClusterManagerHandlerFromEndpoint(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 RegisterClusterManagerHandler(ctx, mux, conn) -} - -// RegisterClusterManagerHandler registers the http handlers for service ClusterManager to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterClusterManagerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterClusterManagerHandlerClient(ctx, mux, NewClusterManagerClient(conn)) -} - -// RegisterClusterManagerHandlerClient registers the http handlers for service ClusterManager -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ClusterManagerClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ClusterManagerClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ClusterManagerClient" to call the correct interceptors. -func RegisterClusterManagerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ClusterManagerClient) error { - - mux.Handle("POST", pattern_ClusterManager_CreateKeyPair_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_ClusterManager_CreateKeyPair_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_CreateKeyPair_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ClusterManager_DescribeKeyPairs_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_ClusterManager_DescribeKeyPairs_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_DescribeKeyPairs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_ClusterManager_DeleteKeyPairs_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_ClusterManager_DeleteKeyPairs_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_DeleteKeyPairs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_AttachKeyPairs_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_ClusterManager_AttachKeyPairs_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_AttachKeyPairs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_DetachKeyPairs_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_ClusterManager_DetachKeyPairs_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_DetachKeyPairs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ClusterManager_DescribeSubnets_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_ClusterManager_DescribeSubnets_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_DescribeSubnets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_CreateCluster_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_ClusterManager_CreateCluster_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_CreateCluster_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_CreateDebugCluster_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_ClusterManager_CreateDebugCluster_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_CreateDebugCluster_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_ModifyClusterAttributes_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_ClusterManager_ModifyClusterAttributes_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_ModifyClusterAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_ModifyClusterNodeAttributes_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_ClusterManager_ModifyClusterNodeAttributes_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_ModifyClusterNodeAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_DeleteClusters_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_ClusterManager_DeleteClusters_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_DeleteClusters_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_UpgradeCluster_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_ClusterManager_UpgradeCluster_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_UpgradeCluster_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_RollbackCluster_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_ClusterManager_RollbackCluster_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_RollbackCluster_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_ResizeCluster_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_ClusterManager_ResizeCluster_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_ResizeCluster_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_AddClusterNodes_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_ClusterManager_AddClusterNodes_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_AddClusterNodes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_DeleteClusterNodes_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_ClusterManager_DeleteClusterNodes_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_DeleteClusterNodes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_ClusterManager_UpdateClusterEnv_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_ClusterManager_UpdateClusterEnv_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_UpdateClusterEnv_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ClusterManager_DescribeClusters_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_ClusterManager_DescribeClusters_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_DescribeClusters_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ClusterManager_DescribeDebugClusters_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_ClusterManager_DescribeDebugClusters_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_DescribeDebugClusters_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ClusterManager_DescribeAppClusters_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_ClusterManager_DescribeAppClusters_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_DescribeAppClusters_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ClusterManager_DescribeDebugAppClusters_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_ClusterManager_DescribeDebugAppClusters_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_DescribeDebugAppClusters_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ClusterManager_DescribeClusterNodes_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_ClusterManager_DescribeClusterNodes_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_DescribeClusterNodes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_StopClusters_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_ClusterManager_StopClusters_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_StopClusters_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_StartClusters_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_ClusterManager_StartClusters_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_StartClusters_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_RecoverClusters_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_ClusterManager_RecoverClusters_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_RecoverClusters_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ClusterManager_CeaseClusters_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_ClusterManager_CeaseClusters_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_CeaseClusters_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ClusterManager_GetClusterStatistics_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_ClusterManager_GetClusterStatistics_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ClusterManager_GetClusterStatistics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_ClusterManager_CreateKeyPair_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "clusters", "key_pairs"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ClusterManager_DescribeKeyPairs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "clusters", "key_pairs"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ClusterManager_DeleteKeyPairs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "clusters", "key_pairs"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ClusterManager_AttachKeyPairs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "clusters", "key_pair", "attach"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ClusterManager_DetachKeyPairs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "clusters", "key_pair", "detach"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ClusterManager_DescribeSubnets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "clusters", "subnets"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ClusterManager_CreateCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "clusters", "create"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ClusterManager_CreateDebugCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "debug_clusters", "create"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ClusterManager_ModifyClusterAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "clusters", "modify"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ClusterManager_ModifyClusterNodeAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "clusters", "modify_nodes"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ClusterManager_DeleteClusters_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "clusters", "delete"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ClusterManager_UpgradeCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "clusters", "upgrade"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ClusterManager_RollbackCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "clusters", "rollback"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ClusterManager_ResizeCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "clusters", "resize"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ClusterManager_AddClusterNodes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "clusters", "add_nodes"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ClusterManager_DeleteClusterNodes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "clusters", "delete_nodes"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ClusterManager_UpdateClusterEnv_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "clusters", "update_env"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ClusterManager_DescribeClusters_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "clusters"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ClusterManager_DescribeDebugClusters_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "debug_clusters"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ClusterManager_DescribeAppClusters_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "clusters", "apps"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ClusterManager_DescribeDebugAppClusters_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "debug_clusters", "apps"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ClusterManager_DescribeClusterNodes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "clusters", "nodes"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ClusterManager_StopClusters_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "clusters", "stop"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ClusterManager_StartClusters_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "clusters", "start"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ClusterManager_RecoverClusters_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "clusters", "recover"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ClusterManager_CeaseClusters_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "clusters", "cease"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ClusterManager_GetClusterStatistics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "clusters", "statistics"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_ClusterManager_CreateKeyPair_0 = runtime.ForwardResponseMessage - - forward_ClusterManager_DescribeKeyPairs_0 = runtime.ForwardResponseMessage - - forward_ClusterManager_DeleteKeyPairs_0 = runtime.ForwardResponseMessage - - forward_ClusterManager_AttachKeyPairs_0 = runtime.ForwardResponseMessage - - forward_ClusterManager_DetachKeyPairs_0 = runtime.ForwardResponseMessage - - forward_ClusterManager_DescribeSubnets_0 = runtime.ForwardResponseMessage - - forward_ClusterManager_CreateCluster_0 = runtime.ForwardResponseMessage - - forward_ClusterManager_CreateDebugCluster_0 = runtime.ForwardResponseMessage - - forward_ClusterManager_ModifyClusterAttributes_0 = runtime.ForwardResponseMessage - - forward_ClusterManager_ModifyClusterNodeAttributes_0 = runtime.ForwardResponseMessage - - forward_ClusterManager_DeleteClusters_0 = runtime.ForwardResponseMessage - - forward_ClusterManager_UpgradeCluster_0 = runtime.ForwardResponseMessage - - forward_ClusterManager_RollbackCluster_0 = runtime.ForwardResponseMessage - - forward_ClusterManager_ResizeCluster_0 = runtime.ForwardResponseMessage - - forward_ClusterManager_AddClusterNodes_0 = runtime.ForwardResponseMessage - - forward_ClusterManager_DeleteClusterNodes_0 = runtime.ForwardResponseMessage - - forward_ClusterManager_UpdateClusterEnv_0 = runtime.ForwardResponseMessage - - forward_ClusterManager_DescribeClusters_0 = runtime.ForwardResponseMessage - - forward_ClusterManager_DescribeDebugClusters_0 = runtime.ForwardResponseMessage - - forward_ClusterManager_DescribeAppClusters_0 = runtime.ForwardResponseMessage - - forward_ClusterManager_DescribeDebugAppClusters_0 = runtime.ForwardResponseMessage - - forward_ClusterManager_DescribeClusterNodes_0 = runtime.ForwardResponseMessage - - forward_ClusterManager_StopClusters_0 = runtime.ForwardResponseMessage - - forward_ClusterManager_StartClusters_0 = runtime.ForwardResponseMessage - - forward_ClusterManager_RecoverClusters_0 = runtime.ForwardResponseMessage - - forward_ClusterManager_CeaseClusters_0 = runtime.ForwardResponseMessage - - forward_ClusterManager_GetClusterStatistics_0 = runtime.ForwardResponseMessage -) diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/helm.pb.go b/vendor/openpitrix.io/openpitrix/pkg/pb/helm.pb.go deleted file mode 100644 index a81ee7a2d..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/helm.pb.go +++ /dev/null @@ -1,926 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: helm.proto - -package pb - -import ( - context "context" - fmt "fmt" - math "math" - - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/empty" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type Release struct { - ReleaseName *wrappers.StringValue `protobuf:"bytes,1,opt,name=release_name,json=releaseName,proto3" json:"release_name,omitempty"` - Version *wrappers.Int32Value `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - Namespace *wrappers.StringValue `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` - Status *wrappers.StringValue `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` - Description *wrappers.StringValue `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - FirstDeployedTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=first_deployed_time,json=firstDeployedTime,proto3" json:"first_deployed_time,omitempty"` - LastDeployedTime *timestamp.Timestamp `protobuf:"bytes,7,opt,name=last_deployed_time,json=lastDeployedTime,proto3" json:"last_deployed_time,omitempty"` - DeletedTime *timestamp.Timestamp `protobuf:"bytes,8,opt,name=deleted_time,json=deletedTime,proto3" json:"deleted_time,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Release) Reset() { *m = Release{} } -func (m *Release) String() string { return proto.CompactTextString(m) } -func (*Release) ProtoMessage() {} -func (*Release) Descriptor() ([]byte, []int) { - return fileDescriptor_141ba45979af1a8e, []int{0} -} - -func (m *Release) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Release.Unmarshal(m, b) -} -func (m *Release) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Release.Marshal(b, m, deterministic) -} -func (m *Release) XXX_Merge(src proto.Message) { - xxx_messageInfo_Release.Merge(m, src) -} -func (m *Release) XXX_Size() int { - return xxx_messageInfo_Release.Size(m) -} -func (m *Release) XXX_DiscardUnknown() { - xxx_messageInfo_Release.DiscardUnknown(m) -} - -var xxx_messageInfo_Release proto.InternalMessageInfo - -func (m *Release) GetReleaseName() *wrappers.StringValue { - if m != nil { - return m.ReleaseName - } - return nil -} - -func (m *Release) GetVersion() *wrappers.Int32Value { - if m != nil { - return m.Version - } - return nil -} - -func (m *Release) GetNamespace() *wrappers.StringValue { - if m != nil { - return m.Namespace - } - return nil -} - -func (m *Release) GetStatus() *wrappers.StringValue { - if m != nil { - return m.Status - } - return nil -} - -func (m *Release) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *Release) GetFirstDeployedTime() *timestamp.Timestamp { - if m != nil { - return m.FirstDeployedTime - } - return nil -} - -func (m *Release) GetLastDeployedTime() *timestamp.Timestamp { - if m != nil { - return m.LastDeployedTime - } - return nil -} - -func (m *Release) GetDeletedTime() *timestamp.Timestamp { - if m != nil { - return m.DeletedTime - } - return nil -} - -type ListReleasesRequest struct { - RuntimeId *wrappers.StringValue `protobuf:"bytes,1,opt,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - ReleaseName *wrappers.StringValue `protobuf:"bytes,2,opt,name=release_name,json=releaseName,proto3" json:"release_name,omitempty"` - Namespace *wrappers.StringValue `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` - Status *wrappers.StringValue `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListReleasesRequest) Reset() { *m = ListReleasesRequest{} } -func (m *ListReleasesRequest) String() string { return proto.CompactTextString(m) } -func (*ListReleasesRequest) ProtoMessage() {} -func (*ListReleasesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_141ba45979af1a8e, []int{1} -} - -func (m *ListReleasesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListReleasesRequest.Unmarshal(m, b) -} -func (m *ListReleasesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListReleasesRequest.Marshal(b, m, deterministic) -} -func (m *ListReleasesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListReleasesRequest.Merge(m, src) -} -func (m *ListReleasesRequest) XXX_Size() int { - return xxx_messageInfo_ListReleasesRequest.Size(m) -} -func (m *ListReleasesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListReleasesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListReleasesRequest proto.InternalMessageInfo - -func (m *ListReleasesRequest) GetRuntimeId() *wrappers.StringValue { - if m != nil { - return m.RuntimeId - } - return nil -} - -func (m *ListReleasesRequest) GetReleaseName() *wrappers.StringValue { - if m != nil { - return m.ReleaseName - } - return nil -} - -func (m *ListReleasesRequest) GetNamespace() *wrappers.StringValue { - if m != nil { - return m.Namespace - } - return nil -} - -func (m *ListReleasesRequest) GetStatus() *wrappers.StringValue { - if m != nil { - return m.Status - } - return nil -} - -type ListReleaseResponse struct { - ReleaseSet []*Release `protobuf:"bytes,1,rep,name=release_set,json=releaseSet,proto3" json:"release_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListReleaseResponse) Reset() { *m = ListReleaseResponse{} } -func (m *ListReleaseResponse) String() string { return proto.CompactTextString(m) } -func (*ListReleaseResponse) ProtoMessage() {} -func (*ListReleaseResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_141ba45979af1a8e, []int{2} -} - -func (m *ListReleaseResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListReleaseResponse.Unmarshal(m, b) -} -func (m *ListReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListReleaseResponse.Marshal(b, m, deterministic) -} -func (m *ListReleaseResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListReleaseResponse.Merge(m, src) -} -func (m *ListReleaseResponse) XXX_Size() int { - return xxx_messageInfo_ListReleaseResponse.Size(m) -} -func (m *ListReleaseResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListReleaseResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListReleaseResponse proto.InternalMessageInfo - -func (m *ListReleaseResponse) GetReleaseSet() []*Release { - if m != nil { - return m.ReleaseSet - } - return nil -} - -type CreateReleaseRequest struct { - // required, id of app to run in cluster - AppId *wrappers.StringValue `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - // required, id of app version - VersionId *wrappers.StringValue `protobuf:"bytes,2,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - // required, id of runtime - RuntimeId *wrappers.StringValue `protobuf:"bytes,3,opt,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - // release name - ReleaseName *wrappers.StringValue `protobuf:"bytes,4,opt,name=release_name,json=releaseName,proto3" json:"release_name,omitempty"` - // namespace - Namespace *wrappers.StringValue `protobuf:"bytes,5,opt,name=namespace,proto3" json:"namespace,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateReleaseRequest) Reset() { *m = CreateReleaseRequest{} } -func (m *CreateReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*CreateReleaseRequest) ProtoMessage() {} -func (*CreateReleaseRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_141ba45979af1a8e, []int{3} -} - -func (m *CreateReleaseRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateReleaseRequest.Unmarshal(m, b) -} -func (m *CreateReleaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateReleaseRequest.Marshal(b, m, deterministic) -} -func (m *CreateReleaseRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateReleaseRequest.Merge(m, src) -} -func (m *CreateReleaseRequest) XXX_Size() int { - return xxx_messageInfo_CreateReleaseRequest.Size(m) -} -func (m *CreateReleaseRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateReleaseRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateReleaseRequest proto.InternalMessageInfo - -func (m *CreateReleaseRequest) GetAppId() *wrappers.StringValue { - if m != nil { - return m.AppId - } - return nil -} - -func (m *CreateReleaseRequest) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -func (m *CreateReleaseRequest) GetRuntimeId() *wrappers.StringValue { - if m != nil { - return m.RuntimeId - } - return nil -} - -func (m *CreateReleaseRequest) GetReleaseName() *wrappers.StringValue { - if m != nil { - return m.ReleaseName - } - return nil -} - -func (m *CreateReleaseRequest) GetNamespace() *wrappers.StringValue { - if m != nil { - return m.Namespace - } - return nil -} - -type CreateReleaseResponse struct { - ReleaseName *wrappers.StringValue `protobuf:"bytes,1,opt,name=release_name,json=releaseName,proto3" json:"release_name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateReleaseResponse) Reset() { *m = CreateReleaseResponse{} } -func (m *CreateReleaseResponse) String() string { return proto.CompactTextString(m) } -func (*CreateReleaseResponse) ProtoMessage() {} -func (*CreateReleaseResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_141ba45979af1a8e, []int{4} -} - -func (m *CreateReleaseResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateReleaseResponse.Unmarshal(m, b) -} -func (m *CreateReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateReleaseResponse.Marshal(b, m, deterministic) -} -func (m *CreateReleaseResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateReleaseResponse.Merge(m, src) -} -func (m *CreateReleaseResponse) XXX_Size() int { - return xxx_messageInfo_CreateReleaseResponse.Size(m) -} -func (m *CreateReleaseResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CreateReleaseResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateReleaseResponse proto.InternalMessageInfo - -func (m *CreateReleaseResponse) GetReleaseName() *wrappers.StringValue { - if m != nil { - return m.ReleaseName - } - return nil -} - -type UpgradeReleaseRequest struct { - RuntimeId *wrappers.StringValue `protobuf:"bytes,1,opt,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - ReleaseName *wrappers.StringValue `protobuf:"bytes,2,opt,name=release_name,json=releaseName,proto3" json:"release_name,omitempty"` - VersionId *wrappers.StringValue `protobuf:"bytes,3,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UpgradeReleaseRequest) Reset() { *m = UpgradeReleaseRequest{} } -func (m *UpgradeReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*UpgradeReleaseRequest) ProtoMessage() {} -func (*UpgradeReleaseRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_141ba45979af1a8e, []int{5} -} - -func (m *UpgradeReleaseRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UpgradeReleaseRequest.Unmarshal(m, b) -} -func (m *UpgradeReleaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UpgradeReleaseRequest.Marshal(b, m, deterministic) -} -func (m *UpgradeReleaseRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpgradeReleaseRequest.Merge(m, src) -} -func (m *UpgradeReleaseRequest) XXX_Size() int { - return xxx_messageInfo_UpgradeReleaseRequest.Size(m) -} -func (m *UpgradeReleaseRequest) XXX_DiscardUnknown() { - xxx_messageInfo_UpgradeReleaseRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_UpgradeReleaseRequest proto.InternalMessageInfo - -func (m *UpgradeReleaseRequest) GetRuntimeId() *wrappers.StringValue { - if m != nil { - return m.RuntimeId - } - return nil -} - -func (m *UpgradeReleaseRequest) GetReleaseName() *wrappers.StringValue { - if m != nil { - return m.ReleaseName - } - return nil -} - -func (m *UpgradeReleaseRequest) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -type UpgradeReleaseResponse struct { - ReleaseName *wrappers.StringValue `protobuf:"bytes,1,opt,name=release_name,json=releaseName,proto3" json:"release_name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UpgradeReleaseResponse) Reset() { *m = UpgradeReleaseResponse{} } -func (m *UpgradeReleaseResponse) String() string { return proto.CompactTextString(m) } -func (*UpgradeReleaseResponse) ProtoMessage() {} -func (*UpgradeReleaseResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_141ba45979af1a8e, []int{6} -} - -func (m *UpgradeReleaseResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UpgradeReleaseResponse.Unmarshal(m, b) -} -func (m *UpgradeReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UpgradeReleaseResponse.Marshal(b, m, deterministic) -} -func (m *UpgradeReleaseResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_UpgradeReleaseResponse.Merge(m, src) -} -func (m *UpgradeReleaseResponse) XXX_Size() int { - return xxx_messageInfo_UpgradeReleaseResponse.Size(m) -} -func (m *UpgradeReleaseResponse) XXX_DiscardUnknown() { - xxx_messageInfo_UpgradeReleaseResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_UpgradeReleaseResponse proto.InternalMessageInfo - -func (m *UpgradeReleaseResponse) GetReleaseName() *wrappers.StringValue { - if m != nil { - return m.ReleaseName - } - return nil -} - -type RollbackReleaseRequest struct { - RuntimeId *wrappers.StringValue `protobuf:"bytes,1,opt,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - ReleaseName *wrappers.StringValue `protobuf:"bytes,2,opt,name=release_name,json=releaseName,proto3" json:"release_name,omitempty"` - Version *wrappers.Int32Value `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RollbackReleaseRequest) Reset() { *m = RollbackReleaseRequest{} } -func (m *RollbackReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*RollbackReleaseRequest) ProtoMessage() {} -func (*RollbackReleaseRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_141ba45979af1a8e, []int{7} -} - -func (m *RollbackReleaseRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RollbackReleaseRequest.Unmarshal(m, b) -} -func (m *RollbackReleaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RollbackReleaseRequest.Marshal(b, m, deterministic) -} -func (m *RollbackReleaseRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RollbackReleaseRequest.Merge(m, src) -} -func (m *RollbackReleaseRequest) XXX_Size() int { - return xxx_messageInfo_RollbackReleaseRequest.Size(m) -} -func (m *RollbackReleaseRequest) XXX_DiscardUnknown() { - xxx_messageInfo_RollbackReleaseRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_RollbackReleaseRequest proto.InternalMessageInfo - -func (m *RollbackReleaseRequest) GetRuntimeId() *wrappers.StringValue { - if m != nil { - return m.RuntimeId - } - return nil -} - -func (m *RollbackReleaseRequest) GetReleaseName() *wrappers.StringValue { - if m != nil { - return m.ReleaseName - } - return nil -} - -func (m *RollbackReleaseRequest) GetVersion() *wrappers.Int32Value { - if m != nil { - return m.Version - } - return nil -} - -type RollbackReleaseResponse struct { - ReleaseName *wrappers.StringValue `protobuf:"bytes,1,opt,name=release_name,json=releaseName,proto3" json:"release_name,omitempty"` - Version *wrappers.Int32Value `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RollbackReleaseResponse) Reset() { *m = RollbackReleaseResponse{} } -func (m *RollbackReleaseResponse) String() string { return proto.CompactTextString(m) } -func (*RollbackReleaseResponse) ProtoMessage() {} -func (*RollbackReleaseResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_141ba45979af1a8e, []int{8} -} - -func (m *RollbackReleaseResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RollbackReleaseResponse.Unmarshal(m, b) -} -func (m *RollbackReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RollbackReleaseResponse.Marshal(b, m, deterministic) -} -func (m *RollbackReleaseResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RollbackReleaseResponse.Merge(m, src) -} -func (m *RollbackReleaseResponse) XXX_Size() int { - return xxx_messageInfo_RollbackReleaseResponse.Size(m) -} -func (m *RollbackReleaseResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RollbackReleaseResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_RollbackReleaseResponse proto.InternalMessageInfo - -func (m *RollbackReleaseResponse) GetReleaseName() *wrappers.StringValue { - if m != nil { - return m.ReleaseName - } - return nil -} - -func (m *RollbackReleaseResponse) GetVersion() *wrappers.Int32Value { - if m != nil { - return m.Version - } - return nil -} - -type DeleteReleaseRequest struct { - RuntimeId *wrappers.StringValue `protobuf:"bytes,1,opt,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - ReleaseName *wrappers.StringValue `protobuf:"bytes,2,opt,name=release_name,json=releaseName,proto3" json:"release_name,omitempty"` - Purge *wrappers.BoolValue `protobuf:"bytes,3,opt,name=purge,proto3" json:"purge,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteReleaseRequest) Reset() { *m = DeleteReleaseRequest{} } -func (m *DeleteReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteReleaseRequest) ProtoMessage() {} -func (*DeleteReleaseRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_141ba45979af1a8e, []int{9} -} - -func (m *DeleteReleaseRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteReleaseRequest.Unmarshal(m, b) -} -func (m *DeleteReleaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteReleaseRequest.Marshal(b, m, deterministic) -} -func (m *DeleteReleaseRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteReleaseRequest.Merge(m, src) -} -func (m *DeleteReleaseRequest) XXX_Size() int { - return xxx_messageInfo_DeleteReleaseRequest.Size(m) -} -func (m *DeleteReleaseRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteReleaseRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteReleaseRequest proto.InternalMessageInfo - -func (m *DeleteReleaseRequest) GetRuntimeId() *wrappers.StringValue { - if m != nil { - return m.RuntimeId - } - return nil -} - -func (m *DeleteReleaseRequest) GetReleaseName() *wrappers.StringValue { - if m != nil { - return m.ReleaseName - } - return nil -} - -func (m *DeleteReleaseRequest) GetPurge() *wrappers.BoolValue { - if m != nil { - return m.Purge - } - return nil -} - -type DeleteReleaseResponse struct { - ReleaseName *wrappers.StringValue `protobuf:"bytes,1,opt,name=release_name,json=releaseName,proto3" json:"release_name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteReleaseResponse) Reset() { *m = DeleteReleaseResponse{} } -func (m *DeleteReleaseResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteReleaseResponse) ProtoMessage() {} -func (*DeleteReleaseResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_141ba45979af1a8e, []int{10} -} - -func (m *DeleteReleaseResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteReleaseResponse.Unmarshal(m, b) -} -func (m *DeleteReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteReleaseResponse.Marshal(b, m, deterministic) -} -func (m *DeleteReleaseResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteReleaseResponse.Merge(m, src) -} -func (m *DeleteReleaseResponse) XXX_Size() int { - return xxx_messageInfo_DeleteReleaseResponse.Size(m) -} -func (m *DeleteReleaseResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteReleaseResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteReleaseResponse proto.InternalMessageInfo - -func (m *DeleteReleaseResponse) GetReleaseName() *wrappers.StringValue { - if m != nil { - return m.ReleaseName - } - return nil -} - -func init() { - proto.RegisterType((*Release)(nil), "openpitrix.Release") - proto.RegisterType((*ListReleasesRequest)(nil), "openpitrix.ListReleasesRequest") - proto.RegisterType((*ListReleaseResponse)(nil), "openpitrix.ListReleaseResponse") - proto.RegisterType((*CreateReleaseRequest)(nil), "openpitrix.CreateReleaseRequest") - proto.RegisterType((*CreateReleaseResponse)(nil), "openpitrix.CreateReleaseResponse") - proto.RegisterType((*UpgradeReleaseRequest)(nil), "openpitrix.UpgradeReleaseRequest") - proto.RegisterType((*UpgradeReleaseResponse)(nil), "openpitrix.UpgradeReleaseResponse") - proto.RegisterType((*RollbackReleaseRequest)(nil), "openpitrix.RollbackReleaseRequest") - proto.RegisterType((*RollbackReleaseResponse)(nil), "openpitrix.RollbackReleaseResponse") - proto.RegisterType((*DeleteReleaseRequest)(nil), "openpitrix.DeleteReleaseRequest") - proto.RegisterType((*DeleteReleaseResponse)(nil), "openpitrix.DeleteReleaseResponse") -} - -func init() { proto.RegisterFile("helm.proto", fileDescriptor_141ba45979af1a8e) } - -var fileDescriptor_141ba45979af1a8e = []byte{ - // 773 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0x96, 0xf3, 0x57, 0x3a, 0x09, 0x69, 0xbb, 0xfd, 0x21, 0x72, 0x2b, 0x1a, 0x8c, 0x90, 0xaa, - 0xd2, 0x26, 0x90, 0xc2, 0xa5, 0x08, 0x50, 0x4a, 0x0f, 0x94, 0xbf, 0x43, 0x0a, 0x08, 0xb8, 0x44, - 0x9b, 0x78, 0x6b, 0x2c, 0x1c, 0x7b, 0xd9, 0xdd, 0xb4, 0xf4, 0x86, 0x10, 0x48, 0xbd, 0x12, 0x9e, - 0x80, 0x57, 0xe1, 0xc0, 0x8d, 0x0b, 0xbc, 0x02, 0x0f, 0x82, 0x6c, 0xaf, 0x69, 0xd6, 0x0e, 0x6d, - 0x4a, 0x2b, 0xe8, 0x29, 0x91, 0xe7, 0xfb, 0xbe, 0x99, 0x9d, 0x6f, 0x76, 0x16, 0xe0, 0x25, 0x71, - 0x3a, 0x15, 0xca, 0x3c, 0xe1, 0x21, 0xf0, 0x28, 0x71, 0xa9, 0x2d, 0x98, 0xfd, 0x46, 0x9f, 0xb5, - 0x3c, 0xcf, 0x72, 0x48, 0x35, 0x88, 0xb4, 0xba, 0x5b, 0x55, 0xd2, 0xa1, 0x62, 0x37, 0x04, 0xea, - 0xe7, 0xe3, 0xc1, 0x1d, 0x86, 0x29, 0x25, 0x8c, 0xcb, 0xf8, 0x7c, 0x3c, 0x2e, 0xec, 0x0e, 0xe1, - 0x02, 0x77, 0xa8, 0x04, 0xcc, 0x49, 0x00, 0xa6, 0x76, 0x15, 0xbb, 0xae, 0x27, 0xb0, 0xb0, 0x3d, - 0x37, 0xa2, 0x2f, 0x05, 0x3f, 0xed, 0x65, 0x8b, 0xb8, 0xcb, 0x7c, 0x07, 0x5b, 0x16, 0x61, 0x55, - 0x8f, 0x06, 0x88, 0x24, 0xda, 0xd8, 0xcb, 0xc0, 0x48, 0x83, 0x38, 0x04, 0x73, 0x82, 0x6e, 0x43, - 0x81, 0x85, 0x7f, 0x9b, 0x2e, 0xee, 0x90, 0x92, 0x56, 0xd6, 0x16, 0xf2, 0xb5, 0xb9, 0x4a, 0x98, - 0xae, 0x12, 0xd5, 0x53, 0xd9, 0x14, 0xcc, 0x76, 0xad, 0xa7, 0xd8, 0xe9, 0x92, 0x46, 0x5e, 0x32, - 0x1e, 0xe1, 0x0e, 0x41, 0xd7, 0x61, 0x64, 0x9b, 0x30, 0x6e, 0x7b, 0x6e, 0x29, 0x15, 0x70, 0x67, - 0x13, 0xdc, 0x0d, 0x57, 0xac, 0xd4, 0x42, 0x6a, 0x84, 0x45, 0xab, 0x30, 0xea, 0xe7, 0xe3, 0x14, - 0xb7, 0x49, 0x29, 0x3d, 0x44, 0xd2, 0x7d, 0x38, 0xba, 0x06, 0x39, 0x2e, 0xb0, 0xe8, 0xf2, 0x52, - 0x66, 0x08, 0xa2, 0xc4, 0xa2, 0x5b, 0x90, 0x37, 0x09, 0x6f, 0x33, 0x3b, 0xe8, 0x4b, 0x29, 0x3b, - 0xcc, 0x41, 0xfb, 0x08, 0xe8, 0x1e, 0x4c, 0x6e, 0xd9, 0x8c, 0x8b, 0xa6, 0x49, 0xa8, 0xe3, 0xed, - 0x12, 0xb3, 0xe9, 0x7b, 0x54, 0xca, 0x05, 0x3a, 0x7a, 0x42, 0xe7, 0x71, 0x64, 0x60, 0x63, 0x22, - 0xa0, 0xad, 0x4b, 0x96, 0xff, 0x1d, 0xdd, 0x05, 0xe4, 0xe0, 0x84, 0xd4, 0xc8, 0xa1, 0x52, 0xe3, - 0x3e, 0x4b, 0x51, 0xba, 0x09, 0x05, 0x93, 0x38, 0x44, 0x44, 0x1a, 0x67, 0x0e, 0xd5, 0xc8, 0x4b, - 0xbc, 0xff, 0xc5, 0xf8, 0x90, 0x82, 0xc9, 0x07, 0x36, 0x17, 0x72, 0x1c, 0x78, 0x83, 0xbc, 0xee, - 0x12, 0x2e, 0xd0, 0x0d, 0x00, 0xd6, 0x75, 0x7d, 0xc5, 0xa6, 0x6d, 0x0e, 0x35, 0x14, 0xa3, 0x12, - 0xbf, 0x61, 0x26, 0x66, 0x2a, 0x75, 0xd4, 0x99, 0xfa, 0xe7, 0xc3, 0x61, 0xdc, 0x57, 0xda, 0xd0, - 0x20, 0x9c, 0x7a, 0x2e, 0xf7, 0xc5, 0xa2, 0xba, 0x9a, 0x9c, 0x88, 0x92, 0x56, 0x4e, 0x2f, 0xe4, - 0x6b, 0x93, 0x95, 0xfd, 0x5b, 0x5f, 0x89, 0x18, 0x20, 0x71, 0x9b, 0x44, 0x18, 0x5f, 0x52, 0x30, - 0x75, 0x87, 0x11, 0x2c, 0xc8, 0x6f, 0xbd, 0xb0, 0xab, 0x2b, 0x90, 0xc3, 0x94, 0x0e, 0xdb, 0xd1, - 0x2c, 0xa6, 0x74, 0xc3, 0xf4, 0xad, 0x90, 0x97, 0xc6, 0x27, 0x0e, 0xd3, 0xcb, 0x51, 0x89, 0x0f, - 0xc9, 0x7d, 0x3e, 0xa6, 0x8f, 0xe7, 0x63, 0xe6, 0x58, 0x3e, 0x66, 0x8f, 0xe4, 0xa3, 0xf1, 0x0c, - 0xa6, 0x63, 0x3d, 0x94, 0x9e, 0x1c, 0x77, 0x63, 0x19, 0xdf, 0x35, 0x98, 0x7e, 0x42, 0x2d, 0x86, - 0xcd, 0xb8, 0x3f, 0xff, 0x77, 0xea, 0x55, 0xa3, 0xd3, 0x47, 0x32, 0xda, 0x78, 0x0e, 0x33, 0xf1, - 0x33, 0x9d, 0x54, 0xbf, 0xbe, 0x69, 0x30, 0xd3, 0xf0, 0x1c, 0xa7, 0x85, 0xdb, 0xaf, 0x4e, 0x55, - 0xc3, 0xfa, 0x9e, 0x9e, 0xf4, 0xf0, 0x4f, 0x8f, 0xf1, 0x51, 0x83, 0x73, 0x89, 0xf3, 0x9c, 0x50, - 0xb3, 0xfe, 0xf2, 0x39, 0x34, 0xbe, 0x6a, 0x30, 0xb5, 0x1e, 0xec, 0xe5, 0x53, 0xd5, 0xe1, 0x2b, - 0x90, 0xa5, 0x5d, 0x66, 0x45, 0x4b, 0x38, 0xf9, 0xac, 0xac, 0x79, 0x9e, 0x23, 0xb7, 0x55, 0x00, - 0xf4, 0xaf, 0x6d, 0xec, 0x1c, 0x27, 0xd4, 0xd9, 0xda, 0xe7, 0x2c, 0x14, 0xa5, 0xe8, 0x43, 0xec, - 0x62, 0x8b, 0x30, 0xb4, 0x03, 0x85, 0xfe, 0xc7, 0x0b, 0xcd, 0xf7, 0x6f, 0xe6, 0x01, 0xcf, 0x9a, - 0xfe, 0x27, 0x40, 0x54, 0xa5, 0x71, 0xa9, 0x57, 0x2f, 0xa2, 0x40, 0xb4, 0x2c, 0x43, 0xef, 0x7e, - 0xfc, 0xfc, 0x94, 0x2a, 0xa2, 0x42, 0x75, 0xfb, 0x6a, 0x95, 0x45, 0x89, 0xde, 0x6a, 0x70, 0x56, - 0xd9, 0x4e, 0xa8, 0xdc, 0xaf, 0x3c, 0x68, 0xf9, 0xeb, 0x17, 0x0e, 0x40, 0xc8, 0xec, 0x8b, 0xbd, - 0xfa, 0x38, 0x2a, 0x86, 0x31, 0x25, 0xff, 0x84, 0xae, 0xe4, 0x5f, 0xd5, 0x16, 0xd1, 0x7b, 0x0d, - 0x8a, 0xea, 0x8d, 0x47, 0x4a, 0x86, 0x81, 0x1b, 0x4e, 0x37, 0x0e, 0x82, 0xc8, 0x2a, 0x2e, 0xf7, - 0xea, 0x13, 0x68, 0x4c, 0x06, 0xd5, 0x32, 0x6a, 0x89, 0x32, 0xf6, 0x34, 0x18, 0x8b, 0x5d, 0x26, - 0xa4, 0x24, 0x19, 0xbc, 0x39, 0xf4, 0x8b, 0x07, 0x62, 0x64, 0x25, 0x4b, 0xbd, 0x3a, 0x42, 0xe3, - 0x51, 0x54, 0x2d, 0xc5, 0x48, 0x94, 0xe2, 0x9b, 0xa2, 0xcc, 0x9e, 0x6a, 0xca, 0xa0, 0xeb, 0xa5, - 0x9a, 0x32, 0x70, 0x70, 0xa5, 0x29, 0x61, 0x4c, 0x2d, 0x61, 0x31, 0x5e, 0xc2, 0x5a, 0xe6, 0x45, - 0x8a, 0xb6, 0x5a, 0xb9, 0x60, 0x98, 0x57, 0x7e, 0x05, 0x00, 0x00, 0xff, 0xff, 0x0a, 0xf9, 0x10, - 0xa6, 0x2a, 0x0c, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// ReleaseManagerClient is the client API for ReleaseManager service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ReleaseManagerClient interface { - ListReleases(ctx context.Context, in *ListReleasesRequest, opts ...grpc.CallOption) (*ListReleaseResponse, error) - CreateRelease(ctx context.Context, in *CreateReleaseRequest, opts ...grpc.CallOption) (*CreateReleaseResponse, error) - UpgradeRelease(ctx context.Context, in *UpgradeReleaseRequest, opts ...grpc.CallOption) (*UpgradeReleaseResponse, error) - RollbackRelease(ctx context.Context, in *RollbackReleaseRequest, opts ...grpc.CallOption) (*RollbackReleaseResponse, error) - DeleteRelease(ctx context.Context, in *DeleteReleaseRequest, opts ...grpc.CallOption) (*DeleteReleaseResponse, error) -} - -type releaseManagerClient struct { - cc *grpc.ClientConn -} - -func NewReleaseManagerClient(cc *grpc.ClientConn) ReleaseManagerClient { - return &releaseManagerClient{cc} -} - -func (c *releaseManagerClient) ListReleases(ctx context.Context, in *ListReleasesRequest, opts ...grpc.CallOption) (*ListReleaseResponse, error) { - out := new(ListReleaseResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ReleaseManager/ListReleases", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *releaseManagerClient) CreateRelease(ctx context.Context, in *CreateReleaseRequest, opts ...grpc.CallOption) (*CreateReleaseResponse, error) { - out := new(CreateReleaseResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ReleaseManager/CreateRelease", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *releaseManagerClient) UpgradeRelease(ctx context.Context, in *UpgradeReleaseRequest, opts ...grpc.CallOption) (*UpgradeReleaseResponse, error) { - out := new(UpgradeReleaseResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ReleaseManager/UpgradeRelease", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *releaseManagerClient) RollbackRelease(ctx context.Context, in *RollbackReleaseRequest, opts ...grpc.CallOption) (*RollbackReleaseResponse, error) { - out := new(RollbackReleaseResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ReleaseManager/RollbackRelease", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *releaseManagerClient) DeleteRelease(ctx context.Context, in *DeleteReleaseRequest, opts ...grpc.CallOption) (*DeleteReleaseResponse, error) { - out := new(DeleteReleaseResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ReleaseManager/DeleteRelease", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ReleaseManagerServer is the server API for ReleaseManager service. -type ReleaseManagerServer interface { - ListReleases(context.Context, *ListReleasesRequest) (*ListReleaseResponse, error) - CreateRelease(context.Context, *CreateReleaseRequest) (*CreateReleaseResponse, error) - UpgradeRelease(context.Context, *UpgradeReleaseRequest) (*UpgradeReleaseResponse, error) - RollbackRelease(context.Context, *RollbackReleaseRequest) (*RollbackReleaseResponse, error) - DeleteRelease(context.Context, *DeleteReleaseRequest) (*DeleteReleaseResponse, error) -} - -// UnimplementedReleaseManagerServer can be embedded to have forward compatible implementations. -type UnimplementedReleaseManagerServer struct { -} - -func (*UnimplementedReleaseManagerServer) ListReleases(ctx context.Context, req *ListReleasesRequest) (*ListReleaseResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListReleases not implemented") -} -func (*UnimplementedReleaseManagerServer) CreateRelease(ctx context.Context, req *CreateReleaseRequest) (*CreateReleaseResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateRelease not implemented") -} -func (*UnimplementedReleaseManagerServer) UpgradeRelease(ctx context.Context, req *UpgradeReleaseRequest) (*UpgradeReleaseResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpgradeRelease not implemented") -} -func (*UnimplementedReleaseManagerServer) RollbackRelease(ctx context.Context, req *RollbackReleaseRequest) (*RollbackReleaseResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RollbackRelease not implemented") -} -func (*UnimplementedReleaseManagerServer) DeleteRelease(ctx context.Context, req *DeleteReleaseRequest) (*DeleteReleaseResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteRelease not implemented") -} - -func RegisterReleaseManagerServer(s *grpc.Server, srv ReleaseManagerServer) { - s.RegisterService(&_ReleaseManager_serviceDesc, srv) -} - -func _ReleaseManager_ListReleases_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListReleasesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ReleaseManagerServer).ListReleases(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ReleaseManager/ListReleases", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ReleaseManagerServer).ListReleases(ctx, req.(*ListReleasesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ReleaseManager_CreateRelease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateReleaseRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ReleaseManagerServer).CreateRelease(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ReleaseManager/CreateRelease", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ReleaseManagerServer).CreateRelease(ctx, req.(*CreateReleaseRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ReleaseManager_UpgradeRelease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpgradeReleaseRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ReleaseManagerServer).UpgradeRelease(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ReleaseManager/UpgradeRelease", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ReleaseManagerServer).UpgradeRelease(ctx, req.(*UpgradeReleaseRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ReleaseManager_RollbackRelease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RollbackReleaseRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ReleaseManagerServer).RollbackRelease(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ReleaseManager/RollbackRelease", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ReleaseManagerServer).RollbackRelease(ctx, req.(*RollbackReleaseRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ReleaseManager_DeleteRelease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteReleaseRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ReleaseManagerServer).DeleteRelease(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ReleaseManager/DeleteRelease", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ReleaseManagerServer).DeleteRelease(ctx, req.(*DeleteReleaseRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ReleaseManager_serviceDesc = grpc.ServiceDesc{ - ServiceName: "openpitrix.ReleaseManager", - HandlerType: (*ReleaseManagerServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListReleases", - Handler: _ReleaseManager_ListReleases_Handler, - }, - { - MethodName: "CreateRelease", - Handler: _ReleaseManager_CreateRelease_Handler, - }, - { - MethodName: "UpgradeRelease", - Handler: _ReleaseManager_UpgradeRelease_Handler, - }, - { - MethodName: "RollbackRelease", - Handler: _ReleaseManager_RollbackRelease_Handler, - }, - { - MethodName: "DeleteRelease", - Handler: _ReleaseManager_DeleteRelease_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "helm.proto", -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/helm.pb.gw.go b/vendor/openpitrix.io/openpitrix/pkg/pb/helm.pb.gw.go deleted file mode 100644 index 0b1360a9b..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/helm.pb.gw.go +++ /dev/null @@ -1,474 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: helm.proto - -/* -Package pb is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package pb - -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/status" -) - -// 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 ( - filter_ReleaseManager_ListReleases_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_ReleaseManager_ListReleases_0(ctx context.Context, marshaler runtime.Marshaler, client ReleaseManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListReleasesRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ReleaseManager_ListReleases_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListReleases(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ReleaseManager_ListReleases_0(ctx context.Context, marshaler runtime.Marshaler, server ReleaseManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListReleasesRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_ReleaseManager_ListReleases_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListReleases(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ReleaseManager_CreateRelease_0(ctx context.Context, marshaler runtime.Marshaler, client ReleaseManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateReleaseRequest - 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.CreateRelease(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ReleaseManager_CreateRelease_0(ctx context.Context, marshaler runtime.Marshaler, server ReleaseManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateReleaseRequest - 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.CreateRelease(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ReleaseManager_UpgradeRelease_0(ctx context.Context, marshaler runtime.Marshaler, client ReleaseManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpgradeReleaseRequest - 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.UpgradeRelease(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ReleaseManager_UpgradeRelease_0(ctx context.Context, marshaler runtime.Marshaler, server ReleaseManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpgradeReleaseRequest - 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.UpgradeRelease(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ReleaseManager_RollbackRelease_0(ctx context.Context, marshaler runtime.Marshaler, client ReleaseManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RollbackReleaseRequest - 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.RollbackRelease(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ReleaseManager_RollbackRelease_0(ctx context.Context, marshaler runtime.Marshaler, server ReleaseManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RollbackReleaseRequest - 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.RollbackRelease(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ReleaseManager_DeleteRelease_0(ctx context.Context, marshaler runtime.Marshaler, client ReleaseManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteReleaseRequest - 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.DeleteRelease(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ReleaseManager_DeleteRelease_0(ctx context.Context, marshaler runtime.Marshaler, server ReleaseManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteReleaseRequest - 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.DeleteRelease(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterReleaseManagerHandlerServer registers the http handlers for service ReleaseManager to "mux". -// UnaryRPC :call ReleaseManagerServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterReleaseManagerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ReleaseManagerServer) error { - - mux.Handle("GET", pattern_ReleaseManager_ListReleases_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ReleaseManager_ListReleases_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ReleaseManager_ListReleases_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_ReleaseManager_CreateRelease_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ReleaseManager_CreateRelease_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ReleaseManager_CreateRelease_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_ReleaseManager_UpgradeRelease_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ReleaseManager_UpgradeRelease_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ReleaseManager_UpgradeRelease_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ReleaseManager_RollbackRelease_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ReleaseManager_RollbackRelease_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ReleaseManager_RollbackRelease_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_ReleaseManager_DeleteRelease_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ReleaseManager_DeleteRelease_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ReleaseManager_DeleteRelease_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterReleaseManagerHandlerFromEndpoint is same as RegisterReleaseManagerHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterReleaseManagerHandlerFromEndpoint(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 RegisterReleaseManagerHandler(ctx, mux, conn) -} - -// RegisterReleaseManagerHandler registers the http handlers for service ReleaseManager to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterReleaseManagerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterReleaseManagerHandlerClient(ctx, mux, NewReleaseManagerClient(conn)) -} - -// RegisterReleaseManagerHandlerClient registers the http handlers for service ReleaseManager -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ReleaseManagerClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ReleaseManagerClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ReleaseManagerClient" to call the correct interceptors. -func RegisterReleaseManagerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ReleaseManagerClient) error { - - mux.Handle("GET", pattern_ReleaseManager_ListReleases_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_ReleaseManager_ListReleases_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ReleaseManager_ListReleases_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_ReleaseManager_CreateRelease_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_ReleaseManager_CreateRelease_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ReleaseManager_CreateRelease_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_ReleaseManager_UpgradeRelease_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_ReleaseManager_UpgradeRelease_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ReleaseManager_UpgradeRelease_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ReleaseManager_RollbackRelease_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_ReleaseManager_RollbackRelease_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ReleaseManager_RollbackRelease_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_ReleaseManager_DeleteRelease_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_ReleaseManager_DeleteRelease_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ReleaseManager_DeleteRelease_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_ReleaseManager_ListReleases_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "releases"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ReleaseManager_CreateRelease_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "releases"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ReleaseManager_UpgradeRelease_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "releases"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ReleaseManager_RollbackRelease_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "releases"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ReleaseManager_DeleteRelease_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "releases"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_ReleaseManager_ListReleases_0 = runtime.ForwardResponseMessage - - forward_ReleaseManager_CreateRelease_0 = runtime.ForwardResponseMessage - - forward_ReleaseManager_UpgradeRelease_0 = runtime.ForwardResponseMessage - - forward_ReleaseManager_RollbackRelease_0 = runtime.ForwardResponseMessage - - forward_ReleaseManager_DeleteRelease_0 = runtime.ForwardResponseMessage -) diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/isv.pb.go b/vendor/openpitrix.io/openpitrix/pkg/pb/isv.pb.go deleted file mode 100644 index 4d123e62b..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/isv.pb.go +++ /dev/null @@ -1,1283 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: isv.proto - -package pb - -import ( - context "context" - fmt "fmt" - math "math" - - proto "github.com/golang/protobuf/proto" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type DescribeVendorVerifyInfosRequest struct { - // query key, support these fields(user_id, status) - SearchWord *wrappers.StringValue `protobuf:"bytes,1,opt,name=search_word,json=searchWord,proto3" json:"search_word,omitempty"` - // sort key, order by sort_key, default create_time - SortKey *wrappers.StringValue `protobuf:"bytes,2,opt,name=sort_key,json=sortKey,proto3" json:"sort_key,omitempty"` - // value = 0 sort ASC, value = 1 sort DESC - Reverse *wrappers.BoolValue `protobuf:"bytes,3,opt,name=reverse,proto3" json:"reverse,omitempty"` - // data limit per page, default value 20, max value 200 - Limit uint32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` - // data offset, default 0 - Offset uint32 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` - // user ids - UserId []string `protobuf:"bytes,11,rep,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - // status eg.[draft|submitted|passed|rejected|suspended|in-review|new] - Status []string `protobuf:"bytes,12,rep,name=status,proto3" json:"status,omitempty"` - // select column to display - DisplayColumns []string `protobuf:"bytes,13,rep,name=display_columns,json=displayColumns,proto3" json:"display_columns,omitempty"` - // owner - Owner []string `protobuf:"bytes,14,rep,name=owner,proto3" json:"owner,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeVendorVerifyInfosRequest) Reset() { *m = DescribeVendorVerifyInfosRequest{} } -func (m *DescribeVendorVerifyInfosRequest) String() string { return proto.CompactTextString(m) } -func (*DescribeVendorVerifyInfosRequest) ProtoMessage() {} -func (*DescribeVendorVerifyInfosRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9f98fd0318e50e7b, []int{0} -} - -func (m *DescribeVendorVerifyInfosRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeVendorVerifyInfosRequest.Unmarshal(m, b) -} -func (m *DescribeVendorVerifyInfosRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeVendorVerifyInfosRequest.Marshal(b, m, deterministic) -} -func (m *DescribeVendorVerifyInfosRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeVendorVerifyInfosRequest.Merge(m, src) -} -func (m *DescribeVendorVerifyInfosRequest) XXX_Size() int { - return xxx_messageInfo_DescribeVendorVerifyInfosRequest.Size(m) -} -func (m *DescribeVendorVerifyInfosRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeVendorVerifyInfosRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeVendorVerifyInfosRequest proto.InternalMessageInfo - -func (m *DescribeVendorVerifyInfosRequest) GetSearchWord() *wrappers.StringValue { - if m != nil { - return m.SearchWord - } - return nil -} - -func (m *DescribeVendorVerifyInfosRequest) GetSortKey() *wrappers.StringValue { - if m != nil { - return m.SortKey - } - return nil -} - -func (m *DescribeVendorVerifyInfosRequest) GetReverse() *wrappers.BoolValue { - if m != nil { - return m.Reverse - } - return nil -} - -func (m *DescribeVendorVerifyInfosRequest) GetLimit() uint32 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *DescribeVendorVerifyInfosRequest) GetOffset() uint32 { - if m != nil { - return m.Offset - } - return 0 -} - -func (m *DescribeVendorVerifyInfosRequest) GetUserId() []string { - if m != nil { - return m.UserId - } - return nil -} - -func (m *DescribeVendorVerifyInfosRequest) GetStatus() []string { - if m != nil { - return m.Status - } - return nil -} - -func (m *DescribeVendorVerifyInfosRequest) GetDisplayColumns() []string { - if m != nil { - return m.DisplayColumns - } - return nil -} - -func (m *DescribeVendorVerifyInfosRequest) GetOwner() []string { - if m != nil { - return m.Owner - } - return nil -} - -type DescribeVendorVerifyInfosResponse struct { - // total count of vendor - TotalCount uint32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - // list of vendor verify info - VendorVerifyInfoSet []*VendorVerifyInfo `protobuf:"bytes,2,rep,name=vendor_verify_info_set,json=vendorVerifyInfoSet,proto3" json:"vendor_verify_info_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeVendorVerifyInfosResponse) Reset() { *m = DescribeVendorVerifyInfosResponse{} } -func (m *DescribeVendorVerifyInfosResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeVendorVerifyInfosResponse) ProtoMessage() {} -func (*DescribeVendorVerifyInfosResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9f98fd0318e50e7b, []int{1} -} - -func (m *DescribeVendorVerifyInfosResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeVendorVerifyInfosResponse.Unmarshal(m, b) -} -func (m *DescribeVendorVerifyInfosResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeVendorVerifyInfosResponse.Marshal(b, m, deterministic) -} -func (m *DescribeVendorVerifyInfosResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeVendorVerifyInfosResponse.Merge(m, src) -} -func (m *DescribeVendorVerifyInfosResponse) XXX_Size() int { - return xxx_messageInfo_DescribeVendorVerifyInfosResponse.Size(m) -} -func (m *DescribeVendorVerifyInfosResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeVendorVerifyInfosResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeVendorVerifyInfosResponse proto.InternalMessageInfo - -func (m *DescribeVendorVerifyInfosResponse) GetTotalCount() uint32 { - if m != nil { - return m.TotalCount - } - return 0 -} - -func (m *DescribeVendorVerifyInfosResponse) GetVendorVerifyInfoSet() []*VendorVerifyInfo { - if m != nil { - return m.VendorVerifyInfoSet - } - return nil -} - -type VendorVerifyInfo struct { - // user id - UserId *wrappers.StringValue `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - // company name - CompanyName *wrappers.StringValue `protobuf:"bytes,2,opt,name=company_name,json=companyName,proto3" json:"company_name,omitempty"` - // company website - CompanyWebsite *wrappers.StringValue `protobuf:"bytes,3,opt,name=company_website,json=companyWebsite,proto3" json:"company_website,omitempty"` - // company profile - CompanyProfile *wrappers.StringValue `protobuf:"bytes,4,opt,name=company_profile,json=companyProfile,proto3" json:"company_profile,omitempty"` - // authorizer name - AuthorizerName *wrappers.StringValue `protobuf:"bytes,5,opt,name=authorizer_name,json=authorizerName,proto3" json:"authorizer_name,omitempty"` - // authorizer email eg.***@yunify.com - AuthorizerEmail *wrappers.StringValue `protobuf:"bytes,6,opt,name=authorizer_email,json=authorizerEmail,proto3" json:"authorizer_email,omitempty"` - // authorizer phone, string of 11 digit - AuthorizerPhone *wrappers.StringValue `protobuf:"bytes,7,opt,name=authorizer_phone,json=authorizerPhone,proto3" json:"authorizer_phone,omitempty"` - // bank name - BankName *wrappers.StringValue `protobuf:"bytes,8,opt,name=bank_name,json=bankName,proto3" json:"bank_name,omitempty"` - // name of bank account - BankAccountName *wrappers.StringValue `protobuf:"bytes,9,opt,name=bank_account_name,json=bankAccountName,proto3" json:"bank_account_name,omitempty"` - // number of bank account - BankAccountNumber *wrappers.StringValue `protobuf:"bytes,10,opt,name=bank_account_number,json=bankAccountNumber,proto3" json:"bank_account_number,omitempty"` - // status eg.[draft|submitted|passed|rejected|suspended|in-review|new] - Status *wrappers.StringValue `protobuf:"bytes,11,opt,name=status,proto3" json:"status,omitempty"` - // reject message - RejectMessage *wrappers.StringValue `protobuf:"bytes,12,opt,name=reject_message,json=rejectMessage,proto3" json:"reject_message,omitempty"` - // approver who approve the vendor verify - Approver *wrappers.StringValue `protobuf:"bytes,13,opt,name=approver,proto3" json:"approver,omitempty"` - // owner who own the vendor verify - Owner *wrappers.StringValue `protobuf:"bytes,14,opt,name=owner,proto3" json:"owner,omitempty"` - // owner path, concat string group_path:user_id - OwnerPath *wrappers.StringValue `protobuf:"bytes,15,opt,name=owner_path,json=ownerPath,proto3" json:"owner_path,omitempty"` - // submit time of vendor verify - SubmitTime *timestamp.Timestamp `protobuf:"bytes,16,opt,name=submit_time,json=submitTime,proto3" json:"submit_time,omitempty"` - // record status changed time - StatusTime *timestamp.Timestamp `protobuf:"bytes,17,opt,name=status_time,json=statusTime,proto3" json:"status_time,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *VendorVerifyInfo) Reset() { *m = VendorVerifyInfo{} } -func (m *VendorVerifyInfo) String() string { return proto.CompactTextString(m) } -func (*VendorVerifyInfo) ProtoMessage() {} -func (*VendorVerifyInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_9f98fd0318e50e7b, []int{2} -} - -func (m *VendorVerifyInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_VendorVerifyInfo.Unmarshal(m, b) -} -func (m *VendorVerifyInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_VendorVerifyInfo.Marshal(b, m, deterministic) -} -func (m *VendorVerifyInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_VendorVerifyInfo.Merge(m, src) -} -func (m *VendorVerifyInfo) XXX_Size() int { - return xxx_messageInfo_VendorVerifyInfo.Size(m) -} -func (m *VendorVerifyInfo) XXX_DiscardUnknown() { - xxx_messageInfo_VendorVerifyInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_VendorVerifyInfo proto.InternalMessageInfo - -func (m *VendorVerifyInfo) GetUserId() *wrappers.StringValue { - if m != nil { - return m.UserId - } - return nil -} - -func (m *VendorVerifyInfo) GetCompanyName() *wrappers.StringValue { - if m != nil { - return m.CompanyName - } - return nil -} - -func (m *VendorVerifyInfo) GetCompanyWebsite() *wrappers.StringValue { - if m != nil { - return m.CompanyWebsite - } - return nil -} - -func (m *VendorVerifyInfo) GetCompanyProfile() *wrappers.StringValue { - if m != nil { - return m.CompanyProfile - } - return nil -} - -func (m *VendorVerifyInfo) GetAuthorizerName() *wrappers.StringValue { - if m != nil { - return m.AuthorizerName - } - return nil -} - -func (m *VendorVerifyInfo) GetAuthorizerEmail() *wrappers.StringValue { - if m != nil { - return m.AuthorizerEmail - } - return nil -} - -func (m *VendorVerifyInfo) GetAuthorizerPhone() *wrappers.StringValue { - if m != nil { - return m.AuthorizerPhone - } - return nil -} - -func (m *VendorVerifyInfo) GetBankName() *wrappers.StringValue { - if m != nil { - return m.BankName - } - return nil -} - -func (m *VendorVerifyInfo) GetBankAccountName() *wrappers.StringValue { - if m != nil { - return m.BankAccountName - } - return nil -} - -func (m *VendorVerifyInfo) GetBankAccountNumber() *wrappers.StringValue { - if m != nil { - return m.BankAccountNumber - } - return nil -} - -func (m *VendorVerifyInfo) GetStatus() *wrappers.StringValue { - if m != nil { - return m.Status - } - return nil -} - -func (m *VendorVerifyInfo) GetRejectMessage() *wrappers.StringValue { - if m != nil { - return m.RejectMessage - } - return nil -} - -func (m *VendorVerifyInfo) GetApprover() *wrappers.StringValue { - if m != nil { - return m.Approver - } - return nil -} - -func (m *VendorVerifyInfo) GetOwner() *wrappers.StringValue { - if m != nil { - return m.Owner - } - return nil -} - -func (m *VendorVerifyInfo) GetOwnerPath() *wrappers.StringValue { - if m != nil { - return m.OwnerPath - } - return nil -} - -func (m *VendorVerifyInfo) GetSubmitTime() *timestamp.Timestamp { - if m != nil { - return m.SubmitTime - } - return nil -} - -func (m *VendorVerifyInfo) GetStatusTime() *timestamp.Timestamp { - if m != nil { - return m.StatusTime - } - return nil -} - -type SubmitVendorVerifyInfoRequest struct { - // required, id of user to submit - UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - // required, company name - CompanyName *wrappers.StringValue `protobuf:"bytes,2,opt,name=company_name,json=companyName,proto3" json:"company_name,omitempty"` - // company website - CompanyWebsite *wrappers.StringValue `protobuf:"bytes,3,opt,name=company_website,json=companyWebsite,proto3" json:"company_website,omitempty"` - // company profile - CompanyProfile *wrappers.StringValue `protobuf:"bytes,4,opt,name=company_profile,json=companyProfile,proto3" json:"company_profile,omitempty"` - // required, authorizer name - AuthorizerName *wrappers.StringValue `protobuf:"bytes,5,opt,name=authorizer_name,json=authorizerName,proto3" json:"authorizer_name,omitempty"` - // required, authorizer email eg. xxx@yunify.com - AuthorizerEmail *wrappers.StringValue `protobuf:"bytes,6,opt,name=authorizer_email,json=authorizerEmail,proto3" json:"authorizer_email,omitempty"` - // authorizer phone, string of 11 digit - AuthorizerPhone *wrappers.StringValue `protobuf:"bytes,7,opt,name=authorizer_phone,json=authorizerPhone,proto3" json:"authorizer_phone,omitempty"` - // bank name - BankName *wrappers.StringValue `protobuf:"bytes,8,opt,name=bank_name,json=bankName,proto3" json:"bank_name,omitempty"` - // bank account name - BankAccountName *wrappers.StringValue `protobuf:"bytes,9,opt,name=bank_account_name,json=bankAccountName,proto3" json:"bank_account_name,omitempty"` - // bank account number - BankAccountNumber *wrappers.StringValue `protobuf:"bytes,10,opt,name=bank_account_number,json=bankAccountNumber,proto3" json:"bank_account_number,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SubmitVendorVerifyInfoRequest) Reset() { *m = SubmitVendorVerifyInfoRequest{} } -func (m *SubmitVendorVerifyInfoRequest) String() string { return proto.CompactTextString(m) } -func (*SubmitVendorVerifyInfoRequest) ProtoMessage() {} -func (*SubmitVendorVerifyInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9f98fd0318e50e7b, []int{3} -} - -func (m *SubmitVendorVerifyInfoRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SubmitVendorVerifyInfoRequest.Unmarshal(m, b) -} -func (m *SubmitVendorVerifyInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SubmitVendorVerifyInfoRequest.Marshal(b, m, deterministic) -} -func (m *SubmitVendorVerifyInfoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubmitVendorVerifyInfoRequest.Merge(m, src) -} -func (m *SubmitVendorVerifyInfoRequest) XXX_Size() int { - return xxx_messageInfo_SubmitVendorVerifyInfoRequest.Size(m) -} -func (m *SubmitVendorVerifyInfoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SubmitVendorVerifyInfoRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SubmitVendorVerifyInfoRequest proto.InternalMessageInfo - -func (m *SubmitVendorVerifyInfoRequest) GetUserId() string { - if m != nil { - return m.UserId - } - return "" -} - -func (m *SubmitVendorVerifyInfoRequest) GetCompanyName() *wrappers.StringValue { - if m != nil { - return m.CompanyName - } - return nil -} - -func (m *SubmitVendorVerifyInfoRequest) GetCompanyWebsite() *wrappers.StringValue { - if m != nil { - return m.CompanyWebsite - } - return nil -} - -func (m *SubmitVendorVerifyInfoRequest) GetCompanyProfile() *wrappers.StringValue { - if m != nil { - return m.CompanyProfile - } - return nil -} - -func (m *SubmitVendorVerifyInfoRequest) GetAuthorizerName() *wrappers.StringValue { - if m != nil { - return m.AuthorizerName - } - return nil -} - -func (m *SubmitVendorVerifyInfoRequest) GetAuthorizerEmail() *wrappers.StringValue { - if m != nil { - return m.AuthorizerEmail - } - return nil -} - -func (m *SubmitVendorVerifyInfoRequest) GetAuthorizerPhone() *wrappers.StringValue { - if m != nil { - return m.AuthorizerPhone - } - return nil -} - -func (m *SubmitVendorVerifyInfoRequest) GetBankName() *wrappers.StringValue { - if m != nil { - return m.BankName - } - return nil -} - -func (m *SubmitVendorVerifyInfoRequest) GetBankAccountName() *wrappers.StringValue { - if m != nil { - return m.BankAccountName - } - return nil -} - -func (m *SubmitVendorVerifyInfoRequest) GetBankAccountNumber() *wrappers.StringValue { - if m != nil { - return m.BankAccountNumber - } - return nil -} - -type SubmitVendorVerifyInfoResponse struct { - // id of user submitted - UserId *wrappers.StringValue `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SubmitVendorVerifyInfoResponse) Reset() { *m = SubmitVendorVerifyInfoResponse{} } -func (m *SubmitVendorVerifyInfoResponse) String() string { return proto.CompactTextString(m) } -func (*SubmitVendorVerifyInfoResponse) ProtoMessage() {} -func (*SubmitVendorVerifyInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9f98fd0318e50e7b, []int{4} -} - -func (m *SubmitVendorVerifyInfoResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SubmitVendorVerifyInfoResponse.Unmarshal(m, b) -} -func (m *SubmitVendorVerifyInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SubmitVendorVerifyInfoResponse.Marshal(b, m, deterministic) -} -func (m *SubmitVendorVerifyInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SubmitVendorVerifyInfoResponse.Merge(m, src) -} -func (m *SubmitVendorVerifyInfoResponse) XXX_Size() int { - return xxx_messageInfo_SubmitVendorVerifyInfoResponse.Size(m) -} -func (m *SubmitVendorVerifyInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SubmitVendorVerifyInfoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SubmitVendorVerifyInfoResponse proto.InternalMessageInfo - -func (m *SubmitVendorVerifyInfoResponse) GetUserId() *wrappers.StringValue { - if m != nil { - return m.UserId - } - return nil -} - -type PassVendorVerifyInfoRequest struct { - // required, id of user to pass - UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PassVendorVerifyInfoRequest) Reset() { *m = PassVendorVerifyInfoRequest{} } -func (m *PassVendorVerifyInfoRequest) String() string { return proto.CompactTextString(m) } -func (*PassVendorVerifyInfoRequest) ProtoMessage() {} -func (*PassVendorVerifyInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9f98fd0318e50e7b, []int{5} -} - -func (m *PassVendorVerifyInfoRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PassVendorVerifyInfoRequest.Unmarshal(m, b) -} -func (m *PassVendorVerifyInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PassVendorVerifyInfoRequest.Marshal(b, m, deterministic) -} -func (m *PassVendorVerifyInfoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PassVendorVerifyInfoRequest.Merge(m, src) -} -func (m *PassVendorVerifyInfoRequest) XXX_Size() int { - return xxx_messageInfo_PassVendorVerifyInfoRequest.Size(m) -} -func (m *PassVendorVerifyInfoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PassVendorVerifyInfoRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_PassVendorVerifyInfoRequest proto.InternalMessageInfo - -func (m *PassVendorVerifyInfoRequest) GetUserId() string { - if m != nil { - return m.UserId - } - return "" -} - -type PassVendorVerifyInfoResponse struct { - // id of user passed - UserId *wrappers.StringValue `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PassVendorVerifyInfoResponse) Reset() { *m = PassVendorVerifyInfoResponse{} } -func (m *PassVendorVerifyInfoResponse) String() string { return proto.CompactTextString(m) } -func (*PassVendorVerifyInfoResponse) ProtoMessage() {} -func (*PassVendorVerifyInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9f98fd0318e50e7b, []int{6} -} - -func (m *PassVendorVerifyInfoResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PassVendorVerifyInfoResponse.Unmarshal(m, b) -} -func (m *PassVendorVerifyInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PassVendorVerifyInfoResponse.Marshal(b, m, deterministic) -} -func (m *PassVendorVerifyInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PassVendorVerifyInfoResponse.Merge(m, src) -} -func (m *PassVendorVerifyInfoResponse) XXX_Size() int { - return xxx_messageInfo_PassVendorVerifyInfoResponse.Size(m) -} -func (m *PassVendorVerifyInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PassVendorVerifyInfoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_PassVendorVerifyInfoResponse proto.InternalMessageInfo - -func (m *PassVendorVerifyInfoResponse) GetUserId() *wrappers.StringValue { - if m != nil { - return m.UserId - } - return nil -} - -type RejectVendorVerifyInfoRequest struct { - // required, id of user to reject - UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - // reject message - RejectMessage *wrappers.StringValue `protobuf:"bytes,2,opt,name=reject_message,json=rejectMessage,proto3" json:"reject_message,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RejectVendorVerifyInfoRequest) Reset() { *m = RejectVendorVerifyInfoRequest{} } -func (m *RejectVendorVerifyInfoRequest) String() string { return proto.CompactTextString(m) } -func (*RejectVendorVerifyInfoRequest) ProtoMessage() {} -func (*RejectVendorVerifyInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9f98fd0318e50e7b, []int{7} -} - -func (m *RejectVendorVerifyInfoRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RejectVendorVerifyInfoRequest.Unmarshal(m, b) -} -func (m *RejectVendorVerifyInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RejectVendorVerifyInfoRequest.Marshal(b, m, deterministic) -} -func (m *RejectVendorVerifyInfoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RejectVendorVerifyInfoRequest.Merge(m, src) -} -func (m *RejectVendorVerifyInfoRequest) XXX_Size() int { - return xxx_messageInfo_RejectVendorVerifyInfoRequest.Size(m) -} -func (m *RejectVendorVerifyInfoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_RejectVendorVerifyInfoRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_RejectVendorVerifyInfoRequest proto.InternalMessageInfo - -func (m *RejectVendorVerifyInfoRequest) GetUserId() string { - if m != nil { - return m.UserId - } - return "" -} - -func (m *RejectVendorVerifyInfoRequest) GetRejectMessage() *wrappers.StringValue { - if m != nil { - return m.RejectMessage - } - return nil -} - -type RejectVendorVerifyInfoResponse struct { - // id of user rejected - UserId *wrappers.StringValue `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RejectVendorVerifyInfoResponse) Reset() { *m = RejectVendorVerifyInfoResponse{} } -func (m *RejectVendorVerifyInfoResponse) String() string { return proto.CompactTextString(m) } -func (*RejectVendorVerifyInfoResponse) ProtoMessage() {} -func (*RejectVendorVerifyInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9f98fd0318e50e7b, []int{8} -} - -func (m *RejectVendorVerifyInfoResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RejectVendorVerifyInfoResponse.Unmarshal(m, b) -} -func (m *RejectVendorVerifyInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RejectVendorVerifyInfoResponse.Marshal(b, m, deterministic) -} -func (m *RejectVendorVerifyInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RejectVendorVerifyInfoResponse.Merge(m, src) -} -func (m *RejectVendorVerifyInfoResponse) XXX_Size() int { - return xxx_messageInfo_RejectVendorVerifyInfoResponse.Size(m) -} -func (m *RejectVendorVerifyInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RejectVendorVerifyInfoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_RejectVendorVerifyInfoResponse proto.InternalMessageInfo - -func (m *RejectVendorVerifyInfoResponse) GetUserId() *wrappers.StringValue { - if m != nil { - return m.UserId - } - return nil -} - -type VendorStatistics struct { - // use user id to statistic - UserId *wrappers.StringValue `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - // company name - CompanyName *wrappers.StringValue `protobuf:"bytes,2,opt,name=company_name,json=companyName,proto3" json:"company_name,omitempty"` - // number of user's active app - ActiveAppCount uint32 `protobuf:"varint,3,opt,name=active_app_count,json=activeAppCount,proto3" json:"active_app_count,omitempty"` - // total count of cluster last month - ClusterCountMonth uint32 `protobuf:"varint,4,opt,name=cluster_count_month,json=clusterCountMonth,proto3" json:"cluster_count_month,omitempty"` - // total count of cluster - ClusterCountTotal uint32 `protobuf:"varint,5,opt,name=cluster_count_total,json=clusterCountTotal,proto3" json:"cluster_count_total,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *VendorStatistics) Reset() { *m = VendorStatistics{} } -func (m *VendorStatistics) String() string { return proto.CompactTextString(m) } -func (*VendorStatistics) ProtoMessage() {} -func (*VendorStatistics) Descriptor() ([]byte, []int) { - return fileDescriptor_9f98fd0318e50e7b, []int{9} -} - -func (m *VendorStatistics) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_VendorStatistics.Unmarshal(m, b) -} -func (m *VendorStatistics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_VendorStatistics.Marshal(b, m, deterministic) -} -func (m *VendorStatistics) XXX_Merge(src proto.Message) { - xxx_messageInfo_VendorStatistics.Merge(m, src) -} -func (m *VendorStatistics) XXX_Size() int { - return xxx_messageInfo_VendorStatistics.Size(m) -} -func (m *VendorStatistics) XXX_DiscardUnknown() { - xxx_messageInfo_VendorStatistics.DiscardUnknown(m) -} - -var xxx_messageInfo_VendorStatistics proto.InternalMessageInfo - -func (m *VendorStatistics) GetUserId() *wrappers.StringValue { - if m != nil { - return m.UserId - } - return nil -} - -func (m *VendorStatistics) GetCompanyName() *wrappers.StringValue { - if m != nil { - return m.CompanyName - } - return nil -} - -func (m *VendorStatistics) GetActiveAppCount() uint32 { - if m != nil { - return m.ActiveAppCount - } - return 0 -} - -func (m *VendorStatistics) GetClusterCountMonth() uint32 { - if m != nil { - return m.ClusterCountMonth - } - return 0 -} - -func (m *VendorStatistics) GetClusterCountTotal() uint32 { - if m != nil { - return m.ClusterCountTotal - } - return 0 -} - -type DescribeVendorStatisticsResponse struct { - // total count of vendor statistic - TotalCount uint32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - // list of vendor statistic - VendorVerifyStatisticsSet []*VendorStatistics `protobuf:"bytes,2,rep,name=vendor_verify_statistics_set,json=vendorVerifyStatisticsSet,proto3" json:"vendor_verify_statistics_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeVendorStatisticsResponse) Reset() { *m = DescribeVendorStatisticsResponse{} } -func (m *DescribeVendorStatisticsResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeVendorStatisticsResponse) ProtoMessage() {} -func (*DescribeVendorStatisticsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9f98fd0318e50e7b, []int{10} -} - -func (m *DescribeVendorStatisticsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeVendorStatisticsResponse.Unmarshal(m, b) -} -func (m *DescribeVendorStatisticsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeVendorStatisticsResponse.Marshal(b, m, deterministic) -} -func (m *DescribeVendorStatisticsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeVendorStatisticsResponse.Merge(m, src) -} -func (m *DescribeVendorStatisticsResponse) XXX_Size() int { - return xxx_messageInfo_DescribeVendorStatisticsResponse.Size(m) -} -func (m *DescribeVendorStatisticsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeVendorStatisticsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeVendorStatisticsResponse proto.InternalMessageInfo - -func (m *DescribeVendorStatisticsResponse) GetTotalCount() uint32 { - if m != nil { - return m.TotalCount - } - return 0 -} - -func (m *DescribeVendorStatisticsResponse) GetVendorVerifyStatisticsSet() []*VendorStatistics { - if m != nil { - return m.VendorVerifyStatisticsSet - } - return nil -} - -type GetVendorVerifyInfoRequest struct { - // required, use user id to get vendor verify info - UserId *wrappers.StringValue `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetVendorVerifyInfoRequest) Reset() { *m = GetVendorVerifyInfoRequest{} } -func (m *GetVendorVerifyInfoRequest) String() string { return proto.CompactTextString(m) } -func (*GetVendorVerifyInfoRequest) ProtoMessage() {} -func (*GetVendorVerifyInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9f98fd0318e50e7b, []int{11} -} - -func (m *GetVendorVerifyInfoRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetVendorVerifyInfoRequest.Unmarshal(m, b) -} -func (m *GetVendorVerifyInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetVendorVerifyInfoRequest.Marshal(b, m, deterministic) -} -func (m *GetVendorVerifyInfoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetVendorVerifyInfoRequest.Merge(m, src) -} -func (m *GetVendorVerifyInfoRequest) XXX_Size() int { - return xxx_messageInfo_GetVendorVerifyInfoRequest.Size(m) -} -func (m *GetVendorVerifyInfoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetVendorVerifyInfoRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetVendorVerifyInfoRequest proto.InternalMessageInfo - -func (m *GetVendorVerifyInfoRequest) GetUserId() *wrappers.StringValue { - if m != nil { - return m.UserId - } - return nil -} - -type GetVendorVerifyInfoResponse struct { - // vendor verify info - VendorVerifyInfo *VendorVerifyInfo `protobuf:"bytes,1,opt,name=vendor_verify_info,json=vendorVerifyInfo,proto3" json:"vendor_verify_info,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetVendorVerifyInfoResponse) Reset() { *m = GetVendorVerifyInfoResponse{} } -func (m *GetVendorVerifyInfoResponse) String() string { return proto.CompactTextString(m) } -func (*GetVendorVerifyInfoResponse) ProtoMessage() {} -func (*GetVendorVerifyInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9f98fd0318e50e7b, []int{12} -} - -func (m *GetVendorVerifyInfoResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetVendorVerifyInfoResponse.Unmarshal(m, b) -} -func (m *GetVendorVerifyInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetVendorVerifyInfoResponse.Marshal(b, m, deterministic) -} -func (m *GetVendorVerifyInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetVendorVerifyInfoResponse.Merge(m, src) -} -func (m *GetVendorVerifyInfoResponse) XXX_Size() int { - return xxx_messageInfo_GetVendorVerifyInfoResponse.Size(m) -} -func (m *GetVendorVerifyInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetVendorVerifyInfoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetVendorVerifyInfoResponse proto.InternalMessageInfo - -func (m *GetVendorVerifyInfoResponse) GetVendorVerifyInfo() *VendorVerifyInfo { - if m != nil { - return m.VendorVerifyInfo - } - return nil -} - -func init() { - proto.RegisterType((*DescribeVendorVerifyInfosRequest)(nil), "openpitrix.DescribeVendorVerifyInfosRequest") - proto.RegisterType((*DescribeVendorVerifyInfosResponse)(nil), "openpitrix.DescribeVendorVerifyInfosResponse") - proto.RegisterType((*VendorVerifyInfo)(nil), "openpitrix.VendorVerifyInfo") - proto.RegisterType((*SubmitVendorVerifyInfoRequest)(nil), "openpitrix.SubmitVendorVerifyInfoRequest") - proto.RegisterType((*SubmitVendorVerifyInfoResponse)(nil), "openpitrix.SubmitVendorVerifyInfoResponse") - proto.RegisterType((*PassVendorVerifyInfoRequest)(nil), "openpitrix.PassVendorVerifyInfoRequest") - proto.RegisterType((*PassVendorVerifyInfoResponse)(nil), "openpitrix.PassVendorVerifyInfoResponse") - proto.RegisterType((*RejectVendorVerifyInfoRequest)(nil), "openpitrix.RejectVendorVerifyInfoRequest") - proto.RegisterType((*RejectVendorVerifyInfoResponse)(nil), "openpitrix.RejectVendorVerifyInfoResponse") - proto.RegisterType((*VendorStatistics)(nil), "openpitrix.VendorStatistics") - proto.RegisterType((*DescribeVendorStatisticsResponse)(nil), "openpitrix.DescribeVendorStatisticsResponse") - proto.RegisterType((*GetVendorVerifyInfoRequest)(nil), "openpitrix.GetVendorVerifyInfoRequest") - proto.RegisterType((*GetVendorVerifyInfoResponse)(nil), "openpitrix.GetVendorVerifyInfoResponse") -} - -func init() { proto.RegisterFile("isv.proto", fileDescriptor_9f98fd0318e50e7b) } - -var fileDescriptor_9f98fd0318e50e7b = []byte{ - // 1259 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0x4d, 0x6f, 0x1b, 0x45, - 0x18, 0x96, 0x9d, 0xe6, 0xc3, 0xe3, 0xe6, 0x6b, 0x12, 0xb9, 0x1b, 0x27, 0x6d, 0x97, 0x95, 0x20, - 0x69, 0x95, 0x26, 0xa2, 0x94, 0x52, 0x5a, 0x55, 0xc8, 0x2d, 0x55, 0x69, 0xa1, 0x28, 0x38, 0xa5, - 0x95, 0x90, 0xd0, 0x6a, 0x6c, 0xbf, 0xb6, 0x87, 0xae, 0x77, 0x86, 0x99, 0x59, 0x87, 0x20, 0x21, - 0x21, 0xb8, 0x70, 0x0e, 0x48, 0x9c, 0x41, 0xe2, 0x80, 0x38, 0xf2, 0x1b, 0xf8, 0x05, 0xfc, 0x85, - 0x9e, 0xf9, 0x0d, 0x68, 0x66, 0xd6, 0xf1, 0x7a, 0xfd, 0x91, 0x4d, 0x7b, 0xe8, 0xa5, 0x27, 0x7b, - 0xdf, 0x7d, 0x9e, 0x77, 0x9e, 0x79, 0xfd, 0x7e, 0x19, 0x15, 0xa8, 0xec, 0xee, 0x70, 0xc1, 0x14, - 0xc3, 0x88, 0x71, 0x08, 0x39, 0x55, 0x82, 0x7e, 0x53, 0xbe, 0xd0, 0x62, 0xac, 0x15, 0xc0, 0xae, - 0x79, 0x53, 0x8b, 0x9a, 0xbb, 0x07, 0x82, 0x70, 0x0e, 0x42, 0x5a, 0x6c, 0xf9, 0x62, 0xfa, 0xbd, - 0xa2, 0x1d, 0x90, 0x8a, 0x74, 0x78, 0x0c, 0xd8, 0x88, 0x01, 0x84, 0xd3, 0x5d, 0x12, 0x86, 0x4c, - 0x11, 0x45, 0x59, 0xd8, 0xa3, 0x6f, 0x9b, 0x8f, 0xfa, 0x95, 0x16, 0x84, 0x57, 0xe4, 0x01, 0x69, - 0xb5, 0x40, 0xec, 0x32, 0x6e, 0x10, 0xc3, 0x68, 0xef, 0xbf, 0x3c, 0x72, 0x3f, 0x04, 0x59, 0x17, - 0xb4, 0x06, 0x4f, 0x20, 0x6c, 0x30, 0xf1, 0x04, 0x04, 0x6d, 0x1e, 0x3e, 0x08, 0x9b, 0x4c, 0x56, - 0xe1, 0xeb, 0x08, 0xa4, 0xc2, 0xb7, 0x51, 0x51, 0x02, 0x11, 0xf5, 0xb6, 0x7f, 0xc0, 0x44, 0xc3, - 0xc9, 0xb9, 0xb9, 0xad, 0xe2, 0xd5, 0x8d, 0x1d, 0x2b, 0x63, 0xa7, 0xa7, 0x73, 0x67, 0x5f, 0x09, - 0x1a, 0xb6, 0x9e, 0x90, 0x20, 0x82, 0x2a, 0xb2, 0x84, 0xa7, 0x4c, 0x34, 0xf0, 0x7b, 0x68, 0x4e, - 0x32, 0xa1, 0xfc, 0x67, 0x70, 0xe8, 0xe4, 0x33, 0x70, 0x67, 0x35, 0xfa, 0x63, 0x38, 0xc4, 0xd7, - 0xd0, 0xac, 0x80, 0x2e, 0x08, 0x09, 0xce, 0x94, 0xe1, 0x95, 0x87, 0x78, 0x77, 0x18, 0x0b, 0x62, - 0x56, 0x0c, 0xc5, 0xab, 0x68, 0x3a, 0xa0, 0x1d, 0xaa, 0x9c, 0x33, 0x6e, 0x6e, 0x6b, 0xbe, 0x6a, - 0x1f, 0x70, 0x09, 0xcd, 0xb0, 0x66, 0x53, 0x82, 0x72, 0xa6, 0x8d, 0x39, 0x7e, 0xc2, 0xe7, 0xd0, - 0x6c, 0x24, 0x41, 0xf8, 0xb4, 0xe1, 0x14, 0xdd, 0xa9, 0xad, 0x42, 0x75, 0x46, 0x3f, 0x3e, 0x68, - 0x68, 0x82, 0x54, 0x44, 0x45, 0xd2, 0x39, 0x6b, 0xed, 0xf6, 0x09, 0x6f, 0xa2, 0xc5, 0x06, 0x95, - 0x3c, 0x20, 0x87, 0x7e, 0x9d, 0x05, 0x51, 0x27, 0x94, 0xce, 0xbc, 0x01, 0x2c, 0xc4, 0xe6, 0xbb, - 0xd6, 0xaa, 0x75, 0xb0, 0x83, 0x10, 0x84, 0xb3, 0x60, 0x5e, 0xdb, 0x07, 0xef, 0xd7, 0x1c, 0x7a, - 0x63, 0x42, 0xc0, 0x25, 0x67, 0xa1, 0x04, 0x7c, 0x11, 0x15, 0x15, 0x53, 0x24, 0xf0, 0xeb, 0x2c, - 0x0a, 0x95, 0x89, 0xf8, 0x7c, 0x15, 0x19, 0xd3, 0x5d, 0x6d, 0xc1, 0x9f, 0xa1, 0x52, 0xd7, 0xb0, - 0xfd, 0xae, 0xa1, 0xfb, 0x34, 0x6c, 0x32, 0x5f, 0x5f, 0x2f, 0xef, 0x4e, 0x99, 0x08, 0xf7, 0x33, - 0x6e, 0x27, 0x7d, 0x4e, 0x75, 0xa5, 0x9b, 0xb2, 0xec, 0x83, 0xf2, 0x9e, 0xcf, 0xa1, 0xa5, 0x34, - 0x12, 0xbf, 0xdb, 0x0f, 0x4f, 0x96, 0x9f, 0xbd, 0x17, 0xbc, 0x0f, 0xd0, 0xd9, 0x3a, 0xeb, 0x70, - 0x12, 0x1e, 0xfa, 0x21, 0xe9, 0x40, 0xa6, 0x9f, 0xbd, 0x18, 0x33, 0x3e, 0x25, 0x1d, 0xc0, 0xf7, - 0xd0, 0x62, 0xcf, 0xc1, 0x01, 0xd4, 0x24, 0x55, 0xbd, 0x14, 0x98, 0xec, 0x63, 0x21, 0x26, 0x3d, - 0xb5, 0x9c, 0xa4, 0x1b, 0x2e, 0x58, 0x93, 0x06, 0x60, 0xb2, 0x22, 0xab, 0x9b, 0x3d, 0xcb, 0xd1, - 0x6e, 0x48, 0xa4, 0xda, 0x4c, 0xd0, 0x6f, 0x41, 0xd8, 0x1b, 0x4d, 0x67, 0x71, 0xd3, 0x27, 0x99, - 0x4b, 0xdd, 0x47, 0x4b, 0x09, 0x37, 0xd0, 0x21, 0x34, 0x70, 0x66, 0x32, 0xf8, 0x49, 0x1c, 0x7e, - 0x4f, 0x93, 0x52, 0x8e, 0x78, 0x9b, 0x85, 0xe0, 0xcc, 0x9e, 0xce, 0xd1, 0x9e, 0x26, 0xe1, 0xf7, - 0x51, 0xa1, 0x46, 0xc2, 0x67, 0xf6, 0x4a, 0x73, 0x19, 0x3c, 0xcc, 0x69, 0xb8, 0xb9, 0xcc, 0x47, - 0x68, 0xd9, 0x50, 0x49, 0xdd, 0xe4, 0xa8, 0x75, 0x51, 0xc8, 0x22, 0x42, 0xd3, 0x2a, 0x96, 0x65, - 0x3c, 0x7d, 0x82, 0x56, 0x06, 0x3d, 0x45, 0x9d, 0x1a, 0x08, 0x07, 0x65, 0xf0, 0xb5, 0x9c, 0xf4, - 0x65, 0x68, 0xf8, 0xda, 0x71, 0xdd, 0x16, 0xb3, 0x24, 0x6c, 0x5c, 0xd5, 0x77, 0xd1, 0x82, 0x80, - 0xaf, 0xa0, 0xae, 0xfc, 0x0e, 0x48, 0x49, 0x5a, 0xe0, 0x9c, 0xcd, 0xc0, 0x9e, 0xb7, 0x9c, 0x47, - 0x96, 0x82, 0x6f, 0xa0, 0x39, 0xc2, 0xb9, 0x60, 0x5d, 0x10, 0xce, 0x7c, 0x96, 0x60, 0xf6, 0xd0, - 0xf8, 0x6a, 0xbf, 0x57, 0x9c, 0x4c, 0xb3, 0x50, 0x7c, 0x0b, 0x21, 0xf3, 0xc5, 0xe7, 0x44, 0xb5, - 0x9d, 0xc5, 0x0c, 0xc4, 0x82, 0xc1, 0xef, 0x11, 0xd5, 0xc6, 0xb7, 0x50, 0x51, 0x46, 0xb5, 0x0e, - 0x55, 0xbe, 0x9e, 0x2e, 0xce, 0xd2, 0x98, 0xf6, 0xfa, 0xb8, 0x37, 0x7a, 0xaa, 0xc8, 0xc2, 0xb5, - 0xc1, 0x90, 0x4d, 0xd8, 0x2c, 0x79, 0x39, 0x03, 0xd9, 0xc0, 0xb5, 0xc1, 0xfb, 0x7b, 0x1a, 0x9d, - 0xdf, 0x37, 0xbe, 0x86, 0xda, 0x52, 0x3c, 0x6e, 0xce, 0x0d, 0xf6, 0x9c, 0xc2, 0xeb, 0xae, 0xf2, - 0xba, 0xab, 0xbc, 0xe2, 0xae, 0xe2, 0x3d, 0x45, 0x17, 0xc6, 0x25, 0x6d, 0x3c, 0xb2, 0x5f, 0x6c, - 0x52, 0x7a, 0xd7, 0xd1, 0xfa, 0x1e, 0x91, 0xf2, 0xb4, 0xb5, 0xe0, 0x7d, 0x8e, 0x36, 0x46, 0xf3, - 0x5e, 0x4e, 0xce, 0x77, 0xe8, 0x7c, 0xd5, 0xf4, 0xb4, 0x53, 0x17, 0xe7, 0x70, 0x07, 0xcd, 0x9f, - 0xba, 0x83, 0xea, 0x30, 0x8f, 0x3b, 0xfe, 0xe5, 0xee, 0xf5, 0x4b, 0xbe, 0xb7, 0xdc, 0xec, 0xeb, - 0x05, 0x58, 0x2a, 0x5a, 0x97, 0xaf, 0x6c, 0xb9, 0xd9, 0x42, 0x4b, 0xa4, 0xae, 0x68, 0x17, 0x7c, - 0xc2, 0x79, 0xbc, 0xe2, 0x4d, 0x99, 0x15, 0x6f, 0xc1, 0xda, 0x2b, 0x9c, 0xdb, 0x35, 0x6f, 0x07, - 0xad, 0xd4, 0x83, 0x48, 0x2a, 0x10, 0x16, 0xe6, 0x77, 0x58, 0xa8, 0xda, 0xf1, 0x66, 0xbb, 0x1c, - 0xbf, 0x32, 0xd0, 0x47, 0xfa, 0xc5, 0x30, 0xde, 0xac, 0x8c, 0xf1, 0xca, 0x3b, 0x80, 0x7f, 0xac, - 0x5f, 0x78, 0xbf, 0xe7, 0xd2, 0xeb, 0x7f, 0x3f, 0x3c, 0xd9, 0x97, 0xd1, 0x2f, 0xd1, 0xc6, 0xe0, - 0x32, 0x2a, 0x8f, 0x9d, 0x4c, 0x5e, 0x49, 0x13, 0x87, 0xad, 0x25, 0x57, 0xd2, 0xbe, 0x5d, 0x2f, - 0xa6, 0xfb, 0xa8, 0x7c, 0x1f, 0xc6, 0x26, 0xe4, 0x0b, 0x26, 0x04, 0x45, 0xeb, 0x23, 0x9d, 0xc6, - 0x77, 0x7e, 0x88, 0xf0, 0xf0, 0x7e, 0x7d, 0x7c, 0xc0, 0xa4, 0xdd, 0x7a, 0x29, 0xbd, 0x5b, 0x5f, - 0xfd, 0xbe, 0x80, 0xd0, 0x03, 0xd9, 0x7d, 0x44, 0x42, 0xd2, 0x02, 0x81, 0xff, 0xcc, 0xa1, 0xd2, - 0xe8, 0x5e, 0x82, 0x2f, 0x25, 0x3d, 0x4f, 0x1c, 0x92, 0xe5, 0xcb, 0x59, 0xa0, 0xf6, 0x32, 0xde, - 0x8d, 0xa3, 0xca, 0x3a, 0x5e, 0xb3, 0x20, 0xd7, 0xca, 0x73, 0xed, 0xb5, 0x5c, 0x7d, 0xad, 0x1f, - 0xfe, 0x7d, 0xfe, 0x73, 0x7e, 0xd5, 0x5b, 0xdc, 0xed, 0xbe, 0xbd, 0xab, 0x13, 0xd2, 0x22, 0xe4, - 0xcd, 0xdc, 0x65, 0xfc, 0x63, 0x1e, 0xad, 0x8d, 0xfd, 0xb7, 0x82, 0xb7, 0x93, 0x1a, 0x4e, 0xfa, - 0x17, 0x59, 0xbe, 0x92, 0x11, 0x1d, 0x8b, 0xfe, 0x29, 0x77, 0x54, 0x09, 0x71, 0x70, 0x1f, 0x06, - 0x25, 0x53, 0x90, 0x46, 0xf4, 0xb6, 0x5b, 0x27, 0xa1, 0xab, 0xe7, 0xa8, 0x70, 0x0f, 0xa8, 0x6a, - 0xbb, 0xaa, 0x0d, 0x12, 0xdc, 0x26, 0x85, 0xa0, 0x21, 0xb7, 0xe2, 0x8c, 0xd8, 0x76, 0xed, 0xe2, - 0x71, 0x69, 0xdb, 0x6d, 0x40, 0x93, 0x44, 0x81, 0x72, 0x05, 0xa8, 0x48, 0x84, 0x2e, 0x09, 0x02, - 0x77, 0xe8, 0x6c, 0x13, 0x88, 0x65, 0x9c, 0x0e, 0x04, 0xfe, 0x27, 0x87, 0xd6, 0x7b, 0x82, 0x2b, - 0x9c, 0x0f, 0xf5, 0x91, 0xd3, 0xc5, 0x61, 0x02, 0x7a, 0xb8, 0xf8, 0xbc, 0x87, 0x47, 0x95, 0x32, - 0x76, 0x74, 0x14, 0xfa, 0x45, 0xe5, 0xb2, 0x66, 0x1c, 0x13, 0xa3, 0x78, 0x13, 0xbf, 0x99, 0x52, - 0x9c, 0xf8, 0x9e, 0xa8, 0x45, 0xfc, 0x5b, 0x0e, 0xad, 0x8e, 0x1a, 0x1a, 0x78, 0x33, 0x29, 0x69, - 0xc2, 0x38, 0x2a, 0x6f, 0x9d, 0x0c, 0x8c, 0x75, 0x5f, 0x3f, 0xaa, 0xac, 0x62, 0xac, 0x21, 0x83, - 0x19, 0x67, 0x14, 0xaf, 0x79, 0xab, 0x69, 0xc5, 0x9c, 0x48, 0x93, 0x71, 0x7f, 0xe5, 0x50, 0x69, - 0xf4, 0x08, 0x18, 0xac, 0x8e, 0x89, 0x53, 0x6a, 0xb0, 0x3a, 0x26, 0x4f, 0x14, 0xef, 0xe6, 0x51, - 0xa5, 0x84, 0x57, 0x2d, 0x68, 0x84, 0xd6, 0x75, 0xaf, 0x94, 0xd6, 0x6a, 0x67, 0x96, 0x56, 0xfb, - 0x47, 0x0e, 0xad, 0x8c, 0x68, 0x23, 0xf8, 0xad, 0xe4, 0xf9, 0xe3, 0x9b, 0x57, 0x79, 0xf3, 0x44, - 0x5c, 0x2c, 0xf2, 0xf6, 0x51, 0xc5, 0xc1, 0xa5, 0x74, 0x31, 0x24, 0xea, 0x77, 0x03, 0x97, 0xc7, - 0x27, 0xc1, 0x9d, 0x33, 0x5f, 0xe4, 0x79, 0xad, 0x36, 0x63, 0x3a, 0xe2, 0x3b, 0xff, 0x07, 0x00, - 0x00, 0xff, 0xff, 0x71, 0x41, 0x15, 0x45, 0x99, 0x12, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// IsvManagerClient is the client API for IsvManager service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type IsvManagerClient interface { - // Submit vendor verify info - SubmitVendorVerifyInfo(ctx context.Context, in *SubmitVendorVerifyInfoRequest, opts ...grpc.CallOption) (*SubmitVendorVerifyInfoResponse, error) - // Get vendor verifies info, can filer with these fields(user_id, status), default return all VendorVerifyInfos - DescribeVendorVerifyInfos(ctx context.Context, in *DescribeVendorVerifyInfosRequest, opts ...grpc.CallOption) (*DescribeVendorVerifyInfosResponse, error) - // Get statistics of vendor - DescribeAppVendorStatistics(ctx context.Context, in *DescribeVendorVerifyInfosRequest, opts ...grpc.CallOption) (*DescribeVendorStatisticsResponse, error) - // Pass vendor verify - PassVendorVerifyInfo(ctx context.Context, in *PassVendorVerifyInfoRequest, opts ...grpc.CallOption) (*PassVendorVerifyInfoResponse, error) - // Reject vendor verify - RejectVendorVerifyInfo(ctx context.Context, in *RejectVendorVerifyInfoRequest, opts ...grpc.CallOption) (*RejectVendorVerifyInfoResponse, error) - // Get vendor verify info - GetVendorVerifyInfo(ctx context.Context, in *GetVendorVerifyInfoRequest, opts ...grpc.CallOption) (*GetVendorVerifyInfoResponse, error) -} - -type isvManagerClient struct { - cc *grpc.ClientConn -} - -func NewIsvManagerClient(cc *grpc.ClientConn) IsvManagerClient { - return &isvManagerClient{cc} -} - -func (c *isvManagerClient) SubmitVendorVerifyInfo(ctx context.Context, in *SubmitVendorVerifyInfoRequest, opts ...grpc.CallOption) (*SubmitVendorVerifyInfoResponse, error) { - out := new(SubmitVendorVerifyInfoResponse) - err := c.cc.Invoke(ctx, "/openpitrix.IsvManager/SubmitVendorVerifyInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *isvManagerClient) DescribeVendorVerifyInfos(ctx context.Context, in *DescribeVendorVerifyInfosRequest, opts ...grpc.CallOption) (*DescribeVendorVerifyInfosResponse, error) { - out := new(DescribeVendorVerifyInfosResponse) - err := c.cc.Invoke(ctx, "/openpitrix.IsvManager/DescribeVendorVerifyInfos", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *isvManagerClient) DescribeAppVendorStatistics(ctx context.Context, in *DescribeVendorVerifyInfosRequest, opts ...grpc.CallOption) (*DescribeVendorStatisticsResponse, error) { - out := new(DescribeVendorStatisticsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.IsvManager/DescribeAppVendorStatistics", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *isvManagerClient) PassVendorVerifyInfo(ctx context.Context, in *PassVendorVerifyInfoRequest, opts ...grpc.CallOption) (*PassVendorVerifyInfoResponse, error) { - out := new(PassVendorVerifyInfoResponse) - err := c.cc.Invoke(ctx, "/openpitrix.IsvManager/PassVendorVerifyInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *isvManagerClient) RejectVendorVerifyInfo(ctx context.Context, in *RejectVendorVerifyInfoRequest, opts ...grpc.CallOption) (*RejectVendorVerifyInfoResponse, error) { - out := new(RejectVendorVerifyInfoResponse) - err := c.cc.Invoke(ctx, "/openpitrix.IsvManager/RejectVendorVerifyInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *isvManagerClient) GetVendorVerifyInfo(ctx context.Context, in *GetVendorVerifyInfoRequest, opts ...grpc.CallOption) (*GetVendorVerifyInfoResponse, error) { - out := new(GetVendorVerifyInfoResponse) - err := c.cc.Invoke(ctx, "/openpitrix.IsvManager/GetVendorVerifyInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// IsvManagerServer is the server API for IsvManager service. -type IsvManagerServer interface { - // Submit vendor verify info - SubmitVendorVerifyInfo(context.Context, *SubmitVendorVerifyInfoRequest) (*SubmitVendorVerifyInfoResponse, error) - // Get vendor verifies info, can filer with these fields(user_id, status), default return all VendorVerifyInfos - DescribeVendorVerifyInfos(context.Context, *DescribeVendorVerifyInfosRequest) (*DescribeVendorVerifyInfosResponse, error) - // Get statistics of vendor - DescribeAppVendorStatistics(context.Context, *DescribeVendorVerifyInfosRequest) (*DescribeVendorStatisticsResponse, error) - // Pass vendor verify - PassVendorVerifyInfo(context.Context, *PassVendorVerifyInfoRequest) (*PassVendorVerifyInfoResponse, error) - // Reject vendor verify - RejectVendorVerifyInfo(context.Context, *RejectVendorVerifyInfoRequest) (*RejectVendorVerifyInfoResponse, error) - // Get vendor verify info - GetVendorVerifyInfo(context.Context, *GetVendorVerifyInfoRequest) (*GetVendorVerifyInfoResponse, error) -} - -// UnimplementedIsvManagerServer can be embedded to have forward compatible implementations. -type UnimplementedIsvManagerServer struct { -} - -func (*UnimplementedIsvManagerServer) SubmitVendorVerifyInfo(ctx context.Context, req *SubmitVendorVerifyInfoRequest) (*SubmitVendorVerifyInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitVendorVerifyInfo not implemented") -} -func (*UnimplementedIsvManagerServer) DescribeVendorVerifyInfos(ctx context.Context, req *DescribeVendorVerifyInfosRequest) (*DescribeVendorVerifyInfosResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeVendorVerifyInfos not implemented") -} -func (*UnimplementedIsvManagerServer) DescribeAppVendorStatistics(ctx context.Context, req *DescribeVendorVerifyInfosRequest) (*DescribeVendorStatisticsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeAppVendorStatistics not implemented") -} -func (*UnimplementedIsvManagerServer) PassVendorVerifyInfo(ctx context.Context, req *PassVendorVerifyInfoRequest) (*PassVendorVerifyInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PassVendorVerifyInfo not implemented") -} -func (*UnimplementedIsvManagerServer) RejectVendorVerifyInfo(ctx context.Context, req *RejectVendorVerifyInfoRequest) (*RejectVendorVerifyInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RejectVendorVerifyInfo not implemented") -} -func (*UnimplementedIsvManagerServer) GetVendorVerifyInfo(ctx context.Context, req *GetVendorVerifyInfoRequest) (*GetVendorVerifyInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetVendorVerifyInfo not implemented") -} - -func RegisterIsvManagerServer(s *grpc.Server, srv IsvManagerServer) { - s.RegisterService(&_IsvManager_serviceDesc, srv) -} - -func _IsvManager_SubmitVendorVerifyInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SubmitVendorVerifyInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IsvManagerServer).SubmitVendorVerifyInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.IsvManager/SubmitVendorVerifyInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IsvManagerServer).SubmitVendorVerifyInfo(ctx, req.(*SubmitVendorVerifyInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _IsvManager_DescribeVendorVerifyInfos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeVendorVerifyInfosRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IsvManagerServer).DescribeVendorVerifyInfos(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.IsvManager/DescribeVendorVerifyInfos", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IsvManagerServer).DescribeVendorVerifyInfos(ctx, req.(*DescribeVendorVerifyInfosRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _IsvManager_DescribeAppVendorStatistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeVendorVerifyInfosRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IsvManagerServer).DescribeAppVendorStatistics(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.IsvManager/DescribeAppVendorStatistics", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IsvManagerServer).DescribeAppVendorStatistics(ctx, req.(*DescribeVendorVerifyInfosRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _IsvManager_PassVendorVerifyInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PassVendorVerifyInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IsvManagerServer).PassVendorVerifyInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.IsvManager/PassVendorVerifyInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IsvManagerServer).PassVendorVerifyInfo(ctx, req.(*PassVendorVerifyInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _IsvManager_RejectVendorVerifyInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RejectVendorVerifyInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IsvManagerServer).RejectVendorVerifyInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.IsvManager/RejectVendorVerifyInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IsvManagerServer).RejectVendorVerifyInfo(ctx, req.(*RejectVendorVerifyInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _IsvManager_GetVendorVerifyInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetVendorVerifyInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(IsvManagerServer).GetVendorVerifyInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.IsvManager/GetVendorVerifyInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(IsvManagerServer).GetVendorVerifyInfo(ctx, req.(*GetVendorVerifyInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _IsvManager_serviceDesc = grpc.ServiceDesc{ - ServiceName: "openpitrix.IsvManager", - HandlerType: (*IsvManagerServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SubmitVendorVerifyInfo", - Handler: _IsvManager_SubmitVendorVerifyInfo_Handler, - }, - { - MethodName: "DescribeVendorVerifyInfos", - Handler: _IsvManager_DescribeVendorVerifyInfos_Handler, - }, - { - MethodName: "DescribeAppVendorStatistics", - Handler: _IsvManager_DescribeAppVendorStatistics_Handler, - }, - { - MethodName: "PassVendorVerifyInfo", - Handler: _IsvManager_PassVendorVerifyInfo_Handler, - }, - { - MethodName: "RejectVendorVerifyInfo", - Handler: _IsvManager_RejectVendorVerifyInfo_Handler, - }, - { - MethodName: "GetVendorVerifyInfo", - Handler: _IsvManager_GetVendorVerifyInfo_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "isv.proto", -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/isv.pb.gw.go b/vendor/openpitrix.io/openpitrix/pkg/pb/isv.pb.gw.go deleted file mode 100644 index f8e211a07..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/isv.pb.gw.go +++ /dev/null @@ -1,550 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: isv.proto - -/* -Package pb is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package pb - -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/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage - -func request_IsvManager_SubmitVendorVerifyInfo_0(ctx context.Context, marshaler runtime.Marshaler, client IsvManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SubmitVendorVerifyInfoRequest - 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.SubmitVendorVerifyInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_IsvManager_SubmitVendorVerifyInfo_0(ctx context.Context, marshaler runtime.Marshaler, server IsvManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SubmitVendorVerifyInfoRequest - 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.SubmitVendorVerifyInfo(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_IsvManager_DescribeVendorVerifyInfos_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_IsvManager_DescribeVendorVerifyInfos_0(ctx context.Context, marshaler runtime.Marshaler, client IsvManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeVendorVerifyInfosRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_IsvManager_DescribeVendorVerifyInfos_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeVendorVerifyInfos(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_IsvManager_DescribeVendorVerifyInfos_0(ctx context.Context, marshaler runtime.Marshaler, server IsvManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeVendorVerifyInfosRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_IsvManager_DescribeVendorVerifyInfos_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeVendorVerifyInfos(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_IsvManager_DescribeAppVendorStatistics_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_IsvManager_DescribeAppVendorStatistics_0(ctx context.Context, marshaler runtime.Marshaler, client IsvManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeVendorVerifyInfosRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_IsvManager_DescribeAppVendorStatistics_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeAppVendorStatistics(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_IsvManager_DescribeAppVendorStatistics_0(ctx context.Context, marshaler runtime.Marshaler, server IsvManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeVendorVerifyInfosRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_IsvManager_DescribeAppVendorStatistics_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeAppVendorStatistics(ctx, &protoReq) - return msg, metadata, err - -} - -func request_IsvManager_PassVendorVerifyInfo_0(ctx context.Context, marshaler runtime.Marshaler, client IsvManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PassVendorVerifyInfoRequest - 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.PassVendorVerifyInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_IsvManager_PassVendorVerifyInfo_0(ctx context.Context, marshaler runtime.Marshaler, server IsvManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq PassVendorVerifyInfoRequest - 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.PassVendorVerifyInfo(ctx, &protoReq) - return msg, metadata, err - -} - -func request_IsvManager_RejectVendorVerifyInfo_0(ctx context.Context, marshaler runtime.Marshaler, client IsvManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RejectVendorVerifyInfoRequest - 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.RejectVendorVerifyInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_IsvManager_RejectVendorVerifyInfo_0(ctx context.Context, marshaler runtime.Marshaler, server IsvManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RejectVendorVerifyInfoRequest - 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.RejectVendorVerifyInfo(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_IsvManager_GetVendorVerifyInfo_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_IsvManager_GetVendorVerifyInfo_0(ctx context.Context, marshaler runtime.Marshaler, client IsvManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetVendorVerifyInfoRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_IsvManager_GetVendorVerifyInfo_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetVendorVerifyInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_IsvManager_GetVendorVerifyInfo_0(ctx context.Context, marshaler runtime.Marshaler, server IsvManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetVendorVerifyInfoRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_IsvManager_GetVendorVerifyInfo_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetVendorVerifyInfo(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterIsvManagerHandlerServer registers the http handlers for service IsvManager to "mux". -// UnaryRPC :call IsvManagerServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterIsvManagerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server IsvManagerServer) error { - - mux.Handle("POST", pattern_IsvManager_SubmitVendorVerifyInfo_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_IsvManager_SubmitVendorVerifyInfo_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_IsvManager_SubmitVendorVerifyInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_IsvManager_DescribeVendorVerifyInfos_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_IsvManager_DescribeVendorVerifyInfos_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_IsvManager_DescribeVendorVerifyInfos_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_IsvManager_DescribeAppVendorStatistics_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_IsvManager_DescribeAppVendorStatistics_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_IsvManager_DescribeAppVendorStatistics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_IsvManager_PassVendorVerifyInfo_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_IsvManager_PassVendorVerifyInfo_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_IsvManager_PassVendorVerifyInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_IsvManager_RejectVendorVerifyInfo_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_IsvManager_RejectVendorVerifyInfo_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_IsvManager_RejectVendorVerifyInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_IsvManager_GetVendorVerifyInfo_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_IsvManager_GetVendorVerifyInfo_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_IsvManager_GetVendorVerifyInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterIsvManagerHandlerFromEndpoint is same as RegisterIsvManagerHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterIsvManagerHandlerFromEndpoint(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 RegisterIsvManagerHandler(ctx, mux, conn) -} - -// RegisterIsvManagerHandler registers the http handlers for service IsvManager to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterIsvManagerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterIsvManagerHandlerClient(ctx, mux, NewIsvManagerClient(conn)) -} - -// RegisterIsvManagerHandlerClient registers the http handlers for service IsvManager -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "IsvManagerClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "IsvManagerClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "IsvManagerClient" to call the correct interceptors. -func RegisterIsvManagerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client IsvManagerClient) error { - - mux.Handle("POST", pattern_IsvManager_SubmitVendorVerifyInfo_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_IsvManager_SubmitVendorVerifyInfo_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_IsvManager_SubmitVendorVerifyInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_IsvManager_DescribeVendorVerifyInfos_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_IsvManager_DescribeVendorVerifyInfos_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_IsvManager_DescribeVendorVerifyInfos_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_IsvManager_DescribeAppVendorStatistics_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_IsvManager_DescribeAppVendorStatistics_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_IsvManager_DescribeAppVendorStatistics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_IsvManager_PassVendorVerifyInfo_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_IsvManager_PassVendorVerifyInfo_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_IsvManager_PassVendorVerifyInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_IsvManager_RejectVendorVerifyInfo_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_IsvManager_RejectVendorVerifyInfo_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_IsvManager_RejectVendorVerifyInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_IsvManager_GetVendorVerifyInfo_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_IsvManager_GetVendorVerifyInfo_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_IsvManager_GetVendorVerifyInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_IsvManager_SubmitVendorVerifyInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "app_vendors"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_IsvManager_DescribeVendorVerifyInfos_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "app_vendors"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_IsvManager_DescribeAppVendorStatistics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "app_vendors", "app_vendor_statistics"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_IsvManager_PassVendorVerifyInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "app_vendors", "pass"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_IsvManager_RejectVendorVerifyInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "app_vendors", "reject"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_IsvManager_GetVendorVerifyInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "app_vendors", "app_vendor"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_IsvManager_SubmitVendorVerifyInfo_0 = runtime.ForwardResponseMessage - - forward_IsvManager_DescribeVendorVerifyInfos_0 = runtime.ForwardResponseMessage - - forward_IsvManager_DescribeAppVendorStatistics_0 = runtime.ForwardResponseMessage - - forward_IsvManager_PassVendorVerifyInfo_0 = runtime.ForwardResponseMessage - - forward_IsvManager_RejectVendorVerifyInfo_0 = runtime.ForwardResponseMessage - - forward_IsvManager_GetVendorVerifyInfo_0 = runtime.ForwardResponseMessage -) diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/job.pb.go b/vendor/openpitrix.io/openpitrix/pkg/pb/job.pb.go deleted file mode 100644 index 22ae08108..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/job.pb.go +++ /dev/null @@ -1,779 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: job.proto - -package pb - -import ( - context "context" - fmt "fmt" - math "math" - - proto "github.com/golang/protobuf/proto" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type CreateJobRequest struct { - // required, cluster id - ClusterId *wrappers.StringValue `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // required, id of app run in cluster - AppId *wrappers.StringValue `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - // id of specific app version - VersionId *wrappers.StringValue `protobuf:"bytes,3,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - // required, describe job's action.eg:[CreateCluster|StartClusters|...] - JobAction *wrappers.StringValue `protobuf:"bytes,4,opt,name=job_action,json=jobAction,proto3" json:"job_action,omitempty"` - // required, runtime provide.eg:[qingcloud|aliyun|aws|kubernetes] - Provider *wrappers.StringValue `protobuf:"bytes,5,opt,name=provider,proto3" json:"provider,omitempty"` - // required, directive, a json string, describe the info of running the job action - Directive *wrappers.StringValue `protobuf:"bytes,6,opt,name=directive,proto3" json:"directive,omitempty"` - // required, runtime id - RuntimeId *wrappers.StringValue `protobuf:"bytes,7,opt,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateJobRequest) Reset() { *m = CreateJobRequest{} } -func (m *CreateJobRequest) String() string { return proto.CompactTextString(m) } -func (*CreateJobRequest) ProtoMessage() {} -func (*CreateJobRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f32c477d91a04ead, []int{0} -} - -func (m *CreateJobRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateJobRequest.Unmarshal(m, b) -} -func (m *CreateJobRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateJobRequest.Marshal(b, m, deterministic) -} -func (m *CreateJobRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateJobRequest.Merge(m, src) -} -func (m *CreateJobRequest) XXX_Size() int { - return xxx_messageInfo_CreateJobRequest.Size(m) -} -func (m *CreateJobRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateJobRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateJobRequest proto.InternalMessageInfo - -func (m *CreateJobRequest) GetClusterId() *wrappers.StringValue { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *CreateJobRequest) GetAppId() *wrappers.StringValue { - if m != nil { - return m.AppId - } - return nil -} - -func (m *CreateJobRequest) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -func (m *CreateJobRequest) GetJobAction() *wrappers.StringValue { - if m != nil { - return m.JobAction - } - return nil -} - -func (m *CreateJobRequest) GetProvider() *wrappers.StringValue { - if m != nil { - return m.Provider - } - return nil -} - -func (m *CreateJobRequest) GetDirective() *wrappers.StringValue { - if m != nil { - return m.Directive - } - return nil -} - -func (m *CreateJobRequest) GetRuntimeId() *wrappers.StringValue { - if m != nil { - return m.RuntimeId - } - return nil -} - -type CreateJobResponse struct { - // id of job created - JobId *wrappers.StringValue `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - // id of cluster run job - ClusterId *wrappers.StringValue `protobuf:"bytes,2,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // id of app deploy in cluster - AppId *wrappers.StringValue `protobuf:"bytes,3,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - // id of specific app version - VersionId *wrappers.StringValue `protobuf:"bytes,4,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - // id of runtime of cluster - RuntimeId *wrappers.StringValue `protobuf:"bytes,5,opt,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateJobResponse) Reset() { *m = CreateJobResponse{} } -func (m *CreateJobResponse) String() string { return proto.CompactTextString(m) } -func (*CreateJobResponse) ProtoMessage() {} -func (*CreateJobResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f32c477d91a04ead, []int{1} -} - -func (m *CreateJobResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateJobResponse.Unmarshal(m, b) -} -func (m *CreateJobResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateJobResponse.Marshal(b, m, deterministic) -} -func (m *CreateJobResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateJobResponse.Merge(m, src) -} -func (m *CreateJobResponse) XXX_Size() int { - return xxx_messageInfo_CreateJobResponse.Size(m) -} -func (m *CreateJobResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CreateJobResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateJobResponse proto.InternalMessageInfo - -func (m *CreateJobResponse) GetJobId() *wrappers.StringValue { - if m != nil { - return m.JobId - } - return nil -} - -func (m *CreateJobResponse) GetClusterId() *wrappers.StringValue { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *CreateJobResponse) GetAppId() *wrappers.StringValue { - if m != nil { - return m.AppId - } - return nil -} - -func (m *CreateJobResponse) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -func (m *CreateJobResponse) GetRuntimeId() *wrappers.StringValue { - if m != nil { - return m.RuntimeId - } - return nil -} - -type Job struct { - // job id - JobId *wrappers.StringValue `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - // id of cluster run job - ClusterId *wrappers.StringValue `protobuf:"bytes,2,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // id of app deployed in cluster - AppId *wrappers.StringValue `protobuf:"bytes,3,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - // id of specific app version - VersionId *wrappers.StringValue `protobuf:"bytes,4,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - // describe job's action eg:[CreateCluster|StartClusters|...] - JobAction *wrappers.StringValue `protobuf:"bytes,5,opt,name=job_action,json=jobAction,proto3" json:"job_action,omitempty"` - // status eg.[successful|failed|running|pending] - Status *wrappers.StringValue `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"` - // error code, if job run failed will return a error code - ErrorCode *wrappers.UInt32Value `protobuf:"bytes,7,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` - // directive, a json string, describe the info of running the job action - Directive *wrappers.StringValue `protobuf:"bytes,8,opt,name=directive,proto3" json:"directive,omitempty"` - // host name of server - Executor *wrappers.StringValue `protobuf:"bytes,9,opt,name=executor,proto3" json:"executor,omitempty"` - // total count of task in job, a job contain one more task - TaskCount *wrappers.UInt32Value `protobuf:"bytes,10,opt,name=task_count,json=taskCount,proto3" json:"task_count,omitempty"` - // own path, concat string group_path:user_id - OwnerPath *wrappers.StringValue `protobuf:"bytes,11,opt,name=owner_path,json=ownerPath,proto3" json:"owner_path,omitempty"` - // runtime provider eg:[qingcloud|aliyun|aws|kubernetes] - Provider *wrappers.StringValue `protobuf:"bytes,12,opt,name=provider,proto3" json:"provider,omitempty"` - // id of runtime of cluster - RuntimeId *wrappers.StringValue `protobuf:"bytes,13,opt,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - // the time job create - CreateTime *timestamp.Timestamp `protobuf:"bytes,14,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // record the status changed time - StatusTime *timestamp.Timestamp `protobuf:"bytes,15,opt,name=status_time,json=statusTime,proto3" json:"status_time,omitempty"` - // owner - Owner *wrappers.StringValue `protobuf:"bytes,16,opt,name=owner,proto3" json:"owner,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Job) Reset() { *m = Job{} } -func (m *Job) String() string { return proto.CompactTextString(m) } -func (*Job) ProtoMessage() {} -func (*Job) Descriptor() ([]byte, []int) { - return fileDescriptor_f32c477d91a04ead, []int{2} -} - -func (m *Job) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Job.Unmarshal(m, b) -} -func (m *Job) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Job.Marshal(b, m, deterministic) -} -func (m *Job) XXX_Merge(src proto.Message) { - xxx_messageInfo_Job.Merge(m, src) -} -func (m *Job) XXX_Size() int { - return xxx_messageInfo_Job.Size(m) -} -func (m *Job) XXX_DiscardUnknown() { - xxx_messageInfo_Job.DiscardUnknown(m) -} - -var xxx_messageInfo_Job proto.InternalMessageInfo - -func (m *Job) GetJobId() *wrappers.StringValue { - if m != nil { - return m.JobId - } - return nil -} - -func (m *Job) GetClusterId() *wrappers.StringValue { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *Job) GetAppId() *wrappers.StringValue { - if m != nil { - return m.AppId - } - return nil -} - -func (m *Job) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -func (m *Job) GetJobAction() *wrappers.StringValue { - if m != nil { - return m.JobAction - } - return nil -} - -func (m *Job) GetStatus() *wrappers.StringValue { - if m != nil { - return m.Status - } - return nil -} - -func (m *Job) GetErrorCode() *wrappers.UInt32Value { - if m != nil { - return m.ErrorCode - } - return nil -} - -func (m *Job) GetDirective() *wrappers.StringValue { - if m != nil { - return m.Directive - } - return nil -} - -func (m *Job) GetExecutor() *wrappers.StringValue { - if m != nil { - return m.Executor - } - return nil -} - -func (m *Job) GetTaskCount() *wrappers.UInt32Value { - if m != nil { - return m.TaskCount - } - return nil -} - -func (m *Job) GetOwnerPath() *wrappers.StringValue { - if m != nil { - return m.OwnerPath - } - return nil -} - -func (m *Job) GetProvider() *wrappers.StringValue { - if m != nil { - return m.Provider - } - return nil -} - -func (m *Job) GetRuntimeId() *wrappers.StringValue { - if m != nil { - return m.RuntimeId - } - return nil -} - -func (m *Job) GetCreateTime() *timestamp.Timestamp { - if m != nil { - return m.CreateTime - } - return nil -} - -func (m *Job) GetStatusTime() *timestamp.Timestamp { - if m != nil { - return m.StatusTime - } - return nil -} - -func (m *Job) GetOwner() *wrappers.StringValue { - if m != nil { - return m.Owner - } - return nil -} - -type DescribeJobsRequest struct { - // query key, support these fields(job_id, cluster_id, app_id, version_id, executor, provider, status, owner) - SearchWord *wrappers.StringValue `protobuf:"bytes,1,opt,name=search_word,json=searchWord,proto3" json:"search_word,omitempty"` - // sort key, order by sort_key, default create_time - SortKey *wrappers.StringValue `protobuf:"bytes,2,opt,name=sort_key,json=sortKey,proto3" json:"sort_key,omitempty"` - // value = 0 sort ASC, value = 1 sort DESC - Reverse *wrappers.BoolValue `protobuf:"bytes,3,opt,name=reverse,proto3" json:"reverse,omitempty"` - // data limit per page, default value 20, max value 200 - Limit uint32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` - // data offset, default 0 - Offset uint32 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` - // select column to display - DisplayColumns []string `protobuf:"bytes,6,rep,name=display_columns,json=displayColumns,proto3" json:"display_columns,omitempty"` - // job ids - JobId []string `protobuf:"bytes,11,rep,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - // cluster id - ClusterId *wrappers.StringValue `protobuf:"bytes,12,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` - // app id - AppId *wrappers.StringValue `protobuf:"bytes,13,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` - // specific app version id to filter result - VersionId *wrappers.StringValue `protobuf:"bytes,14,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - // host name of server - Executor *wrappers.StringValue `protobuf:"bytes,15,opt,name=executor,proto3" json:"executor,omitempty"` - // runtime provider eg.[qingcloud|aliyun|aws|kubernetes] - Provider *wrappers.StringValue `protobuf:"bytes,16,opt,name=provider,proto3" json:"provider,omitempty"` - // runtime id - RuntimeId *wrappers.StringValue `protobuf:"bytes,17,opt,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - // status eg.[successful|failed|running|pending] - Status []string `protobuf:"bytes,18,rep,name=status,proto3" json:"status,omitempty"` - // owner - Owner []string `protobuf:"bytes,19,rep,name=owner,proto3" json:"owner,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeJobsRequest) Reset() { *m = DescribeJobsRequest{} } -func (m *DescribeJobsRequest) String() string { return proto.CompactTextString(m) } -func (*DescribeJobsRequest) ProtoMessage() {} -func (*DescribeJobsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f32c477d91a04ead, []int{3} -} - -func (m *DescribeJobsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeJobsRequest.Unmarshal(m, b) -} -func (m *DescribeJobsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeJobsRequest.Marshal(b, m, deterministic) -} -func (m *DescribeJobsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeJobsRequest.Merge(m, src) -} -func (m *DescribeJobsRequest) XXX_Size() int { - return xxx_messageInfo_DescribeJobsRequest.Size(m) -} -func (m *DescribeJobsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeJobsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeJobsRequest proto.InternalMessageInfo - -func (m *DescribeJobsRequest) GetSearchWord() *wrappers.StringValue { - if m != nil { - return m.SearchWord - } - return nil -} - -func (m *DescribeJobsRequest) GetSortKey() *wrappers.StringValue { - if m != nil { - return m.SortKey - } - return nil -} - -func (m *DescribeJobsRequest) GetReverse() *wrappers.BoolValue { - if m != nil { - return m.Reverse - } - return nil -} - -func (m *DescribeJobsRequest) GetLimit() uint32 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *DescribeJobsRequest) GetOffset() uint32 { - if m != nil { - return m.Offset - } - return 0 -} - -func (m *DescribeJobsRequest) GetDisplayColumns() []string { - if m != nil { - return m.DisplayColumns - } - return nil -} - -func (m *DescribeJobsRequest) GetJobId() []string { - if m != nil { - return m.JobId - } - return nil -} - -func (m *DescribeJobsRequest) GetClusterId() *wrappers.StringValue { - if m != nil { - return m.ClusterId - } - return nil -} - -func (m *DescribeJobsRequest) GetAppId() *wrappers.StringValue { - if m != nil { - return m.AppId - } - return nil -} - -func (m *DescribeJobsRequest) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -func (m *DescribeJobsRequest) GetExecutor() *wrappers.StringValue { - if m != nil { - return m.Executor - } - return nil -} - -func (m *DescribeJobsRequest) GetProvider() *wrappers.StringValue { - if m != nil { - return m.Provider - } - return nil -} - -func (m *DescribeJobsRequest) GetRuntimeId() *wrappers.StringValue { - if m != nil { - return m.RuntimeId - } - return nil -} - -func (m *DescribeJobsRequest) GetStatus() []string { - if m != nil { - return m.Status - } - return nil -} - -func (m *DescribeJobsRequest) GetOwner() []string { - if m != nil { - return m.Owner - } - return nil -} - -type DescribeJobsResponse struct { - // total count of job - TotalCount uint32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - // list of job - JobSet []*Job `protobuf:"bytes,2,rep,name=job_set,json=jobSet,proto3" json:"job_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeJobsResponse) Reset() { *m = DescribeJobsResponse{} } -func (m *DescribeJobsResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeJobsResponse) ProtoMessage() {} -func (*DescribeJobsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f32c477d91a04ead, []int{4} -} - -func (m *DescribeJobsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeJobsResponse.Unmarshal(m, b) -} -func (m *DescribeJobsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeJobsResponse.Marshal(b, m, deterministic) -} -func (m *DescribeJobsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeJobsResponse.Merge(m, src) -} -func (m *DescribeJobsResponse) XXX_Size() int { - return xxx_messageInfo_DescribeJobsResponse.Size(m) -} -func (m *DescribeJobsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeJobsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeJobsResponse proto.InternalMessageInfo - -func (m *DescribeJobsResponse) GetTotalCount() uint32 { - if m != nil { - return m.TotalCount - } - return 0 -} - -func (m *DescribeJobsResponse) GetJobSet() []*Job { - if m != nil { - return m.JobSet - } - return nil -} - -func init() { - proto.RegisterType((*CreateJobRequest)(nil), "openpitrix.CreateJobRequest") - proto.RegisterType((*CreateJobResponse)(nil), "openpitrix.CreateJobResponse") - proto.RegisterType((*Job)(nil), "openpitrix.Job") - proto.RegisterType((*DescribeJobsRequest)(nil), "openpitrix.DescribeJobsRequest") - proto.RegisterType((*DescribeJobsResponse)(nil), "openpitrix.DescribeJobsResponse") -} - -func init() { proto.RegisterFile("job.proto", fileDescriptor_f32c477d91a04ead) } - -var fileDescriptor_f32c477d91a04ead = []byte{ - // 901 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x56, 0x4f, 0x6f, 0x23, 0x35, - 0x14, 0x57, 0x92, 0xa6, 0x49, 0x9c, 0xfe, 0x5b, 0x6f, 0x59, 0x8d, 0xa2, 0x42, 0xad, 0x5e, 0x08, - 0xd2, 0x6c, 0x22, 0xd2, 0x95, 0x58, 0xb1, 0xe2, 0xb0, 0x5b, 0x24, 0x68, 0x11, 0x12, 0xca, 0xf2, - 0x47, 0xe2, 0x32, 0xf2, 0xcc, 0xbc, 0x24, 0xce, 0x4e, 0xc7, 0xc6, 0xf6, 0x34, 0xdb, 0x2b, 0x12, - 0x12, 0x67, 0xb8, 0xf2, 0x19, 0x90, 0x90, 0xb8, 0x73, 0xe6, 0xcc, 0x57, 0xe0, 0x03, 0xf0, 0x11, - 0x90, 0xed, 0x99, 0x74, 0xba, 0xdd, 0x8a, 0x99, 0x72, 0xdc, 0x53, 0x34, 0xf6, 0xef, 0x97, 0xf7, - 0xfc, 0x7e, 0xef, 0xf7, 0x6c, 0xd4, 0x5b, 0xf2, 0x70, 0x24, 0x24, 0xd7, 0x1c, 0x23, 0x2e, 0x20, - 0x15, 0x4c, 0x4b, 0xf6, 0x72, 0xf0, 0xce, 0x9c, 0xf3, 0x79, 0x02, 0x63, 0xbb, 0x13, 0x66, 0xb3, - 0xf1, 0x4a, 0x52, 0x21, 0x40, 0x2a, 0x87, 0x1d, 0x1c, 0xbe, 0xba, 0xaf, 0xd9, 0x39, 0x28, 0x4d, - 0xcf, 0x45, 0x0e, 0x38, 0xc8, 0x01, 0x54, 0xb0, 0x31, 0x4d, 0x53, 0xae, 0xa9, 0x66, 0x3c, 0x2d, - 0xe8, 0xbe, 0xfd, 0x89, 0x1e, 0xce, 0x21, 0x7d, 0xa8, 0x56, 0x74, 0x3e, 0x07, 0x39, 0xe6, 0xc2, - 0x22, 0x6e, 0xa2, 0x8f, 0x7e, 0x6b, 0xa1, 0xbd, 0x13, 0x09, 0x54, 0xc3, 0x19, 0x0f, 0xa7, 0xf0, - 0x5d, 0x06, 0x4a, 0xe3, 0x27, 0x08, 0x45, 0x49, 0xa6, 0x34, 0xc8, 0x80, 0xc5, 0x5e, 0x83, 0x34, - 0x86, 0xfd, 0xc9, 0xc1, 0xc8, 0x45, 0x1d, 0x15, 0x69, 0x8d, 0x9e, 0x6b, 0xc9, 0xd2, 0xf9, 0xd7, - 0x34, 0xc9, 0x60, 0xda, 0xcb, 0xf1, 0xa7, 0x31, 0x3e, 0x46, 0x9b, 0x54, 0x08, 0x43, 0x6c, 0x56, - 0x20, 0xb6, 0xa9, 0x10, 0xa7, 0xb1, 0x89, 0x78, 0x01, 0x52, 0x31, 0x9e, 0x1a, 0x62, 0xab, 0x4a, - 0xc4, 0x1c, 0xef, 0xc8, 0x4b, 0x1e, 0x06, 0x34, 0x32, 0x07, 0xf3, 0x36, 0xaa, 0x90, 0x97, 0x3c, - 0x7c, 0x6a, 0xe1, 0xf8, 0x31, 0xea, 0x0a, 0xc9, 0x2f, 0x58, 0x0c, 0xd2, 0x6b, 0x57, 0xa0, 0xae, - 0xd1, 0xf8, 0x43, 0xd4, 0x8b, 0x99, 0x84, 0x48, 0xb3, 0x0b, 0xf0, 0x36, 0xab, 0x44, 0x5d, 0xc3, - 0x4d, 0xca, 0x32, 0x4b, 0x8d, 0xb0, 0xe6, 0xbc, 0x9d, 0x2a, 0xe4, 0x1c, 0x7f, 0x1a, 0x1f, 0xfd, - 0xde, 0x44, 0xf7, 0x4a, 0x9a, 0x29, 0xc1, 0x53, 0x05, 0xa6, 0xee, 0xa6, 0x0a, 0x15, 0x05, 0x6b, - 0x2f, 0x79, 0xe8, 0x4a, 0x57, 0x52, 0xba, 0x79, 0x57, 0xa5, 0x5b, 0x77, 0x55, 0x7a, 0xa3, 0xb6, - 0xd2, 0xa5, 0xb2, 0xb5, 0xeb, 0x95, 0xed, 0xd7, 0x0e, 0x6a, 0x9d, 0xf1, 0xf0, 0x4d, 0x29, 0x54, - 0xc9, 0x12, 0xed, 0x7a, 0x96, 0x78, 0x84, 0x36, 0x95, 0xa6, 0x3a, 0x53, 0x95, 0xba, 0x3a, 0xc7, - 0x9a, 0x90, 0x20, 0x25, 0x97, 0x41, 0xc4, 0x63, 0xb8, 0xb5, 0xa5, 0xbf, 0x3a, 0x4d, 0xf5, 0xf1, - 0x24, 0x0f, 0x69, 0xf1, 0x27, 0x3c, 0x86, 0xeb, 0x5e, 0xea, 0xd6, 0xf3, 0xd2, 0x63, 0xd4, 0x85, - 0x97, 0x10, 0x65, 0x9a, 0x4b, 0xaf, 0x57, 0xc5, 0xc1, 0x05, 0xda, 0xa4, 0xac, 0xa9, 0x7a, 0x11, - 0x44, 0x3c, 0x4b, 0xb5, 0x87, 0xaa, 0xa4, 0x6c, 0xf0, 0x27, 0x06, 0x6e, 0xc8, 0x7c, 0x95, 0x82, - 0x0c, 0x04, 0xd5, 0x0b, 0xaf, 0x5f, 0x25, 0x67, 0x8b, 0xff, 0x82, 0xea, 0xc5, 0xb5, 0xa9, 0xb3, - 0x55, 0x6b, 0xea, 0x5c, 0xb7, 0xc0, 0x76, 0x2d, 0x0b, 0xe0, 0x27, 0xa8, 0x1f, 0xd9, 0xc1, 0x11, - 0x98, 0x05, 0x6f, 0xc7, 0xb2, 0x07, 0x37, 0xd8, 0x5f, 0x16, 0x17, 0xce, 0x14, 0x39, 0xb8, 0x59, - 0x30, 0x64, 0x27, 0xb5, 0x23, 0xef, 0xfe, 0x37, 0xd9, 0xc1, 0x2d, 0x79, 0x82, 0xda, 0xf6, 0xf4, - 0xde, 0x5e, 0x15, 0x07, 0x58, 0xe8, 0xd1, 0x1f, 0x6d, 0x74, 0xff, 0x63, 0x50, 0x91, 0x64, 0xa1, - 0x99, 0x74, 0xaa, 0xb8, 0x9e, 0x3e, 0x42, 0x7d, 0x05, 0x54, 0x46, 0x8b, 0x60, 0xc5, 0x65, 0x35, - 0x17, 0x23, 0x47, 0xf8, 0x86, 0xcb, 0x18, 0x7f, 0x80, 0xba, 0x8a, 0x4b, 0x1d, 0xbc, 0x80, 0xcb, - 0x4a, 0x46, 0xee, 0x18, 0xf4, 0x67, 0x70, 0x89, 0x1f, 0xa1, 0x8e, 0x04, 0xe3, 0x31, 0xc8, 0x7d, - 0x7c, 0xf3, 0xf0, 0xcf, 0x38, 0x4f, 0x72, 0x56, 0x0e, 0xc5, 0xfb, 0xa8, 0x9d, 0xb0, 0x73, 0xa6, - 0xad, 0x85, 0xb7, 0xa7, 0xee, 0x03, 0x3f, 0x40, 0x9b, 0x7c, 0x36, 0x53, 0xa0, 0xad, 0x39, 0xb7, - 0xa7, 0xf9, 0x17, 0x7e, 0x17, 0xed, 0xc6, 0x4c, 0x89, 0x84, 0x5e, 0x06, 0x11, 0x4f, 0xb2, 0xf3, - 0xd4, 0x98, 0xb0, 0x35, 0xec, 0x4d, 0x77, 0xf2, 0xe5, 0x13, 0xb7, 0x8a, 0xdf, 0x5a, 0x4f, 0xb1, - 0xbe, 0xdd, 0x7f, 0xed, 0x9c, 0xda, 0xba, 0xeb, 0x9c, 0xda, 0xbe, 0xeb, 0x9c, 0xda, 0xa9, 0x37, - 0xa7, 0xca, 0xde, 0xdd, 0xad, 0xe5, 0xdd, 0xb2, 0x83, 0xf6, 0xfe, 0x87, 0x83, 0xee, 0xd5, 0x73, - 0xd0, 0x83, 0xf5, 0x6c, 0xc4, 0xb6, 0xec, 0xc5, 0xf4, 0xdb, 0x2f, 0xfa, 0xfb, 0xbe, 0x53, 0xc3, - 0x75, 0x30, 0x45, 0xfb, 0xd7, 0x1b, 0x38, 0xbf, 0xab, 0x0f, 0x51, 0x5f, 0x73, 0x4d, 0x93, 0x7c, - 0xf2, 0x34, 0x6c, 0x0b, 0x20, 0xbb, 0xe4, 0x86, 0xcb, 0x10, 0x75, 0x8c, 0xba, 0xa6, 0x3f, 0x9a, - 0xa4, 0x35, 0xec, 0x4f, 0x76, 0x47, 0x57, 0x2f, 0xc8, 0x91, 0xb9, 0xf6, 0x8d, 0xfa, 0xcf, 0x41, - 0x4f, 0xfe, 0x6c, 0x22, 0x74, 0xc6, 0xc3, 0xcf, 0x69, 0x4a, 0xe7, 0x20, 0xf1, 0xa7, 0xa8, 0xb7, - 0x7e, 0x1a, 0xe0, 0x83, 0x32, 0xe9, 0xd5, 0x57, 0xde, 0xe0, 0xed, 0x5b, 0x76, 0xf3, 0x1c, 0xff, - 0x69, 0xa0, 0xad, 0x72, 0xf2, 0xf8, 0xb0, 0x8c, 0x7f, 0x8d, 0x2f, 0x07, 0xe4, 0x76, 0x80, 0xfb, - 0xcf, 0xa3, 0x5f, 0x1a, 0x3f, 0x3d, 0xfd, 0xb1, 0x81, 0x7f, 0x68, 0x7c, 0x02, 0x9a, 0x2c, 0x79, - 0xe8, 0x93, 0x19, 0x4b, 0x34, 0x48, 0xb2, 0x62, 0x7a, 0x41, 0xf4, 0x02, 0x14, 0x90, 0x19, 0x83, - 0x24, 0x56, 0x43, 0xd7, 0xdc, 0x3e, 0xb9, 0xea, 0x66, 0x9f, 0xb8, 0xe6, 0xf4, 0xc9, 0x55, 0xbf, - 0xf9, 0xa4, 0x68, 0x08, 0x9f, 0x14, 0x02, 0xfb, 0xc4, 0x69, 0xe2, 0x13, 0x2b, 0xc2, 0x7b, 0x3e, - 0x89, 0x61, 0x46, 0xb3, 0x44, 0x13, 0x09, 0x3a, 0x93, 0x29, 0xa1, 0x49, 0x62, 0x82, 0xab, 0xef, - 0xff, 0xfa, 0xfb, 0xe7, 0x26, 0xc2, 0xdd, 0xf1, 0xc5, 0xfb, 0x63, 0xf3, 0xfd, 0x6c, 0xe3, 0xdb, - 0xa6, 0x08, 0xc3, 0x4d, 0xdb, 0x03, 0xc7, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x03, 0x9a, 0x48, - 0x87, 0xbf, 0x0b, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// JobManagerClient is the client API for JobManager service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type JobManagerClient interface { - CreateJob(ctx context.Context, in *CreateJobRequest, opts ...grpc.CallOption) (*CreateJobResponse, error) - // Get job, filter with these fields(job_id, cluster_id, app_id, version_id, executor, provider, status, owner), default return all jobs - DescribeJobs(ctx context.Context, in *DescribeJobsRequest, opts ...grpc.CallOption) (*DescribeJobsResponse, error) -} - -type jobManagerClient struct { - cc *grpc.ClientConn -} - -func NewJobManagerClient(cc *grpc.ClientConn) JobManagerClient { - return &jobManagerClient{cc} -} - -func (c *jobManagerClient) CreateJob(ctx context.Context, in *CreateJobRequest, opts ...grpc.CallOption) (*CreateJobResponse, error) { - out := new(CreateJobResponse) - err := c.cc.Invoke(ctx, "/openpitrix.JobManager/CreateJob", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *jobManagerClient) DescribeJobs(ctx context.Context, in *DescribeJobsRequest, opts ...grpc.CallOption) (*DescribeJobsResponse, error) { - out := new(DescribeJobsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.JobManager/DescribeJobs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// JobManagerServer is the server API for JobManager service. -type JobManagerServer interface { - CreateJob(context.Context, *CreateJobRequest) (*CreateJobResponse, error) - // Get job, filter with these fields(job_id, cluster_id, app_id, version_id, executor, provider, status, owner), default return all jobs - DescribeJobs(context.Context, *DescribeJobsRequest) (*DescribeJobsResponse, error) -} - -// UnimplementedJobManagerServer can be embedded to have forward compatible implementations. -type UnimplementedJobManagerServer struct { -} - -func (*UnimplementedJobManagerServer) CreateJob(ctx context.Context, req *CreateJobRequest) (*CreateJobResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateJob not implemented") -} -func (*UnimplementedJobManagerServer) DescribeJobs(ctx context.Context, req *DescribeJobsRequest) (*DescribeJobsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeJobs not implemented") -} - -func RegisterJobManagerServer(s *grpc.Server, srv JobManagerServer) { - s.RegisterService(&_JobManager_serviceDesc, srv) -} - -func _JobManager_CreateJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateJobRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(JobManagerServer).CreateJob(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.JobManager/CreateJob", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(JobManagerServer).CreateJob(ctx, req.(*CreateJobRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _JobManager_DescribeJobs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeJobsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(JobManagerServer).DescribeJobs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.JobManager/DescribeJobs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(JobManagerServer).DescribeJobs(ctx, req.(*DescribeJobsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _JobManager_serviceDesc = grpc.ServiceDesc{ - ServiceName: "openpitrix.JobManager", - HandlerType: (*JobManagerServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateJob", - Handler: _JobManager_CreateJob_Handler, - }, - { - MethodName: "DescribeJobs", - Handler: _JobManager_DescribeJobs_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "job.proto", -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/job.pb.gw.go b/vendor/openpitrix.io/openpitrix/pkg/pb/job.pb.gw.go deleted file mode 100644 index a737761ef..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/job.pb.gw.go +++ /dev/null @@ -1,162 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: job.proto - -/* -Package pb is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package pb - -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/status" -) - -// 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 ( - filter_JobManager_DescribeJobs_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_JobManager_DescribeJobs_0(ctx context.Context, marshaler runtime.Marshaler, client JobManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeJobsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_JobManager_DescribeJobs_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeJobs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_JobManager_DescribeJobs_0(ctx context.Context, marshaler runtime.Marshaler, server JobManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeJobsRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_JobManager_DescribeJobs_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeJobs(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterJobManagerHandlerServer registers the http handlers for service JobManager to "mux". -// UnaryRPC :call JobManagerServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterJobManagerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server JobManagerServer) error { - - mux.Handle("GET", pattern_JobManager_DescribeJobs_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_JobManager_DescribeJobs_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_JobManager_DescribeJobs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterJobManagerHandlerFromEndpoint is same as RegisterJobManagerHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterJobManagerHandlerFromEndpoint(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 RegisterJobManagerHandler(ctx, mux, conn) -} - -// RegisterJobManagerHandler registers the http handlers for service JobManager to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterJobManagerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterJobManagerHandlerClient(ctx, mux, NewJobManagerClient(conn)) -} - -// RegisterJobManagerHandlerClient registers the http handlers for service JobManager -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "JobManagerClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "JobManagerClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "JobManagerClient" to call the correct interceptors. -func RegisterJobManagerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client JobManagerClient) error { - - mux.Handle("GET", pattern_JobManager_DescribeJobs_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_JobManager_DescribeJobs_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_JobManager_DescribeJobs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_JobManager_DescribeJobs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "jobs"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_JobManager_DescribeJobs_0 = runtime.ForwardResponseMessage -) diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/market.pb.go b/vendor/openpitrix.io/openpitrix/pkg/pb/market.pb.go deleted file mode 100644 index 090707e7b..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/market.pb.go +++ /dev/null @@ -1,1377 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: market.proto - -package pb - -import ( - context "context" - fmt "fmt" - math "math" - - proto "github.com/golang/protobuf/proto" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type Market struct { - MarketId *wrappers.StringValue `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - Name *wrappers.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Visibility *wrappers.StringValue `protobuf:"bytes,3,opt,name=visibility,proto3" json:"visibility,omitempty"` - Status *wrappers.StringValue `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` - OwnerPath *wrappers.StringValue `protobuf:"bytes,5,opt,name=owner_path,json=ownerPath,proto3" json:"owner_path,omitempty"` - Description *wrappers.StringValue `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` - CreateTime *timestamp.Timestamp `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - StatusTime *timestamp.Timestamp `protobuf:"bytes,8,opt,name=status_time,json=statusTime,proto3" json:"status_time,omitempty"` - Owner *wrappers.StringValue `protobuf:"bytes,9,opt,name=owner,proto3" json:"owner,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Market) Reset() { *m = Market{} } -func (m *Market) String() string { return proto.CompactTextString(m) } -func (*Market) ProtoMessage() {} -func (*Market) Descriptor() ([]byte, []int) { - return fileDescriptor_3f90997f23a2c3f8, []int{0} -} - -func (m *Market) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Market.Unmarshal(m, b) -} -func (m *Market) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Market.Marshal(b, m, deterministic) -} -func (m *Market) XXX_Merge(src proto.Message) { - xxx_messageInfo_Market.Merge(m, src) -} -func (m *Market) XXX_Size() int { - return xxx_messageInfo_Market.Size(m) -} -func (m *Market) XXX_DiscardUnknown() { - xxx_messageInfo_Market.DiscardUnknown(m) -} - -var xxx_messageInfo_Market proto.InternalMessageInfo - -func (m *Market) GetMarketId() *wrappers.StringValue { - if m != nil { - return m.MarketId - } - return nil -} - -func (m *Market) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *Market) GetVisibility() *wrappers.StringValue { - if m != nil { - return m.Visibility - } - return nil -} - -func (m *Market) GetStatus() *wrappers.StringValue { - if m != nil { - return m.Status - } - return nil -} - -func (m *Market) GetOwnerPath() *wrappers.StringValue { - if m != nil { - return m.OwnerPath - } - return nil -} - -func (m *Market) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *Market) GetCreateTime() *timestamp.Timestamp { - if m != nil { - return m.CreateTime - } - return nil -} - -func (m *Market) GetStatusTime() *timestamp.Timestamp { - if m != nil { - return m.StatusTime - } - return nil -} - -func (m *Market) GetOwner() *wrappers.StringValue { - if m != nil { - return m.Owner - } - return nil -} - -type CreateMarketRequest struct { - Name *wrappers.StringValue `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Visibility *wrappers.StringValue `protobuf:"bytes,2,opt,name=visibility,proto3" json:"visibility,omitempty"` - Description *wrappers.StringValue `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateMarketRequest) Reset() { *m = CreateMarketRequest{} } -func (m *CreateMarketRequest) String() string { return proto.CompactTextString(m) } -func (*CreateMarketRequest) ProtoMessage() {} -func (*CreateMarketRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3f90997f23a2c3f8, []int{1} -} - -func (m *CreateMarketRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateMarketRequest.Unmarshal(m, b) -} -func (m *CreateMarketRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateMarketRequest.Marshal(b, m, deterministic) -} -func (m *CreateMarketRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateMarketRequest.Merge(m, src) -} -func (m *CreateMarketRequest) XXX_Size() int { - return xxx_messageInfo_CreateMarketRequest.Size(m) -} -func (m *CreateMarketRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateMarketRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateMarketRequest proto.InternalMessageInfo - -func (m *CreateMarketRequest) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *CreateMarketRequest) GetVisibility() *wrappers.StringValue { - if m != nil { - return m.Visibility - } - return nil -} - -func (m *CreateMarketRequest) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -type CreateMarketResponse struct { - MarketId *wrappers.StringValue `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateMarketResponse) Reset() { *m = CreateMarketResponse{} } -func (m *CreateMarketResponse) String() string { return proto.CompactTextString(m) } -func (*CreateMarketResponse) ProtoMessage() {} -func (*CreateMarketResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3f90997f23a2c3f8, []int{2} -} - -func (m *CreateMarketResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateMarketResponse.Unmarshal(m, b) -} -func (m *CreateMarketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateMarketResponse.Marshal(b, m, deterministic) -} -func (m *CreateMarketResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateMarketResponse.Merge(m, src) -} -func (m *CreateMarketResponse) XXX_Size() int { - return xxx_messageInfo_CreateMarketResponse.Size(m) -} -func (m *CreateMarketResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CreateMarketResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateMarketResponse proto.InternalMessageInfo - -func (m *CreateMarketResponse) GetMarketId() *wrappers.StringValue { - if m != nil { - return m.MarketId - } - return nil -} - -type DescribeMarketsRequest struct { - SearchWord *wrappers.StringValue `protobuf:"bytes,1,opt,name=search_word,json=searchWord,proto3" json:"search_word,omitempty"` - // sort key, order by sort_key, default create_time - SortKey *wrappers.StringValue `protobuf:"bytes,2,opt,name=sort_key,json=sortKey,proto3" json:"sort_key,omitempty"` - // value = 0 sort ASC, value = 1 sort DESC - Reverse *wrappers.BoolValue `protobuf:"bytes,3,opt,name=reverse,proto3" json:"reverse,omitempty"` - // default is 20, max value is 200 - Limit uint32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` - // default is 0 - Offset uint32 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` - MarketId []string `protobuf:"bytes,11,rep,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - Name []string `protobuf:"bytes,12,rep,name=name,proto3" json:"name,omitempty"` - Visibility []string `protobuf:"bytes,13,rep,name=visibility,proto3" json:"visibility,omitempty"` - Status []string `protobuf:"bytes,14,rep,name=status,proto3" json:"status,omitempty"` - Owner []string `protobuf:"bytes,15,rep,name=owner,proto3" json:"owner,omitempty"` - UserId []string `protobuf:"bytes,16,rep,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeMarketsRequest) Reset() { *m = DescribeMarketsRequest{} } -func (m *DescribeMarketsRequest) String() string { return proto.CompactTextString(m) } -func (*DescribeMarketsRequest) ProtoMessage() {} -func (*DescribeMarketsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3f90997f23a2c3f8, []int{3} -} - -func (m *DescribeMarketsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeMarketsRequest.Unmarshal(m, b) -} -func (m *DescribeMarketsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeMarketsRequest.Marshal(b, m, deterministic) -} -func (m *DescribeMarketsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeMarketsRequest.Merge(m, src) -} -func (m *DescribeMarketsRequest) XXX_Size() int { - return xxx_messageInfo_DescribeMarketsRequest.Size(m) -} -func (m *DescribeMarketsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeMarketsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeMarketsRequest proto.InternalMessageInfo - -func (m *DescribeMarketsRequest) GetSearchWord() *wrappers.StringValue { - if m != nil { - return m.SearchWord - } - return nil -} - -func (m *DescribeMarketsRequest) GetSortKey() *wrappers.StringValue { - if m != nil { - return m.SortKey - } - return nil -} - -func (m *DescribeMarketsRequest) GetReverse() *wrappers.BoolValue { - if m != nil { - return m.Reverse - } - return nil -} - -func (m *DescribeMarketsRequest) GetLimit() uint32 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *DescribeMarketsRequest) GetOffset() uint32 { - if m != nil { - return m.Offset - } - return 0 -} - -func (m *DescribeMarketsRequest) GetMarketId() []string { - if m != nil { - return m.MarketId - } - return nil -} - -func (m *DescribeMarketsRequest) GetName() []string { - if m != nil { - return m.Name - } - return nil -} - -func (m *DescribeMarketsRequest) GetVisibility() []string { - if m != nil { - return m.Visibility - } - return nil -} - -func (m *DescribeMarketsRequest) GetStatus() []string { - if m != nil { - return m.Status - } - return nil -} - -func (m *DescribeMarketsRequest) GetOwner() []string { - if m != nil { - return m.Owner - } - return nil -} - -func (m *DescribeMarketsRequest) GetUserId() []string { - if m != nil { - return m.UserId - } - return nil -} - -type DescribeMarketsResponse struct { - TotalCount uint32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - MarketSet []*Market `protobuf:"bytes,2,rep,name=market_set,json=marketSet,proto3" json:"market_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeMarketsResponse) Reset() { *m = DescribeMarketsResponse{} } -func (m *DescribeMarketsResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeMarketsResponse) ProtoMessage() {} -func (*DescribeMarketsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3f90997f23a2c3f8, []int{4} -} - -func (m *DescribeMarketsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeMarketsResponse.Unmarshal(m, b) -} -func (m *DescribeMarketsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeMarketsResponse.Marshal(b, m, deterministic) -} -func (m *DescribeMarketsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeMarketsResponse.Merge(m, src) -} -func (m *DescribeMarketsResponse) XXX_Size() int { - return xxx_messageInfo_DescribeMarketsResponse.Size(m) -} -func (m *DescribeMarketsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeMarketsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeMarketsResponse proto.InternalMessageInfo - -func (m *DescribeMarketsResponse) GetTotalCount() uint32 { - if m != nil { - return m.TotalCount - } - return 0 -} - -func (m *DescribeMarketsResponse) GetMarketSet() []*Market { - if m != nil { - return m.MarketSet - } - return nil -} - -type ModifyMarketRequest struct { - MarketId *wrappers.StringValue `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - Name *wrappers.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Visibility *wrappers.StringValue `protobuf:"bytes,3,opt,name=visibility,proto3" json:"visibility,omitempty"` - Status *wrappers.StringValue `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` - Description *wrappers.StringValue `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyMarketRequest) Reset() { *m = ModifyMarketRequest{} } -func (m *ModifyMarketRequest) String() string { return proto.CompactTextString(m) } -func (*ModifyMarketRequest) ProtoMessage() {} -func (*ModifyMarketRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3f90997f23a2c3f8, []int{5} -} - -func (m *ModifyMarketRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyMarketRequest.Unmarshal(m, b) -} -func (m *ModifyMarketRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyMarketRequest.Marshal(b, m, deterministic) -} -func (m *ModifyMarketRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyMarketRequest.Merge(m, src) -} -func (m *ModifyMarketRequest) XXX_Size() int { - return xxx_messageInfo_ModifyMarketRequest.Size(m) -} -func (m *ModifyMarketRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyMarketRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyMarketRequest proto.InternalMessageInfo - -func (m *ModifyMarketRequest) GetMarketId() *wrappers.StringValue { - if m != nil { - return m.MarketId - } - return nil -} - -func (m *ModifyMarketRequest) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *ModifyMarketRequest) GetVisibility() *wrappers.StringValue { - if m != nil { - return m.Visibility - } - return nil -} - -func (m *ModifyMarketRequest) GetStatus() *wrappers.StringValue { - if m != nil { - return m.Status - } - return nil -} - -func (m *ModifyMarketRequest) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -type ModifyMarketResponse struct { - MarketId *wrappers.StringValue `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyMarketResponse) Reset() { *m = ModifyMarketResponse{} } -func (m *ModifyMarketResponse) String() string { return proto.CompactTextString(m) } -func (*ModifyMarketResponse) ProtoMessage() {} -func (*ModifyMarketResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3f90997f23a2c3f8, []int{6} -} - -func (m *ModifyMarketResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyMarketResponse.Unmarshal(m, b) -} -func (m *ModifyMarketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyMarketResponse.Marshal(b, m, deterministic) -} -func (m *ModifyMarketResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyMarketResponse.Merge(m, src) -} -func (m *ModifyMarketResponse) XXX_Size() int { - return xxx_messageInfo_ModifyMarketResponse.Size(m) -} -func (m *ModifyMarketResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyMarketResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyMarketResponse proto.InternalMessageInfo - -func (m *ModifyMarketResponse) GetMarketId() *wrappers.StringValue { - if m != nil { - return m.MarketId - } - return nil -} - -type DeleteMarketsRequest struct { - MarketId []string `protobuf:"bytes,1,rep,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteMarketsRequest) Reset() { *m = DeleteMarketsRequest{} } -func (m *DeleteMarketsRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteMarketsRequest) ProtoMessage() {} -func (*DeleteMarketsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3f90997f23a2c3f8, []int{7} -} - -func (m *DeleteMarketsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteMarketsRequest.Unmarshal(m, b) -} -func (m *DeleteMarketsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteMarketsRequest.Marshal(b, m, deterministic) -} -func (m *DeleteMarketsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteMarketsRequest.Merge(m, src) -} -func (m *DeleteMarketsRequest) XXX_Size() int { - return xxx_messageInfo_DeleteMarketsRequest.Size(m) -} -func (m *DeleteMarketsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteMarketsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteMarketsRequest proto.InternalMessageInfo - -func (m *DeleteMarketsRequest) GetMarketId() []string { - if m != nil { - return m.MarketId - } - return nil -} - -type DeleteMarketsResponse struct { - MarketId []string `protobuf:"bytes,1,rep,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteMarketsResponse) Reset() { *m = DeleteMarketsResponse{} } -func (m *DeleteMarketsResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteMarketsResponse) ProtoMessage() {} -func (*DeleteMarketsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3f90997f23a2c3f8, []int{8} -} - -func (m *DeleteMarketsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteMarketsResponse.Unmarshal(m, b) -} -func (m *DeleteMarketsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteMarketsResponse.Marshal(b, m, deterministic) -} -func (m *DeleteMarketsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteMarketsResponse.Merge(m, src) -} -func (m *DeleteMarketsResponse) XXX_Size() int { - return xxx_messageInfo_DeleteMarketsResponse.Size(m) -} -func (m *DeleteMarketsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteMarketsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteMarketsResponse proto.InternalMessageInfo - -func (m *DeleteMarketsResponse) GetMarketId() []string { - if m != nil { - return m.MarketId - } - return nil -} - -type UserJoinMarketRequest struct { - MarketId []string `protobuf:"bytes,1,rep,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - UserId []string `protobuf:"bytes,2,rep,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UserJoinMarketRequest) Reset() { *m = UserJoinMarketRequest{} } -func (m *UserJoinMarketRequest) String() string { return proto.CompactTextString(m) } -func (*UserJoinMarketRequest) ProtoMessage() {} -func (*UserJoinMarketRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3f90997f23a2c3f8, []int{9} -} - -func (m *UserJoinMarketRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UserJoinMarketRequest.Unmarshal(m, b) -} -func (m *UserJoinMarketRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UserJoinMarketRequest.Marshal(b, m, deterministic) -} -func (m *UserJoinMarketRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserJoinMarketRequest.Merge(m, src) -} -func (m *UserJoinMarketRequest) XXX_Size() int { - return xxx_messageInfo_UserJoinMarketRequest.Size(m) -} -func (m *UserJoinMarketRequest) XXX_DiscardUnknown() { - xxx_messageInfo_UserJoinMarketRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_UserJoinMarketRequest proto.InternalMessageInfo - -func (m *UserJoinMarketRequest) GetMarketId() []string { - if m != nil { - return m.MarketId - } - return nil -} - -func (m *UserJoinMarketRequest) GetUserId() []string { - if m != nil { - return m.UserId - } - return nil -} - -type UserJoinMarketResponse struct { - MarketId []string `protobuf:"bytes,1,rep,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - UserId []string `protobuf:"bytes,2,rep,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UserJoinMarketResponse) Reset() { *m = UserJoinMarketResponse{} } -func (m *UserJoinMarketResponse) String() string { return proto.CompactTextString(m) } -func (*UserJoinMarketResponse) ProtoMessage() {} -func (*UserJoinMarketResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3f90997f23a2c3f8, []int{10} -} - -func (m *UserJoinMarketResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UserJoinMarketResponse.Unmarshal(m, b) -} -func (m *UserJoinMarketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UserJoinMarketResponse.Marshal(b, m, deterministic) -} -func (m *UserJoinMarketResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserJoinMarketResponse.Merge(m, src) -} -func (m *UserJoinMarketResponse) XXX_Size() int { - return xxx_messageInfo_UserJoinMarketResponse.Size(m) -} -func (m *UserJoinMarketResponse) XXX_DiscardUnknown() { - xxx_messageInfo_UserJoinMarketResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_UserJoinMarketResponse proto.InternalMessageInfo - -func (m *UserJoinMarketResponse) GetMarketId() []string { - if m != nil { - return m.MarketId - } - return nil -} - -func (m *UserJoinMarketResponse) GetUserId() []string { - if m != nil { - return m.UserId - } - return nil -} - -type UserLeaveMarketRequest struct { - MarketId []string `protobuf:"bytes,1,rep,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - UserId []string `protobuf:"bytes,2,rep,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UserLeaveMarketRequest) Reset() { *m = UserLeaveMarketRequest{} } -func (m *UserLeaveMarketRequest) String() string { return proto.CompactTextString(m) } -func (*UserLeaveMarketRequest) ProtoMessage() {} -func (*UserLeaveMarketRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3f90997f23a2c3f8, []int{11} -} - -func (m *UserLeaveMarketRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UserLeaveMarketRequest.Unmarshal(m, b) -} -func (m *UserLeaveMarketRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UserLeaveMarketRequest.Marshal(b, m, deterministic) -} -func (m *UserLeaveMarketRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserLeaveMarketRequest.Merge(m, src) -} -func (m *UserLeaveMarketRequest) XXX_Size() int { - return xxx_messageInfo_UserLeaveMarketRequest.Size(m) -} -func (m *UserLeaveMarketRequest) XXX_DiscardUnknown() { - xxx_messageInfo_UserLeaveMarketRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_UserLeaveMarketRequest proto.InternalMessageInfo - -func (m *UserLeaveMarketRequest) GetMarketId() []string { - if m != nil { - return m.MarketId - } - return nil -} - -func (m *UserLeaveMarketRequest) GetUserId() []string { - if m != nil { - return m.UserId - } - return nil -} - -type UserLeaveMarketResponse struct { - MarketId []string `protobuf:"bytes,1,rep,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - UserId []string `protobuf:"bytes,2,rep,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *UserLeaveMarketResponse) Reset() { *m = UserLeaveMarketResponse{} } -func (m *UserLeaveMarketResponse) String() string { return proto.CompactTextString(m) } -func (*UserLeaveMarketResponse) ProtoMessage() {} -func (*UserLeaveMarketResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3f90997f23a2c3f8, []int{12} -} - -func (m *UserLeaveMarketResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UserLeaveMarketResponse.Unmarshal(m, b) -} -func (m *UserLeaveMarketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UserLeaveMarketResponse.Marshal(b, m, deterministic) -} -func (m *UserLeaveMarketResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserLeaveMarketResponse.Merge(m, src) -} -func (m *UserLeaveMarketResponse) XXX_Size() int { - return xxx_messageInfo_UserLeaveMarketResponse.Size(m) -} -func (m *UserLeaveMarketResponse) XXX_DiscardUnknown() { - xxx_messageInfo_UserLeaveMarketResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_UserLeaveMarketResponse proto.InternalMessageInfo - -func (m *UserLeaveMarketResponse) GetMarketId() []string { - if m != nil { - return m.MarketId - } - return nil -} - -func (m *UserLeaveMarketResponse) GetUserId() []string { - if m != nil { - return m.UserId - } - return nil -} - -type MarketUser struct { - MarketId *wrappers.StringValue `protobuf:"bytes,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - UserId *wrappers.StringValue `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - OwnerPath *wrappers.StringValue `protobuf:"bytes,3,opt,name=owner_path,json=ownerPath,proto3" json:"owner_path,omitempty"` - CreateTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - Owner *wrappers.StringValue `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MarketUser) Reset() { *m = MarketUser{} } -func (m *MarketUser) String() string { return proto.CompactTextString(m) } -func (*MarketUser) ProtoMessage() {} -func (*MarketUser) Descriptor() ([]byte, []int) { - return fileDescriptor_3f90997f23a2c3f8, []int{13} -} - -func (m *MarketUser) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MarketUser.Unmarshal(m, b) -} -func (m *MarketUser) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MarketUser.Marshal(b, m, deterministic) -} -func (m *MarketUser) XXX_Merge(src proto.Message) { - xxx_messageInfo_MarketUser.Merge(m, src) -} -func (m *MarketUser) XXX_Size() int { - return xxx_messageInfo_MarketUser.Size(m) -} -func (m *MarketUser) XXX_DiscardUnknown() { - xxx_messageInfo_MarketUser.DiscardUnknown(m) -} - -var xxx_messageInfo_MarketUser proto.InternalMessageInfo - -func (m *MarketUser) GetMarketId() *wrappers.StringValue { - if m != nil { - return m.MarketId - } - return nil -} - -func (m *MarketUser) GetUserId() *wrappers.StringValue { - if m != nil { - return m.UserId - } - return nil -} - -func (m *MarketUser) GetOwnerPath() *wrappers.StringValue { - if m != nil { - return m.OwnerPath - } - return nil -} - -func (m *MarketUser) GetCreateTime() *timestamp.Timestamp { - if m != nil { - return m.CreateTime - } - return nil -} - -func (m *MarketUser) GetOwner() *wrappers.StringValue { - if m != nil { - return m.Owner - } - return nil -} - -type DescribeMarketUsersRequest struct { - SearchWord *wrappers.StringValue `protobuf:"bytes,1,opt,name=search_word,json=searchWord,proto3" json:"search_word,omitempty"` - // sort key, order by sort_key, default create_time - SortKey *wrappers.StringValue `protobuf:"bytes,2,opt,name=sort_key,json=sortKey,proto3" json:"sort_key,omitempty"` - // value = 0 sort ASC, value = 1 sort DESC - Reverse *wrappers.BoolValue `protobuf:"bytes,3,opt,name=reverse,proto3" json:"reverse,omitempty"` - // default is 20, max value is 200 - Limit uint32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` - // default is 0 - Offset uint32 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` - MarketId []string `protobuf:"bytes,11,rep,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` - UserId []string `protobuf:"bytes,12,rep,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - Owner []string `protobuf:"bytes,13,rep,name=owner,proto3" json:"owner,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeMarketUsersRequest) Reset() { *m = DescribeMarketUsersRequest{} } -func (m *DescribeMarketUsersRequest) String() string { return proto.CompactTextString(m) } -func (*DescribeMarketUsersRequest) ProtoMessage() {} -func (*DescribeMarketUsersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3f90997f23a2c3f8, []int{14} -} - -func (m *DescribeMarketUsersRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeMarketUsersRequest.Unmarshal(m, b) -} -func (m *DescribeMarketUsersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeMarketUsersRequest.Marshal(b, m, deterministic) -} -func (m *DescribeMarketUsersRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeMarketUsersRequest.Merge(m, src) -} -func (m *DescribeMarketUsersRequest) XXX_Size() int { - return xxx_messageInfo_DescribeMarketUsersRequest.Size(m) -} -func (m *DescribeMarketUsersRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeMarketUsersRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeMarketUsersRequest proto.InternalMessageInfo - -func (m *DescribeMarketUsersRequest) GetSearchWord() *wrappers.StringValue { - if m != nil { - return m.SearchWord - } - return nil -} - -func (m *DescribeMarketUsersRequest) GetSortKey() *wrappers.StringValue { - if m != nil { - return m.SortKey - } - return nil -} - -func (m *DescribeMarketUsersRequest) GetReverse() *wrappers.BoolValue { - if m != nil { - return m.Reverse - } - return nil -} - -func (m *DescribeMarketUsersRequest) GetLimit() uint32 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *DescribeMarketUsersRequest) GetOffset() uint32 { - if m != nil { - return m.Offset - } - return 0 -} - -func (m *DescribeMarketUsersRequest) GetMarketId() []string { - if m != nil { - return m.MarketId - } - return nil -} - -func (m *DescribeMarketUsersRequest) GetUserId() []string { - if m != nil { - return m.UserId - } - return nil -} - -func (m *DescribeMarketUsersRequest) GetOwner() []string { - if m != nil { - return m.Owner - } - return nil -} - -type DescribeMarketUsersResponse struct { - TotalCount uint32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - MarketUserSet []*MarketUser `protobuf:"bytes,2,rep,name=market_user_set,json=marketUserSet,proto3" json:"market_user_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeMarketUsersResponse) Reset() { *m = DescribeMarketUsersResponse{} } -func (m *DescribeMarketUsersResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeMarketUsersResponse) ProtoMessage() {} -func (*DescribeMarketUsersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3f90997f23a2c3f8, []int{15} -} - -func (m *DescribeMarketUsersResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeMarketUsersResponse.Unmarshal(m, b) -} -func (m *DescribeMarketUsersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeMarketUsersResponse.Marshal(b, m, deterministic) -} -func (m *DescribeMarketUsersResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeMarketUsersResponse.Merge(m, src) -} -func (m *DescribeMarketUsersResponse) XXX_Size() int { - return xxx_messageInfo_DescribeMarketUsersResponse.Size(m) -} -func (m *DescribeMarketUsersResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeMarketUsersResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeMarketUsersResponse proto.InternalMessageInfo - -func (m *DescribeMarketUsersResponse) GetTotalCount() uint32 { - if m != nil { - return m.TotalCount - } - return 0 -} - -func (m *DescribeMarketUsersResponse) GetMarketUserSet() []*MarketUser { - if m != nil { - return m.MarketUserSet - } - return nil -} - -func init() { - proto.RegisterType((*Market)(nil), "openpitrix.Market") - proto.RegisterType((*CreateMarketRequest)(nil), "openpitrix.CreateMarketRequest") - proto.RegisterType((*CreateMarketResponse)(nil), "openpitrix.CreateMarketResponse") - proto.RegisterType((*DescribeMarketsRequest)(nil), "openpitrix.DescribeMarketsRequest") - proto.RegisterType((*DescribeMarketsResponse)(nil), "openpitrix.DescribeMarketsResponse") - proto.RegisterType((*ModifyMarketRequest)(nil), "openpitrix.ModifyMarketRequest") - proto.RegisterType((*ModifyMarketResponse)(nil), "openpitrix.ModifyMarketResponse") - proto.RegisterType((*DeleteMarketsRequest)(nil), "openpitrix.DeleteMarketsRequest") - proto.RegisterType((*DeleteMarketsResponse)(nil), "openpitrix.DeleteMarketsResponse") - proto.RegisterType((*UserJoinMarketRequest)(nil), "openpitrix.UserJoinMarketRequest") - proto.RegisterType((*UserJoinMarketResponse)(nil), "openpitrix.UserJoinMarketResponse") - proto.RegisterType((*UserLeaveMarketRequest)(nil), "openpitrix.UserLeaveMarketRequest") - proto.RegisterType((*UserLeaveMarketResponse)(nil), "openpitrix.UserLeaveMarketResponse") - proto.RegisterType((*MarketUser)(nil), "openpitrix.MarketUser") - proto.RegisterType((*DescribeMarketUsersRequest)(nil), "openpitrix.DescribeMarketUsersRequest") - proto.RegisterType((*DescribeMarketUsersResponse)(nil), "openpitrix.DescribeMarketUsersResponse") -} - -func init() { proto.RegisterFile("market.proto", fileDescriptor_3f90997f23a2c3f8) } - -var fileDescriptor_3f90997f23a2c3f8 = []byte{ - // 1053 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcb, 0x6e, 0x23, 0x45, - 0x17, 0x96, 0xef, 0xc9, 0xb1, 0x3b, 0xce, 0x5f, 0x49, 0x1c, 0xcb, 0x89, 0x12, 0xff, 0x8d, 0x04, - 0x61, 0x20, 0x36, 0xe3, 0x09, 0x42, 0x30, 0x30, 0x92, 0x67, 0x46, 0x42, 0x03, 0x84, 0x8b, 0xc3, - 0x45, 0x62, 0x63, 0xb5, 0xed, 0xb2, 0x53, 0x4c, 0xbb, 0xab, 0xa9, 0x2a, 0xc7, 0x8c, 0x90, 0x40, - 0x42, 0x6c, 0x90, 0x58, 0x20, 0xc3, 0x8a, 0x67, 0x60, 0xcd, 0x13, 0xc0, 0x92, 0x15, 0xaf, 0xc0, - 0x83, 0xa0, 0xae, 0x2a, 0x27, 0xd5, 0xdd, 0x8e, 0xd3, 0x99, 0xb0, 0x42, 0xac, 0x92, 0xae, 0xf3, - 0x9d, 0x73, 0xbe, 0x3a, 0x97, 0xfa, 0x0c, 0xa5, 0xb1, 0xc3, 0x1e, 0x63, 0xd1, 0xf0, 0x19, 0x15, - 0x14, 0x01, 0xf5, 0xb1, 0xe7, 0x13, 0xc1, 0xc8, 0x17, 0xb5, 0xbd, 0x11, 0xa5, 0x23, 0x17, 0x37, - 0xa5, 0xa5, 0x37, 0x19, 0x36, 0xa7, 0xcc, 0xf1, 0x7d, 0xcc, 0xb8, 0xc2, 0xd6, 0xf6, 0xa3, 0x76, - 0x41, 0xc6, 0x98, 0x0b, 0x67, 0xec, 0x6b, 0xc0, 0xae, 0x06, 0x38, 0x3e, 0x69, 0x3a, 0x9e, 0x47, - 0x85, 0x23, 0x08, 0xf5, 0xe6, 0xee, 0x2f, 0xca, 0x3f, 0xfd, 0xc3, 0x11, 0xf6, 0x0e, 0xf9, 0xd4, - 0x19, 0x8d, 0x30, 0x6b, 0x52, 0x5f, 0x22, 0xe2, 0x68, 0xfb, 0xa7, 0x2c, 0xe4, 0x8f, 0x25, 0x53, - 0xf4, 0x2a, 0xac, 0x2a, 0xce, 0x5d, 0x32, 0xa8, 0xa6, 0xea, 0xa9, 0x83, 0x62, 0x6b, 0xb7, 0xa1, - 0x52, 0x35, 0xe6, 0x5c, 0x1a, 0x27, 0x82, 0x11, 0x6f, 0xf4, 0xb1, 0xe3, 0x4e, 0x70, 0x67, 0x45, - 0xc1, 0x1f, 0x0d, 0xd0, 0x4b, 0x90, 0xf5, 0x9c, 0x31, 0xae, 0xa6, 0x13, 0x78, 0x49, 0x24, 0x7a, - 0x1d, 0xe0, 0x8c, 0x70, 0xd2, 0x23, 0x2e, 0x11, 0x4f, 0xaa, 0x99, 0x04, 0x7e, 0x06, 0x1e, 0x1d, - 0x41, 0x9e, 0x0b, 0x47, 0x4c, 0x78, 0x35, 0x9b, 0xc0, 0x53, 0x63, 0xd1, 0x5d, 0x00, 0x3a, 0xf5, - 0x30, 0xeb, 0xfa, 0x8e, 0x38, 0xad, 0xe6, 0x12, 0x78, 0xae, 0x4a, 0xfc, 0xfb, 0x8e, 0x38, 0x45, - 0xf7, 0xa0, 0x38, 0xc0, 0xbc, 0xcf, 0x88, 0x2c, 0x65, 0x35, 0x9f, 0xc0, 0xdb, 0x74, 0x40, 0x77, - 0xa1, 0xd8, 0x67, 0xd8, 0x11, 0xb8, 0x1b, 0xb4, 0xb3, 0x5a, 0x90, 0xfe, 0xb5, 0x98, 0xff, 0x87, - 0xf3, 0x5e, 0x77, 0x40, 0xc1, 0x83, 0x83, 0xc0, 0x59, 0xdd, 0x41, 0x39, 0xaf, 0x5c, 0xed, 0xac, - 0xe0, 0xd2, 0xb9, 0x05, 0x39, 0x79, 0x8d, 0xea, 0x6a, 0x02, 0xce, 0x0a, 0x6a, 0xff, 0x9e, 0x82, - 0x8d, 0x07, 0x32, 0xbf, 0x1a, 0x8e, 0x0e, 0xfe, 0x7c, 0x82, 0xb9, 0x38, 0x6f, 0x74, 0xea, 0x29, - 0x1b, 0x9d, 0xbe, 0x66, 0xa3, 0x23, 0x55, 0xcf, 0x5c, 0xb3, 0xea, 0xf6, 0x07, 0xb0, 0x19, 0xbe, - 0x06, 0xf7, 0xa9, 0xc7, 0xf1, 0x0d, 0x66, 0xdd, 0xfe, 0x3e, 0x03, 0x95, 0x87, 0x32, 0x45, 0x4f, - 0x47, 0xe5, 0xf3, 0xea, 0xbc, 0x01, 0x45, 0x8e, 0x1d, 0xd6, 0x3f, 0xed, 0x4e, 0x29, 0x4b, 0x16, - 0x17, 0x94, 0xc3, 0x27, 0x94, 0x0d, 0xd0, 0x2b, 0xb0, 0xc2, 0x29, 0x13, 0xdd, 0xc7, 0x38, 0x59, - 0xa1, 0x0a, 0x01, 0xfa, 0x6d, 0x1c, 0xac, 0x43, 0x81, 0xe1, 0x33, 0xcc, 0x38, 0xd6, 0x15, 0x8a, - 0x8f, 0xc6, 0x7d, 0x4a, 0x5d, 0xed, 0xa5, 0xa1, 0x68, 0x13, 0x72, 0x2e, 0x19, 0x13, 0x21, 0x77, - 0xc8, 0xea, 0xa8, 0x0f, 0x54, 0x81, 0x3c, 0x1d, 0x0e, 0x39, 0x16, 0x72, 0x41, 0xac, 0x8e, 0xfe, - 0x42, 0x3b, 0x66, 0xc5, 0x8a, 0xf5, 0xcc, 0xc1, 0xaa, 0xb1, 0xff, 0x48, 0x8f, 0x45, 0x49, 0x9e, - 0xab, 0xc6, 0xef, 0x85, 0x1a, 0x6f, 0x49, 0x8b, 0xd9, 0xda, 0xca, 0xf9, 0x0e, 0xaf, 0x49, 0xdb, - 0x7c, 0x4b, 0x37, 0xe7, 0xe3, 0x5a, 0x96, 0xc7, 0xea, 0x03, 0x6d, 0x43, 0x61, 0xc2, 0x31, 0x0b, - 0x92, 0xaf, 0x2b, 0x78, 0xf0, 0xf9, 0x68, 0x60, 0x8f, 0x61, 0x3b, 0xd6, 0x0d, 0xdd, 0xe4, 0x7d, - 0x28, 0x0a, 0x2a, 0x1c, 0xb7, 0xdb, 0xa7, 0x13, 0x4f, 0xc8, 0x76, 0x58, 0x1d, 0x90, 0x47, 0x0f, - 0x82, 0x13, 0x74, 0x1b, 0x40, 0xdf, 0x29, 0xb8, 0x6f, 0xba, 0x9e, 0x39, 0x28, 0xb6, 0x50, 0xe3, - 0xe2, 0xa9, 0x6e, 0xe8, 0xa9, 0xd1, 0x37, 0x3f, 0xc1, 0xc2, 0xfe, 0x35, 0x0d, 0x1b, 0xc7, 0x74, - 0x40, 0x86, 0x4f, 0xc2, 0x8b, 0xf1, 0xaf, 0x7f, 0x3c, 0x23, 0x9b, 0x98, 0x7b, 0x8a, 0x4d, 0x0c, - 0xd7, 0xed, 0xe6, 0x9b, 0x78, 0x07, 0x36, 0x1f, 0x62, 0x17, 0x8b, 0xe8, 0x1a, 0xee, 0x84, 0x43, - 0x86, 0x46, 0xd5, 0x3e, 0x82, 0xad, 0x88, 0x93, 0x26, 0xb2, 0xd4, 0xeb, 0x18, 0xb6, 0x3e, 0xe2, - 0x98, 0xbd, 0x45, 0x89, 0x17, 0xee, 0xfb, 0x32, 0x2f, 0x73, 0x68, 0xd3, 0xa1, 0xa1, 0x7d, 0x17, - 0x2a, 0xd1, 0x70, 0x09, 0x58, 0x5c, 0x19, 0xef, 0x1d, 0xec, 0x9c, 0xe1, 0x7f, 0x82, 0xdf, 0x7b, - 0xb0, 0x1d, 0x8b, 0x77, 0x23, 0x82, 0xbf, 0xa4, 0x01, 0x54, 0xa0, 0x20, 0xee, 0x4d, 0xb6, 0xe5, - 0x65, 0x33, 0x45, 0x82, 0xf1, 0x55, 0x04, 0x22, 0xda, 0x9f, 0xb9, 0x9e, 0xf6, 0x47, 0xb4, 0x3b, - 0x7b, 0x2d, 0xed, 0x3e, 0x97, 0xdf, 0x5c, 0x72, 0xf9, 0xfd, 0x2d, 0x0d, 0xb5, 0xf0, 0xab, 0x16, - 0x94, 0xed, 0x3f, 0x9d, 0x31, 0xe6, 0xab, 0x64, 0xce, 0xd7, 0x85, 0x68, 0x58, 0x86, 0x68, 0xd8, - 0x5f, 0xc1, 0xce, 0xc2, 0x2a, 0x26, 0xd5, 0x87, 0x7b, 0x50, 0xd6, 0x5c, 0x64, 0xd6, 0x0b, 0x91, - 0xa8, 0xc4, 0x45, 0x22, 0x08, 0xdd, 0xb1, 0xc6, 0xe7, 0xff, 0x9f, 0x60, 0xd1, 0xfa, 0xa3, 0x00, - 0x96, 0xb2, 0x1e, 0x3b, 0x9e, 0x33, 0xc2, 0x0c, 0x7d, 0x09, 0x25, 0xf3, 0xf7, 0x08, 0xda, 0x37, - 0x03, 0x2d, 0xf8, 0xc1, 0x55, 0xab, 0x5f, 0x0e, 0x50, 0xb7, 0xb0, 0x0f, 0x66, 0xed, 0x32, 0xb2, - 0x94, 0xa9, 0xae, 0xf2, 0x7f, 0xf3, 0xe7, 0x5f, 0x3f, 0xa6, 0xd7, 0xed, 0x62, 0xf3, 0xec, 0x76, - 0x53, 0x9d, 0xf0, 0xd7, 0x52, 0xb7, 0xd0, 0x0f, 0x29, 0x28, 0x47, 0xb4, 0x12, 0xd9, 0x66, 0xfc, - 0xc5, 0x3f, 0x6b, 0x6a, 0xcf, 0x2c, 0xc5, 0x68, 0x1a, 0x47, 0xb3, 0xf6, 0x1e, 0xda, 0x9d, 0x5b, - 0x35, 0x11, 0x5e, 0x9f, 0x12, 0x71, 0x5a, 0x1f, 0x12, 0x57, 0x60, 0x26, 0x59, 0x59, 0xc8, 0x64, - 0x15, 0xd4, 0xc3, 0x54, 0x85, 0x70, 0x3d, 0x16, 0xe8, 0x6c, 0xb8, 0x1e, 0x8b, 0x04, 0x45, 0xd7, - 0x43, 0x99, 0x42, 0xf5, 0x68, 0x45, 0xeb, 0xf1, 0x35, 0x58, 0x21, 0x29, 0x40, 0xf5, 0xf0, 0x45, - 0xe3, 0xd2, 0x52, 0xfb, 0xff, 0x12, 0x84, 0xce, 0xff, 0xfc, 0xac, 0xbd, 0x8e, 0xd6, 0x94, 0x6d, - 0x5e, 0x06, 0x45, 0xe0, 0x56, 0x94, 0xc0, 0xb7, 0x29, 0x58, 0x0b, 0xeb, 0x00, 0x0a, 0x25, 0x58, - 0x28, 0x39, 0x35, 0x7b, 0x19, 0x44, 0x93, 0x78, 0x61, 0xd6, 0xb6, 0x50, 0x31, 0x30, 0x98, 0x25, - 0xd8, 0xb2, 0xd7, 0x4d, 0x06, 0x9f, 0x51, 0xe2, 0x05, 0x34, 0xbe, 0x4b, 0x41, 0x39, 0xf2, 0xdc, - 0xa3, 0x58, 0x92, 0xb8, 0xb6, 0x84, 0xe7, 0xe2, 0x12, 0xbd, 0xb0, 0x0f, 0x67, 0xed, 0x35, 0x54, - 0x92, 0x16, 0x93, 0x4a, 0xc5, 0xfe, 0x9f, 0x49, 0xc5, 0x0d, 0xec, 0x01, 0x97, 0x9f, 0x53, 0xb0, - 0xb1, 0x60, 0x67, 0xd1, 0xb3, 0x97, 0xcf, 0xa0, 0xf9, 0x34, 0xd6, 0x9e, 0xbb, 0x12, 0xa7, 0x79, - 0xb5, 0x66, 0xed, 0x6d, 0xb4, 0xf5, 0x26, 0x16, 0xf5, 0x60, 0xb7, 0xe3, 0x83, 0x8a, 0x90, 0x51, - 0x2b, 0xb9, 0xff, 0xfc, 0x7e, 0xf6, 0xd3, 0xb4, 0xdf, 0xeb, 0xe5, 0xe5, 0x63, 0x77, 0xe7, 0xef, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, 0xb6, 0xd8, 0x65, 0xe2, 0x0f, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// MarketManagerClient is the client API for MarketManager service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MarketManagerClient interface { - CreateMarket(ctx context.Context, in *CreateMarketRequest, opts ...grpc.CallOption) (*CreateMarketResponse, error) - DescribeMarkets(ctx context.Context, in *DescribeMarketsRequest, opts ...grpc.CallOption) (*DescribeMarketsResponse, error) - ModifyMarket(ctx context.Context, in *ModifyMarketRequest, opts ...grpc.CallOption) (*ModifyMarketResponse, error) - DeleteMarkets(ctx context.Context, in *DeleteMarketsRequest, opts ...grpc.CallOption) (*DeleteMarketsResponse, error) - UserJoinMarket(ctx context.Context, in *UserJoinMarketRequest, opts ...grpc.CallOption) (*UserJoinMarketResponse, error) - UserLeaveMarket(ctx context.Context, in *UserLeaveMarketRequest, opts ...grpc.CallOption) (*UserLeaveMarketResponse, error) - DescribeMarketUsers(ctx context.Context, in *DescribeMarketUsersRequest, opts ...grpc.CallOption) (*DescribeMarketUsersResponse, error) -} - -type marketManagerClient struct { - cc *grpc.ClientConn -} - -func NewMarketManagerClient(cc *grpc.ClientConn) MarketManagerClient { - return &marketManagerClient{cc} -} - -func (c *marketManagerClient) CreateMarket(ctx context.Context, in *CreateMarketRequest, opts ...grpc.CallOption) (*CreateMarketResponse, error) { - out := new(CreateMarketResponse) - err := c.cc.Invoke(ctx, "/openpitrix.MarketManager/CreateMarket", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *marketManagerClient) DescribeMarkets(ctx context.Context, in *DescribeMarketsRequest, opts ...grpc.CallOption) (*DescribeMarketsResponse, error) { - out := new(DescribeMarketsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.MarketManager/DescribeMarkets", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *marketManagerClient) ModifyMarket(ctx context.Context, in *ModifyMarketRequest, opts ...grpc.CallOption) (*ModifyMarketResponse, error) { - out := new(ModifyMarketResponse) - err := c.cc.Invoke(ctx, "/openpitrix.MarketManager/ModifyMarket", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *marketManagerClient) DeleteMarkets(ctx context.Context, in *DeleteMarketsRequest, opts ...grpc.CallOption) (*DeleteMarketsResponse, error) { - out := new(DeleteMarketsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.MarketManager/DeleteMarkets", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *marketManagerClient) UserJoinMarket(ctx context.Context, in *UserJoinMarketRequest, opts ...grpc.CallOption) (*UserJoinMarketResponse, error) { - out := new(UserJoinMarketResponse) - err := c.cc.Invoke(ctx, "/openpitrix.MarketManager/UserJoinMarket", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *marketManagerClient) UserLeaveMarket(ctx context.Context, in *UserLeaveMarketRequest, opts ...grpc.CallOption) (*UserLeaveMarketResponse, error) { - out := new(UserLeaveMarketResponse) - err := c.cc.Invoke(ctx, "/openpitrix.MarketManager/UserLeaveMarket", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *marketManagerClient) DescribeMarketUsers(ctx context.Context, in *DescribeMarketUsersRequest, opts ...grpc.CallOption) (*DescribeMarketUsersResponse, error) { - out := new(DescribeMarketUsersResponse) - err := c.cc.Invoke(ctx, "/openpitrix.MarketManager/DescribeMarketUsers", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MarketManagerServer is the server API for MarketManager service. -type MarketManagerServer interface { - CreateMarket(context.Context, *CreateMarketRequest) (*CreateMarketResponse, error) - DescribeMarkets(context.Context, *DescribeMarketsRequest) (*DescribeMarketsResponse, error) - ModifyMarket(context.Context, *ModifyMarketRequest) (*ModifyMarketResponse, error) - DeleteMarkets(context.Context, *DeleteMarketsRequest) (*DeleteMarketsResponse, error) - UserJoinMarket(context.Context, *UserJoinMarketRequest) (*UserJoinMarketResponse, error) - UserLeaveMarket(context.Context, *UserLeaveMarketRequest) (*UserLeaveMarketResponse, error) - DescribeMarketUsers(context.Context, *DescribeMarketUsersRequest) (*DescribeMarketUsersResponse, error) -} - -// UnimplementedMarketManagerServer can be embedded to have forward compatible implementations. -type UnimplementedMarketManagerServer struct { -} - -func (*UnimplementedMarketManagerServer) CreateMarket(ctx context.Context, req *CreateMarketRequest) (*CreateMarketResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateMarket not implemented") -} -func (*UnimplementedMarketManagerServer) DescribeMarkets(ctx context.Context, req *DescribeMarketsRequest) (*DescribeMarketsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeMarkets not implemented") -} -func (*UnimplementedMarketManagerServer) ModifyMarket(ctx context.Context, req *ModifyMarketRequest) (*ModifyMarketResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ModifyMarket not implemented") -} -func (*UnimplementedMarketManagerServer) DeleteMarkets(ctx context.Context, req *DeleteMarketsRequest) (*DeleteMarketsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteMarkets not implemented") -} -func (*UnimplementedMarketManagerServer) UserJoinMarket(ctx context.Context, req *UserJoinMarketRequest) (*UserJoinMarketResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserJoinMarket not implemented") -} -func (*UnimplementedMarketManagerServer) UserLeaveMarket(ctx context.Context, req *UserLeaveMarketRequest) (*UserLeaveMarketResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserLeaveMarket not implemented") -} -func (*UnimplementedMarketManagerServer) DescribeMarketUsers(ctx context.Context, req *DescribeMarketUsersRequest) (*DescribeMarketUsersResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeMarketUsers not implemented") -} - -func RegisterMarketManagerServer(s *grpc.Server, srv MarketManagerServer) { - s.RegisterService(&_MarketManager_serviceDesc, srv) -} - -func _MarketManager_CreateMarket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateMarketRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MarketManagerServer).CreateMarket(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.MarketManager/CreateMarket", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MarketManagerServer).CreateMarket(ctx, req.(*CreateMarketRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MarketManager_DescribeMarkets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeMarketsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MarketManagerServer).DescribeMarkets(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.MarketManager/DescribeMarkets", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MarketManagerServer).DescribeMarkets(ctx, req.(*DescribeMarketsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MarketManager_ModifyMarket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ModifyMarketRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MarketManagerServer).ModifyMarket(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.MarketManager/ModifyMarket", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MarketManagerServer).ModifyMarket(ctx, req.(*ModifyMarketRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MarketManager_DeleteMarkets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteMarketsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MarketManagerServer).DeleteMarkets(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.MarketManager/DeleteMarkets", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MarketManagerServer).DeleteMarkets(ctx, req.(*DeleteMarketsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MarketManager_UserJoinMarket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UserJoinMarketRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MarketManagerServer).UserJoinMarket(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.MarketManager/UserJoinMarket", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MarketManagerServer).UserJoinMarket(ctx, req.(*UserJoinMarketRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MarketManager_UserLeaveMarket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UserLeaveMarketRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MarketManagerServer).UserLeaveMarket(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.MarketManager/UserLeaveMarket", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MarketManagerServer).UserLeaveMarket(ctx, req.(*UserLeaveMarketRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _MarketManager_DescribeMarketUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeMarketUsersRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MarketManagerServer).DescribeMarketUsers(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.MarketManager/DescribeMarketUsers", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MarketManagerServer).DescribeMarketUsers(ctx, req.(*DescribeMarketUsersRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _MarketManager_serviceDesc = grpc.ServiceDesc{ - ServiceName: "openpitrix.MarketManager", - HandlerType: (*MarketManagerServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateMarket", - Handler: _MarketManager_CreateMarket_Handler, - }, - { - MethodName: "DescribeMarkets", - Handler: _MarketManager_DescribeMarkets_Handler, - }, - { - MethodName: "ModifyMarket", - Handler: _MarketManager_ModifyMarket_Handler, - }, - { - MethodName: "DeleteMarkets", - Handler: _MarketManager_DeleteMarkets_Handler, - }, - { - MethodName: "UserJoinMarket", - Handler: _MarketManager_UserJoinMarket_Handler, - }, - { - MethodName: "UserLeaveMarket", - Handler: _MarketManager_UserLeaveMarket_Handler, - }, - { - MethodName: "DescribeMarketUsers", - Handler: _MarketManager_DescribeMarketUsers_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "market.proto", -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/market.pb.gw.go b/vendor/openpitrix.io/openpitrix/pkg/pb/market.pb.gw.go deleted file mode 100644 index 0cbea0f68..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/market.pb.gw.go +++ /dev/null @@ -1,629 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: market.proto - -/* -Package pb is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package pb - -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/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage - -func request_MarketManager_CreateMarket_0(ctx context.Context, marshaler runtime.Marshaler, client MarketManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateMarketRequest - 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.CreateMarket(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_MarketManager_CreateMarket_0(ctx context.Context, marshaler runtime.Marshaler, server MarketManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateMarketRequest - 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.CreateMarket(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_MarketManager_DescribeMarkets_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_MarketManager_DescribeMarkets_0(ctx context.Context, marshaler runtime.Marshaler, client MarketManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeMarketsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MarketManager_DescribeMarkets_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeMarkets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_MarketManager_DescribeMarkets_0(ctx context.Context, marshaler runtime.Marshaler, server MarketManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeMarketsRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_MarketManager_DescribeMarkets_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeMarkets(ctx, &protoReq) - return msg, metadata, err - -} - -func request_MarketManager_ModifyMarket_0(ctx context.Context, marshaler runtime.Marshaler, client MarketManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyMarketRequest - 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.ModifyMarket(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_MarketManager_ModifyMarket_0(ctx context.Context, marshaler runtime.Marshaler, server MarketManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyMarketRequest - 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.ModifyMarket(ctx, &protoReq) - return msg, metadata, err - -} - -func request_MarketManager_DeleteMarkets_0(ctx context.Context, marshaler runtime.Marshaler, client MarketManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteMarketsRequest - 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.DeleteMarkets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_MarketManager_DeleteMarkets_0(ctx context.Context, marshaler runtime.Marshaler, server MarketManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteMarketsRequest - 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.DeleteMarkets(ctx, &protoReq) - return msg, metadata, err - -} - -func request_MarketManager_UserJoinMarket_0(ctx context.Context, marshaler runtime.Marshaler, client MarketManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UserJoinMarketRequest - 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.UserJoinMarket(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_MarketManager_UserJoinMarket_0(ctx context.Context, marshaler runtime.Marshaler, server MarketManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UserJoinMarketRequest - 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.UserJoinMarket(ctx, &protoReq) - return msg, metadata, err - -} - -func request_MarketManager_UserLeaveMarket_0(ctx context.Context, marshaler runtime.Marshaler, client MarketManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UserLeaveMarketRequest - 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.UserLeaveMarket(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_MarketManager_UserLeaveMarket_0(ctx context.Context, marshaler runtime.Marshaler, server MarketManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UserLeaveMarketRequest - 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.UserLeaveMarket(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_MarketManager_DescribeMarketUsers_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_MarketManager_DescribeMarketUsers_0(ctx context.Context, marshaler runtime.Marshaler, client MarketManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeMarketUsersRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_MarketManager_DescribeMarketUsers_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeMarketUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_MarketManager_DescribeMarketUsers_0(ctx context.Context, marshaler runtime.Marshaler, server MarketManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeMarketUsersRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_MarketManager_DescribeMarketUsers_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeMarketUsers(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterMarketManagerHandlerServer registers the http handlers for service MarketManager to "mux". -// UnaryRPC :call MarketManagerServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterMarketManagerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MarketManagerServer) error { - - mux.Handle("POST", pattern_MarketManager_CreateMarket_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_MarketManager_CreateMarket_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_MarketManager_CreateMarket_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_MarketManager_DescribeMarkets_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_MarketManager_DescribeMarkets_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_MarketManager_DescribeMarkets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_MarketManager_ModifyMarket_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_MarketManager_ModifyMarket_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_MarketManager_ModifyMarket_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_MarketManager_DeleteMarkets_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_MarketManager_DeleteMarkets_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_MarketManager_DeleteMarkets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_MarketManager_UserJoinMarket_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_MarketManager_UserJoinMarket_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_MarketManager_UserJoinMarket_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_MarketManager_UserLeaveMarket_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_MarketManager_UserLeaveMarket_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_MarketManager_UserLeaveMarket_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_MarketManager_DescribeMarketUsers_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_MarketManager_DescribeMarketUsers_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_MarketManager_DescribeMarketUsers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterMarketManagerHandlerFromEndpoint is same as RegisterMarketManagerHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterMarketManagerHandlerFromEndpoint(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 RegisterMarketManagerHandler(ctx, mux, conn) -} - -// RegisterMarketManagerHandler registers the http handlers for service MarketManager to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterMarketManagerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterMarketManagerHandlerClient(ctx, mux, NewMarketManagerClient(conn)) -} - -// RegisterMarketManagerHandlerClient registers the http handlers for service MarketManager -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MarketManagerClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MarketManagerClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "MarketManagerClient" to call the correct interceptors. -func RegisterMarketManagerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MarketManagerClient) error { - - mux.Handle("POST", pattern_MarketManager_CreateMarket_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_MarketManager_CreateMarket_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_MarketManager_CreateMarket_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_MarketManager_DescribeMarkets_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_MarketManager_DescribeMarkets_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_MarketManager_DescribeMarkets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_MarketManager_ModifyMarket_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_MarketManager_ModifyMarket_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_MarketManager_ModifyMarket_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_MarketManager_DeleteMarkets_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_MarketManager_DeleteMarkets_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_MarketManager_DeleteMarkets_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_MarketManager_UserJoinMarket_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_MarketManager_UserJoinMarket_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_MarketManager_UserJoinMarket_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_MarketManager_UserLeaveMarket_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_MarketManager_UserLeaveMarket_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_MarketManager_UserLeaveMarket_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_MarketManager_DescribeMarketUsers_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_MarketManager_DescribeMarketUsers_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_MarketManager_DescribeMarketUsers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_MarketManager_CreateMarket_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "markets"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_MarketManager_DescribeMarkets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "markets"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_MarketManager_ModifyMarket_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "markets"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_MarketManager_DeleteMarkets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "markets"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_MarketManager_UserJoinMarket_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "markets"}, "join", runtime.AssumeColonVerbOpt(true))) - - pattern_MarketManager_UserLeaveMarket_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "markets"}, "leave", runtime.AssumeColonVerbOpt(true))) - - pattern_MarketManager_DescribeMarketUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "market_users"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_MarketManager_CreateMarket_0 = runtime.ForwardResponseMessage - - forward_MarketManager_DescribeMarkets_0 = runtime.ForwardResponseMessage - - forward_MarketManager_ModifyMarket_0 = runtime.ForwardResponseMessage - - forward_MarketManager_DeleteMarkets_0 = runtime.ForwardResponseMessage - - forward_MarketManager_UserJoinMarket_0 = runtime.ForwardResponseMessage - - forward_MarketManager_UserLeaveMarket_0 = runtime.ForwardResponseMessage - - forward_MarketManager_DescribeMarketUsers_0 = runtime.ForwardResponseMessage -) diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/repo.pb.go b/vendor/openpitrix.io/openpitrix/pkg/pb/repo.pb.go deleted file mode 100644 index a345790a2..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/repo.pb.go +++ /dev/null @@ -1,1460 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: repo.proto - -package pb - -import ( - context "context" - fmt "fmt" - math "math" - - proto "github.com/golang/protobuf/proto" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type CreateRepoRequest struct { - // required, repository name - Name *wrappers.StringValue `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // repository description - Description *wrappers.StringValue `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - // repository type - Type *wrappers.StringValue `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` - // required, url of visiting the repository - Url *wrappers.StringValue `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"` - // required, credential of visiting the repository - Credential *wrappers.StringValue `protobuf:"bytes,5,opt,name=credential,proto3" json:"credential,omitempty"` - // required, visibility eg:[public|private] - Visibility *wrappers.StringValue `protobuf:"bytes,6,opt,name=visibility,proto3" json:"visibility,omitempty"` - // required, runtime provider eg.[qingcloud|aliyun|aws|kubernetes] - Providers []string `protobuf:"bytes,7,rep,name=providers,proto3" json:"providers,omitempty"` - // a kv string, tags of server - Labels *wrappers.StringValue `protobuf:"bytes,8,opt,name=labels,proto3" json:"labels,omitempty"` - // selectors of label - Selectors *wrappers.StringValue `protobuf:"bytes,9,opt,name=selectors,proto3" json:"selectors,omitempty"` - // category id - CategoryId *wrappers.StringValue `protobuf:"bytes,10,opt,name=category_id,json=categoryId,proto3" json:"category_id,omitempty"` - // required app default status.eg:[draft|active] - AppDefaultStatus *wrappers.StringValue `protobuf:"bytes,11,opt,name=app_default_status,json=appDefaultStatus,proto3" json:"app_default_status,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateRepoRequest) Reset() { *m = CreateRepoRequest{} } -func (m *CreateRepoRequest) String() string { return proto.CompactTextString(m) } -func (*CreateRepoRequest) ProtoMessage() {} -func (*CreateRepoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9a6377fc15c39a05, []int{0} -} - -func (m *CreateRepoRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateRepoRequest.Unmarshal(m, b) -} -func (m *CreateRepoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateRepoRequest.Marshal(b, m, deterministic) -} -func (m *CreateRepoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateRepoRequest.Merge(m, src) -} -func (m *CreateRepoRequest) XXX_Size() int { - return xxx_messageInfo_CreateRepoRequest.Size(m) -} -func (m *CreateRepoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateRepoRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateRepoRequest proto.InternalMessageInfo - -func (m *CreateRepoRequest) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *CreateRepoRequest) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *CreateRepoRequest) GetType() *wrappers.StringValue { - if m != nil { - return m.Type - } - return nil -} - -func (m *CreateRepoRequest) GetUrl() *wrappers.StringValue { - if m != nil { - return m.Url - } - return nil -} - -func (m *CreateRepoRequest) GetCredential() *wrappers.StringValue { - if m != nil { - return m.Credential - } - return nil -} - -func (m *CreateRepoRequest) GetVisibility() *wrappers.StringValue { - if m != nil { - return m.Visibility - } - return nil -} - -func (m *CreateRepoRequest) GetProviders() []string { - if m != nil { - return m.Providers - } - return nil -} - -func (m *CreateRepoRequest) GetLabels() *wrappers.StringValue { - if m != nil { - return m.Labels - } - return nil -} - -func (m *CreateRepoRequest) GetSelectors() *wrappers.StringValue { - if m != nil { - return m.Selectors - } - return nil -} - -func (m *CreateRepoRequest) GetCategoryId() *wrappers.StringValue { - if m != nil { - return m.CategoryId - } - return nil -} - -func (m *CreateRepoRequest) GetAppDefaultStatus() *wrappers.StringValue { - if m != nil { - return m.AppDefaultStatus - } - return nil -} - -type CreateRepoResponse struct { - // id of repository created - RepoId *wrappers.StringValue `protobuf:"bytes,1,opt,name=repo_id,json=repoId,proto3" json:"repo_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateRepoResponse) Reset() { *m = CreateRepoResponse{} } -func (m *CreateRepoResponse) String() string { return proto.CompactTextString(m) } -func (*CreateRepoResponse) ProtoMessage() {} -func (*CreateRepoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9a6377fc15c39a05, []int{1} -} - -func (m *CreateRepoResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateRepoResponse.Unmarshal(m, b) -} -func (m *CreateRepoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateRepoResponse.Marshal(b, m, deterministic) -} -func (m *CreateRepoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateRepoResponse.Merge(m, src) -} -func (m *CreateRepoResponse) XXX_Size() int { - return xxx_messageInfo_CreateRepoResponse.Size(m) -} -func (m *CreateRepoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CreateRepoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateRepoResponse proto.InternalMessageInfo - -func (m *CreateRepoResponse) GetRepoId() *wrappers.StringValue { - if m != nil { - return m.RepoId - } - return nil -} - -type ModifyRepoRequest struct { - // required, id of repository to modify - RepoId *wrappers.StringValue `protobuf:"bytes,1,opt,name=repo_id,json=repoId,proto3" json:"repo_id,omitempty"` - // repository name - Name *wrappers.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // repository description - Description *wrappers.StringValue `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - // repository type - Type *wrappers.StringValue `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` - // url of visiting the repository - Url *wrappers.StringValue `protobuf:"bytes,5,opt,name=url,proto3" json:"url,omitempty"` - // credential of visiting the repository - Credential *wrappers.StringValue `protobuf:"bytes,6,opt,name=credential,proto3" json:"credential,omitempty"` - // visibility eg:[public|private] - Visibility *wrappers.StringValue `protobuf:"bytes,7,opt,name=visibility,proto3" json:"visibility,omitempty"` - // runtime provider eg.[qingcloud|aliyun|aws|kubernetes] - Providers []string `protobuf:"bytes,8,rep,name=providers,proto3" json:"providers,omitempty"` - // a kv string, tags of server - Labels *wrappers.StringValue `protobuf:"bytes,9,opt,name=labels,proto3" json:"labels,omitempty"` - // selectors of label - Selectors *wrappers.StringValue `protobuf:"bytes,10,opt,name=selectors,proto3" json:"selectors,omitempty"` - // category id - CategoryId *wrappers.StringValue `protobuf:"bytes,11,opt,name=category_id,json=categoryId,proto3" json:"category_id,omitempty"` - // app default status eg:[draft|active] - AppDefaultStatus *wrappers.StringValue `protobuf:"bytes,12,opt,name=app_default_status,json=appDefaultStatus,proto3" json:"app_default_status,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyRepoRequest) Reset() { *m = ModifyRepoRequest{} } -func (m *ModifyRepoRequest) String() string { return proto.CompactTextString(m) } -func (*ModifyRepoRequest) ProtoMessage() {} -func (*ModifyRepoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9a6377fc15c39a05, []int{2} -} - -func (m *ModifyRepoRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyRepoRequest.Unmarshal(m, b) -} -func (m *ModifyRepoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyRepoRequest.Marshal(b, m, deterministic) -} -func (m *ModifyRepoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyRepoRequest.Merge(m, src) -} -func (m *ModifyRepoRequest) XXX_Size() int { - return xxx_messageInfo_ModifyRepoRequest.Size(m) -} -func (m *ModifyRepoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyRepoRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyRepoRequest proto.InternalMessageInfo - -func (m *ModifyRepoRequest) GetRepoId() *wrappers.StringValue { - if m != nil { - return m.RepoId - } - return nil -} - -func (m *ModifyRepoRequest) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *ModifyRepoRequest) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *ModifyRepoRequest) GetType() *wrappers.StringValue { - if m != nil { - return m.Type - } - return nil -} - -func (m *ModifyRepoRequest) GetUrl() *wrappers.StringValue { - if m != nil { - return m.Url - } - return nil -} - -func (m *ModifyRepoRequest) GetCredential() *wrappers.StringValue { - if m != nil { - return m.Credential - } - return nil -} - -func (m *ModifyRepoRequest) GetVisibility() *wrappers.StringValue { - if m != nil { - return m.Visibility - } - return nil -} - -func (m *ModifyRepoRequest) GetProviders() []string { - if m != nil { - return m.Providers - } - return nil -} - -func (m *ModifyRepoRequest) GetLabels() *wrappers.StringValue { - if m != nil { - return m.Labels - } - return nil -} - -func (m *ModifyRepoRequest) GetSelectors() *wrappers.StringValue { - if m != nil { - return m.Selectors - } - return nil -} - -func (m *ModifyRepoRequest) GetCategoryId() *wrappers.StringValue { - if m != nil { - return m.CategoryId - } - return nil -} - -func (m *ModifyRepoRequest) GetAppDefaultStatus() *wrappers.StringValue { - if m != nil { - return m.AppDefaultStatus - } - return nil -} - -type ModifyRepoResponse struct { - // id of repository modified - RepoId *wrappers.StringValue `protobuf:"bytes,1,opt,name=repo_id,json=repoId,proto3" json:"repo_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyRepoResponse) Reset() { *m = ModifyRepoResponse{} } -func (m *ModifyRepoResponse) String() string { return proto.CompactTextString(m) } -func (*ModifyRepoResponse) ProtoMessage() {} -func (*ModifyRepoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9a6377fc15c39a05, []int{3} -} - -func (m *ModifyRepoResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyRepoResponse.Unmarshal(m, b) -} -func (m *ModifyRepoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyRepoResponse.Marshal(b, m, deterministic) -} -func (m *ModifyRepoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyRepoResponse.Merge(m, src) -} -func (m *ModifyRepoResponse) XXX_Size() int { - return xxx_messageInfo_ModifyRepoResponse.Size(m) -} -func (m *ModifyRepoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyRepoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyRepoResponse proto.InternalMessageInfo - -func (m *ModifyRepoResponse) GetRepoId() *wrappers.StringValue { - if m != nil { - return m.RepoId - } - return nil -} - -type DeleteReposRequest struct { - // required, ids of repository to delete - RepoId []string `protobuf:"bytes,1,rep,name=repo_id,json=repoId,proto3" json:"repo_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteReposRequest) Reset() { *m = DeleteReposRequest{} } -func (m *DeleteReposRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteReposRequest) ProtoMessage() {} -func (*DeleteReposRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9a6377fc15c39a05, []int{4} -} - -func (m *DeleteReposRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteReposRequest.Unmarshal(m, b) -} -func (m *DeleteReposRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteReposRequest.Marshal(b, m, deterministic) -} -func (m *DeleteReposRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteReposRequest.Merge(m, src) -} -func (m *DeleteReposRequest) XXX_Size() int { - return xxx_messageInfo_DeleteReposRequest.Size(m) -} -func (m *DeleteReposRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteReposRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteReposRequest proto.InternalMessageInfo - -func (m *DeleteReposRequest) GetRepoId() []string { - if m != nil { - return m.RepoId - } - return nil -} - -type DeleteReposResponse struct { - // ids of repository deleted - RepoId []string `protobuf:"bytes,1,rep,name=repo_id,json=repoId,proto3" json:"repo_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteReposResponse) Reset() { *m = DeleteReposResponse{} } -func (m *DeleteReposResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteReposResponse) ProtoMessage() {} -func (*DeleteReposResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9a6377fc15c39a05, []int{5} -} - -func (m *DeleteReposResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteReposResponse.Unmarshal(m, b) -} -func (m *DeleteReposResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteReposResponse.Marshal(b, m, deterministic) -} -func (m *DeleteReposResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteReposResponse.Merge(m, src) -} -func (m *DeleteReposResponse) XXX_Size() int { - return xxx_messageInfo_DeleteReposResponse.Size(m) -} -func (m *DeleteReposResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteReposResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteReposResponse proto.InternalMessageInfo - -func (m *DeleteReposResponse) GetRepoId() []string { - if m != nil { - return m.RepoId - } - return nil -} - -type RepoLabel struct { - // label key - LabelKey *wrappers.StringValue `protobuf:"bytes,1,opt,name=label_key,json=labelKey,proto3" json:"label_key,omitempty"` - // label value - LabelValue *wrappers.StringValue `protobuf:"bytes,2,opt,name=label_value,json=labelValue,proto3" json:"label_value,omitempty"` - // the time when repository label create - CreateTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RepoLabel) Reset() { *m = RepoLabel{} } -func (m *RepoLabel) String() string { return proto.CompactTextString(m) } -func (*RepoLabel) ProtoMessage() {} -func (*RepoLabel) Descriptor() ([]byte, []int) { - return fileDescriptor_9a6377fc15c39a05, []int{6} -} - -func (m *RepoLabel) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RepoLabel.Unmarshal(m, b) -} -func (m *RepoLabel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RepoLabel.Marshal(b, m, deterministic) -} -func (m *RepoLabel) XXX_Merge(src proto.Message) { - xxx_messageInfo_RepoLabel.Merge(m, src) -} -func (m *RepoLabel) XXX_Size() int { - return xxx_messageInfo_RepoLabel.Size(m) -} -func (m *RepoLabel) XXX_DiscardUnknown() { - xxx_messageInfo_RepoLabel.DiscardUnknown(m) -} - -var xxx_messageInfo_RepoLabel proto.InternalMessageInfo - -func (m *RepoLabel) GetLabelKey() *wrappers.StringValue { - if m != nil { - return m.LabelKey - } - return nil -} - -func (m *RepoLabel) GetLabelValue() *wrappers.StringValue { - if m != nil { - return m.LabelValue - } - return nil -} - -func (m *RepoLabel) GetCreateTime() *timestamp.Timestamp { - if m != nil { - return m.CreateTime - } - return nil -} - -type RepoSelector struct { - // selector key - SelectorKey *wrappers.StringValue `protobuf:"bytes,1,opt,name=selector_key,json=selectorKey,proto3" json:"selector_key,omitempty"` - // selector value - SelectorValue *wrappers.StringValue `protobuf:"bytes,2,opt,name=selector_value,json=selectorValue,proto3" json:"selector_value,omitempty"` - // the time when repository selector create - CreateTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RepoSelector) Reset() { *m = RepoSelector{} } -func (m *RepoSelector) String() string { return proto.CompactTextString(m) } -func (*RepoSelector) ProtoMessage() {} -func (*RepoSelector) Descriptor() ([]byte, []int) { - return fileDescriptor_9a6377fc15c39a05, []int{7} -} - -func (m *RepoSelector) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RepoSelector.Unmarshal(m, b) -} -func (m *RepoSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RepoSelector.Marshal(b, m, deterministic) -} -func (m *RepoSelector) XXX_Merge(src proto.Message) { - xxx_messageInfo_RepoSelector.Merge(m, src) -} -func (m *RepoSelector) XXX_Size() int { - return xxx_messageInfo_RepoSelector.Size(m) -} -func (m *RepoSelector) XXX_DiscardUnknown() { - xxx_messageInfo_RepoSelector.DiscardUnknown(m) -} - -var xxx_messageInfo_RepoSelector proto.InternalMessageInfo - -func (m *RepoSelector) GetSelectorKey() *wrappers.StringValue { - if m != nil { - return m.SelectorKey - } - return nil -} - -func (m *RepoSelector) GetSelectorValue() *wrappers.StringValue { - if m != nil { - return m.SelectorValue - } - return nil -} - -func (m *RepoSelector) GetCreateTime() *timestamp.Timestamp { - if m != nil { - return m.CreateTime - } - return nil -} - -type Repo struct { - // repository id - RepoId *wrappers.StringValue `protobuf:"bytes,1,opt,name=repo_id,json=repoId,proto3" json:"repo_id,omitempty"` - // repository name - Name *wrappers.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // repository description - Description *wrappers.StringValue `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - // type of repository eg.[http|https|s3] - Type *wrappers.StringValue `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` - // url of visiting the repository - Url *wrappers.StringValue `protobuf:"bytes,5,opt,name=url,proto3" json:"url,omitempty"` - // credential of visiting the repository - Credential *wrappers.StringValue `protobuf:"bytes,6,opt,name=credential,proto3" json:"credential,omitempty"` - // visibility.eg:[public|private] - Visibility *wrappers.StringValue `protobuf:"bytes,7,opt,name=visibility,proto3" json:"visibility,omitempty"` - // owner path, concat string group_path:user_id - OwnerPath *wrappers.StringValue `protobuf:"bytes,8,opt,name=owner_path,json=ownerPath,proto3" json:"owner_path,omitempty"` - // runtime provider eg.[qingcloud|aliyun|aws|kubernetes] - Providers []string `protobuf:"bytes,9,rep,name=providers,proto3" json:"providers,omitempty"` - // labels - Labels []*RepoLabel `protobuf:"bytes,10,rep,name=labels,proto3" json:"labels,omitempty"` - // selectors of label - Selectors []*RepoSelector `protobuf:"bytes,11,rep,name=selectors,proto3" json:"selectors,omitempty"` - // status eg.[active|deleted] - Status *wrappers.StringValue `protobuf:"bytes,12,opt,name=status,proto3" json:"status,omitempty"` - // the time when repository create - CreateTime *timestamp.Timestamp `protobuf:"bytes,13,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // record status changed time - StatusTime *timestamp.Timestamp `protobuf:"bytes,14,opt,name=status_time,json=statusTime,proto3" json:"status_time,omitempty"` - // list category - CategorySet []*ResourceCategory `protobuf:"bytes,15,rep,name=category_set,json=categorySet,proto3" json:"category_set,omitempty"` - // app default status eg[active|draft] - AppDefaultStatus *wrappers.StringValue `protobuf:"bytes,16,opt,name=app_default_status,json=appDefaultStatus,proto3" json:"app_default_status,omitempty"` - // controller, value 0 for self resource, value 1 for openpitrix resource - Controller *wrappers.Int32Value `protobuf:"bytes,17,opt,name=controller,proto3" json:"controller,omitempty"` - // owner - Owner *wrappers.StringValue `protobuf:"bytes,18,opt,name=owner,proto3" json:"owner,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Repo) Reset() { *m = Repo{} } -func (m *Repo) String() string { return proto.CompactTextString(m) } -func (*Repo) ProtoMessage() {} -func (*Repo) Descriptor() ([]byte, []int) { - return fileDescriptor_9a6377fc15c39a05, []int{8} -} - -func (m *Repo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Repo.Unmarshal(m, b) -} -func (m *Repo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Repo.Marshal(b, m, deterministic) -} -func (m *Repo) XXX_Merge(src proto.Message) { - xxx_messageInfo_Repo.Merge(m, src) -} -func (m *Repo) XXX_Size() int { - return xxx_messageInfo_Repo.Size(m) -} -func (m *Repo) XXX_DiscardUnknown() { - xxx_messageInfo_Repo.DiscardUnknown(m) -} - -var xxx_messageInfo_Repo proto.InternalMessageInfo - -func (m *Repo) GetRepoId() *wrappers.StringValue { - if m != nil { - return m.RepoId - } - return nil -} - -func (m *Repo) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *Repo) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *Repo) GetType() *wrappers.StringValue { - if m != nil { - return m.Type - } - return nil -} - -func (m *Repo) GetUrl() *wrappers.StringValue { - if m != nil { - return m.Url - } - return nil -} - -func (m *Repo) GetCredential() *wrappers.StringValue { - if m != nil { - return m.Credential - } - return nil -} - -func (m *Repo) GetVisibility() *wrappers.StringValue { - if m != nil { - return m.Visibility - } - return nil -} - -func (m *Repo) GetOwnerPath() *wrappers.StringValue { - if m != nil { - return m.OwnerPath - } - return nil -} - -func (m *Repo) GetProviders() []string { - if m != nil { - return m.Providers - } - return nil -} - -func (m *Repo) GetLabels() []*RepoLabel { - if m != nil { - return m.Labels - } - return nil -} - -func (m *Repo) GetSelectors() []*RepoSelector { - if m != nil { - return m.Selectors - } - return nil -} - -func (m *Repo) GetStatus() *wrappers.StringValue { - if m != nil { - return m.Status - } - return nil -} - -func (m *Repo) GetCreateTime() *timestamp.Timestamp { - if m != nil { - return m.CreateTime - } - return nil -} - -func (m *Repo) GetStatusTime() *timestamp.Timestamp { - if m != nil { - return m.StatusTime - } - return nil -} - -func (m *Repo) GetCategorySet() []*ResourceCategory { - if m != nil { - return m.CategorySet - } - return nil -} - -func (m *Repo) GetAppDefaultStatus() *wrappers.StringValue { - if m != nil { - return m.AppDefaultStatus - } - return nil -} - -func (m *Repo) GetController() *wrappers.Int32Value { - if m != nil { - return m.Controller - } - return nil -} - -func (m *Repo) GetOwner() *wrappers.StringValue { - if m != nil { - return m.Owner - } - return nil -} - -type DescribeReposRequest struct { - // query key, support these fields(repo_id, name, type, visibility, status, app_default_status, owner, controller) - SearchWord *wrappers.StringValue `protobuf:"bytes,1,opt,name=search_word,json=searchWord,proto3" json:"search_word,omitempty"` - // sort key, order by sort_key, default create_time - SortKey *wrappers.StringValue `protobuf:"bytes,2,opt,name=sort_key,json=sortKey,proto3" json:"sort_key,omitempty"` - // value = 0 sort ASC, value = 1 sort DESC - Reverse *wrappers.BoolValue `protobuf:"bytes,3,opt,name=reverse,proto3" json:"reverse,omitempty"` - // data limit per page, default value 20, max value 200 - Limit uint32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` - // data offset, default 0 - Offset uint32 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` - // repository ids - RepoId []string `protobuf:"bytes,11,rep,name=repo_id,json=repoId,proto3" json:"repo_id,omitempty"` - // repository name - Name []string `protobuf:"bytes,12,rep,name=name,proto3" json:"name,omitempty"` - // repository type - Type []string `protobuf:"bytes,13,rep,name=type,proto3" json:"type,omitempty"` - // visibility eg:[public|private] - Visibility []string `protobuf:"bytes,14,rep,name=visibility,proto3" json:"visibility,omitempty"` - // status eg.[active|deleted] - Status []string `protobuf:"bytes,15,rep,name=status,proto3" json:"status,omitempty"` - // runtime provider eg.[qingcloud|aliyun|aws|kubernetes] - Provider []string `protobuf:"bytes,16,rep,name=provider,proto3" json:"provider,omitempty"` - // a kv string, tags of server - Label *wrappers.StringValue `protobuf:"bytes,17,opt,name=label,proto3" json:"label,omitempty"` - // selector of label - Selector *wrappers.StringValue `protobuf:"bytes,18,opt,name=selector,proto3" json:"selector,omitempty"` - // category ids - CategoryId []string `protobuf:"bytes,19,rep,name=category_id,json=categoryId,proto3" json:"category_id,omitempty"` - // owner - Owner []string `protobuf:"bytes,20,rep,name=owner,proto3" json:"owner,omitempty"` - // app default status eg.[draft|active] - AppDefaultStatus []string `protobuf:"bytes,21,rep,name=app_default_status,json=appDefaultStatus,proto3" json:"app_default_status,omitempty"` - // user id - UserId string `protobuf:"bytes,22,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - // controller, value 0 for self resource, value1 for openpitrix resource - Controller *wrappers.Int32Value `protobuf:"bytes,23,opt,name=controller,proto3" json:"controller,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeReposRequest) Reset() { *m = DescribeReposRequest{} } -func (m *DescribeReposRequest) String() string { return proto.CompactTextString(m) } -func (*DescribeReposRequest) ProtoMessage() {} -func (*DescribeReposRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9a6377fc15c39a05, []int{9} -} - -func (m *DescribeReposRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeReposRequest.Unmarshal(m, b) -} -func (m *DescribeReposRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeReposRequest.Marshal(b, m, deterministic) -} -func (m *DescribeReposRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeReposRequest.Merge(m, src) -} -func (m *DescribeReposRequest) XXX_Size() int { - return xxx_messageInfo_DescribeReposRequest.Size(m) -} -func (m *DescribeReposRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeReposRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeReposRequest proto.InternalMessageInfo - -func (m *DescribeReposRequest) GetSearchWord() *wrappers.StringValue { - if m != nil { - return m.SearchWord - } - return nil -} - -func (m *DescribeReposRequest) GetSortKey() *wrappers.StringValue { - if m != nil { - return m.SortKey - } - return nil -} - -func (m *DescribeReposRequest) GetReverse() *wrappers.BoolValue { - if m != nil { - return m.Reverse - } - return nil -} - -func (m *DescribeReposRequest) GetLimit() uint32 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *DescribeReposRequest) GetOffset() uint32 { - if m != nil { - return m.Offset - } - return 0 -} - -func (m *DescribeReposRequest) GetRepoId() []string { - if m != nil { - return m.RepoId - } - return nil -} - -func (m *DescribeReposRequest) GetName() []string { - if m != nil { - return m.Name - } - return nil -} - -func (m *DescribeReposRequest) GetType() []string { - if m != nil { - return m.Type - } - return nil -} - -func (m *DescribeReposRequest) GetVisibility() []string { - if m != nil { - return m.Visibility - } - return nil -} - -func (m *DescribeReposRequest) GetStatus() []string { - if m != nil { - return m.Status - } - return nil -} - -func (m *DescribeReposRequest) GetProvider() []string { - if m != nil { - return m.Provider - } - return nil -} - -func (m *DescribeReposRequest) GetLabel() *wrappers.StringValue { - if m != nil { - return m.Label - } - return nil -} - -func (m *DescribeReposRequest) GetSelector() *wrappers.StringValue { - if m != nil { - return m.Selector - } - return nil -} - -func (m *DescribeReposRequest) GetCategoryId() []string { - if m != nil { - return m.CategoryId - } - return nil -} - -func (m *DescribeReposRequest) GetOwner() []string { - if m != nil { - return m.Owner - } - return nil -} - -func (m *DescribeReposRequest) GetAppDefaultStatus() []string { - if m != nil { - return m.AppDefaultStatus - } - return nil -} - -func (m *DescribeReposRequest) GetUserId() string { - if m != nil { - return m.UserId - } - return "" -} - -func (m *DescribeReposRequest) GetController() *wrappers.Int32Value { - if m != nil { - return m.Controller - } - return nil -} - -type DescribeReposResponse struct { - // total count of repository - TotalCount uint32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - // list of repository - RepoSet []*Repo `protobuf:"bytes,2,rep,name=repo_set,json=repoSet,proto3" json:"repo_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeReposResponse) Reset() { *m = DescribeReposResponse{} } -func (m *DescribeReposResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeReposResponse) ProtoMessage() {} -func (*DescribeReposResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9a6377fc15c39a05, []int{10} -} - -func (m *DescribeReposResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeReposResponse.Unmarshal(m, b) -} -func (m *DescribeReposResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeReposResponse.Marshal(b, m, deterministic) -} -func (m *DescribeReposResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeReposResponse.Merge(m, src) -} -func (m *DescribeReposResponse) XXX_Size() int { - return xxx_messageInfo_DescribeReposResponse.Size(m) -} -func (m *DescribeReposResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeReposResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeReposResponse proto.InternalMessageInfo - -func (m *DescribeReposResponse) GetTotalCount() uint32 { - if m != nil { - return m.TotalCount - } - return 0 -} - -func (m *DescribeReposResponse) GetRepoSet() []*Repo { - if m != nil { - return m.RepoSet - } - return nil -} - -type ValidateRepoRequest struct { - // required, type of repository - Type *wrappers.StringValue `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - // required, url of visiting the repository - Url *wrappers.StringValue `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` - // required, credential of visiting the repository - Credential *wrappers.StringValue `protobuf:"bytes,3,opt,name=credential,proto3" json:"credential,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ValidateRepoRequest) Reset() { *m = ValidateRepoRequest{} } -func (m *ValidateRepoRequest) String() string { return proto.CompactTextString(m) } -func (*ValidateRepoRequest) ProtoMessage() {} -func (*ValidateRepoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9a6377fc15c39a05, []int{11} -} - -func (m *ValidateRepoRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ValidateRepoRequest.Unmarshal(m, b) -} -func (m *ValidateRepoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ValidateRepoRequest.Marshal(b, m, deterministic) -} -func (m *ValidateRepoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidateRepoRequest.Merge(m, src) -} -func (m *ValidateRepoRequest) XXX_Size() int { - return xxx_messageInfo_ValidateRepoRequest.Size(m) -} -func (m *ValidateRepoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ValidateRepoRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidateRepoRequest proto.InternalMessageInfo - -func (m *ValidateRepoRequest) GetType() *wrappers.StringValue { - if m != nil { - return m.Type - } - return nil -} - -func (m *ValidateRepoRequest) GetUrl() *wrappers.StringValue { - if m != nil { - return m.Url - } - return nil -} - -func (m *ValidateRepoRequest) GetCredential() *wrappers.StringValue { - if m != nil { - return m.Credential - } - return nil -} - -type ValidateRepoResponse struct { - // validate repository ok or not - Ok *wrappers.BoolValue `protobuf:"bytes,1,opt,name=ok,proto3" json:"ok,omitempty"` - // if validate error,return error code - ErrorCode uint32 `protobuf:"varint,2,opt,name=errorCode,proto3" json:"errorCode,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ValidateRepoResponse) Reset() { *m = ValidateRepoResponse{} } -func (m *ValidateRepoResponse) String() string { return proto.CompactTextString(m) } -func (*ValidateRepoResponse) ProtoMessage() {} -func (*ValidateRepoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9a6377fc15c39a05, []int{12} -} - -func (m *ValidateRepoResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ValidateRepoResponse.Unmarshal(m, b) -} -func (m *ValidateRepoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ValidateRepoResponse.Marshal(b, m, deterministic) -} -func (m *ValidateRepoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidateRepoResponse.Merge(m, src) -} -func (m *ValidateRepoResponse) XXX_Size() int { - return xxx_messageInfo_ValidateRepoResponse.Size(m) -} -func (m *ValidateRepoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ValidateRepoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidateRepoResponse proto.InternalMessageInfo - -func (m *ValidateRepoResponse) GetOk() *wrappers.BoolValue { - if m != nil { - return m.Ok - } - return nil -} - -func (m *ValidateRepoResponse) GetErrorCode() uint32 { - if m != nil { - return m.ErrorCode - } - return 0 -} - -func init() { - proto.RegisterType((*CreateRepoRequest)(nil), "openpitrix.CreateRepoRequest") - proto.RegisterType((*CreateRepoResponse)(nil), "openpitrix.CreateRepoResponse") - proto.RegisterType((*ModifyRepoRequest)(nil), "openpitrix.ModifyRepoRequest") - proto.RegisterType((*ModifyRepoResponse)(nil), "openpitrix.ModifyRepoResponse") - proto.RegisterType((*DeleteReposRequest)(nil), "openpitrix.DeleteReposRequest") - proto.RegisterType((*DeleteReposResponse)(nil), "openpitrix.DeleteReposResponse") - proto.RegisterType((*RepoLabel)(nil), "openpitrix.RepoLabel") - proto.RegisterType((*RepoSelector)(nil), "openpitrix.RepoSelector") - proto.RegisterType((*Repo)(nil), "openpitrix.Repo") - proto.RegisterType((*DescribeReposRequest)(nil), "openpitrix.DescribeReposRequest") - proto.RegisterType((*DescribeReposResponse)(nil), "openpitrix.DescribeReposResponse") - proto.RegisterType((*ValidateRepoRequest)(nil), "openpitrix.ValidateRepoRequest") - proto.RegisterType((*ValidateRepoResponse)(nil), "openpitrix.ValidateRepoResponse") -} - -func init() { proto.RegisterFile("repo.proto", fileDescriptor_9a6377fc15c39a05) } - -var fileDescriptor_9a6377fc15c39a05 = []byte{ - // 1377 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcd, 0x6e, 0x1b, 0x37, - 0x17, 0xc5, 0xc8, 0x96, 0x2c, 0xdd, 0xb1, 0x1c, 0x87, 0xb6, 0x93, 0xf9, 0x14, 0x7f, 0x36, 0xab, - 0x95, 0xeb, 0xca, 0x52, 0xab, 0xa4, 0x7f, 0xf9, 0x69, 0xe0, 0x38, 0x40, 0xe1, 0xa6, 0x01, 0x0a, - 0xb9, 0x48, 0x81, 0x6e, 0x54, 0x5a, 0x43, 0xc9, 0x03, 0x8f, 0x87, 0x53, 0x92, 0xb2, 0xab, 0x6d, - 0x80, 0x6e, 0xba, 0x74, 0x97, 0x05, 0x8a, 0x3e, 0x42, 0x81, 0x22, 0x2f, 0xd0, 0x3e, 0x41, 0xd1, - 0x57, 0xe8, 0x6b, 0xb4, 0x28, 0xc8, 0xa1, 0x46, 0x33, 0x92, 0x95, 0x8c, 0xe5, 0x2c, 0xba, 0xe8, - 0xca, 0x22, 0x79, 0x0e, 0x79, 0xc9, 0x7b, 0xcf, 0xe1, 0xd0, 0x00, 0x9c, 0x86, 0xac, 0x1e, 0x72, - 0x26, 0x19, 0x02, 0x16, 0xd2, 0x20, 0xf4, 0x24, 0xf7, 0xbe, 0xa9, 0x6c, 0xf4, 0x18, 0xeb, 0xf9, - 0xb4, 0xa1, 0x47, 0x0e, 0xfb, 0xdd, 0xc6, 0x19, 0x27, 0x61, 0x48, 0xb9, 0x88, 0xb0, 0x95, 0xcd, - 0xf1, 0x71, 0xe9, 0x9d, 0x50, 0x21, 0xc9, 0x49, 0x68, 0x00, 0xeb, 0x06, 0x40, 0x42, 0xaf, 0x41, - 0x82, 0x80, 0x49, 0x22, 0x3d, 0x16, 0x0c, 0xe9, 0x35, 0xfd, 0xa7, 0xb3, 0xd3, 0xa3, 0xc1, 0x8e, - 0x38, 0x23, 0xbd, 0x1e, 0xe5, 0x0d, 0x16, 0x6a, 0xc4, 0x05, 0x68, 0x5b, 0x0e, 0x42, 0x6a, 0x1a, - 0xd5, 0xbf, 0xe7, 0xe1, 0xfa, 0x1e, 0xa7, 0x44, 0xd2, 0x16, 0x0d, 0x59, 0x8b, 0x7e, 0xdd, 0xa7, - 0x42, 0xa2, 0xb7, 0x61, 0x3e, 0x20, 0x27, 0xd4, 0xb1, 0xb0, 0xb5, 0x65, 0x37, 0xd7, 0xeb, 0xd1, - 0xea, 0xf5, 0x61, 0x78, 0xf5, 0x03, 0xc9, 0xbd, 0xa0, 0xf7, 0x8c, 0xf8, 0x7d, 0xda, 0xd2, 0x48, - 0xf4, 0x11, 0xd8, 0x2e, 0x15, 0x1d, 0xee, 0xe9, 0x65, 0x9d, 0x5c, 0x06, 0x62, 0x92, 0xa0, 0x56, - 0x54, 0x61, 0x39, 0x73, 0x59, 0x56, 0x54, 0x48, 0x54, 0x87, 0xb9, 0x3e, 0xf7, 0x9d, 0xf9, 0x0c, - 0x04, 0x05, 0x44, 0xf7, 0x01, 0x3a, 0x9c, 0xba, 0x34, 0x90, 0x1e, 0xf1, 0x9d, 0x7c, 0x06, 0x5a, - 0x02, 0xaf, 0xd8, 0xa7, 0x9e, 0xf0, 0x0e, 0x3d, 0xdf, 0x93, 0x03, 0xa7, 0x90, 0x85, 0x3d, 0xc2, - 0xa3, 0x75, 0x28, 0x85, 0x9c, 0x9d, 0x7a, 0x2e, 0xe5, 0xc2, 0x59, 0xc0, 0x73, 0x5b, 0xa5, 0xd6, - 0xa8, 0x03, 0xdd, 0x81, 0x82, 0x4f, 0x0e, 0xa9, 0x2f, 0x9c, 0x62, 0x86, 0x79, 0x0d, 0x16, 0xdd, - 0x85, 0x92, 0xa0, 0x3e, 0xed, 0x48, 0xc6, 0x85, 0x53, 0xca, 0x40, 0x1c, 0xc1, 0xd1, 0x03, 0xb0, - 0x3b, 0x44, 0xd2, 0x1e, 0xe3, 0x83, 0xb6, 0xe7, 0x3a, 0x90, 0xe9, 0x30, 0x0c, 0x61, 0xdf, 0x45, - 0x9f, 0x00, 0x22, 0x61, 0xd8, 0x76, 0x69, 0x97, 0xf4, 0x7d, 0xd9, 0x16, 0x92, 0xc8, 0xbe, 0x70, - 0xec, 0x0c, 0xb3, 0x2c, 0x93, 0x30, 0x7c, 0x1c, 0xd1, 0x0e, 0x34, 0xab, 0xfa, 0x04, 0x50, 0xb2, - 0xfe, 0x44, 0xc8, 0x02, 0x41, 0xd1, 0xbb, 0xb0, 0xa0, 0xa4, 0xa4, 0x82, 0xcb, 0x52, 0x83, 0x05, - 0x05, 0xde, 0x77, 0xab, 0x2f, 0xf2, 0x70, 0xfd, 0x29, 0x73, 0xbd, 0xee, 0x20, 0x59, 0xcd, 0xb3, - 0x4d, 0x16, 0x8b, 0x20, 0x37, 0xab, 0x08, 0xe6, 0x66, 0x15, 0xc1, 0xfc, 0x65, 0x45, 0x90, 0x9f, - 0x4d, 0x04, 0x85, 0x2b, 0x89, 0x60, 0xe1, 0x2a, 0x22, 0x28, 0x4e, 0x17, 0x41, 0x69, 0x56, 0x11, - 0xc0, 0x95, 0x44, 0x60, 0xbf, 0x16, 0x11, 0x2c, 0xce, 0x2a, 0x82, 0x64, 0xd9, 0x5e, 0x4d, 0x04, - 0x3b, 0x80, 0x1e, 0x53, 0x9f, 0x46, 0x8a, 0x12, 0x43, 0x11, 0xdc, 0x4c, 0x4e, 0xa6, 0xce, 0x7e, - 0x08, 0xaf, 0xc3, 0x4a, 0x0a, 0x6e, 0x16, 0x9f, 0x8a, 0xff, 0xd5, 0x82, 0x92, 0x82, 0x7e, 0xaa, - 0x32, 0x80, 0x3e, 0x84, 0x92, 0x4e, 0x45, 0xfb, 0x98, 0x0e, 0x32, 0x45, 0x59, 0xd4, 0xf0, 0x27, - 0x74, 0xa0, 0xce, 0x3f, 0xa2, 0x9e, 0xaa, 0x81, 0x4c, 0x32, 0x03, 0x4d, 0xd0, 0xbf, 0xd1, 0x3d, - 0xb0, 0x3b, 0xda, 0x38, 0xda, 0xea, 0xb2, 0x34, 0x62, 0xab, 0x4c, 0xd0, 0x3f, 0x1f, 0xde, 0xa4, - 0xba, 0x92, 0x89, 0xa4, 0xaa, 0xa3, 0xfa, 0xbb, 0x05, 0x8b, 0x6a, 0x13, 0x07, 0xa6, 0x1a, 0xd0, - 0x43, 0x58, 0x1c, 0x56, 0x46, 0xe6, 0xad, 0xd8, 0x43, 0x86, 0xda, 0xcd, 0x1e, 0x2c, 0xc5, 0x13, - 0x64, 0xdf, 0x50, 0x79, 0xc8, 0x79, 0x0d, 0x7b, 0xfa, 0x6b, 0x01, 0xe6, 0xd5, 0x9e, 0xfe, 0xf3, - 0xbb, 0x7f, 0x87, 0xdf, 0xdd, 0x03, 0x60, 0x67, 0x01, 0xe5, 0xed, 0x90, 0xc8, 0xa3, 0x4c, 0x57, - 0x7b, 0x49, 0xe3, 0x3f, 0x23, 0xf2, 0x28, 0x6d, 0x96, 0xa5, 0x71, 0xb3, 0xdc, 0x89, 0xcd, 0x12, - 0xf0, 0xdc, 0x96, 0xdd, 0x5c, 0xab, 0x8f, 0x3e, 0x36, 0xeb, 0xb1, 0x38, 0x63, 0x97, 0x7c, 0x2f, - 0xe9, 0x92, 0xb6, 0x66, 0x38, 0xe3, 0x8c, 0xa1, 0x12, 0x92, 0x0e, 0x79, 0x07, 0x0a, 0x97, 0xb0, - 0x35, 0x83, 0x1d, 0x2f, 0xe2, 0xf2, 0x65, 0x8a, 0x58, 0x91, 0xa3, 0x69, 0x22, 0xf2, 0xd2, 0xab, - 0xc9, 0x11, 0x5c, 0x93, 0x1f, 0xc2, 0x62, 0xec, 0xe8, 0x82, 0x4a, 0xe7, 0x9a, 0xde, 0xea, 0x7a, - 0x7a, 0xab, 0x82, 0xf5, 0x79, 0x87, 0xee, 0x19, 0x5c, 0x2b, 0xbe, 0x03, 0x0e, 0xa8, 0x9c, 0xe2, - 0xe9, 0xcb, 0xb3, 0x78, 0xba, 0x4a, 0x7f, 0x87, 0x05, 0x92, 0x33, 0xdf, 0xa7, 0xdc, 0xb9, 0xae, - 0xe7, 0xb8, 0x35, 0x31, 0xc7, 0x7e, 0x20, 0x6f, 0x37, 0x87, 0x95, 0x17, 0xc3, 0x51, 0x13, 0xf2, - 0xba, 0x16, 0x1c, 0x94, 0x61, 0xed, 0x08, 0x5a, 0xfd, 0x39, 0x0f, 0xab, 0x8f, 0xb5, 0xba, 0x0e, - 0xd3, 0xd6, 0xff, 0x00, 0x6c, 0x41, 0x09, 0xef, 0x1c, 0xb5, 0xcf, 0x18, 0xcf, 0xe6, 0x09, 0x10, - 0x11, 0xbe, 0x60, 0xdc, 0x45, 0xef, 0x43, 0x51, 0x30, 0x2e, 0xb5, 0x2d, 0x66, 0xf1, 0x86, 0x05, - 0x85, 0x56, 0x96, 0x78, 0x47, 0xf9, 0xd0, 0x29, 0xe5, 0x62, 0xba, 0x93, 0x3d, 0x62, 0xcc, 0x37, - 0x2c, 0x03, 0x45, 0xab, 0x90, 0xf7, 0xbd, 0x13, 0x4f, 0x6a, 0x57, 0x28, 0xb7, 0xa2, 0x06, 0xba, - 0x01, 0x05, 0xd6, 0xed, 0xaa, 0xa4, 0xe6, 0x75, 0xb7, 0x69, 0x25, 0xaf, 0x29, 0x3b, 0x79, 0x4d, - 0x21, 0x64, 0xdc, 0x6c, 0x51, 0xf7, 0x46, 0x7e, 0x85, 0x8c, 0xdf, 0x94, 0xa3, 0x3e, 0xed, 0x28, - 0x1b, 0x29, 0x8d, 0x2f, 0xe9, 0x91, 0xa4, 0x8a, 0x6f, 0xc4, 0x1a, 0xb8, 0x16, 0xcd, 0x6f, 0xaa, - 0xbc, 0x02, 0xc5, 0xa1, 0x1e, 0x9d, 0x65, 0x3d, 0x12, 0xb7, 0x55, 0xf6, 0xb4, 0xf2, 0x4c, 0xd6, - 0x5f, 0x91, 0x3d, 0x0d, 0x45, 0x1f, 0x40, 0x71, 0x28, 0xbc, 0x4c, 0x49, 0x8f, 0xd1, 0x68, 0x33, - 0xfd, 0x1d, 0xb3, 0x12, 0x6d, 0x21, 0xf1, 0xa5, 0xb2, 0x3a, 0x2c, 0xa6, 0x55, 0x3d, 0x14, 0x35, - 0x50, 0xed, 0xc2, 0x5a, 0x5f, 0xd3, 0x90, 0xc9, 0x6a, 0xbe, 0x09, 0x0b, 0x7d, 0x41, 0xb9, 0x5a, - 0xe0, 0x06, 0xb6, 0xd4, 0x39, 0xa8, 0xe6, 0xbe, 0x3b, 0x56, 0xe6, 0x37, 0x2f, 0x55, 0xe6, 0x55, - 0x0a, 0x6b, 0x63, 0x15, 0x6b, 0xbe, 0x3e, 0x36, 0xc1, 0x96, 0x4c, 0x12, 0xbf, 0xdd, 0x61, 0xfd, - 0x40, 0xea, 0x92, 0x2d, 0xb7, 0x40, 0x77, 0xed, 0xa9, 0x1e, 0xf4, 0x16, 0x14, 0x75, 0xde, 0x55, - 0x45, 0xe4, 0xb4, 0xcc, 0x97, 0xc7, 0x1d, 0xad, 0xa5, 0x2b, 0xe3, 0x80, 0xca, 0xea, 0x0b, 0x0b, - 0x56, 0x9e, 0x11, 0xdf, 0x73, 0x27, 0x9f, 0xb9, 0xba, 0x1e, 0xac, 0xcb, 0xde, 0x3f, 0xb9, 0xd9, - 0xee, 0x9f, 0xb9, 0xcb, 0xdd, 0x3f, 0xd5, 0xaf, 0x60, 0x35, 0x1d, 0xb6, 0x39, 0x9d, 0x6d, 0xc8, - 0xb1, 0x63, 0x13, 0xf5, 0xcb, 0x34, 0x95, 0x63, 0xc7, 0xea, 0x22, 0xa1, 0x9c, 0x33, 0xbe, 0xc7, - 0xdc, 0xe8, 0x6a, 0x2f, 0xb7, 0x46, 0x1d, 0xcd, 0xdf, 0x0a, 0x60, 0xab, 0xa9, 0x9f, 0x92, 0x80, - 0xf4, 0x28, 0x47, 0x3f, 0x59, 0x00, 0xa3, 0xe7, 0x18, 0xfa, 0x7f, 0xf2, 0x4c, 0x27, 0xfe, 0x4d, - 0x50, 0xd9, 0x98, 0x36, 0x1c, 0xc5, 0x59, 0x3d, 0x38, 0xdf, 0xbd, 0x8f, 0xee, 0x46, 0x03, 0x58, - 0x25, 0x43, 0x78, 0x92, 0xf1, 0x41, 0x2d, 0xf1, 0x1b, 0xf7, 0x05, 0x75, 0xb1, 0x64, 0x58, 0x48, - 0xc6, 0x29, 0x0e, 0x49, 0xe7, 0x98, 0xf4, 0x28, 0x66, 0x5d, 0x4c, 0xc2, 0xf0, 0xf9, 0x1f, 0x7f, - 0x7e, 0x9f, 0x5b, 0xaa, 0x96, 0x1a, 0xa7, 0xef, 0x34, 0x34, 0xe5, 0xae, 0xb5, 0x8d, 0xbe, 0xcb, - 0x41, 0x39, 0x55, 0x34, 0x08, 0x27, 0xc3, 0xb8, 0xc8, 0x01, 0x2b, 0x6f, 0xbc, 0x04, 0x61, 0x62, - 0xfd, 0xc5, 0x3a, 0xdf, 0xfd, 0xd1, 0x42, 0x3f, 0x58, 0x1f, 0x53, 0x39, 0x8a, 0xcf, 0xa3, 0x02, - 0xd7, 0xba, 0x9e, 0x2f, 0x29, 0xc7, 0x67, 0x9e, 0x3c, 0xc2, 0xf2, 0x88, 0x0a, 0x8a, 0xbb, 0x1e, - 0xf5, 0x5d, 0xb1, 0x65, 0x9c, 0xa7, 0x86, 0x95, 0xbb, 0xd4, 0xb0, 0xaa, 0x90, 0x1a, 0x1e, 0x79, - 0x47, 0x0d, 0x47, 0xa2, 0xaa, 0xe1, 0x49, 0xa1, 0xd5, 0xb0, 0x56, 0x61, 0x0d, 0x8f, 0xd4, 0xf0, - 0x66, 0x0d, 0x1b, 0x0c, 0xe6, 0x54, 0xf6, 0x79, 0x80, 0x89, 0xef, 0xa7, 0x42, 0xd1, 0xe7, 0x61, - 0xa3, 0xd1, 0x79, 0xa0, 0x33, 0x80, 0xd1, 0xc3, 0x21, 0x9d, 0xae, 0x89, 0x77, 0x70, 0x3a, 0x5d, - 0x93, 0xef, 0x8d, 0xea, 0xf6, 0xf9, 0xee, 0x0a, 0x32, 0xef, 0xe7, 0x44, 0x8a, 0xa2, 0x2c, 0x34, - 0xd3, 0x59, 0x78, 0x6e, 0x81, 0x9d, 0x78, 0x36, 0xa0, 0x8d, 0xf4, 0x09, 0x8f, 0x3f, 0x3f, 0x2a, - 0x9b, 0x53, 0xc7, 0xcd, 0xe2, 0xcd, 0xf3, 0xdd, 0x5b, 0xe8, 0x7f, 0x8f, 0x88, 0xec, 0x1c, 0x61, - 0x57, 0x8f, 0x4f, 0x6e, 0x7d, 0x69, 0x3b, 0x1d, 0xc4, 0xb7, 0x16, 0x2c, 0x26, 0x05, 0x82, 0x52, - 0xab, 0x5c, 0xa0, 0xf8, 0x0a, 0x9e, 0x0e, 0x18, 0xc5, 0xb1, 0x86, 0x62, 0xb7, 0x18, 0x3f, 0x86, - 0x55, 0x84, 0xe2, 0x08, 0x1a, 0xa7, 0x06, 0xf4, 0x68, 0xfe, 0xcb, 0x5c, 0x78, 0x78, 0x58, 0xd0, - 0x0a, 0xbc, 0xfd, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x58, 0x53, 0x0f, 0x6a, 0x05, 0x14, 0x00, - 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// RepoManagerClient is the client API for RepoManager service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type RepoManagerClient interface { - // Create repository, repository used to store package of app - CreateRepo(ctx context.Context, in *CreateRepoRequest, opts ...grpc.CallOption) (*CreateRepoResponse, error) - // Get repositories ,filter with these fields(repo_id, name, type, visibility, status, app_default_status, owner, controller), default return all repositories - DescribeRepos(ctx context.Context, in *DescribeReposRequest, opts ...grpc.CallOption) (*DescribeReposResponse, error) - // Modify repository - ModifyRepo(ctx context.Context, in *ModifyRepoRequest, opts ...grpc.CallOption) (*ModifyRepoResponse, error) - // Batch delete repositories - DeleteRepos(ctx context.Context, in *DeleteReposRequest, opts ...grpc.CallOption) (*DeleteReposResponse, error) - // Validate repository - ValidateRepo(ctx context.Context, in *ValidateRepoRequest, opts ...grpc.CallOption) (*ValidateRepoResponse, error) -} - -type repoManagerClient struct { - cc *grpc.ClientConn -} - -func NewRepoManagerClient(cc *grpc.ClientConn) RepoManagerClient { - return &repoManagerClient{cc} -} - -func (c *repoManagerClient) CreateRepo(ctx context.Context, in *CreateRepoRequest, opts ...grpc.CallOption) (*CreateRepoResponse, error) { - out := new(CreateRepoResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RepoManager/CreateRepo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *repoManagerClient) DescribeRepos(ctx context.Context, in *DescribeReposRequest, opts ...grpc.CallOption) (*DescribeReposResponse, error) { - out := new(DescribeReposResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RepoManager/DescribeRepos", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *repoManagerClient) ModifyRepo(ctx context.Context, in *ModifyRepoRequest, opts ...grpc.CallOption) (*ModifyRepoResponse, error) { - out := new(ModifyRepoResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RepoManager/ModifyRepo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *repoManagerClient) DeleteRepos(ctx context.Context, in *DeleteReposRequest, opts ...grpc.CallOption) (*DeleteReposResponse, error) { - out := new(DeleteReposResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RepoManager/DeleteRepos", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *repoManagerClient) ValidateRepo(ctx context.Context, in *ValidateRepoRequest, opts ...grpc.CallOption) (*ValidateRepoResponse, error) { - out := new(ValidateRepoResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RepoManager/ValidateRepo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// RepoManagerServer is the server API for RepoManager service. -type RepoManagerServer interface { - // Create repository, repository used to store package of app - CreateRepo(context.Context, *CreateRepoRequest) (*CreateRepoResponse, error) - // Get repositories ,filter with these fields(repo_id, name, type, visibility, status, app_default_status, owner, controller), default return all repositories - DescribeRepos(context.Context, *DescribeReposRequest) (*DescribeReposResponse, error) - // Modify repository - ModifyRepo(context.Context, *ModifyRepoRequest) (*ModifyRepoResponse, error) - // Batch delete repositories - DeleteRepos(context.Context, *DeleteReposRequest) (*DeleteReposResponse, error) - // Validate repository - ValidateRepo(context.Context, *ValidateRepoRequest) (*ValidateRepoResponse, error) -} - -// UnimplementedRepoManagerServer can be embedded to have forward compatible implementations. -type UnimplementedRepoManagerServer struct { -} - -func (*UnimplementedRepoManagerServer) CreateRepo(ctx context.Context, req *CreateRepoRequest) (*CreateRepoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateRepo not implemented") -} -func (*UnimplementedRepoManagerServer) DescribeRepos(ctx context.Context, req *DescribeReposRequest) (*DescribeReposResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeRepos not implemented") -} -func (*UnimplementedRepoManagerServer) ModifyRepo(ctx context.Context, req *ModifyRepoRequest) (*ModifyRepoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ModifyRepo not implemented") -} -func (*UnimplementedRepoManagerServer) DeleteRepos(ctx context.Context, req *DeleteReposRequest) (*DeleteReposResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteRepos not implemented") -} -func (*UnimplementedRepoManagerServer) ValidateRepo(ctx context.Context, req *ValidateRepoRequest) (*ValidateRepoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ValidateRepo not implemented") -} - -func RegisterRepoManagerServer(s *grpc.Server, srv RepoManagerServer) { - s.RegisterService(&_RepoManager_serviceDesc, srv) -} - -func _RepoManager_CreateRepo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateRepoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RepoManagerServer).CreateRepo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RepoManager/CreateRepo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RepoManagerServer).CreateRepo(ctx, req.(*CreateRepoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RepoManager_DescribeRepos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeReposRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RepoManagerServer).DescribeRepos(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RepoManager/DescribeRepos", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RepoManagerServer).DescribeRepos(ctx, req.(*DescribeReposRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RepoManager_ModifyRepo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ModifyRepoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RepoManagerServer).ModifyRepo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RepoManager/ModifyRepo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RepoManagerServer).ModifyRepo(ctx, req.(*ModifyRepoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RepoManager_DeleteRepos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteReposRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RepoManagerServer).DeleteRepos(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RepoManager/DeleteRepos", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RepoManagerServer).DeleteRepos(ctx, req.(*DeleteReposRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RepoManager_ValidateRepo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ValidateRepoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RepoManagerServer).ValidateRepo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RepoManager/ValidateRepo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RepoManagerServer).ValidateRepo(ctx, req.(*ValidateRepoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _RepoManager_serviceDesc = grpc.ServiceDesc{ - ServiceName: "openpitrix.RepoManager", - HandlerType: (*RepoManagerServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateRepo", - Handler: _RepoManager_CreateRepo_Handler, - }, - { - MethodName: "DescribeRepos", - Handler: _RepoManager_DescribeRepos_Handler, - }, - { - MethodName: "ModifyRepo", - Handler: _RepoManager_ModifyRepo_Handler, - }, - { - MethodName: "DeleteRepos", - Handler: _RepoManager_DeleteRepos_Handler, - }, - { - MethodName: "ValidateRepo", - Handler: _RepoManager_ValidateRepo_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "repo.proto", -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/repo.pb.gw.go b/vendor/openpitrix.io/openpitrix/pkg/pb/repo.pb.gw.go deleted file mode 100644 index 94c4af1de..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/repo.pb.gw.go +++ /dev/null @@ -1,473 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: repo.proto - -/* -Package pb is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package pb - -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/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage - -func request_RepoManager_CreateRepo_0(ctx context.Context, marshaler runtime.Marshaler, client RepoManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateRepoRequest - 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.CreateRepo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_RepoManager_CreateRepo_0(ctx context.Context, marshaler runtime.Marshaler, server RepoManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateRepoRequest - 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.CreateRepo(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_RepoManager_DescribeRepos_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_RepoManager_DescribeRepos_0(ctx context.Context, marshaler runtime.Marshaler, client RepoManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeReposRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RepoManager_DescribeRepos_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeRepos(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_RepoManager_DescribeRepos_0(ctx context.Context, marshaler runtime.Marshaler, server RepoManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeReposRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_RepoManager_DescribeRepos_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeRepos(ctx, &protoReq) - return msg, metadata, err - -} - -func request_RepoManager_ModifyRepo_0(ctx context.Context, marshaler runtime.Marshaler, client RepoManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyRepoRequest - 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.ModifyRepo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_RepoManager_ModifyRepo_0(ctx context.Context, marshaler runtime.Marshaler, server RepoManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyRepoRequest - 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.ModifyRepo(ctx, &protoReq) - return msg, metadata, err - -} - -func request_RepoManager_DeleteRepos_0(ctx context.Context, marshaler runtime.Marshaler, client RepoManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteReposRequest - 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.DeleteRepos(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_RepoManager_DeleteRepos_0(ctx context.Context, marshaler runtime.Marshaler, server RepoManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteReposRequest - 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.DeleteRepos(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_RepoManager_ValidateRepo_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_RepoManager_ValidateRepo_0(ctx context.Context, marshaler runtime.Marshaler, client RepoManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ValidateRepoRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RepoManager_ValidateRepo_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ValidateRepo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_RepoManager_ValidateRepo_0(ctx context.Context, marshaler runtime.Marshaler, server RepoManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ValidateRepoRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_RepoManager_ValidateRepo_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ValidateRepo(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterRepoManagerHandlerServer registers the http handlers for service RepoManager to "mux". -// UnaryRPC :call RepoManagerServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterRepoManagerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RepoManagerServer) error { - - mux.Handle("POST", pattern_RepoManager_CreateRepo_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_RepoManager_CreateRepo_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RepoManager_CreateRepo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_RepoManager_DescribeRepos_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_RepoManager_DescribeRepos_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RepoManager_DescribeRepos_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_RepoManager_ModifyRepo_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_RepoManager_ModifyRepo_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RepoManager_ModifyRepo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_RepoManager_DeleteRepos_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_RepoManager_DeleteRepos_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RepoManager_DeleteRepos_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_RepoManager_ValidateRepo_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_RepoManager_ValidateRepo_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RepoManager_ValidateRepo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterRepoManagerHandlerFromEndpoint is same as RegisterRepoManagerHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterRepoManagerHandlerFromEndpoint(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 RegisterRepoManagerHandler(ctx, mux, conn) -} - -// RegisterRepoManagerHandler registers the http handlers for service RepoManager to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterRepoManagerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterRepoManagerHandlerClient(ctx, mux, NewRepoManagerClient(conn)) -} - -// RegisterRepoManagerHandlerClient registers the http handlers for service RepoManager -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RepoManagerClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RepoManagerClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "RepoManagerClient" to call the correct interceptors. -func RegisterRepoManagerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RepoManagerClient) error { - - mux.Handle("POST", pattern_RepoManager_CreateRepo_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_RepoManager_CreateRepo_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RepoManager_CreateRepo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_RepoManager_DescribeRepos_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_RepoManager_DescribeRepos_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RepoManager_DescribeRepos_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_RepoManager_ModifyRepo_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_RepoManager_ModifyRepo_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RepoManager_ModifyRepo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_RepoManager_DeleteRepos_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_RepoManager_DeleteRepos_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RepoManager_DeleteRepos_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_RepoManager_ValidateRepo_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_RepoManager_ValidateRepo_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RepoManager_ValidateRepo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_RepoManager_CreateRepo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "repos"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RepoManager_DescribeRepos_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "repos"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RepoManager_ModifyRepo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "repos"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RepoManager_DeleteRepos_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "repos"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RepoManager_ValidateRepo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "repos", "validate"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_RepoManager_CreateRepo_0 = runtime.ForwardResponseMessage - - forward_RepoManager_DescribeRepos_0 = runtime.ForwardResponseMessage - - forward_RepoManager_ModifyRepo_0 = runtime.ForwardResponseMessage - - forward_RepoManager_DeleteRepos_0 = runtime.ForwardResponseMessage - - forward_RepoManager_ValidateRepo_0 = runtime.ForwardResponseMessage -) diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/repo_indexer.pb.go b/vendor/openpitrix.io/openpitrix/pkg/pb/repo_indexer.pb.go deleted file mode 100644 index 63216f30f..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/repo_indexer.pb.go +++ /dev/null @@ -1,528 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: repo_indexer.proto - -package pb - -import ( - context "context" - fmt "fmt" - math "math" - - proto "github.com/golang/protobuf/proto" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type IndexRepoRequest struct { - // id of repository to index - RepoId *wrappers.StringValue `protobuf:"bytes,1,opt,name=repo_id,json=repoId,proto3" json:"repo_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *IndexRepoRequest) Reset() { *m = IndexRepoRequest{} } -func (m *IndexRepoRequest) String() string { return proto.CompactTextString(m) } -func (*IndexRepoRequest) ProtoMessage() {} -func (*IndexRepoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e135b06a8245a758, []int{0} -} - -func (m *IndexRepoRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_IndexRepoRequest.Unmarshal(m, b) -} -func (m *IndexRepoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_IndexRepoRequest.Marshal(b, m, deterministic) -} -func (m *IndexRepoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_IndexRepoRequest.Merge(m, src) -} -func (m *IndexRepoRequest) XXX_Size() int { - return xxx_messageInfo_IndexRepoRequest.Size(m) -} -func (m *IndexRepoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_IndexRepoRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_IndexRepoRequest proto.InternalMessageInfo - -func (m *IndexRepoRequest) GetRepoId() *wrappers.StringValue { - if m != nil { - return m.RepoId - } - return nil -} - -type IndexRepoResponse struct { - // repository event - RepoEvent *RepoEvent `protobuf:"bytes,1,opt,name=repo_event,json=repoEvent,proto3" json:"repo_event,omitempty"` - // id of repository indexed - RepoId *wrappers.StringValue `protobuf:"bytes,2,opt,name=repo_id,json=repoId,proto3" json:"repo_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *IndexRepoResponse) Reset() { *m = IndexRepoResponse{} } -func (m *IndexRepoResponse) String() string { return proto.CompactTextString(m) } -func (*IndexRepoResponse) ProtoMessage() {} -func (*IndexRepoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e135b06a8245a758, []int{1} -} - -func (m *IndexRepoResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_IndexRepoResponse.Unmarshal(m, b) -} -func (m *IndexRepoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_IndexRepoResponse.Marshal(b, m, deterministic) -} -func (m *IndexRepoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_IndexRepoResponse.Merge(m, src) -} -func (m *IndexRepoResponse) XXX_Size() int { - return xxx_messageInfo_IndexRepoResponse.Size(m) -} -func (m *IndexRepoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_IndexRepoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_IndexRepoResponse proto.InternalMessageInfo - -func (m *IndexRepoResponse) GetRepoEvent() *RepoEvent { - if m != nil { - return m.RepoEvent - } - return nil -} - -func (m *IndexRepoResponse) GetRepoId() *wrappers.StringValue { - if m != nil { - return m.RepoId - } - return nil -} - -type RepoEvent struct { - // repository event id - RepoEventId *wrappers.StringValue `protobuf:"bytes,1,opt,name=repo_event_id,json=repoEventId,proto3" json:"repo_event_id,omitempty"` - // repository id - RepoId *wrappers.StringValue `protobuf:"bytes,2,opt,name=repo_id,json=repoId,proto3" json:"repo_id,omitempty"` - // owner path, concat string group_path:user_id - OwnerPath *wrappers.StringValue `protobuf:"bytes,3,opt,name=owner_path,json=ownerPath,proto3" json:"owner_path,omitempty"` - // repository event status eg.[failed|successful|working|pending] - Status *wrappers.StringValue `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` - // result - Result *wrappers.StringValue `protobuf:"bytes,5,opt,name=result,proto3" json:"result,omitempty"` - // repository event create time - CreateTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // record status changed time - StatusTime *timestamp.Timestamp `protobuf:"bytes,7,opt,name=status_time,json=statusTime,proto3" json:"status_time,omitempty"` - // owner - Owner *wrappers.StringValue `protobuf:"bytes,8,opt,name=owner,proto3" json:"owner,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RepoEvent) Reset() { *m = RepoEvent{} } -func (m *RepoEvent) String() string { return proto.CompactTextString(m) } -func (*RepoEvent) ProtoMessage() {} -func (*RepoEvent) Descriptor() ([]byte, []int) { - return fileDescriptor_e135b06a8245a758, []int{2} -} - -func (m *RepoEvent) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RepoEvent.Unmarshal(m, b) -} -func (m *RepoEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RepoEvent.Marshal(b, m, deterministic) -} -func (m *RepoEvent) XXX_Merge(src proto.Message) { - xxx_messageInfo_RepoEvent.Merge(m, src) -} -func (m *RepoEvent) XXX_Size() int { - return xxx_messageInfo_RepoEvent.Size(m) -} -func (m *RepoEvent) XXX_DiscardUnknown() { - xxx_messageInfo_RepoEvent.DiscardUnknown(m) -} - -var xxx_messageInfo_RepoEvent proto.InternalMessageInfo - -func (m *RepoEvent) GetRepoEventId() *wrappers.StringValue { - if m != nil { - return m.RepoEventId - } - return nil -} - -func (m *RepoEvent) GetRepoId() *wrappers.StringValue { - if m != nil { - return m.RepoId - } - return nil -} - -func (m *RepoEvent) GetOwnerPath() *wrappers.StringValue { - if m != nil { - return m.OwnerPath - } - return nil -} - -func (m *RepoEvent) GetStatus() *wrappers.StringValue { - if m != nil { - return m.Status - } - return nil -} - -func (m *RepoEvent) GetResult() *wrappers.StringValue { - if m != nil { - return m.Result - } - return nil -} - -func (m *RepoEvent) GetCreateTime() *timestamp.Timestamp { - if m != nil { - return m.CreateTime - } - return nil -} - -func (m *RepoEvent) GetStatusTime() *timestamp.Timestamp { - if m != nil { - return m.StatusTime - } - return nil -} - -func (m *RepoEvent) GetOwner() *wrappers.StringValue { - if m != nil { - return m.Owner - } - return nil -} - -type DescribeRepoEventsRequest struct { - // data limit per page, default value 20, max value 200 - Limit uint32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` - // data offset, default 0 - Offset uint32 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` - // repository event ids - RepoEventId []string `protobuf:"bytes,11,rep,name=repo_event_id,json=repoEventId,proto3" json:"repo_event_id,omitempty"` - // repository ids - RepoId []string `protobuf:"bytes,12,rep,name=repo_id,json=repoId,proto3" json:"repo_id,omitempty"` - // owner - Owner []string `protobuf:"bytes,13,rep,name=owner,proto3" json:"owner,omitempty"` - // repository event status eg.[failed|successful|working|pending] - Status []string `protobuf:"bytes,14,rep,name=status,proto3" json:"status,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeRepoEventsRequest) Reset() { *m = DescribeRepoEventsRequest{} } -func (m *DescribeRepoEventsRequest) String() string { return proto.CompactTextString(m) } -func (*DescribeRepoEventsRequest) ProtoMessage() {} -func (*DescribeRepoEventsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e135b06a8245a758, []int{3} -} - -func (m *DescribeRepoEventsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeRepoEventsRequest.Unmarshal(m, b) -} -func (m *DescribeRepoEventsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeRepoEventsRequest.Marshal(b, m, deterministic) -} -func (m *DescribeRepoEventsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeRepoEventsRequest.Merge(m, src) -} -func (m *DescribeRepoEventsRequest) XXX_Size() int { - return xxx_messageInfo_DescribeRepoEventsRequest.Size(m) -} -func (m *DescribeRepoEventsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeRepoEventsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeRepoEventsRequest proto.InternalMessageInfo - -func (m *DescribeRepoEventsRequest) GetLimit() uint32 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *DescribeRepoEventsRequest) GetOffset() uint32 { - if m != nil { - return m.Offset - } - return 0 -} - -func (m *DescribeRepoEventsRequest) GetRepoEventId() []string { - if m != nil { - return m.RepoEventId - } - return nil -} - -func (m *DescribeRepoEventsRequest) GetRepoId() []string { - if m != nil { - return m.RepoId - } - return nil -} - -func (m *DescribeRepoEventsRequest) GetOwner() []string { - if m != nil { - return m.Owner - } - return nil -} - -func (m *DescribeRepoEventsRequest) GetStatus() []string { - if m != nil { - return m.Status - } - return nil -} - -type DescribeRepoEventsResponse struct { - // total count of repository event - TotalCount uint32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - // list of repository event - RepoEventSet []*RepoEvent `protobuf:"bytes,2,rep,name=repo_event_set,json=repoEventSet,proto3" json:"repo_event_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeRepoEventsResponse) Reset() { *m = DescribeRepoEventsResponse{} } -func (m *DescribeRepoEventsResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeRepoEventsResponse) ProtoMessage() {} -func (*DescribeRepoEventsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e135b06a8245a758, []int{4} -} - -func (m *DescribeRepoEventsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeRepoEventsResponse.Unmarshal(m, b) -} -func (m *DescribeRepoEventsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeRepoEventsResponse.Marshal(b, m, deterministic) -} -func (m *DescribeRepoEventsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeRepoEventsResponse.Merge(m, src) -} -func (m *DescribeRepoEventsResponse) XXX_Size() int { - return xxx_messageInfo_DescribeRepoEventsResponse.Size(m) -} -func (m *DescribeRepoEventsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeRepoEventsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeRepoEventsResponse proto.InternalMessageInfo - -func (m *DescribeRepoEventsResponse) GetTotalCount() uint32 { - if m != nil { - return m.TotalCount - } - return 0 -} - -func (m *DescribeRepoEventsResponse) GetRepoEventSet() []*RepoEvent { - if m != nil { - return m.RepoEventSet - } - return nil -} - -func init() { - proto.RegisterType((*IndexRepoRequest)(nil), "openpitrix.IndexRepoRequest") - proto.RegisterType((*IndexRepoResponse)(nil), "openpitrix.IndexRepoResponse") - proto.RegisterType((*RepoEvent)(nil), "openpitrix.RepoEvent") - proto.RegisterType((*DescribeRepoEventsRequest)(nil), "openpitrix.DescribeRepoEventsRequest") - proto.RegisterType((*DescribeRepoEventsResponse)(nil), "openpitrix.DescribeRepoEventsResponse") -} - -func init() { proto.RegisterFile("repo_indexer.proto", fileDescriptor_e135b06a8245a758) } - -var fileDescriptor_e135b06a8245a758 = []byte{ - // 607 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xcd, 0x6e, 0xd3, 0x4c, - 0x14, 0x95, 0x93, 0x36, 0xfd, 0x72, 0xd3, 0xf4, 0xa3, 0xa3, 0x96, 0x1a, 0x2b, 0xb4, 0x96, 0x25, - 0x50, 0x85, 0xa8, 0xad, 0x96, 0xb2, 0x21, 0x1b, 0xca, 0x8f, 0x50, 0x76, 0xc8, 0x45, 0x2c, 0xd8, - 0x44, 0x93, 0xe4, 0xd6, 0xb5, 0x94, 0x7a, 0x86, 0x99, 0x71, 0x5b, 0x58, 0x21, 0x24, 0x5e, 0xa0, - 0x48, 0x3c, 0x06, 0x2b, 0xde, 0x84, 0x25, 0x5b, 0x1e, 0x04, 0xcd, 0x8c, 0xed, 0x86, 0x86, 0xa8, - 0x81, 0x95, 0x3d, 0x73, 0xcf, 0xb9, 0xf7, 0xdc, 0xbf, 0x01, 0x22, 0x90, 0xb3, 0x7e, 0x9a, 0x8d, - 0xf0, 0x1c, 0x45, 0xc8, 0x05, 0x53, 0x8c, 0x00, 0xe3, 0x98, 0xf1, 0x54, 0x89, 0xf4, 0xdc, 0xdb, - 0x4c, 0x18, 0x4b, 0xc6, 0x18, 0x19, 0xcb, 0x20, 0x3f, 0x8a, 0xce, 0x04, 0xe5, 0x1c, 0x85, 0xb4, - 0x58, 0x6f, 0xeb, 0xaa, 0x5d, 0xa5, 0x27, 0x28, 0x15, 0x3d, 0xe1, 0x05, 0xa0, 0x53, 0x00, 0x28, - 0x4f, 0x23, 0x9a, 0x65, 0x4c, 0x51, 0x95, 0xb2, 0xac, 0xa4, 0xdf, 0x37, 0x9f, 0xe1, 0x4e, 0x82, - 0xd9, 0x8e, 0x3c, 0xa3, 0x49, 0x82, 0x22, 0x62, 0xdc, 0x20, 0xa6, 0xd1, 0x41, 0x0f, 0x6e, 0xf4, - 0xb4, 0xd2, 0x18, 0x39, 0x8b, 0xf1, 0x6d, 0x8e, 0x52, 0x91, 0x87, 0xb0, 0x64, 0x53, 0x18, 0xb9, - 0x8e, 0xef, 0x6c, 0xb7, 0xf6, 0x3a, 0xa1, 0x8d, 0x18, 0x96, 0x92, 0xc2, 0x43, 0x25, 0xd2, 0x2c, - 0x79, 0x4d, 0xc7, 0x39, 0xc6, 0x0d, 0x0d, 0xee, 0x8d, 0x82, 0x0f, 0x0e, 0xac, 0x4e, 0xf8, 0x92, - 0x9c, 0x65, 0x12, 0xc9, 0x3e, 0x80, 0x71, 0x86, 0xa7, 0x98, 0xa9, 0xc2, 0xdf, 0x7a, 0x78, 0x59, - 0x8e, 0x50, 0xa3, 0x9f, 0x6b, 0x63, 0xdc, 0x14, 0xe5, 0xef, 0xa4, 0x84, 0xda, 0x5f, 0x48, 0xf8, - 0x51, 0x87, 0x66, 0xe5, 0x8f, 0x3c, 0x86, 0xf6, 0x65, 0xe8, 0x79, 0xb3, 0x69, 0x55, 0x22, 0x7a, - 0xa3, 0x7f, 0x94, 0x41, 0xba, 0x00, 0xec, 0x2c, 0x43, 0xd1, 0xe7, 0x54, 0x1d, 0xbb, 0xf5, 0x39, - 0x98, 0x4d, 0x83, 0x7f, 0x49, 0xd5, 0x31, 0xd9, 0x87, 0x86, 0x54, 0x54, 0xe5, 0xd2, 0x5d, 0x98, - 0x27, 0xa4, 0xc5, 0x6a, 0x96, 0x40, 0x99, 0x8f, 0x95, 0xbb, 0x38, 0x9f, 0x50, 0x8d, 0x25, 0x5d, - 0x68, 0x0d, 0x05, 0x52, 0x85, 0x7d, 0x3d, 0x63, 0x6e, 0xc3, 0x50, 0xbd, 0x29, 0xea, 0xab, 0x72, - 0x00, 0x63, 0xb0, 0x70, 0x7d, 0xa1, 0xc9, 0x36, 0xb8, 0x25, 0x2f, 0x5d, 0x4f, 0xb6, 0x70, 0x43, - 0xde, 0x83, 0x45, 0x93, 0xb2, 0xfb, 0xdf, 0x1c, 0x72, 0x2d, 0x34, 0xf8, 0xe6, 0xc0, 0xad, 0x67, - 0x28, 0x87, 0x22, 0x1d, 0x60, 0xd5, 0x65, 0x59, 0x4e, 0xed, 0x1a, 0x2c, 0x8e, 0xd3, 0x93, 0x54, - 0x99, 0xb2, 0xb5, 0x63, 0x7b, 0x20, 0x37, 0xa1, 0xc1, 0x8e, 0x8e, 0x24, 0xda, 0xba, 0xb4, 0xe3, - 0xe2, 0x44, 0x82, 0xab, 0xb3, 0xd1, 0xf2, 0xeb, 0xdb, 0xcd, 0xdf, 0xbb, 0xbf, 0x71, 0xd9, 0xfd, - 0x65, 0x63, 0x2d, 0xfb, 0xbb, 0x56, 0x8a, 0x6f, 0x9b, 0x6b, 0x7b, 0xd0, 0xa1, 0x8a, 0xc6, 0xad, - 0x58, 0xb4, 0x3d, 0x05, 0xef, 0xc1, 0xfb, 0x93, 0xea, 0x62, 0x3f, 0xb6, 0xa0, 0xa5, 0x98, 0xa2, - 0xe3, 0xfe, 0x90, 0xe5, 0xc5, 0x82, 0xb4, 0x63, 0x30, 0x57, 0x4f, 0xf5, 0x0d, 0xe9, 0xc2, 0xca, - 0x84, 0x52, 0x9d, 0x49, 0xcd, 0xaf, 0xcf, 0x5e, 0xa2, 0xe5, 0x2a, 0x83, 0x43, 0x54, 0x7b, 0x5f, - 0x6b, 0xd0, 0xd2, 0xb6, 0x9e, 0x7d, 0x8d, 0xc8, 0x27, 0x07, 0x9a, 0xd5, 0x8e, 0x92, 0xce, 0xa4, - 0x8b, 0xab, 0xcf, 0x80, 0x77, 0x7b, 0x86, 0xd5, 0x0a, 0x0f, 0xba, 0x17, 0x07, 0x9b, 0xa4, 0x73, - 0xa8, 0xa8, 0x50, 0xbe, 0x79, 0xec, 0x7c, 0x1d, 0x59, 0xa6, 0x8a, 0x89, 0x77, 0xbe, 0x11, 0xfb, - 0xf1, 0xfb, 0xcf, 0xcf, 0xb5, 0xb5, 0xe0, 0xff, 0xe8, 0x74, 0x37, 0x32, 0xb6, 0xc8, 0xe0, 0x1e, - 0x39, 0xf7, 0xc8, 0x17, 0x07, 0xc8, 0x74, 0x51, 0xc8, 0x9d, 0xc9, 0x90, 0x33, 0x5b, 0xed, 0xdd, - 0xbd, 0x0e, 0x56, 0x48, 0xdc, 0xbd, 0x38, 0xd8, 0x20, 0xeb, 0x2f, 0x50, 0x4d, 0x49, 0x93, 0x46, - 0xdb, 0x2a, 0xa9, 0xb4, 0xd9, 0xf2, 0xca, 0x27, 0x0b, 0x6f, 0x6a, 0x7c, 0x30, 0x68, 0x98, 0x31, - 0x7c, 0xf0, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x44, 0x04, 0xf0, 0xba, 0xcb, 0x05, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// RepoIndexerClient is the client API for RepoIndexer service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type RepoIndexerClient interface { - // Start index repository event - IndexRepo(ctx context.Context, in *IndexRepoRequest, opts ...grpc.CallOption) (*IndexRepoResponse, error) - // Get repository events - DescribeRepoEvents(ctx context.Context, in *DescribeRepoEventsRequest, opts ...grpc.CallOption) (*DescribeRepoEventsResponse, error) -} - -type repoIndexerClient struct { - cc *grpc.ClientConn -} - -func NewRepoIndexerClient(cc *grpc.ClientConn) RepoIndexerClient { - return &repoIndexerClient{cc} -} - -func (c *repoIndexerClient) IndexRepo(ctx context.Context, in *IndexRepoRequest, opts ...grpc.CallOption) (*IndexRepoResponse, error) { - out := new(IndexRepoResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RepoIndexer/IndexRepo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *repoIndexerClient) DescribeRepoEvents(ctx context.Context, in *DescribeRepoEventsRequest, opts ...grpc.CallOption) (*DescribeRepoEventsResponse, error) { - out := new(DescribeRepoEventsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RepoIndexer/DescribeRepoEvents", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// RepoIndexerServer is the server API for RepoIndexer service. -type RepoIndexerServer interface { - // Start index repository event - IndexRepo(context.Context, *IndexRepoRequest) (*IndexRepoResponse, error) - // Get repository events - DescribeRepoEvents(context.Context, *DescribeRepoEventsRequest) (*DescribeRepoEventsResponse, error) -} - -// UnimplementedRepoIndexerServer can be embedded to have forward compatible implementations. -type UnimplementedRepoIndexerServer struct { -} - -func (*UnimplementedRepoIndexerServer) IndexRepo(ctx context.Context, req *IndexRepoRequest) (*IndexRepoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method IndexRepo not implemented") -} -func (*UnimplementedRepoIndexerServer) DescribeRepoEvents(ctx context.Context, req *DescribeRepoEventsRequest) (*DescribeRepoEventsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeRepoEvents not implemented") -} - -func RegisterRepoIndexerServer(s *grpc.Server, srv RepoIndexerServer) { - s.RegisterService(&_RepoIndexer_serviceDesc, srv) -} - -func _RepoIndexer_IndexRepo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IndexRepoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RepoIndexerServer).IndexRepo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RepoIndexer/IndexRepo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RepoIndexerServer).IndexRepo(ctx, req.(*IndexRepoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RepoIndexer_DescribeRepoEvents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeRepoEventsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RepoIndexerServer).DescribeRepoEvents(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RepoIndexer/DescribeRepoEvents", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RepoIndexerServer).DescribeRepoEvents(ctx, req.(*DescribeRepoEventsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _RepoIndexer_serviceDesc = grpc.ServiceDesc{ - ServiceName: "openpitrix.RepoIndexer", - HandlerType: (*RepoIndexerServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "IndexRepo", - Handler: _RepoIndexer_IndexRepo_Handler, - }, - { - MethodName: "DescribeRepoEvents", - Handler: _RepoIndexer_DescribeRepoEvents_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "repo_indexer.proto", -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/repo_indexer.pb.gw.go b/vendor/openpitrix.io/openpitrix/pkg/pb/repo_indexer.pb.gw.go deleted file mode 100644 index f151082c3..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/repo_indexer.pb.gw.go +++ /dev/null @@ -1,240 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: repo_indexer.proto - -/* -Package pb is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package pb - -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/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage - -func request_RepoIndexer_IndexRepo_0(ctx context.Context, marshaler runtime.Marshaler, client RepoIndexerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq IndexRepoRequest - 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.IndexRepo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_RepoIndexer_IndexRepo_0(ctx context.Context, marshaler runtime.Marshaler, server RepoIndexerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq IndexRepoRequest - 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.IndexRepo(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_RepoIndexer_DescribeRepoEvents_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_RepoIndexer_DescribeRepoEvents_0(ctx context.Context, marshaler runtime.Marshaler, client RepoIndexerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeRepoEventsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RepoIndexer_DescribeRepoEvents_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeRepoEvents(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_RepoIndexer_DescribeRepoEvents_0(ctx context.Context, marshaler runtime.Marshaler, server RepoIndexerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeRepoEventsRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_RepoIndexer_DescribeRepoEvents_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeRepoEvents(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterRepoIndexerHandlerServer registers the http handlers for service RepoIndexer to "mux". -// UnaryRPC :call RepoIndexerServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterRepoIndexerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RepoIndexerServer) error { - - mux.Handle("POST", pattern_RepoIndexer_IndexRepo_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_RepoIndexer_IndexRepo_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RepoIndexer_IndexRepo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_RepoIndexer_DescribeRepoEvents_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_RepoIndexer_DescribeRepoEvents_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RepoIndexer_DescribeRepoEvents_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterRepoIndexerHandlerFromEndpoint is same as RegisterRepoIndexerHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterRepoIndexerHandlerFromEndpoint(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 RegisterRepoIndexerHandler(ctx, mux, conn) -} - -// RegisterRepoIndexerHandler registers the http handlers for service RepoIndexer to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterRepoIndexerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterRepoIndexerHandlerClient(ctx, mux, NewRepoIndexerClient(conn)) -} - -// RegisterRepoIndexerHandlerClient registers the http handlers for service RepoIndexer -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RepoIndexerClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RepoIndexerClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "RepoIndexerClient" to call the correct interceptors. -func RegisterRepoIndexerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RepoIndexerClient) error { - - mux.Handle("POST", pattern_RepoIndexer_IndexRepo_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_RepoIndexer_IndexRepo_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RepoIndexer_IndexRepo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_RepoIndexer_DescribeRepoEvents_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_RepoIndexer_DescribeRepoEvents_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RepoIndexer_DescribeRepoEvents_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_RepoIndexer_IndexRepo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "repos", "index"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RepoIndexer_DescribeRepoEvents_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "repo_events"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_RepoIndexer_IndexRepo_0 = runtime.ForwardResponseMessage - - forward_RepoIndexer_DescribeRepoEvents_0 = runtime.ForwardResponseMessage -) diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/runtime.pb.go b/vendor/openpitrix.io/openpitrix/pkg/pb/runtime.pb.go deleted file mode 100644 index 43fb3de06..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/runtime.pb.go +++ /dev/null @@ -1,2490 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: runtime.proto - -package pb - -import ( - context "context" - fmt "fmt" - math "math" - - proto "github.com/golang/protobuf/proto" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type RuntimeCredential struct { - // runtime credential id - RuntimeCredentialId *wrappers.StringValue `protobuf:"bytes,1,opt,name=runtime_credential_id,json=runtimeCredentialId,proto3" json:"runtime_credential_id,omitempty"` - // runtime credential name - Name *wrappers.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // runtime credential description - Description *wrappers.StringValue `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - // runtime url eg.[http://www.qingyun.com] - RuntimeUrl *wrappers.StringValue `protobuf:"bytes,4,opt,name=runtime_url,json=runtimeUrl,proto3" json:"runtime_url,omitempty"` - // runtime credential content - RuntimeCredentialContent *wrappers.StringValue `protobuf:"bytes,5,opt,name=runtime_credential_content,json=runtimeCredentialContent,proto3" json:"runtime_credential_content,omitempty"` - // own path, concat string group_path:user_id - OwnerPath *wrappers.StringValue `protobuf:"bytes,6,opt,name=owner_path,json=ownerPath,proto3" json:"owner_path,omitempty"` - // runtime provider eg.[qingcloud|aliyun|aws|kubernetes] - Provider *wrappers.StringValue `protobuf:"bytes,7,opt,name=provider,proto3" json:"provider,omitempty"` - // runtime credential status eg.[active|deleted] - Status *wrappers.StringValue `protobuf:"bytes,8,opt,name=status,proto3" json:"status,omitempty"` - // the time when runtime credential create - CreateTime *timestamp.Timestamp `protobuf:"bytes,9,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // record status changed time - StatusTime *timestamp.Timestamp `protobuf:"bytes,10,opt,name=status_time,json=statusTime,proto3" json:"status_time,omitempty"` - // debug or not - Debug *wrappers.BoolValue `protobuf:"bytes,11,opt,name=debug,proto3" json:"debug,omitempty"` - // owner - Owner *wrappers.StringValue `protobuf:"bytes,12,opt,name=owner,proto3" json:"owner,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RuntimeCredential) Reset() { *m = RuntimeCredential{} } -func (m *RuntimeCredential) String() string { return proto.CompactTextString(m) } -func (*RuntimeCredential) ProtoMessage() {} -func (*RuntimeCredential) Descriptor() ([]byte, []int) { - return fileDescriptor_86e2dd377c869464, []int{0} -} - -func (m *RuntimeCredential) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RuntimeCredential.Unmarshal(m, b) -} -func (m *RuntimeCredential) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RuntimeCredential.Marshal(b, m, deterministic) -} -func (m *RuntimeCredential) XXX_Merge(src proto.Message) { - xxx_messageInfo_RuntimeCredential.Merge(m, src) -} -func (m *RuntimeCredential) XXX_Size() int { - return xxx_messageInfo_RuntimeCredential.Size(m) -} -func (m *RuntimeCredential) XXX_DiscardUnknown() { - xxx_messageInfo_RuntimeCredential.DiscardUnknown(m) -} - -var xxx_messageInfo_RuntimeCredential proto.InternalMessageInfo - -func (m *RuntimeCredential) GetRuntimeCredentialId() *wrappers.StringValue { - if m != nil { - return m.RuntimeCredentialId - } - return nil -} - -func (m *RuntimeCredential) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *RuntimeCredential) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *RuntimeCredential) GetRuntimeUrl() *wrappers.StringValue { - if m != nil { - return m.RuntimeUrl - } - return nil -} - -func (m *RuntimeCredential) GetRuntimeCredentialContent() *wrappers.StringValue { - if m != nil { - return m.RuntimeCredentialContent - } - return nil -} - -func (m *RuntimeCredential) GetOwnerPath() *wrappers.StringValue { - if m != nil { - return m.OwnerPath - } - return nil -} - -func (m *RuntimeCredential) GetProvider() *wrappers.StringValue { - if m != nil { - return m.Provider - } - return nil -} - -func (m *RuntimeCredential) GetStatus() *wrappers.StringValue { - if m != nil { - return m.Status - } - return nil -} - -func (m *RuntimeCredential) GetCreateTime() *timestamp.Timestamp { - if m != nil { - return m.CreateTime - } - return nil -} - -func (m *RuntimeCredential) GetStatusTime() *timestamp.Timestamp { - if m != nil { - return m.StatusTime - } - return nil -} - -func (m *RuntimeCredential) GetDebug() *wrappers.BoolValue { - if m != nil { - return m.Debug - } - return nil -} - -func (m *RuntimeCredential) GetOwner() *wrappers.StringValue { - if m != nil { - return m.Owner - } - return nil -} - -type Runtime struct { - // runtime id - RuntimeId *wrappers.StringValue `protobuf:"bytes,1,opt,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - // runtime name,create by owner. - Name *wrappers.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // runtime description - Description *wrappers.StringValue `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - // runtime provider.eg.[qingcloud|aliyun|aws|kubernetes] - Provider *wrappers.StringValue `protobuf:"bytes,4,opt,name=provider,proto3" json:"provider,omitempty"` - // runtime credential id - RuntimeCredentialId *wrappers.StringValue `protobuf:"bytes,5,opt,name=runtime_credential_id,json=runtimeCredentialId,proto3" json:"runtime_credential_id,omitempty"` - // runtime zone eg.[pek3a|pek3b|...] - Zone *wrappers.StringValue `protobuf:"bytes,6,opt,name=zone,proto3" json:"zone,omitempty"` - // owner path, concat string group_path:user_id - OwnerPath *wrappers.StringValue `protobuf:"bytes,7,opt,name=owner_path,json=ownerPath,proto3" json:"owner_path,omitempty"` - // status eg.[active|deleted] - Status *wrappers.StringValue `protobuf:"bytes,8,opt,name=status,proto3" json:"status,omitempty"` - // the time when runtime create - CreateTime *timestamp.Timestamp `protobuf:"bytes,9,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // record status changed time - StatusTime *timestamp.Timestamp `protobuf:"bytes,10,opt,name=status_time,json=statusTime,proto3" json:"status_time,omitempty"` - // debug or not - Debug *wrappers.BoolValue `protobuf:"bytes,11,opt,name=debug,proto3" json:"debug,omitempty"` - // owner - Owner *wrappers.StringValue `protobuf:"bytes,12,opt,name=owner,proto3" json:"owner,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Runtime) Reset() { *m = Runtime{} } -func (m *Runtime) String() string { return proto.CompactTextString(m) } -func (*Runtime) ProtoMessage() {} -func (*Runtime) Descriptor() ([]byte, []int) { - return fileDescriptor_86e2dd377c869464, []int{1} -} - -func (m *Runtime) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Runtime.Unmarshal(m, b) -} -func (m *Runtime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Runtime.Marshal(b, m, deterministic) -} -func (m *Runtime) XXX_Merge(src proto.Message) { - xxx_messageInfo_Runtime.Merge(m, src) -} -func (m *Runtime) XXX_Size() int { - return xxx_messageInfo_Runtime.Size(m) -} -func (m *Runtime) XXX_DiscardUnknown() { - xxx_messageInfo_Runtime.DiscardUnknown(m) -} - -var xxx_messageInfo_Runtime proto.InternalMessageInfo - -func (m *Runtime) GetRuntimeId() *wrappers.StringValue { - if m != nil { - return m.RuntimeId - } - return nil -} - -func (m *Runtime) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *Runtime) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *Runtime) GetProvider() *wrappers.StringValue { - if m != nil { - return m.Provider - } - return nil -} - -func (m *Runtime) GetRuntimeCredentialId() *wrappers.StringValue { - if m != nil { - return m.RuntimeCredentialId - } - return nil -} - -func (m *Runtime) GetZone() *wrappers.StringValue { - if m != nil { - return m.Zone - } - return nil -} - -func (m *Runtime) GetOwnerPath() *wrappers.StringValue { - if m != nil { - return m.OwnerPath - } - return nil -} - -func (m *Runtime) GetStatus() *wrappers.StringValue { - if m != nil { - return m.Status - } - return nil -} - -func (m *Runtime) GetCreateTime() *timestamp.Timestamp { - if m != nil { - return m.CreateTime - } - return nil -} - -func (m *Runtime) GetStatusTime() *timestamp.Timestamp { - if m != nil { - return m.StatusTime - } - return nil -} - -func (m *Runtime) GetDebug() *wrappers.BoolValue { - if m != nil { - return m.Debug - } - return nil -} - -func (m *Runtime) GetOwner() *wrappers.StringValue { - if m != nil { - return m.Owner - } - return nil -} - -type RuntimeDetail struct { - // runtime - Runtime *Runtime `protobuf:"bytes,1,opt,name=runtime,proto3" json:"runtime,omitempty"` - // runtime credential - RuntimeCredential *RuntimeCredential `protobuf:"bytes,2,opt,name=runtime_credential,json=runtimeCredential,proto3" json:"runtime_credential,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RuntimeDetail) Reset() { *m = RuntimeDetail{} } -func (m *RuntimeDetail) String() string { return proto.CompactTextString(m) } -func (*RuntimeDetail) ProtoMessage() {} -func (*RuntimeDetail) Descriptor() ([]byte, []int) { - return fileDescriptor_86e2dd377c869464, []int{2} -} - -func (m *RuntimeDetail) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RuntimeDetail.Unmarshal(m, b) -} -func (m *RuntimeDetail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RuntimeDetail.Marshal(b, m, deterministic) -} -func (m *RuntimeDetail) XXX_Merge(src proto.Message) { - xxx_messageInfo_RuntimeDetail.Merge(m, src) -} -func (m *RuntimeDetail) XXX_Size() int { - return xxx_messageInfo_RuntimeDetail.Size(m) -} -func (m *RuntimeDetail) XXX_DiscardUnknown() { - xxx_messageInfo_RuntimeDetail.DiscardUnknown(m) -} - -var xxx_messageInfo_RuntimeDetail proto.InternalMessageInfo - -func (m *RuntimeDetail) GetRuntime() *Runtime { - if m != nil { - return m.Runtime - } - return nil -} - -func (m *RuntimeDetail) GetRuntimeCredential() *RuntimeCredential { - if m != nil { - return m.RuntimeCredential - } - return nil -} - -type CreateRuntimeRequest struct { - // required, runtime name - Name *wrappers.StringValue `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // runtime description - Description *wrappers.StringValue `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - // required, runtime provider eg.[qingcloud|aliyun|aws|kubernetes] - Provider *wrappers.StringValue `protobuf:"bytes,3,opt,name=provider,proto3" json:"provider,omitempty"` - // required, runtime credential id - RuntimeCredentialId *wrappers.StringValue `protobuf:"bytes,4,opt,name=runtime_credential_id,json=runtimeCredentialId,proto3" json:"runtime_credential_id,omitempty"` - // required, runtime zone eg.[pek3a|pek3b|...] - Zone *wrappers.StringValue `protobuf:"bytes,5,opt,name=zone,proto3" json:"zone,omitempty"` - // for kubesphere only, if provider this value means upsert this record - RuntimeId *wrappers.StringValue `protobuf:"bytes,10,opt,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateRuntimeRequest) Reset() { *m = CreateRuntimeRequest{} } -func (m *CreateRuntimeRequest) String() string { return proto.CompactTextString(m) } -func (*CreateRuntimeRequest) ProtoMessage() {} -func (*CreateRuntimeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_86e2dd377c869464, []int{3} -} - -func (m *CreateRuntimeRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateRuntimeRequest.Unmarshal(m, b) -} -func (m *CreateRuntimeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateRuntimeRequest.Marshal(b, m, deterministic) -} -func (m *CreateRuntimeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateRuntimeRequest.Merge(m, src) -} -func (m *CreateRuntimeRequest) XXX_Size() int { - return xxx_messageInfo_CreateRuntimeRequest.Size(m) -} -func (m *CreateRuntimeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateRuntimeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateRuntimeRequest proto.InternalMessageInfo - -func (m *CreateRuntimeRequest) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *CreateRuntimeRequest) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *CreateRuntimeRequest) GetProvider() *wrappers.StringValue { - if m != nil { - return m.Provider - } - return nil -} - -func (m *CreateRuntimeRequest) GetRuntimeCredentialId() *wrappers.StringValue { - if m != nil { - return m.RuntimeCredentialId - } - return nil -} - -func (m *CreateRuntimeRequest) GetZone() *wrappers.StringValue { - if m != nil { - return m.Zone - } - return nil -} - -func (m *CreateRuntimeRequest) GetRuntimeId() *wrappers.StringValue { - if m != nil { - return m.RuntimeId - } - return nil -} - -type CreateRuntimeResponse struct { - // id of runtime created - RuntimeId *wrappers.StringValue `protobuf:"bytes,1,opt,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateRuntimeResponse) Reset() { *m = CreateRuntimeResponse{} } -func (m *CreateRuntimeResponse) String() string { return proto.CompactTextString(m) } -func (*CreateRuntimeResponse) ProtoMessage() {} -func (*CreateRuntimeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_86e2dd377c869464, []int{4} -} - -func (m *CreateRuntimeResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateRuntimeResponse.Unmarshal(m, b) -} -func (m *CreateRuntimeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateRuntimeResponse.Marshal(b, m, deterministic) -} -func (m *CreateRuntimeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateRuntimeResponse.Merge(m, src) -} -func (m *CreateRuntimeResponse) XXX_Size() int { - return xxx_messageInfo_CreateRuntimeResponse.Size(m) -} -func (m *CreateRuntimeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CreateRuntimeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateRuntimeResponse proto.InternalMessageInfo - -func (m *CreateRuntimeResponse) GetRuntimeId() *wrappers.StringValue { - if m != nil { - return m.RuntimeId - } - return nil -} - -type DescribeRuntimesRequest struct { - // query key, support these fields(runtime_id, provider, zone, status, owner) - SearchWord *wrappers.StringValue `protobuf:"bytes,1,opt,name=search_word,json=searchWord,proto3" json:"search_word,omitempty"` - // sort key, order by sort_key, default create_time - SortKey *wrappers.StringValue `protobuf:"bytes,2,opt,name=sort_key,json=sortKey,proto3" json:"sort_key,omitempty"` - // value = 0 sort ASC, value = 1 sort DESC - Reverse *wrappers.BoolValue `protobuf:"bytes,3,opt,name=reverse,proto3" json:"reverse,omitempty"` - // data limit per page, default value 20, max value 200 - Limit uint32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` - // data offset, default 0 - Offset uint32 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` - // select columns to display - DisplayColumns []string `protobuf:"bytes,6,rep,name=display_columns,json=displayColumns,proto3" json:"display_columns,omitempty"` - // runtime ids - RuntimeId []string `protobuf:"bytes,11,rep,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - // status eg.[active|deleted] - Status []string `protobuf:"bytes,12,rep,name=status,proto3" json:"status,omitempty"` - // runtime provider eg.[qingcloud|aliyun|aws|kubernetes] - Provider []string `protobuf:"bytes,13,rep,name=provider,proto3" json:"provider,omitempty"` - // owner - Owner []string `protobuf:"bytes,14,rep,name=owner,proto3" json:"owner,omitempty"` - // runtime credential id - RuntimeCredentialId []string `protobuf:"bytes,15,rep,name=runtime_credential_id,json=runtimeCredentialId,proto3" json:"runtime_credential_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeRuntimesRequest) Reset() { *m = DescribeRuntimesRequest{} } -func (m *DescribeRuntimesRequest) String() string { return proto.CompactTextString(m) } -func (*DescribeRuntimesRequest) ProtoMessage() {} -func (*DescribeRuntimesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_86e2dd377c869464, []int{5} -} - -func (m *DescribeRuntimesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeRuntimesRequest.Unmarshal(m, b) -} -func (m *DescribeRuntimesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeRuntimesRequest.Marshal(b, m, deterministic) -} -func (m *DescribeRuntimesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeRuntimesRequest.Merge(m, src) -} -func (m *DescribeRuntimesRequest) XXX_Size() int { - return xxx_messageInfo_DescribeRuntimesRequest.Size(m) -} -func (m *DescribeRuntimesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeRuntimesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeRuntimesRequest proto.InternalMessageInfo - -func (m *DescribeRuntimesRequest) GetSearchWord() *wrappers.StringValue { - if m != nil { - return m.SearchWord - } - return nil -} - -func (m *DescribeRuntimesRequest) GetSortKey() *wrappers.StringValue { - if m != nil { - return m.SortKey - } - return nil -} - -func (m *DescribeRuntimesRequest) GetReverse() *wrappers.BoolValue { - if m != nil { - return m.Reverse - } - return nil -} - -func (m *DescribeRuntimesRequest) GetLimit() uint32 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *DescribeRuntimesRequest) GetOffset() uint32 { - if m != nil { - return m.Offset - } - return 0 -} - -func (m *DescribeRuntimesRequest) GetDisplayColumns() []string { - if m != nil { - return m.DisplayColumns - } - return nil -} - -func (m *DescribeRuntimesRequest) GetRuntimeId() []string { - if m != nil { - return m.RuntimeId - } - return nil -} - -func (m *DescribeRuntimesRequest) GetStatus() []string { - if m != nil { - return m.Status - } - return nil -} - -func (m *DescribeRuntimesRequest) GetProvider() []string { - if m != nil { - return m.Provider - } - return nil -} - -func (m *DescribeRuntimesRequest) GetOwner() []string { - if m != nil { - return m.Owner - } - return nil -} - -func (m *DescribeRuntimesRequest) GetRuntimeCredentialId() []string { - if m != nil { - return m.RuntimeCredentialId - } - return nil -} - -type DescribeRuntimesResponse struct { - // total count of runtime - TotalCount uint32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - // list of runtime - RuntimeSet []*Runtime `protobuf:"bytes,2,rep,name=runtime_set,json=runtimeSet,proto3" json:"runtime_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeRuntimesResponse) Reset() { *m = DescribeRuntimesResponse{} } -func (m *DescribeRuntimesResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeRuntimesResponse) ProtoMessage() {} -func (*DescribeRuntimesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_86e2dd377c869464, []int{6} -} - -func (m *DescribeRuntimesResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeRuntimesResponse.Unmarshal(m, b) -} -func (m *DescribeRuntimesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeRuntimesResponse.Marshal(b, m, deterministic) -} -func (m *DescribeRuntimesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeRuntimesResponse.Merge(m, src) -} -func (m *DescribeRuntimesResponse) XXX_Size() int { - return xxx_messageInfo_DescribeRuntimesResponse.Size(m) -} -func (m *DescribeRuntimesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeRuntimesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeRuntimesResponse proto.InternalMessageInfo - -func (m *DescribeRuntimesResponse) GetTotalCount() uint32 { - if m != nil { - return m.TotalCount - } - return 0 -} - -func (m *DescribeRuntimesResponse) GetRuntimeSet() []*Runtime { - if m != nil { - return m.RuntimeSet - } - return nil -} - -type DescribeRuntimeDetailsResponse struct { - // total count of runtime - TotalCount uint32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - // list of runtime detail info - RuntimeDetailSet []*RuntimeDetail `protobuf:"bytes,2,rep,name=runtime_detail_set,json=runtimeDetailSet,proto3" json:"runtime_detail_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeRuntimeDetailsResponse) Reset() { *m = DescribeRuntimeDetailsResponse{} } -func (m *DescribeRuntimeDetailsResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeRuntimeDetailsResponse) ProtoMessage() {} -func (*DescribeRuntimeDetailsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_86e2dd377c869464, []int{7} -} - -func (m *DescribeRuntimeDetailsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeRuntimeDetailsResponse.Unmarshal(m, b) -} -func (m *DescribeRuntimeDetailsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeRuntimeDetailsResponse.Marshal(b, m, deterministic) -} -func (m *DescribeRuntimeDetailsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeRuntimeDetailsResponse.Merge(m, src) -} -func (m *DescribeRuntimeDetailsResponse) XXX_Size() int { - return xxx_messageInfo_DescribeRuntimeDetailsResponse.Size(m) -} -func (m *DescribeRuntimeDetailsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeRuntimeDetailsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeRuntimeDetailsResponse proto.InternalMessageInfo - -func (m *DescribeRuntimeDetailsResponse) GetTotalCount() uint32 { - if m != nil { - return m.TotalCount - } - return 0 -} - -func (m *DescribeRuntimeDetailsResponse) GetRuntimeDetailSet() []*RuntimeDetail { - if m != nil { - return m.RuntimeDetailSet - } - return nil -} - -type ModifyRuntimeRequest struct { - // required, id of runtime to modify - RuntimeId *wrappers.StringValue `protobuf:"bytes,1,opt,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - // runtime name - Name *wrappers.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // runtime description - Description *wrappers.StringValue `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - // runtime credential id - RuntimeCredentialId *wrappers.StringValue `protobuf:"bytes,4,opt,name=runtime_credential_id,json=runtimeCredentialId,proto3" json:"runtime_credential_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyRuntimeRequest) Reset() { *m = ModifyRuntimeRequest{} } -func (m *ModifyRuntimeRequest) String() string { return proto.CompactTextString(m) } -func (*ModifyRuntimeRequest) ProtoMessage() {} -func (*ModifyRuntimeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_86e2dd377c869464, []int{8} -} - -func (m *ModifyRuntimeRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyRuntimeRequest.Unmarshal(m, b) -} -func (m *ModifyRuntimeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyRuntimeRequest.Marshal(b, m, deterministic) -} -func (m *ModifyRuntimeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyRuntimeRequest.Merge(m, src) -} -func (m *ModifyRuntimeRequest) XXX_Size() int { - return xxx_messageInfo_ModifyRuntimeRequest.Size(m) -} -func (m *ModifyRuntimeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyRuntimeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyRuntimeRequest proto.InternalMessageInfo - -func (m *ModifyRuntimeRequest) GetRuntimeId() *wrappers.StringValue { - if m != nil { - return m.RuntimeId - } - return nil -} - -func (m *ModifyRuntimeRequest) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *ModifyRuntimeRequest) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *ModifyRuntimeRequest) GetRuntimeCredentialId() *wrappers.StringValue { - if m != nil { - return m.RuntimeCredentialId - } - return nil -} - -type ModifyRuntimeResponse struct { - // id of runtime modified - RuntimeId *wrappers.StringValue `protobuf:"bytes,1,opt,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyRuntimeResponse) Reset() { *m = ModifyRuntimeResponse{} } -func (m *ModifyRuntimeResponse) String() string { return proto.CompactTextString(m) } -func (*ModifyRuntimeResponse) ProtoMessage() {} -func (*ModifyRuntimeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_86e2dd377c869464, []int{9} -} - -func (m *ModifyRuntimeResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyRuntimeResponse.Unmarshal(m, b) -} -func (m *ModifyRuntimeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyRuntimeResponse.Marshal(b, m, deterministic) -} -func (m *ModifyRuntimeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyRuntimeResponse.Merge(m, src) -} -func (m *ModifyRuntimeResponse) XXX_Size() int { - return xxx_messageInfo_ModifyRuntimeResponse.Size(m) -} -func (m *ModifyRuntimeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyRuntimeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyRuntimeResponse proto.InternalMessageInfo - -func (m *ModifyRuntimeResponse) GetRuntimeId() *wrappers.StringValue { - if m != nil { - return m.RuntimeId - } - return nil -} - -type DeleteRuntimesRequest struct { - // required, ids of runtime to delete - RuntimeId []string `protobuf:"bytes,1,rep,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - // whether force delete runtime or not - Force *wrappers.BoolValue `protobuf:"bytes,2,opt,name=force,proto3" json:"force,omitempty"` - // timeout(s), when delete runtime - GracePeriod uint32 `protobuf:"varint,3,opt,name=grace_period,json=gracePeriod,proto3" json:"grace_period,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteRuntimesRequest) Reset() { *m = DeleteRuntimesRequest{} } -func (m *DeleteRuntimesRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteRuntimesRequest) ProtoMessage() {} -func (*DeleteRuntimesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_86e2dd377c869464, []int{10} -} - -func (m *DeleteRuntimesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteRuntimesRequest.Unmarshal(m, b) -} -func (m *DeleteRuntimesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteRuntimesRequest.Marshal(b, m, deterministic) -} -func (m *DeleteRuntimesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteRuntimesRequest.Merge(m, src) -} -func (m *DeleteRuntimesRequest) XXX_Size() int { - return xxx_messageInfo_DeleteRuntimesRequest.Size(m) -} -func (m *DeleteRuntimesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteRuntimesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteRuntimesRequest proto.InternalMessageInfo - -func (m *DeleteRuntimesRequest) GetRuntimeId() []string { - if m != nil { - return m.RuntimeId - } - return nil -} - -func (m *DeleteRuntimesRequest) GetForce() *wrappers.BoolValue { - if m != nil { - return m.Force - } - return nil -} - -func (m *DeleteRuntimesRequest) GetGracePeriod() uint32 { - if m != nil { - return m.GracePeriod - } - return 0 -} - -type DeleteRuntimesResponse struct { - // ids of runtime deleted - RuntimeId []string `protobuf:"bytes,1,rep,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteRuntimesResponse) Reset() { *m = DeleteRuntimesResponse{} } -func (m *DeleteRuntimesResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteRuntimesResponse) ProtoMessage() {} -func (*DeleteRuntimesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_86e2dd377c869464, []int{11} -} - -func (m *DeleteRuntimesResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteRuntimesResponse.Unmarshal(m, b) -} -func (m *DeleteRuntimesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteRuntimesResponse.Marshal(b, m, deterministic) -} -func (m *DeleteRuntimesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteRuntimesResponse.Merge(m, src) -} -func (m *DeleteRuntimesResponse) XXX_Size() int { - return xxx_messageInfo_DeleteRuntimesResponse.Size(m) -} -func (m *DeleteRuntimesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteRuntimesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteRuntimesResponse proto.InternalMessageInfo - -func (m *DeleteRuntimesResponse) GetRuntimeId() []string { - if m != nil { - return m.RuntimeId - } - return nil -} - -type CreateRuntimeCredentialRequest struct { - // required, runtime url - RuntimeUrl *wrappers.StringValue `protobuf:"bytes,1,opt,name=runtime_url,json=runtimeUrl,proto3" json:"runtime_url,omitempty"` - // required, runtime credential content, a json file - RuntimeCredentialContent *wrappers.StringValue `protobuf:"bytes,2,opt,name=runtime_credential_content,json=runtimeCredentialContent,proto3" json:"runtime_credential_content,omitempty"` - // required, runtime provider eg.[qingcloud|aliyun|aws|kubernetes] - Provider *wrappers.StringValue `protobuf:"bytes,3,opt,name=provider,proto3" json:"provider,omitempty"` - // runtime credential name - Name *wrappers.StringValue `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` - // runtime credential description - Description *wrappers.StringValue `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - // for kubesphere only, if provider this value means upsert this record - RuntimeCredentialId *wrappers.StringValue `protobuf:"bytes,10,opt,name=runtime_credential_id,json=runtimeCredentialId,proto3" json:"runtime_credential_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateRuntimeCredentialRequest) Reset() { *m = CreateRuntimeCredentialRequest{} } -func (m *CreateRuntimeCredentialRequest) String() string { return proto.CompactTextString(m) } -func (*CreateRuntimeCredentialRequest) ProtoMessage() {} -func (*CreateRuntimeCredentialRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_86e2dd377c869464, []int{12} -} - -func (m *CreateRuntimeCredentialRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateRuntimeCredentialRequest.Unmarshal(m, b) -} -func (m *CreateRuntimeCredentialRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateRuntimeCredentialRequest.Marshal(b, m, deterministic) -} -func (m *CreateRuntimeCredentialRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateRuntimeCredentialRequest.Merge(m, src) -} -func (m *CreateRuntimeCredentialRequest) XXX_Size() int { - return xxx_messageInfo_CreateRuntimeCredentialRequest.Size(m) -} -func (m *CreateRuntimeCredentialRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateRuntimeCredentialRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateRuntimeCredentialRequest proto.InternalMessageInfo - -func (m *CreateRuntimeCredentialRequest) GetRuntimeUrl() *wrappers.StringValue { - if m != nil { - return m.RuntimeUrl - } - return nil -} - -func (m *CreateRuntimeCredentialRequest) GetRuntimeCredentialContent() *wrappers.StringValue { - if m != nil { - return m.RuntimeCredentialContent - } - return nil -} - -func (m *CreateRuntimeCredentialRequest) GetProvider() *wrappers.StringValue { - if m != nil { - return m.Provider - } - return nil -} - -func (m *CreateRuntimeCredentialRequest) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *CreateRuntimeCredentialRequest) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *CreateRuntimeCredentialRequest) GetRuntimeCredentialId() *wrappers.StringValue { - if m != nil { - return m.RuntimeCredentialId - } - return nil -} - -type CreateRuntimeCredentialResponse struct { - // id of runtime credential created - RuntimeCredentialId *wrappers.StringValue `protobuf:"bytes,1,opt,name=runtime_credential_id,json=runtimeCredentialId,proto3" json:"runtime_credential_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateRuntimeCredentialResponse) Reset() { *m = CreateRuntimeCredentialResponse{} } -func (m *CreateRuntimeCredentialResponse) String() string { return proto.CompactTextString(m) } -func (*CreateRuntimeCredentialResponse) ProtoMessage() {} -func (*CreateRuntimeCredentialResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_86e2dd377c869464, []int{13} -} - -func (m *CreateRuntimeCredentialResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateRuntimeCredentialResponse.Unmarshal(m, b) -} -func (m *CreateRuntimeCredentialResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateRuntimeCredentialResponse.Marshal(b, m, deterministic) -} -func (m *CreateRuntimeCredentialResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateRuntimeCredentialResponse.Merge(m, src) -} -func (m *CreateRuntimeCredentialResponse) XXX_Size() int { - return xxx_messageInfo_CreateRuntimeCredentialResponse.Size(m) -} -func (m *CreateRuntimeCredentialResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CreateRuntimeCredentialResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateRuntimeCredentialResponse proto.InternalMessageInfo - -func (m *CreateRuntimeCredentialResponse) GetRuntimeCredentialId() *wrappers.StringValue { - if m != nil { - return m.RuntimeCredentialId - } - return nil -} - -type ValidateRuntimeCredentialRequest struct { - // required, runtime url - RuntimeUrl *wrappers.StringValue `protobuf:"bytes,1,opt,name=runtime_url,json=runtimeUrl,proto3" json:"runtime_url,omitempty"` - // required, runtime url - RuntimeCredentialContent *wrappers.StringValue `protobuf:"bytes,2,opt,name=runtime_credential_content,json=runtimeCredentialContent,proto3" json:"runtime_credential_content,omitempty"` - // required, runtime provider eg.[qingcloud|aliyun|aws|kubernetes] - Provider *wrappers.StringValue `protobuf:"bytes,3,opt,name=provider,proto3" json:"provider,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ValidateRuntimeCredentialRequest) Reset() { *m = ValidateRuntimeCredentialRequest{} } -func (m *ValidateRuntimeCredentialRequest) String() string { return proto.CompactTextString(m) } -func (*ValidateRuntimeCredentialRequest) ProtoMessage() {} -func (*ValidateRuntimeCredentialRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_86e2dd377c869464, []int{14} -} - -func (m *ValidateRuntimeCredentialRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ValidateRuntimeCredentialRequest.Unmarshal(m, b) -} -func (m *ValidateRuntimeCredentialRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ValidateRuntimeCredentialRequest.Marshal(b, m, deterministic) -} -func (m *ValidateRuntimeCredentialRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidateRuntimeCredentialRequest.Merge(m, src) -} -func (m *ValidateRuntimeCredentialRequest) XXX_Size() int { - return xxx_messageInfo_ValidateRuntimeCredentialRequest.Size(m) -} -func (m *ValidateRuntimeCredentialRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ValidateRuntimeCredentialRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidateRuntimeCredentialRequest proto.InternalMessageInfo - -func (m *ValidateRuntimeCredentialRequest) GetRuntimeUrl() *wrappers.StringValue { - if m != nil { - return m.RuntimeUrl - } - return nil -} - -func (m *ValidateRuntimeCredentialRequest) GetRuntimeCredentialContent() *wrappers.StringValue { - if m != nil { - return m.RuntimeCredentialContent - } - return nil -} - -func (m *ValidateRuntimeCredentialRequest) GetProvider() *wrappers.StringValue { - if m != nil { - return m.Provider - } - return nil -} - -type ValidateRuntimeCredentialResponse struct { - // validte ok or not - Ok *wrappers.BoolValue `protobuf:"bytes,1,opt,name=ok,proto3" json:"ok,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ValidateRuntimeCredentialResponse) Reset() { *m = ValidateRuntimeCredentialResponse{} } -func (m *ValidateRuntimeCredentialResponse) String() string { return proto.CompactTextString(m) } -func (*ValidateRuntimeCredentialResponse) ProtoMessage() {} -func (*ValidateRuntimeCredentialResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_86e2dd377c869464, []int{15} -} - -func (m *ValidateRuntimeCredentialResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ValidateRuntimeCredentialResponse.Unmarshal(m, b) -} -func (m *ValidateRuntimeCredentialResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ValidateRuntimeCredentialResponse.Marshal(b, m, deterministic) -} -func (m *ValidateRuntimeCredentialResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidateRuntimeCredentialResponse.Merge(m, src) -} -func (m *ValidateRuntimeCredentialResponse) XXX_Size() int { - return xxx_messageInfo_ValidateRuntimeCredentialResponse.Size(m) -} -func (m *ValidateRuntimeCredentialResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ValidateRuntimeCredentialResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidateRuntimeCredentialResponse proto.InternalMessageInfo - -func (m *ValidateRuntimeCredentialResponse) GetOk() *wrappers.BoolValue { - if m != nil { - return m.Ok - } - return nil -} - -type DescribeRuntimeCredentialsRequest struct { - // query key - SearchWord *wrappers.StringValue `protobuf:"bytes,1,opt,name=search_word,json=searchWord,proto3" json:"search_word,omitempty"` - // sort key, order by sort_key, default create_time - SortKey *wrappers.StringValue `protobuf:"bytes,2,opt,name=sort_key,json=sortKey,proto3" json:"sort_key,omitempty"` - // value = 0 sort ASC, value = 1 sort DESC - Reverse *wrappers.BoolValue `protobuf:"bytes,3,opt,name=reverse,proto3" json:"reverse,omitempty"` - // data limit per page, default value 20, max value 200 - Limit uint32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` - // data offset, default 0 - Offset uint32 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` - // select columns to display - DisplayColumns []string `protobuf:"bytes,6,rep,name=display_columns,json=displayColumns,proto3" json:"display_columns,omitempty"` - // runtime credential ids - RuntimeCredentialId []string `protobuf:"bytes,11,rep,name=runtime_credential_id,json=runtimeCredentialId,proto3" json:"runtime_credential_id,omitempty"` - // status eg.[active|deleted] - Status []string `protobuf:"bytes,12,rep,name=status,proto3" json:"status,omitempty"` - // runtime provider eg.[qingcloud|aliyun|aws|kubernetes] - Provider []string `protobuf:"bytes,13,rep,name=provider,proto3" json:"provider,omitempty"` - // owner - Owner []string `protobuf:"bytes,14,rep,name=owner,proto3" json:"owner,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeRuntimeCredentialsRequest) Reset() { *m = DescribeRuntimeCredentialsRequest{} } -func (m *DescribeRuntimeCredentialsRequest) String() string { return proto.CompactTextString(m) } -func (*DescribeRuntimeCredentialsRequest) ProtoMessage() {} -func (*DescribeRuntimeCredentialsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_86e2dd377c869464, []int{16} -} - -func (m *DescribeRuntimeCredentialsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeRuntimeCredentialsRequest.Unmarshal(m, b) -} -func (m *DescribeRuntimeCredentialsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeRuntimeCredentialsRequest.Marshal(b, m, deterministic) -} -func (m *DescribeRuntimeCredentialsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeRuntimeCredentialsRequest.Merge(m, src) -} -func (m *DescribeRuntimeCredentialsRequest) XXX_Size() int { - return xxx_messageInfo_DescribeRuntimeCredentialsRequest.Size(m) -} -func (m *DescribeRuntimeCredentialsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeRuntimeCredentialsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeRuntimeCredentialsRequest proto.InternalMessageInfo - -func (m *DescribeRuntimeCredentialsRequest) GetSearchWord() *wrappers.StringValue { - if m != nil { - return m.SearchWord - } - return nil -} - -func (m *DescribeRuntimeCredentialsRequest) GetSortKey() *wrappers.StringValue { - if m != nil { - return m.SortKey - } - return nil -} - -func (m *DescribeRuntimeCredentialsRequest) GetReverse() *wrappers.BoolValue { - if m != nil { - return m.Reverse - } - return nil -} - -func (m *DescribeRuntimeCredentialsRequest) GetLimit() uint32 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *DescribeRuntimeCredentialsRequest) GetOffset() uint32 { - if m != nil { - return m.Offset - } - return 0 -} - -func (m *DescribeRuntimeCredentialsRequest) GetDisplayColumns() []string { - if m != nil { - return m.DisplayColumns - } - return nil -} - -func (m *DescribeRuntimeCredentialsRequest) GetRuntimeCredentialId() []string { - if m != nil { - return m.RuntimeCredentialId - } - return nil -} - -func (m *DescribeRuntimeCredentialsRequest) GetStatus() []string { - if m != nil { - return m.Status - } - return nil -} - -func (m *DescribeRuntimeCredentialsRequest) GetProvider() []string { - if m != nil { - return m.Provider - } - return nil -} - -func (m *DescribeRuntimeCredentialsRequest) GetOwner() []string { - if m != nil { - return m.Owner - } - return nil -} - -type DescribeRuntimeCredentialsResponse struct { - // total count of runtime credential - TotalCount uint32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - // list of runtime credential - RuntimeCredentialSet []*RuntimeCredential `protobuf:"bytes,2,rep,name=runtime_credential_set,json=runtimeCredentialSet,proto3" json:"runtime_credential_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeRuntimeCredentialsResponse) Reset() { *m = DescribeRuntimeCredentialsResponse{} } -func (m *DescribeRuntimeCredentialsResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeRuntimeCredentialsResponse) ProtoMessage() {} -func (*DescribeRuntimeCredentialsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_86e2dd377c869464, []int{17} -} - -func (m *DescribeRuntimeCredentialsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeRuntimeCredentialsResponse.Unmarshal(m, b) -} -func (m *DescribeRuntimeCredentialsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeRuntimeCredentialsResponse.Marshal(b, m, deterministic) -} -func (m *DescribeRuntimeCredentialsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeRuntimeCredentialsResponse.Merge(m, src) -} -func (m *DescribeRuntimeCredentialsResponse) XXX_Size() int { - return xxx_messageInfo_DescribeRuntimeCredentialsResponse.Size(m) -} -func (m *DescribeRuntimeCredentialsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeRuntimeCredentialsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeRuntimeCredentialsResponse proto.InternalMessageInfo - -func (m *DescribeRuntimeCredentialsResponse) GetTotalCount() uint32 { - if m != nil { - return m.TotalCount - } - return 0 -} - -func (m *DescribeRuntimeCredentialsResponse) GetRuntimeCredentialSet() []*RuntimeCredential { - if m != nil { - return m.RuntimeCredentialSet - } - return nil -} - -type ModifyRuntimeCredentialRequest struct { - // required, id of runtime credential to modify - RuntimeCredentialId *wrappers.StringValue `protobuf:"bytes,1,opt,name=runtime_credential_id,json=runtimeCredentialId,proto3" json:"runtime_credential_id,omitempty"` - // runtime credential name - Name *wrappers.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // runtime credential description - Description *wrappers.StringValue `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - // runtime credential content, a json file - RuntimeCredentialContent *wrappers.StringValue `protobuf:"bytes,4,opt,name=runtime_credential_content,json=runtimeCredentialContent,proto3" json:"runtime_credential_content,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyRuntimeCredentialRequest) Reset() { *m = ModifyRuntimeCredentialRequest{} } -func (m *ModifyRuntimeCredentialRequest) String() string { return proto.CompactTextString(m) } -func (*ModifyRuntimeCredentialRequest) ProtoMessage() {} -func (*ModifyRuntimeCredentialRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_86e2dd377c869464, []int{18} -} - -func (m *ModifyRuntimeCredentialRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyRuntimeCredentialRequest.Unmarshal(m, b) -} -func (m *ModifyRuntimeCredentialRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyRuntimeCredentialRequest.Marshal(b, m, deterministic) -} -func (m *ModifyRuntimeCredentialRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyRuntimeCredentialRequest.Merge(m, src) -} -func (m *ModifyRuntimeCredentialRequest) XXX_Size() int { - return xxx_messageInfo_ModifyRuntimeCredentialRequest.Size(m) -} -func (m *ModifyRuntimeCredentialRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyRuntimeCredentialRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyRuntimeCredentialRequest proto.InternalMessageInfo - -func (m *ModifyRuntimeCredentialRequest) GetRuntimeCredentialId() *wrappers.StringValue { - if m != nil { - return m.RuntimeCredentialId - } - return nil -} - -func (m *ModifyRuntimeCredentialRequest) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *ModifyRuntimeCredentialRequest) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *ModifyRuntimeCredentialRequest) GetRuntimeCredentialContent() *wrappers.StringValue { - if m != nil { - return m.RuntimeCredentialContent - } - return nil -} - -type ModifyRuntimeCredentialResponse struct { - // id of runtime credential modified - RuntimeCredentialId *wrappers.StringValue `protobuf:"bytes,1,opt,name=runtime_credential_id,json=runtimeCredentialId,proto3" json:"runtime_credential_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModifyRuntimeCredentialResponse) Reset() { *m = ModifyRuntimeCredentialResponse{} } -func (m *ModifyRuntimeCredentialResponse) String() string { return proto.CompactTextString(m) } -func (*ModifyRuntimeCredentialResponse) ProtoMessage() {} -func (*ModifyRuntimeCredentialResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_86e2dd377c869464, []int{19} -} - -func (m *ModifyRuntimeCredentialResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModifyRuntimeCredentialResponse.Unmarshal(m, b) -} -func (m *ModifyRuntimeCredentialResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModifyRuntimeCredentialResponse.Marshal(b, m, deterministic) -} -func (m *ModifyRuntimeCredentialResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModifyRuntimeCredentialResponse.Merge(m, src) -} -func (m *ModifyRuntimeCredentialResponse) XXX_Size() int { - return xxx_messageInfo_ModifyRuntimeCredentialResponse.Size(m) -} -func (m *ModifyRuntimeCredentialResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ModifyRuntimeCredentialResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ModifyRuntimeCredentialResponse proto.InternalMessageInfo - -func (m *ModifyRuntimeCredentialResponse) GetRuntimeCredentialId() *wrappers.StringValue { - if m != nil { - return m.RuntimeCredentialId - } - return nil -} - -type DeleteRuntimeCredentialsRequest struct { - // required, ids of runtime credential to delete - RuntimeCredentialId []string `protobuf:"bytes,1,rep,name=runtime_credential_id,json=runtimeCredentialId,proto3" json:"runtime_credential_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteRuntimeCredentialsRequest) Reset() { *m = DeleteRuntimeCredentialsRequest{} } -func (m *DeleteRuntimeCredentialsRequest) String() string { return proto.CompactTextString(m) } -func (*DeleteRuntimeCredentialsRequest) ProtoMessage() {} -func (*DeleteRuntimeCredentialsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_86e2dd377c869464, []int{20} -} - -func (m *DeleteRuntimeCredentialsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteRuntimeCredentialsRequest.Unmarshal(m, b) -} -func (m *DeleteRuntimeCredentialsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteRuntimeCredentialsRequest.Marshal(b, m, deterministic) -} -func (m *DeleteRuntimeCredentialsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteRuntimeCredentialsRequest.Merge(m, src) -} -func (m *DeleteRuntimeCredentialsRequest) XXX_Size() int { - return xxx_messageInfo_DeleteRuntimeCredentialsRequest.Size(m) -} -func (m *DeleteRuntimeCredentialsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteRuntimeCredentialsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteRuntimeCredentialsRequest proto.InternalMessageInfo - -func (m *DeleteRuntimeCredentialsRequest) GetRuntimeCredentialId() []string { - if m != nil { - return m.RuntimeCredentialId - } - return nil -} - -type DeleteRuntimeCredentialsResponse struct { - // ids of runtime credential deleted - RuntimeCredentialId []string `protobuf:"bytes,1,rep,name=runtime_credential_id,json=runtimeCredentialId,proto3" json:"runtime_credential_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DeleteRuntimeCredentialsResponse) Reset() { *m = DeleteRuntimeCredentialsResponse{} } -func (m *DeleteRuntimeCredentialsResponse) String() string { return proto.CompactTextString(m) } -func (*DeleteRuntimeCredentialsResponse) ProtoMessage() {} -func (*DeleteRuntimeCredentialsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_86e2dd377c869464, []int{21} -} - -func (m *DeleteRuntimeCredentialsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DeleteRuntimeCredentialsResponse.Unmarshal(m, b) -} -func (m *DeleteRuntimeCredentialsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DeleteRuntimeCredentialsResponse.Marshal(b, m, deterministic) -} -func (m *DeleteRuntimeCredentialsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DeleteRuntimeCredentialsResponse.Merge(m, src) -} -func (m *DeleteRuntimeCredentialsResponse) XXX_Size() int { - return xxx_messageInfo_DeleteRuntimeCredentialsResponse.Size(m) -} -func (m *DeleteRuntimeCredentialsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DeleteRuntimeCredentialsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DeleteRuntimeCredentialsResponse proto.InternalMessageInfo - -func (m *DeleteRuntimeCredentialsResponse) GetRuntimeCredentialId() []string { - if m != nil { - return m.RuntimeCredentialId - } - return nil -} - -type DescribeRuntimeProviderZonesRequest struct { - // required, use runtime credential id to get run time provider zones - RuntimeCredentialId *wrappers.StringValue `protobuf:"bytes,1,opt,name=runtime_credential_id,json=runtimeCredentialId,proto3" json:"runtime_credential_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeRuntimeProviderZonesRequest) Reset() { *m = DescribeRuntimeProviderZonesRequest{} } -func (m *DescribeRuntimeProviderZonesRequest) String() string { return proto.CompactTextString(m) } -func (*DescribeRuntimeProviderZonesRequest) ProtoMessage() {} -func (*DescribeRuntimeProviderZonesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_86e2dd377c869464, []int{22} -} - -func (m *DescribeRuntimeProviderZonesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeRuntimeProviderZonesRequest.Unmarshal(m, b) -} -func (m *DescribeRuntimeProviderZonesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeRuntimeProviderZonesRequest.Marshal(b, m, deterministic) -} -func (m *DescribeRuntimeProviderZonesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeRuntimeProviderZonesRequest.Merge(m, src) -} -func (m *DescribeRuntimeProviderZonesRequest) XXX_Size() int { - return xxx_messageInfo_DescribeRuntimeProviderZonesRequest.Size(m) -} -func (m *DescribeRuntimeProviderZonesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeRuntimeProviderZonesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeRuntimeProviderZonesRequest proto.InternalMessageInfo - -func (m *DescribeRuntimeProviderZonesRequest) GetRuntimeCredentialId() *wrappers.StringValue { - if m != nil { - return m.RuntimeCredentialId - } - return nil -} - -type DescribeRuntimeProviderZonesResponse struct { - // runtime credential id - RuntimeCredentialId *wrappers.StringValue `protobuf:"bytes,1,opt,name=runtime_credential_id,json=runtimeCredentialId,proto3" json:"runtime_credential_id,omitempty"` - // list of zone - Zone []string `protobuf:"bytes,2,rep,name=zone,proto3" json:"zone,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeRuntimeProviderZonesResponse) Reset() { *m = DescribeRuntimeProviderZonesResponse{} } -func (m *DescribeRuntimeProviderZonesResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeRuntimeProviderZonesResponse) ProtoMessage() {} -func (*DescribeRuntimeProviderZonesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_86e2dd377c869464, []int{23} -} - -func (m *DescribeRuntimeProviderZonesResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeRuntimeProviderZonesResponse.Unmarshal(m, b) -} -func (m *DescribeRuntimeProviderZonesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeRuntimeProviderZonesResponse.Marshal(b, m, deterministic) -} -func (m *DescribeRuntimeProviderZonesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeRuntimeProviderZonesResponse.Merge(m, src) -} -func (m *DescribeRuntimeProviderZonesResponse) XXX_Size() int { - return xxx_messageInfo_DescribeRuntimeProviderZonesResponse.Size(m) -} -func (m *DescribeRuntimeProviderZonesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeRuntimeProviderZonesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeRuntimeProviderZonesResponse proto.InternalMessageInfo - -func (m *DescribeRuntimeProviderZonesResponse) GetRuntimeCredentialId() *wrappers.StringValue { - if m != nil { - return m.RuntimeCredentialId - } - return nil -} - -func (m *DescribeRuntimeProviderZonesResponse) GetZone() []string { - if m != nil { - return m.Zone - } - return nil -} - -type GetRuntimeStatisticsRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetRuntimeStatisticsRequest) Reset() { *m = GetRuntimeStatisticsRequest{} } -func (m *GetRuntimeStatisticsRequest) String() string { return proto.CompactTextString(m) } -func (*GetRuntimeStatisticsRequest) ProtoMessage() {} -func (*GetRuntimeStatisticsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_86e2dd377c869464, []int{24} -} - -func (m *GetRuntimeStatisticsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetRuntimeStatisticsRequest.Unmarshal(m, b) -} -func (m *GetRuntimeStatisticsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetRuntimeStatisticsRequest.Marshal(b, m, deterministic) -} -func (m *GetRuntimeStatisticsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetRuntimeStatisticsRequest.Merge(m, src) -} -func (m *GetRuntimeStatisticsRequest) XXX_Size() int { - return xxx_messageInfo_GetRuntimeStatisticsRequest.Size(m) -} -func (m *GetRuntimeStatisticsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetRuntimeStatisticsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetRuntimeStatisticsRequest proto.InternalMessageInfo - -type GetRuntimeStatisticsResponse struct { - // runtime create time range map to runtime count, max length is 14 - LastTwoWeekCreated map[string]uint32 `protobuf:"bytes,1,rep,name=last_two_week_created,json=lastTwoWeekCreated,proto3" json:"last_two_week_created,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - // provider id map to runtime count, max length is 10 - TopTenProviders map[string]uint32 `protobuf:"bytes,2,rep,name=top_ten_providers,json=topTenProviders,proto3" json:"top_ten_providers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - // total count of runtime - RuntimeCount uint32 `protobuf:"varint,3,opt,name=runtime_count,json=runtimeCount,proto3" json:"runtime_count,omitempty"` - // total count of provider - ProviderCount uint32 `protobuf:"varint,4,opt,name=provider_count,json=providerCount,proto3" json:"provider_count,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetRuntimeStatisticsResponse) Reset() { *m = GetRuntimeStatisticsResponse{} } -func (m *GetRuntimeStatisticsResponse) String() string { return proto.CompactTextString(m) } -func (*GetRuntimeStatisticsResponse) ProtoMessage() {} -func (*GetRuntimeStatisticsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_86e2dd377c869464, []int{25} -} - -func (m *GetRuntimeStatisticsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetRuntimeStatisticsResponse.Unmarshal(m, b) -} -func (m *GetRuntimeStatisticsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetRuntimeStatisticsResponse.Marshal(b, m, deterministic) -} -func (m *GetRuntimeStatisticsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetRuntimeStatisticsResponse.Merge(m, src) -} -func (m *GetRuntimeStatisticsResponse) XXX_Size() int { - return xxx_messageInfo_GetRuntimeStatisticsResponse.Size(m) -} -func (m *GetRuntimeStatisticsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetRuntimeStatisticsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetRuntimeStatisticsResponse proto.InternalMessageInfo - -func (m *GetRuntimeStatisticsResponse) GetLastTwoWeekCreated() map[string]uint32 { - if m != nil { - return m.LastTwoWeekCreated - } - return nil -} - -func (m *GetRuntimeStatisticsResponse) GetTopTenProviders() map[string]uint32 { - if m != nil { - return m.TopTenProviders - } - return nil -} - -func (m *GetRuntimeStatisticsResponse) GetRuntimeCount() uint32 { - if m != nil { - return m.RuntimeCount - } - return 0 -} - -func (m *GetRuntimeStatisticsResponse) GetProviderCount() uint32 { - if m != nil { - return m.ProviderCount - } - return 0 -} - -func init() { - proto.RegisterType((*RuntimeCredential)(nil), "openpitrix.RuntimeCredential") - proto.RegisterType((*Runtime)(nil), "openpitrix.Runtime") - proto.RegisterType((*RuntimeDetail)(nil), "openpitrix.RuntimeDetail") - proto.RegisterType((*CreateRuntimeRequest)(nil), "openpitrix.CreateRuntimeRequest") - proto.RegisterType((*CreateRuntimeResponse)(nil), "openpitrix.CreateRuntimeResponse") - proto.RegisterType((*DescribeRuntimesRequest)(nil), "openpitrix.DescribeRuntimesRequest") - proto.RegisterType((*DescribeRuntimesResponse)(nil), "openpitrix.DescribeRuntimesResponse") - proto.RegisterType((*DescribeRuntimeDetailsResponse)(nil), "openpitrix.DescribeRuntimeDetailsResponse") - proto.RegisterType((*ModifyRuntimeRequest)(nil), "openpitrix.ModifyRuntimeRequest") - proto.RegisterType((*ModifyRuntimeResponse)(nil), "openpitrix.ModifyRuntimeResponse") - proto.RegisterType((*DeleteRuntimesRequest)(nil), "openpitrix.DeleteRuntimesRequest") - proto.RegisterType((*DeleteRuntimesResponse)(nil), "openpitrix.DeleteRuntimesResponse") - proto.RegisterType((*CreateRuntimeCredentialRequest)(nil), "openpitrix.CreateRuntimeCredentialRequest") - proto.RegisterType((*CreateRuntimeCredentialResponse)(nil), "openpitrix.CreateRuntimeCredentialResponse") - proto.RegisterType((*ValidateRuntimeCredentialRequest)(nil), "openpitrix.ValidateRuntimeCredentialRequest") - proto.RegisterType((*ValidateRuntimeCredentialResponse)(nil), "openpitrix.ValidateRuntimeCredentialResponse") - proto.RegisterType((*DescribeRuntimeCredentialsRequest)(nil), "openpitrix.DescribeRuntimeCredentialsRequest") - proto.RegisterType((*DescribeRuntimeCredentialsResponse)(nil), "openpitrix.DescribeRuntimeCredentialsResponse") - proto.RegisterType((*ModifyRuntimeCredentialRequest)(nil), "openpitrix.ModifyRuntimeCredentialRequest") - proto.RegisterType((*ModifyRuntimeCredentialResponse)(nil), "openpitrix.ModifyRuntimeCredentialResponse") - proto.RegisterType((*DeleteRuntimeCredentialsRequest)(nil), "openpitrix.DeleteRuntimeCredentialsRequest") - proto.RegisterType((*DeleteRuntimeCredentialsResponse)(nil), "openpitrix.DeleteRuntimeCredentialsResponse") - proto.RegisterType((*DescribeRuntimeProviderZonesRequest)(nil), "openpitrix.DescribeRuntimeProviderZonesRequest") - proto.RegisterType((*DescribeRuntimeProviderZonesResponse)(nil), "openpitrix.DescribeRuntimeProviderZonesResponse") - proto.RegisterType((*GetRuntimeStatisticsRequest)(nil), "openpitrix.GetRuntimeStatisticsRequest") - proto.RegisterType((*GetRuntimeStatisticsResponse)(nil), "openpitrix.GetRuntimeStatisticsResponse") - proto.RegisterMapType((map[string]uint32)(nil), "openpitrix.GetRuntimeStatisticsResponse.LastTwoWeekCreatedEntry") - proto.RegisterMapType((map[string]uint32)(nil), "openpitrix.GetRuntimeStatisticsResponse.TopTenProvidersEntry") -} - -func init() { proto.RegisterFile("runtime.proto", fileDescriptor_86e2dd377c869464) } - -var fileDescriptor_86e2dd377c869464 = []byte{ - // 1934 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0xcd, 0x6f, 0x1c, 0x49, - 0x15, 0x57, 0xcf, 0x78, 0xec, 0xf8, 0x8d, 0xc7, 0x89, 0x6b, 0x1d, 0xbb, 0xd3, 0xf1, 0x47, 0xbb, - 0xb3, 0xb0, 0xc1, 0x19, 0xdb, 0x61, 0x88, 0xd8, 0x65, 0x57, 0x41, 0x4c, 0x9c, 0x55, 0x40, 0x24, - 0x22, 0x1a, 0x7b, 0xb3, 0x52, 0x2e, 0xa3, 0xf6, 0x4c, 0xcd, 0xb8, 0xe5, 0x76, 0xd7, 0x6c, 0x75, - 0x8d, 0x07, 0x73, 0x40, 0x2b, 0x96, 0x0b, 0x6c, 0x2e, 0x0c, 0x42, 0x20, 0x0e, 0x1c, 0x11, 0x27, - 0xc4, 0x05, 0x21, 0x04, 0x12, 0x08, 0x09, 0x24, 0xce, 0x88, 0xff, 0x80, 0x1b, 0x7f, 0x00, 0x47, - 0x50, 0x57, 0x55, 0x7b, 0xfa, 0x7b, 0xda, 0xf6, 0x24, 0x08, 0x76, 0x4f, 0xf1, 0x74, 0xbd, 0x57, - 0xf5, 0xbe, 0x7e, 0xbf, 0x7a, 0xaf, 0x02, 0x15, 0xda, 0x77, 0x98, 0x75, 0x8c, 0xb7, 0x7b, 0x94, - 0x30, 0x82, 0x80, 0xf4, 0xb0, 0xd3, 0xb3, 0x18, 0xb5, 0xbe, 0xa9, 0xad, 0x75, 0x09, 0xe9, 0xda, - 0x78, 0x87, 0xaf, 0x1c, 0xf4, 0x3b, 0x3b, 0x03, 0x6a, 0xf6, 0x7a, 0x98, 0xba, 0x42, 0x56, 0x5b, - 0x8f, 0xae, 0x7b, 0xfb, 0xb8, 0xcc, 0x3c, 0xee, 0x49, 0x81, 0x15, 0x29, 0x60, 0xf6, 0xac, 0x1d, - 0xd3, 0x71, 0x08, 0x33, 0x99, 0x45, 0x1c, 0x5f, 0xbd, 0xca, 0xff, 0x69, 0x6d, 0x75, 0xb1, 0xb3, - 0xe5, 0x0e, 0xcc, 0x6e, 0x17, 0xd3, 0x1d, 0xd2, 0xe3, 0x12, 0x71, 0x69, 0xe3, 0xdf, 0x25, 0x58, - 0x68, 0x08, 0x53, 0x77, 0x29, 0x6e, 0x63, 0x87, 0x59, 0xa6, 0x8d, 0x9e, 0xc2, 0x75, 0x69, 0x7f, - 0xb3, 0x75, 0xf6, 0xb5, 0x69, 0xb5, 0x55, 0x45, 0x57, 0x6e, 0x97, 0x6b, 0x2b, 0xdb, 0xc2, 0x82, - 0x6d, 0xdf, 0xc4, 0xed, 0x3d, 0x46, 0x2d, 0xa7, 0xfb, 0xcc, 0xb4, 0xfb, 0xb8, 0xf1, 0x1a, 0x8d, - 0xee, 0xf7, 0xb5, 0x36, 0xba, 0x0b, 0x53, 0x8e, 0x79, 0x8c, 0xd5, 0x42, 0x8e, 0x0d, 0xb8, 0x24, - 0xfa, 0x32, 0x94, 0xdb, 0xd8, 0x6d, 0x51, 0x8b, 0xdb, 0xae, 0x16, 0x73, 0x28, 0x06, 0x15, 0xd0, - 0x7d, 0x28, 0xfb, 0x3e, 0xf4, 0xa9, 0xad, 0x4e, 0xe5, 0xd0, 0x07, 0xa9, 0xf0, 0x1e, 0xb5, 0xd1, - 0x73, 0xd0, 0x12, 0x42, 0xd0, 0x22, 0x0e, 0xc3, 0x0e, 0x53, 0x4b, 0x39, 0x76, 0x53, 0x63, 0x71, - 0xd8, 0x15, 0xda, 0xe8, 0x1d, 0x00, 0x32, 0x70, 0x30, 0x6d, 0xf6, 0x4c, 0x76, 0xa8, 0x4e, 0xe7, - 0xd8, 0x6b, 0x96, 0xcb, 0x3f, 0x35, 0xd9, 0x21, 0x7a, 0x0b, 0xae, 0xf4, 0x28, 0x39, 0xb1, 0xda, - 0x98, 0xaa, 0x33, 0x39, 0x54, 0xcf, 0xa4, 0xd1, 0x3d, 0x98, 0x76, 0x99, 0xc9, 0xfa, 0xae, 0x7a, - 0x25, 0x87, 0x9e, 0x94, 0x45, 0xef, 0x40, 0xb9, 0x45, 0xb1, 0xc9, 0x70, 0xd3, 0x73, 0x46, 0x9d, - 0xe5, 0xaa, 0x5a, 0x4c, 0x75, 0xdf, 0x2f, 0xd2, 0x06, 0x08, 0x71, 0xef, 0x83, 0xa7, 0x2c, 0xb6, - 0x11, 0xca, 0x30, 0x5e, 0x59, 0x88, 0x73, 0xe5, 0xbb, 0x50, 0x6a, 0xe3, 0x83, 0x7e, 0x57, 0x2d, - 0xa7, 0xa8, 0x3d, 0x20, 0xc4, 0x16, 0xc6, 0x0a, 0x41, 0x54, 0x83, 0x12, 0x0f, 0x94, 0x3a, 0x97, - 0xc3, 0x41, 0x21, 0x6a, 0xfc, 0xb5, 0x04, 0x33, 0x12, 0x01, 0x5e, 0x62, 0xfc, 0xa4, 0xe7, 0x2c, - 0xf6, 0x59, 0x29, 0xff, 0x5f, 0x29, 0xf1, 0x60, 0x29, 0x4c, 0x9d, 0xab, 0x14, 0x52, 0x01, 0x5e, - 0xba, 0x04, 0xc0, 0xbf, 0x45, 0x1c, 0x9c, 0xab, 0x9a, 0xb9, 0x64, 0x04, 0x05, 0x33, 0xe7, 0x43, - 0xc1, 0xa7, 0xb5, 0x9c, 0x54, 0xcb, 0x2f, 0x14, 0xa8, 0xc8, 0x5a, 0x7e, 0x88, 0x99, 0x69, 0xd9, - 0x68, 0x0b, 0x66, 0x64, 0xb6, 0x64, 0x39, 0xbf, 0xb6, 0x3d, 0xba, 0x8a, 0xb6, 0xa5, 0x6c, 0xc3, - 0x97, 0x41, 0x8f, 0x01, 0xc5, 0xeb, 0x42, 0x56, 0xf4, 0x6a, 0x82, 0xe6, 0xa8, 0x04, 0x1a, 0x0b, - 0xb1, 0xaa, 0x30, 0x3e, 0x2a, 0xc2, 0xe2, 0x2e, 0x0f, 0xa0, 0x7f, 0x10, 0xfe, 0xa0, 0x8f, 0x5d, - 0x76, 0x06, 0x15, 0xe5, 0xa2, 0x50, 0x29, 0x5c, 0x06, 0x2a, 0xc5, 0xc9, 0x40, 0x65, 0xea, 0xb2, - 0x50, 0x29, 0x9d, 0x07, 0x2a, 0x01, 0x5e, 0x82, 0x73, 0xf1, 0x92, 0xb1, 0x0f, 0xd7, 0x23, 0x49, - 0x70, 0x7b, 0xc4, 0x71, 0x2f, 0xc7, 0x76, 0xc6, 0xef, 0x8a, 0xb0, 0xfc, 0x90, 0x07, 0xf8, 0xc0, - 0xdf, 0xd8, 0xf5, 0xd3, 0x7b, 0x1f, 0xca, 0x2e, 0x36, 0x69, 0xeb, 0xb0, 0x39, 0x20, 0x34, 0xdf, - 0xce, 0x20, 0x14, 0xde, 0x27, 0xb4, 0x8d, 0xde, 0x84, 0x2b, 0x2e, 0xa1, 0xac, 0x79, 0x84, 0x4f, - 0x73, 0x25, 0x7a, 0xc6, 0x93, 0xfe, 0x3a, 0x3e, 0x45, 0xf7, 0x60, 0x86, 0xe2, 0x13, 0x4c, 0x5d, - 0x2c, 0x73, 0x9c, 0x05, 0x33, 0x5f, 0x14, 0x2d, 0x42, 0xc9, 0xb6, 0x8e, 0x2d, 0xc6, 0x13, 0x5a, - 0x69, 0x88, 0x1f, 0x68, 0x09, 0xa6, 0x49, 0xa7, 0xe3, 0x62, 0x71, 0xd7, 0x57, 0x1a, 0xf2, 0x17, - 0x7a, 0x03, 0xae, 0xb6, 0x2d, 0xb7, 0x67, 0x9b, 0xa7, 0xcd, 0x16, 0xb1, 0xfb, 0xc7, 0x8e, 0xab, - 0x4e, 0xeb, 0xc5, 0xdb, 0xb3, 0x8d, 0x79, 0xf9, 0x79, 0x57, 0x7c, 0x45, 0xab, 0xa1, 0xe8, 0x96, - 0xb9, 0x4c, 0xe0, 0xb6, 0x58, 0x3a, 0x23, 0xb0, 0x39, 0xbe, 0xe4, 0x53, 0x94, 0x16, 0x28, 0xd4, - 0x0a, 0x5f, 0x19, 0x95, 0xe2, 0xa2, 0x4f, 0x09, 0xf3, 0x7c, 0x41, 0xfc, 0x40, 0xb5, 0xb4, 0x02, - 0xbd, 0xca, 0xa5, 0x92, 0x4a, 0xd0, 0xf8, 0x00, 0xd4, 0x78, 0xf2, 0x64, 0x59, 0xac, 0x43, 0x99, - 0x11, 0xc6, 0x9b, 0x9d, 0xbe, 0xc3, 0x78, 0xf6, 0x2a, 0x0d, 0xe0, 0x9f, 0x76, 0xbd, 0x2f, 0xe8, - 0xde, 0xa8, 0xb3, 0xf2, 0xe2, 0x53, 0xd0, 0x8b, 0x69, 0xbc, 0xe2, 0x47, 0x60, 0x0f, 0x33, 0xe3, - 0xfb, 0x0a, 0xac, 0x45, 0xce, 0x14, 0x1c, 0x75, 0x8e, 0x93, 0x1f, 0x8d, 0xe8, 0xa9, 0xcd, 0x75, - 0x03, 0x06, 0xdc, 0x48, 0x30, 0x40, 0x1c, 0xd0, 0xb8, 0x46, 0x83, 0x3f, 0x3d, 0x63, 0x7e, 0x5c, - 0x80, 0xc5, 0x27, 0xa4, 0x6d, 0x75, 0x4e, 0x23, 0xcc, 0xf4, 0x3f, 0xd6, 0x01, 0x4c, 0x9c, 0x9c, - 0x3c, 0xb6, 0x88, 0x04, 0x66, 0x12, 0x6c, 0xf1, 0xb1, 0x02, 0xd7, 0x1f, 0x62, 0x1b, 0xb3, 0x18, - 0x57, 0xac, 0x46, 0xb6, 0x8d, 0xc0, 0xe4, 0x2e, 0x94, 0x3a, 0x84, 0xb6, 0xfc, 0x98, 0x66, 0xde, - 0x9b, 0x5c, 0x10, 0x6d, 0xc0, 0x5c, 0x97, 0x9a, 0x2d, 0xdc, 0xec, 0x61, 0x6a, 0x91, 0x36, 0x8f, - 0x69, 0xa5, 0x51, 0xe6, 0xdf, 0x9e, 0xf2, 0x4f, 0xc6, 0x9b, 0xb0, 0x14, 0x35, 0x46, 0x3a, 0x99, - 0x6d, 0x8d, 0xf1, 0xdb, 0x22, 0xac, 0x85, 0xb8, 0x34, 0x70, 0xff, 0x8d, 0xb8, 0x2f, 0x38, 0x76, - 0x28, 0x13, 0x1d, 0x3b, 0x0a, 0x97, 0x1a, 0x3b, 0x2e, 0x7e, 0x07, 0xfa, 0x85, 0x3d, 0x75, 0xd1, - 0xc2, 0x2e, 0x4d, 0xac, 0xb0, 0xe1, 0xa2, 0x85, 0xed, 0xc2, 0x7a, 0x6a, 0xea, 0x64, 0xf6, 0x27, - 0x3e, 0xf6, 0x1a, 0xff, 0x52, 0x40, 0x7f, 0x66, 0xda, 0x56, 0xfb, 0x93, 0x56, 0x32, 0xc6, 0x37, - 0x60, 0x23, 0xc3, 0x71, 0x19, 0xf0, 0x4d, 0x28, 0x90, 0x23, 0xe9, 0x70, 0x16, 0xb4, 0x0b, 0xe4, - 0xc8, 0xf8, 0x79, 0x11, 0x36, 0x22, 0xf7, 0xc7, 0x68, 0xc7, 0x4f, 0x5b, 0x8f, 0x60, 0xeb, 0x91, - 0xda, 0x11, 0x94, 0x53, 0x3b, 0x82, 0xc9, 0xf5, 0x23, 0xc6, 0x4f, 0x15, 0x30, 0xb2, 0x12, 0x95, - 0xf7, 0xb2, 0xdf, 0x83, 0xa5, 0x04, 0x2f, 0x46, 0x17, 0xfe, 0x98, 0x79, 0x64, 0x31, 0xe6, 0xa5, - 0x77, 0xf1, 0xff, 0xb1, 0x00, 0x6b, 0xa1, 0xfb, 0x2d, 0x0e, 0xc7, 0xff, 0x87, 0xc7, 0xaf, 0x6c, - 0x4e, 0x98, 0xba, 0x0c, 0x27, 0x78, 0x44, 0x9a, 0x1a, 0xc1, 0x97, 0x46, 0xa4, 0xef, 0xc1, 0x7a, - 0xe8, 0xca, 0x4e, 0x80, 0x7e, 0x2d, 0xfd, 0xd0, 0xd4, 0x3e, 0xf8, 0x19, 0xe8, 0xe9, 0xdb, 0x4a, - 0x67, 0x2e, 0xb2, 0xef, 0x00, 0x6e, 0x45, 0x20, 0xf0, 0x54, 0x82, 0xe6, 0x39, 0x71, 0x46, 0xcd, - 0xcf, 0xe4, 0xe3, 0xf4, 0x42, 0x81, 0xd7, 0xb3, 0x4f, 0x7e, 0x59, 0x29, 0x42, 0x48, 0x8e, 0xb5, - 0x05, 0x1e, 0x16, 0xfe, 0xb7, 0xb1, 0x0a, 0x37, 0x1f, 0x61, 0x26, 0x0d, 0xd9, 0x63, 0x26, 0xb3, - 0x5c, 0x66, 0xb5, 0x7c, 0xff, 0x8d, 0xbf, 0x17, 0x61, 0x25, 0x79, 0x5d, 0x5a, 0xe9, 0xc2, 0x75, - 0xdb, 0x74, 0x59, 0x93, 0x0d, 0x48, 0x73, 0x80, 0xf1, 0x51, 0x53, 0xbc, 0xc7, 0x88, 0xd8, 0x97, - 0x6b, 0x5f, 0x09, 0x52, 0x40, 0xd6, 0x46, 0xdb, 0x8f, 0x4d, 0x97, 0xed, 0x0f, 0xc8, 0xfb, 0x18, - 0x1f, 0x89, 0x2e, 0xa0, 0xfd, 0xae, 0xc3, 0xe8, 0x69, 0x03, 0xd9, 0xb1, 0x05, 0x64, 0xc1, 0x02, - 0x23, 0xbd, 0x26, 0xc3, 0x4e, 0xd3, 0xa7, 0x3a, 0x57, 0x72, 0xce, 0xfd, 0xdc, 0x07, 0xee, 0x93, - 0xde, 0x3e, 0x76, 0xfc, 0xd8, 0xbb, 0xe2, 0xb4, 0xab, 0x2c, 0xfc, 0x15, 0xdd, 0x3a, 0xfb, 0x8f, - 0x02, 0x49, 0x83, 0xa2, 0x5b, 0x9d, 0xf3, 0xe3, 0xcb, 0x89, 0xf0, 0x33, 0x30, 0xef, 0xdb, 0x21, - 0xa5, 0xc4, 0x75, 0x51, 0xf1, 0xbf, 0x72, 0x31, 0xed, 0x5d, 0x58, 0x4e, 0xf1, 0x12, 0x5d, 0x83, - 0xa2, 0x77, 0xa3, 0x79, 0xa9, 0x9d, 0x6d, 0x78, 0x7f, 0x7a, 0xd4, 0x7d, 0xe2, 0xa5, 0x92, 0x73, - 0x52, 0xa5, 0x21, 0x7e, 0xbc, 0x5d, 0x78, 0x4b, 0xd1, 0x1e, 0xc0, 0x62, 0x92, 0xed, 0xe7, 0xd9, - 0xa3, 0xf6, 0x1b, 0x15, 0xe6, 0x65, 0x68, 0x9e, 0x98, 0x8e, 0xd9, 0xc5, 0x14, 0x7d, 0xa8, 0x40, - 0x25, 0xd4, 0x7f, 0x21, 0x3d, 0x18, 0xcb, 0xa4, 0x67, 0x22, 0x6d, 0x23, 0x43, 0x42, 0x84, 0xd9, - 0xd8, 0x1c, 0xd6, 0xaf, 0xa1, 0x79, 0xb1, 0xa6, 0xcb, 0xa8, 0x7d, 0xe7, 0x6f, 0xff, 0xf8, 0x61, - 0x61, 0xc1, 0x98, 0xdb, 0x39, 0xf9, 0xfc, 0x8e, 0xfc, 0xe4, 0xbe, 0xad, 0x6c, 0xa2, 0x1f, 0x28, - 0x80, 0x84, 0xe4, 0x43, 0x7c, 0xd0, 0xef, 0x4e, 0xd4, 0x8e, 0x2f, 0x0e, 0xeb, 0x4b, 0x48, 0x3e, - 0x76, 0xe9, 0xfc, 0x01, 0x2f, 0x64, 0xcd, 0xb2, 0x81, 0x3c, 0x6b, 0xf8, 0x42, 0x33, 0x68, 0x93, - 0xe5, 0x8d, 0x22, 0x49, 0x43, 0x31, 0xba, 0x15, 0x3c, 0x34, 0xe5, 0xa5, 0x45, 0xdb, 0xcc, 0x10, - 0x8a, 0x4e, 0xd7, 0xff, 0x54, 0xe0, 0x5a, 0x74, 0x9f, 0x7c, 0xa7, 0xbc, 0x9e, 0x2d, 0x24, 0x43, - 0xf0, 0xb1, 0x32, 0xac, 0x33, 0x44, 0x1f, 0x61, 0xe6, 0xbb, 0xee, 0x56, 0xf5, 0x96, 0xe9, 0xe8, - 0x1d, 0xcb, 0x66, 0x98, 0xea, 0x03, 0x8b, 0x1d, 0xea, 0xec, 0x10, 0xbb, 0x58, 0xef, 0x58, 0xd8, - 0x6e, 0xbb, 0xb7, 0x47, 0xa3, 0x56, 0x55, 0xf7, 0x6b, 0xb9, 0xaa, 0x7b, 0xc4, 0x51, 0xd5, 0x45, - 0xfb, 0x51, 0xd5, 0x79, 0x4f, 0xf1, 0xb9, 0xaa, 0xde, 0xc6, 0x1d, 0xb3, 0x6f, 0x33, 0x9d, 0x62, - 0xd6, 0xa7, 0x8e, 0x6e, 0xda, 0xf6, 0xd9, 0x29, 0x3c, 0xc2, 0xf3, 0x28, 0x94, 0x6f, 0xf4, 0x51, - 0xc1, 0x9b, 0x38, 0x85, 0xa9, 0xc1, 0x74, 0x4f, 0xd4, 0xe5, 0x9f, 0x29, 0xc3, 0xfa, 0x87, 0x0a, - 0xfa, 0xb6, 0xe7, 0x73, 0x28, 0xe9, 0x2f, 0xd9, 0xf3, 0xf0, 0x59, 0xdc, 0xff, 0x45, 0x94, 0x50, - 0x61, 0x1c, 0x75, 0xa1, 0xcb, 0x3a, 0x5c, 0xed, 0x49, 0x4f, 0x20, 0xe1, 0x6a, 0x4f, 0x7c, 0x0b, - 0x90, 0xa8, 0x13, 0x6b, 0x61, 0xd4, 0xd5, 0x62, 0xa8, 0xfb, 0xae, 0x02, 0xf3, 0xe1, 0x69, 0x1b, - 0x6d, 0x84, 0x83, 0x9b, 0xf0, 0x2c, 0xa0, 0x19, 0x59, 0x22, 0xd2, 0x8a, 0x3b, 0xc3, 0xfa, 0x02, - 0xba, 0x2a, 0x16, 0xc3, 0xc1, 0x58, 0xd8, 0x8c, 0x99, 0xf1, 0x6b, 0x05, 0x96, 0x53, 0xe6, 0x3f, - 0xb4, 0x99, 0x8a, 0xef, 0x58, 0x77, 0xa8, 0xdd, 0xc9, 0x25, 0x2b, 0x2d, 0xac, 0x0f, 0xeb, 0x37, - 0xd1, 0x8d, 0x56, 0x88, 0x9d, 0xf4, 0xd1, 0x75, 0xcb, 0x6d, 0x5d, 0x35, 0xd4, 0xa0, 0xad, 0x3b, - 0xa3, 0x65, 0x6e, 0xf7, 0x5f, 0x14, 0x58, 0x89, 0x93, 0xd6, 0xab, 0x30, 0xfe, 0xc9, 0xb0, 0xbe, - 0x81, 0xd6, 0x93, 0x28, 0x2d, 0xea, 0xc2, 0x2d, 0x63, 0x2d, 0x5e, 0x7b, 0x51, 0x47, 0x7e, 0x59, - 0x00, 0x2d, 0x7d, 0x2c, 0x40, 0x5b, 0x19, 0x80, 0x8b, 0x37, 0x7b, 0xda, 0x76, 0x5e, 0x71, 0xe9, - 0xcc, 0xaf, 0x94, 0x61, 0xfd, 0x85, 0x82, 0xbe, 0xa7, 0x04, 0xe8, 0x29, 0xe0, 0x86, 0x5b, 0x1d, - 0x8f, 0xd5, 0x50, 0x9b, 0x34, 0x82, 0xe9, 0x08, 0xbe, 0xe3, 0xa9, 0x2a, 0x78, 0x22, 0x8f, 0x9c, - 0x86, 0x52, 0x93, 0x8f, 0xfe, 0x5c, 0xf0, 0x7a, 0xde, 0x38, 0x83, 0xbd, 0xc2, 0xa8, 0xfd, 0x49, - 0x19, 0xd6, 0x7f, 0xa2, 0xa0, 0x1f, 0x29, 0x31, 0x82, 0x7b, 0x85, 0xb1, 0x4b, 0x3d, 0x97, 0x47, - 0x50, 0x47, 0x63, 0x6a, 0x8f, 0x23, 0x3f, 0x65, 0x60, 0x09, 0x83, 0x27, 0x7b, 0x2e, 0x0c, 0x83, - 0x67, 0xcc, 0x04, 0x24, 0x91, 0x1f, 0x66, 0xc8, 0x18, 0xf2, 0x6b, 0x99, 0xc8, 0xff, 0x83, 0x02, - 0x6a, 0xda, 0x70, 0x82, 0xee, 0xa4, 0xf2, 0x63, 0x42, 0xda, 0xab, 0xf9, 0x84, 0xa5, 0xe9, 0x5f, - 0x1d, 0xd6, 0x0d, 0xa4, 0x3f, 0x30, 0x59, 0xeb, 0x50, 0x6f, 0x87, 0xc8, 0x35, 0x16, 0xfc, 0xd5, - 0xcd, 0x71, 0xdc, 0x75, 0x23, 0xf5, 0x11, 0x08, 0x85, 0xac, 0x1a, 0xf7, 0x48, 0xa6, 0x6d, 0xe5, - 0x94, 0x96, 0x4e, 0x3c, 0x1e, 0xd6, 0x57, 0xd1, 0x4d, 0x5f, 0x2e, 0x2d, 0x03, 0x9f, 0x35, 0x36, - 0x52, 0xed, 0x3f, 0x91, 0xba, 0x9e, 0x23, 0xbf, 0x57, 0x60, 0x25, 0x6b, 0xaa, 0x42, 0x3b, 0x19, - 0xc0, 0x4a, 0x9a, 0xfc, 0xb4, 0xbb, 0xf9, 0x15, 0xa4, 0x47, 0x5f, 0x1a, 0xd6, 0x57, 0x90, 0x16, - 0xa4, 0x2f, 0x1f, 0x3d, 0xbc, 0x6f, 0x08, 0x75, 0x01, 0x67, 0x0e, 0xf1, 0x15, 0xf4, 0x0b, 0x05, - 0x16, 0x93, 0x86, 0x15, 0xf4, 0xc6, 0xf8, 0x71, 0x46, 0x98, 0x7b, 0x3b, 0xef, 0xdc, 0x63, 0xdc, - 0xe7, 0x85, 0xdf, 0xc5, 0x8c, 0x83, 0x5c, 0x2c, 0xea, 0xa4, 0x13, 0xea, 0x12, 0x6e, 0xa0, 0xe5, - 0x90, 0x95, 0x23, 0xc9, 0x07, 0x53, 0xcf, 0x0b, 0xbd, 0x83, 0x83, 0x69, 0x3e, 0x75, 0x7e, 0xe1, - 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x13, 0x03, 0x48, 0xff, 0x46, 0x25, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// RuntimeManagerClient is the client API for RuntimeManager service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type RuntimeManagerClient interface { - // create runtime - CreateRuntime(ctx context.Context, in *CreateRuntimeRequest, opts ...grpc.CallOption) (*CreateRuntimeResponse, error) - // create debug runtime - CreateDebugRuntime(ctx context.Context, in *CreateRuntimeRequest, opts ...grpc.CallOption) (*CreateRuntimeResponse, error) - DescribeRuntimeDetails(ctx context.Context, in *DescribeRuntimesRequest, opts ...grpc.CallOption) (*DescribeRuntimeDetailsResponse, error) - // Get runtimes, can filter with these fields(runtime_id, provider, zone, status, owner), default return all runtimes - DescribeRuntimes(ctx context.Context, in *DescribeRuntimesRequest, opts ...grpc.CallOption) (*DescribeRuntimesResponse, error) - // Get debug runtimes, can filter with these fields(runtime_id, provider, zone, status, owner), default return all debug runtimes - DescribeDebugRuntimes(ctx context.Context, in *DescribeRuntimesRequest, opts ...grpc.CallOption) (*DescribeRuntimesResponse, error) - // Modify runtime - ModifyRuntime(ctx context.Context, in *ModifyRuntimeRequest, opts ...grpc.CallOption) (*ModifyRuntimeResponse, error) - // Batch delete runtimes - DeleteRuntimes(ctx context.Context, in *DeleteRuntimesRequest, opts ...grpc.CallOption) (*DeleteRuntimesResponse, error) - // Create runtime credential - CreateRuntimeCredential(ctx context.Context, in *CreateRuntimeCredentialRequest, opts ...grpc.CallOption) (*CreateRuntimeCredentialResponse, error) - // Create debug runtime credential - CreateDebugRuntimeCredential(ctx context.Context, in *CreateRuntimeCredentialRequest, opts ...grpc.CallOption) (*CreateRuntimeCredentialResponse, error) - // Get runtime credentials, filter with these fields(runtime_credential_id, status, provider, owner), default return all runtime credentials - DescribeRuntimeCredentials(ctx context.Context, in *DescribeRuntimeCredentialsRequest, opts ...grpc.CallOption) (*DescribeRuntimeCredentialsResponse, error) - // Get debug runtime credentials, filter with these fields(runtime_credential_id, status, provider, owner), default return all debug runtime credentials - DescribeDebugRuntimeCredentials(ctx context.Context, in *DescribeRuntimeCredentialsRequest, opts ...grpc.CallOption) (*DescribeRuntimeCredentialsResponse, error) - // Modify runtime credential - ModifyRuntimeCredential(ctx context.Context, in *ModifyRuntimeCredentialRequest, opts ...grpc.CallOption) (*ModifyRuntimeCredentialResponse, error) - // Batch delete runtime credentials - DeleteRuntimeCredentials(ctx context.Context, in *DeleteRuntimeCredentialsRequest, opts ...grpc.CallOption) (*DeleteRuntimeCredentialsResponse, error) - // Validate runtime credential - ValidateRuntimeCredential(ctx context.Context, in *ValidateRuntimeCredentialRequest, opts ...grpc.CallOption) (*ValidateRuntimeCredentialResponse, error) - // Get runtime provider zones - DescribeRuntimeProviderZones(ctx context.Context, in *DescribeRuntimeProviderZonesRequest, opts ...grpc.CallOption) (*DescribeRuntimeProviderZonesResponse, error) - // Get statistics of runtime - GetRuntimeStatistics(ctx context.Context, in *GetRuntimeStatisticsRequest, opts ...grpc.CallOption) (*GetRuntimeStatisticsResponse, error) -} - -type runtimeManagerClient struct { - cc *grpc.ClientConn -} - -func NewRuntimeManagerClient(cc *grpc.ClientConn) RuntimeManagerClient { - return &runtimeManagerClient{cc} -} - -func (c *runtimeManagerClient) CreateRuntime(ctx context.Context, in *CreateRuntimeRequest, opts ...grpc.CallOption) (*CreateRuntimeResponse, error) { - out := new(CreateRuntimeResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RuntimeManager/CreateRuntime", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runtimeManagerClient) CreateDebugRuntime(ctx context.Context, in *CreateRuntimeRequest, opts ...grpc.CallOption) (*CreateRuntimeResponse, error) { - out := new(CreateRuntimeResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RuntimeManager/CreateDebugRuntime", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runtimeManagerClient) DescribeRuntimeDetails(ctx context.Context, in *DescribeRuntimesRequest, opts ...grpc.CallOption) (*DescribeRuntimeDetailsResponse, error) { - out := new(DescribeRuntimeDetailsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RuntimeManager/DescribeRuntimeDetails", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runtimeManagerClient) DescribeRuntimes(ctx context.Context, in *DescribeRuntimesRequest, opts ...grpc.CallOption) (*DescribeRuntimesResponse, error) { - out := new(DescribeRuntimesResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RuntimeManager/DescribeRuntimes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runtimeManagerClient) DescribeDebugRuntimes(ctx context.Context, in *DescribeRuntimesRequest, opts ...grpc.CallOption) (*DescribeRuntimesResponse, error) { - out := new(DescribeRuntimesResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RuntimeManager/DescribeDebugRuntimes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runtimeManagerClient) ModifyRuntime(ctx context.Context, in *ModifyRuntimeRequest, opts ...grpc.CallOption) (*ModifyRuntimeResponse, error) { - out := new(ModifyRuntimeResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RuntimeManager/ModifyRuntime", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runtimeManagerClient) DeleteRuntimes(ctx context.Context, in *DeleteRuntimesRequest, opts ...grpc.CallOption) (*DeleteRuntimesResponse, error) { - out := new(DeleteRuntimesResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RuntimeManager/DeleteRuntimes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runtimeManagerClient) CreateRuntimeCredential(ctx context.Context, in *CreateRuntimeCredentialRequest, opts ...grpc.CallOption) (*CreateRuntimeCredentialResponse, error) { - out := new(CreateRuntimeCredentialResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RuntimeManager/CreateRuntimeCredential", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runtimeManagerClient) CreateDebugRuntimeCredential(ctx context.Context, in *CreateRuntimeCredentialRequest, opts ...grpc.CallOption) (*CreateRuntimeCredentialResponse, error) { - out := new(CreateRuntimeCredentialResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RuntimeManager/CreateDebugRuntimeCredential", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runtimeManagerClient) DescribeRuntimeCredentials(ctx context.Context, in *DescribeRuntimeCredentialsRequest, opts ...grpc.CallOption) (*DescribeRuntimeCredentialsResponse, error) { - out := new(DescribeRuntimeCredentialsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RuntimeManager/DescribeRuntimeCredentials", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runtimeManagerClient) DescribeDebugRuntimeCredentials(ctx context.Context, in *DescribeRuntimeCredentialsRequest, opts ...grpc.CallOption) (*DescribeRuntimeCredentialsResponse, error) { - out := new(DescribeRuntimeCredentialsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RuntimeManager/DescribeDebugRuntimeCredentials", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runtimeManagerClient) ModifyRuntimeCredential(ctx context.Context, in *ModifyRuntimeCredentialRequest, opts ...grpc.CallOption) (*ModifyRuntimeCredentialResponse, error) { - out := new(ModifyRuntimeCredentialResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RuntimeManager/ModifyRuntimeCredential", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runtimeManagerClient) DeleteRuntimeCredentials(ctx context.Context, in *DeleteRuntimeCredentialsRequest, opts ...grpc.CallOption) (*DeleteRuntimeCredentialsResponse, error) { - out := new(DeleteRuntimeCredentialsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RuntimeManager/DeleteRuntimeCredentials", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runtimeManagerClient) ValidateRuntimeCredential(ctx context.Context, in *ValidateRuntimeCredentialRequest, opts ...grpc.CallOption) (*ValidateRuntimeCredentialResponse, error) { - out := new(ValidateRuntimeCredentialResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RuntimeManager/ValidateRuntimeCredential", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runtimeManagerClient) DescribeRuntimeProviderZones(ctx context.Context, in *DescribeRuntimeProviderZonesRequest, opts ...grpc.CallOption) (*DescribeRuntimeProviderZonesResponse, error) { - out := new(DescribeRuntimeProviderZonesResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RuntimeManager/DescribeRuntimeProviderZones", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runtimeManagerClient) GetRuntimeStatistics(ctx context.Context, in *GetRuntimeStatisticsRequest, opts ...grpc.CallOption) (*GetRuntimeStatisticsResponse, error) { - out := new(GetRuntimeStatisticsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RuntimeManager/GetRuntimeStatistics", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// RuntimeManagerServer is the server API for RuntimeManager service. -type RuntimeManagerServer interface { - // create runtime - CreateRuntime(context.Context, *CreateRuntimeRequest) (*CreateRuntimeResponse, error) - // create debug runtime - CreateDebugRuntime(context.Context, *CreateRuntimeRequest) (*CreateRuntimeResponse, error) - DescribeRuntimeDetails(context.Context, *DescribeRuntimesRequest) (*DescribeRuntimeDetailsResponse, error) - // Get runtimes, can filter with these fields(runtime_id, provider, zone, status, owner), default return all runtimes - DescribeRuntimes(context.Context, *DescribeRuntimesRequest) (*DescribeRuntimesResponse, error) - // Get debug runtimes, can filter with these fields(runtime_id, provider, zone, status, owner), default return all debug runtimes - DescribeDebugRuntimes(context.Context, *DescribeRuntimesRequest) (*DescribeRuntimesResponse, error) - // Modify runtime - ModifyRuntime(context.Context, *ModifyRuntimeRequest) (*ModifyRuntimeResponse, error) - // Batch delete runtimes - DeleteRuntimes(context.Context, *DeleteRuntimesRequest) (*DeleteRuntimesResponse, error) - // Create runtime credential - CreateRuntimeCredential(context.Context, *CreateRuntimeCredentialRequest) (*CreateRuntimeCredentialResponse, error) - // Create debug runtime credential - CreateDebugRuntimeCredential(context.Context, *CreateRuntimeCredentialRequest) (*CreateRuntimeCredentialResponse, error) - // Get runtime credentials, filter with these fields(runtime_credential_id, status, provider, owner), default return all runtime credentials - DescribeRuntimeCredentials(context.Context, *DescribeRuntimeCredentialsRequest) (*DescribeRuntimeCredentialsResponse, error) - // Get debug runtime credentials, filter with these fields(runtime_credential_id, status, provider, owner), default return all debug runtime credentials - DescribeDebugRuntimeCredentials(context.Context, *DescribeRuntimeCredentialsRequest) (*DescribeRuntimeCredentialsResponse, error) - // Modify runtime credential - ModifyRuntimeCredential(context.Context, *ModifyRuntimeCredentialRequest) (*ModifyRuntimeCredentialResponse, error) - // Batch delete runtime credentials - DeleteRuntimeCredentials(context.Context, *DeleteRuntimeCredentialsRequest) (*DeleteRuntimeCredentialsResponse, error) - // Validate runtime credential - ValidateRuntimeCredential(context.Context, *ValidateRuntimeCredentialRequest) (*ValidateRuntimeCredentialResponse, error) - // Get runtime provider zones - DescribeRuntimeProviderZones(context.Context, *DescribeRuntimeProviderZonesRequest) (*DescribeRuntimeProviderZonesResponse, error) - // Get statistics of runtime - GetRuntimeStatistics(context.Context, *GetRuntimeStatisticsRequest) (*GetRuntimeStatisticsResponse, error) -} - -// UnimplementedRuntimeManagerServer can be embedded to have forward compatible implementations. -type UnimplementedRuntimeManagerServer struct { -} - -func (*UnimplementedRuntimeManagerServer) CreateRuntime(ctx context.Context, req *CreateRuntimeRequest) (*CreateRuntimeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateRuntime not implemented") -} -func (*UnimplementedRuntimeManagerServer) CreateDebugRuntime(ctx context.Context, req *CreateRuntimeRequest) (*CreateRuntimeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateDebugRuntime not implemented") -} -func (*UnimplementedRuntimeManagerServer) DescribeRuntimeDetails(ctx context.Context, req *DescribeRuntimesRequest) (*DescribeRuntimeDetailsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeRuntimeDetails not implemented") -} -func (*UnimplementedRuntimeManagerServer) DescribeRuntimes(ctx context.Context, req *DescribeRuntimesRequest) (*DescribeRuntimesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeRuntimes not implemented") -} -func (*UnimplementedRuntimeManagerServer) DescribeDebugRuntimes(ctx context.Context, req *DescribeRuntimesRequest) (*DescribeRuntimesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeDebugRuntimes not implemented") -} -func (*UnimplementedRuntimeManagerServer) ModifyRuntime(ctx context.Context, req *ModifyRuntimeRequest) (*ModifyRuntimeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ModifyRuntime not implemented") -} -func (*UnimplementedRuntimeManagerServer) DeleteRuntimes(ctx context.Context, req *DeleteRuntimesRequest) (*DeleteRuntimesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteRuntimes not implemented") -} -func (*UnimplementedRuntimeManagerServer) CreateRuntimeCredential(ctx context.Context, req *CreateRuntimeCredentialRequest) (*CreateRuntimeCredentialResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateRuntimeCredential not implemented") -} -func (*UnimplementedRuntimeManagerServer) CreateDebugRuntimeCredential(ctx context.Context, req *CreateRuntimeCredentialRequest) (*CreateRuntimeCredentialResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateDebugRuntimeCredential not implemented") -} -func (*UnimplementedRuntimeManagerServer) DescribeRuntimeCredentials(ctx context.Context, req *DescribeRuntimeCredentialsRequest) (*DescribeRuntimeCredentialsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeRuntimeCredentials not implemented") -} -func (*UnimplementedRuntimeManagerServer) DescribeDebugRuntimeCredentials(ctx context.Context, req *DescribeRuntimeCredentialsRequest) (*DescribeRuntimeCredentialsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeDebugRuntimeCredentials not implemented") -} -func (*UnimplementedRuntimeManagerServer) ModifyRuntimeCredential(ctx context.Context, req *ModifyRuntimeCredentialRequest) (*ModifyRuntimeCredentialResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ModifyRuntimeCredential not implemented") -} -func (*UnimplementedRuntimeManagerServer) DeleteRuntimeCredentials(ctx context.Context, req *DeleteRuntimeCredentialsRequest) (*DeleteRuntimeCredentialsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteRuntimeCredentials not implemented") -} -func (*UnimplementedRuntimeManagerServer) ValidateRuntimeCredential(ctx context.Context, req *ValidateRuntimeCredentialRequest) (*ValidateRuntimeCredentialResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ValidateRuntimeCredential not implemented") -} -func (*UnimplementedRuntimeManagerServer) DescribeRuntimeProviderZones(ctx context.Context, req *DescribeRuntimeProviderZonesRequest) (*DescribeRuntimeProviderZonesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeRuntimeProviderZones not implemented") -} -func (*UnimplementedRuntimeManagerServer) GetRuntimeStatistics(ctx context.Context, req *GetRuntimeStatisticsRequest) (*GetRuntimeStatisticsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetRuntimeStatistics not implemented") -} - -func RegisterRuntimeManagerServer(s *grpc.Server, srv RuntimeManagerServer) { - s.RegisterService(&_RuntimeManager_serviceDesc, srv) -} - -func _RuntimeManager_CreateRuntime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateRuntimeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeManagerServer).CreateRuntime(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RuntimeManager/CreateRuntime", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeManagerServer).CreateRuntime(ctx, req.(*CreateRuntimeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuntimeManager_CreateDebugRuntime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateRuntimeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeManagerServer).CreateDebugRuntime(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RuntimeManager/CreateDebugRuntime", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeManagerServer).CreateDebugRuntime(ctx, req.(*CreateRuntimeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuntimeManager_DescribeRuntimeDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeRuntimesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeManagerServer).DescribeRuntimeDetails(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RuntimeManager/DescribeRuntimeDetails", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeManagerServer).DescribeRuntimeDetails(ctx, req.(*DescribeRuntimesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuntimeManager_DescribeRuntimes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeRuntimesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeManagerServer).DescribeRuntimes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RuntimeManager/DescribeRuntimes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeManagerServer).DescribeRuntimes(ctx, req.(*DescribeRuntimesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuntimeManager_DescribeDebugRuntimes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeRuntimesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeManagerServer).DescribeDebugRuntimes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RuntimeManager/DescribeDebugRuntimes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeManagerServer).DescribeDebugRuntimes(ctx, req.(*DescribeRuntimesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuntimeManager_ModifyRuntime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ModifyRuntimeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeManagerServer).ModifyRuntime(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RuntimeManager/ModifyRuntime", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeManagerServer).ModifyRuntime(ctx, req.(*ModifyRuntimeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuntimeManager_DeleteRuntimes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteRuntimesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeManagerServer).DeleteRuntimes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RuntimeManager/DeleteRuntimes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeManagerServer).DeleteRuntimes(ctx, req.(*DeleteRuntimesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuntimeManager_CreateRuntimeCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateRuntimeCredentialRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeManagerServer).CreateRuntimeCredential(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RuntimeManager/CreateRuntimeCredential", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeManagerServer).CreateRuntimeCredential(ctx, req.(*CreateRuntimeCredentialRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuntimeManager_CreateDebugRuntimeCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateRuntimeCredentialRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeManagerServer).CreateDebugRuntimeCredential(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RuntimeManager/CreateDebugRuntimeCredential", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeManagerServer).CreateDebugRuntimeCredential(ctx, req.(*CreateRuntimeCredentialRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuntimeManager_DescribeRuntimeCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeRuntimeCredentialsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeManagerServer).DescribeRuntimeCredentials(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RuntimeManager/DescribeRuntimeCredentials", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeManagerServer).DescribeRuntimeCredentials(ctx, req.(*DescribeRuntimeCredentialsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuntimeManager_DescribeDebugRuntimeCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeRuntimeCredentialsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeManagerServer).DescribeDebugRuntimeCredentials(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RuntimeManager/DescribeDebugRuntimeCredentials", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeManagerServer).DescribeDebugRuntimeCredentials(ctx, req.(*DescribeRuntimeCredentialsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuntimeManager_ModifyRuntimeCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ModifyRuntimeCredentialRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeManagerServer).ModifyRuntimeCredential(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RuntimeManager/ModifyRuntimeCredential", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeManagerServer).ModifyRuntimeCredential(ctx, req.(*ModifyRuntimeCredentialRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuntimeManager_DeleteRuntimeCredentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteRuntimeCredentialsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeManagerServer).DeleteRuntimeCredentials(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RuntimeManager/DeleteRuntimeCredentials", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeManagerServer).DeleteRuntimeCredentials(ctx, req.(*DeleteRuntimeCredentialsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuntimeManager_ValidateRuntimeCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ValidateRuntimeCredentialRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeManagerServer).ValidateRuntimeCredential(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RuntimeManager/ValidateRuntimeCredential", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeManagerServer).ValidateRuntimeCredential(ctx, req.(*ValidateRuntimeCredentialRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuntimeManager_DescribeRuntimeProviderZones_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeRuntimeProviderZonesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeManagerServer).DescribeRuntimeProviderZones(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RuntimeManager/DescribeRuntimeProviderZones", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeManagerServer).DescribeRuntimeProviderZones(ctx, req.(*DescribeRuntimeProviderZonesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuntimeManager_GetRuntimeStatistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRuntimeStatisticsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeManagerServer).GetRuntimeStatistics(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RuntimeManager/GetRuntimeStatistics", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeManagerServer).GetRuntimeStatistics(ctx, req.(*GetRuntimeStatisticsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _RuntimeManager_serviceDesc = grpc.ServiceDesc{ - ServiceName: "openpitrix.RuntimeManager", - HandlerType: (*RuntimeManagerServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateRuntime", - Handler: _RuntimeManager_CreateRuntime_Handler, - }, - { - MethodName: "CreateDebugRuntime", - Handler: _RuntimeManager_CreateDebugRuntime_Handler, - }, - { - MethodName: "DescribeRuntimeDetails", - Handler: _RuntimeManager_DescribeRuntimeDetails_Handler, - }, - { - MethodName: "DescribeRuntimes", - Handler: _RuntimeManager_DescribeRuntimes_Handler, - }, - { - MethodName: "DescribeDebugRuntimes", - Handler: _RuntimeManager_DescribeDebugRuntimes_Handler, - }, - { - MethodName: "ModifyRuntime", - Handler: _RuntimeManager_ModifyRuntime_Handler, - }, - { - MethodName: "DeleteRuntimes", - Handler: _RuntimeManager_DeleteRuntimes_Handler, - }, - { - MethodName: "CreateRuntimeCredential", - Handler: _RuntimeManager_CreateRuntimeCredential_Handler, - }, - { - MethodName: "CreateDebugRuntimeCredential", - Handler: _RuntimeManager_CreateDebugRuntimeCredential_Handler, - }, - { - MethodName: "DescribeRuntimeCredentials", - Handler: _RuntimeManager_DescribeRuntimeCredentials_Handler, - }, - { - MethodName: "DescribeDebugRuntimeCredentials", - Handler: _RuntimeManager_DescribeDebugRuntimeCredentials_Handler, - }, - { - MethodName: "ModifyRuntimeCredential", - Handler: _RuntimeManager_ModifyRuntimeCredential_Handler, - }, - { - MethodName: "DeleteRuntimeCredentials", - Handler: _RuntimeManager_DeleteRuntimeCredentials_Handler, - }, - { - MethodName: "ValidateRuntimeCredential", - Handler: _RuntimeManager_ValidateRuntimeCredential_Handler, - }, - { - MethodName: "DescribeRuntimeProviderZones", - Handler: _RuntimeManager_DescribeRuntimeProviderZones_Handler, - }, - { - MethodName: "GetRuntimeStatistics", - Handler: _RuntimeManager_GetRuntimeStatistics_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "runtime.proto", -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/runtime.pb.gw.go b/vendor/openpitrix.io/openpitrix/pkg/pb/runtime.pb.gw.go deleted file mode 100644 index 36267e469..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/runtime.pb.gw.go +++ /dev/null @@ -1,1234 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: runtime.proto - -/* -Package pb is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package pb - -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/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage - -func request_RuntimeManager_CreateRuntime_0(ctx context.Context, marshaler runtime.Marshaler, client RuntimeManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateRuntimeRequest - 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.CreateRuntime(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_RuntimeManager_CreateRuntime_0(ctx context.Context, marshaler runtime.Marshaler, server RuntimeManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateRuntimeRequest - 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.CreateRuntime(ctx, &protoReq) - return msg, metadata, err - -} - -func request_RuntimeManager_CreateDebugRuntime_0(ctx context.Context, marshaler runtime.Marshaler, client RuntimeManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateRuntimeRequest - 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.CreateDebugRuntime(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_RuntimeManager_CreateDebugRuntime_0(ctx context.Context, marshaler runtime.Marshaler, server RuntimeManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateRuntimeRequest - 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.CreateDebugRuntime(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_RuntimeManager_DescribeRuntimes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_RuntimeManager_DescribeRuntimes_0(ctx context.Context, marshaler runtime.Marshaler, client RuntimeManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeRuntimesRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RuntimeManager_DescribeRuntimes_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeRuntimes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_RuntimeManager_DescribeRuntimes_0(ctx context.Context, marshaler runtime.Marshaler, server RuntimeManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeRuntimesRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_RuntimeManager_DescribeRuntimes_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeRuntimes(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_RuntimeManager_DescribeDebugRuntimes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_RuntimeManager_DescribeDebugRuntimes_0(ctx context.Context, marshaler runtime.Marshaler, client RuntimeManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeRuntimesRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RuntimeManager_DescribeDebugRuntimes_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeDebugRuntimes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_RuntimeManager_DescribeDebugRuntimes_0(ctx context.Context, marshaler runtime.Marshaler, server RuntimeManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeRuntimesRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_RuntimeManager_DescribeDebugRuntimes_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeDebugRuntimes(ctx, &protoReq) - return msg, metadata, err - -} - -func request_RuntimeManager_ModifyRuntime_0(ctx context.Context, marshaler runtime.Marshaler, client RuntimeManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyRuntimeRequest - 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.ModifyRuntime(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_RuntimeManager_ModifyRuntime_0(ctx context.Context, marshaler runtime.Marshaler, server RuntimeManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyRuntimeRequest - 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.ModifyRuntime(ctx, &protoReq) - return msg, metadata, err - -} - -func request_RuntimeManager_DeleteRuntimes_0(ctx context.Context, marshaler runtime.Marshaler, client RuntimeManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRuntimesRequest - 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.DeleteRuntimes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_RuntimeManager_DeleteRuntimes_0(ctx context.Context, marshaler runtime.Marshaler, server RuntimeManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRuntimesRequest - 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.DeleteRuntimes(ctx, &protoReq) - return msg, metadata, err - -} - -func request_RuntimeManager_CreateRuntimeCredential_0(ctx context.Context, marshaler runtime.Marshaler, client RuntimeManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateRuntimeCredentialRequest - 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.CreateRuntimeCredential(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_RuntimeManager_CreateRuntimeCredential_0(ctx context.Context, marshaler runtime.Marshaler, server RuntimeManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateRuntimeCredentialRequest - 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.CreateRuntimeCredential(ctx, &protoReq) - return msg, metadata, err - -} - -func request_RuntimeManager_CreateDebugRuntimeCredential_0(ctx context.Context, marshaler runtime.Marshaler, client RuntimeManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateRuntimeCredentialRequest - 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.CreateDebugRuntimeCredential(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_RuntimeManager_CreateDebugRuntimeCredential_0(ctx context.Context, marshaler runtime.Marshaler, server RuntimeManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateRuntimeCredentialRequest - 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.CreateDebugRuntimeCredential(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_RuntimeManager_DescribeRuntimeCredentials_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_RuntimeManager_DescribeRuntimeCredentials_0(ctx context.Context, marshaler runtime.Marshaler, client RuntimeManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeRuntimeCredentialsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RuntimeManager_DescribeRuntimeCredentials_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeRuntimeCredentials(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_RuntimeManager_DescribeRuntimeCredentials_0(ctx context.Context, marshaler runtime.Marshaler, server RuntimeManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeRuntimeCredentialsRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_RuntimeManager_DescribeRuntimeCredentials_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeRuntimeCredentials(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_RuntimeManager_DescribeDebugRuntimeCredentials_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_RuntimeManager_DescribeDebugRuntimeCredentials_0(ctx context.Context, marshaler runtime.Marshaler, client RuntimeManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeRuntimeCredentialsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RuntimeManager_DescribeDebugRuntimeCredentials_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeDebugRuntimeCredentials(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_RuntimeManager_DescribeDebugRuntimeCredentials_0(ctx context.Context, marshaler runtime.Marshaler, server RuntimeManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeRuntimeCredentialsRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_RuntimeManager_DescribeDebugRuntimeCredentials_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeDebugRuntimeCredentials(ctx, &protoReq) - return msg, metadata, err - -} - -func request_RuntimeManager_ModifyRuntimeCredential_0(ctx context.Context, marshaler runtime.Marshaler, client RuntimeManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyRuntimeCredentialRequest - 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.ModifyRuntimeCredential(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_RuntimeManager_ModifyRuntimeCredential_0(ctx context.Context, marshaler runtime.Marshaler, server RuntimeManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ModifyRuntimeCredentialRequest - 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.ModifyRuntimeCredential(ctx, &protoReq) - return msg, metadata, err - -} - -func request_RuntimeManager_DeleteRuntimeCredentials_0(ctx context.Context, marshaler runtime.Marshaler, client RuntimeManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRuntimeCredentialsRequest - 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.DeleteRuntimeCredentials(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_RuntimeManager_DeleteRuntimeCredentials_0(ctx context.Context, marshaler runtime.Marshaler, server RuntimeManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRuntimeCredentialsRequest - 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.DeleteRuntimeCredentials(ctx, &protoReq) - return msg, metadata, err - -} - -func request_RuntimeManager_ValidateRuntimeCredential_0(ctx context.Context, marshaler runtime.Marshaler, client RuntimeManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ValidateRuntimeCredentialRequest - 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.ValidateRuntimeCredential(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_RuntimeManager_ValidateRuntimeCredential_0(ctx context.Context, marshaler runtime.Marshaler, server RuntimeManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ValidateRuntimeCredentialRequest - 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.ValidateRuntimeCredential(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_RuntimeManager_DescribeRuntimeProviderZones_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_RuntimeManager_DescribeRuntimeProviderZones_0(ctx context.Context, marshaler runtime.Marshaler, client RuntimeManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeRuntimeProviderZonesRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RuntimeManager_DescribeRuntimeProviderZones_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeRuntimeProviderZones(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_RuntimeManager_DescribeRuntimeProviderZones_0(ctx context.Context, marshaler runtime.Marshaler, server RuntimeManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeRuntimeProviderZonesRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_RuntimeManager_DescribeRuntimeProviderZones_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeRuntimeProviderZones(ctx, &protoReq) - return msg, metadata, err - -} - -func request_RuntimeManager_GetRuntimeStatistics_0(ctx context.Context, marshaler runtime.Marshaler, client RuntimeManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRuntimeStatisticsRequest - var metadata runtime.ServerMetadata - - msg, err := client.GetRuntimeStatistics(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_RuntimeManager_GetRuntimeStatistics_0(ctx context.Context, marshaler runtime.Marshaler, server RuntimeManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRuntimeStatisticsRequest - var metadata runtime.ServerMetadata - - msg, err := server.GetRuntimeStatistics(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterRuntimeManagerHandlerServer registers the http handlers for service RuntimeManager to "mux". -// UnaryRPC :call RuntimeManagerServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterRuntimeManagerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RuntimeManagerServer) error { - - mux.Handle("POST", pattern_RuntimeManager_CreateRuntime_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_RuntimeManager_CreateRuntime_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_CreateRuntime_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_RuntimeManager_CreateDebugRuntime_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_RuntimeManager_CreateDebugRuntime_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_CreateDebugRuntime_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_RuntimeManager_DescribeRuntimes_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_RuntimeManager_DescribeRuntimes_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_DescribeRuntimes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_RuntimeManager_DescribeDebugRuntimes_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_RuntimeManager_DescribeDebugRuntimes_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_DescribeDebugRuntimes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_RuntimeManager_ModifyRuntime_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_RuntimeManager_ModifyRuntime_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_ModifyRuntime_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_RuntimeManager_DeleteRuntimes_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_RuntimeManager_DeleteRuntimes_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_DeleteRuntimes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_RuntimeManager_CreateRuntimeCredential_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_RuntimeManager_CreateRuntimeCredential_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_CreateRuntimeCredential_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_RuntimeManager_CreateDebugRuntimeCredential_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_RuntimeManager_CreateDebugRuntimeCredential_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_CreateDebugRuntimeCredential_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_RuntimeManager_DescribeRuntimeCredentials_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_RuntimeManager_DescribeRuntimeCredentials_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_DescribeRuntimeCredentials_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_RuntimeManager_DescribeDebugRuntimeCredentials_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_RuntimeManager_DescribeDebugRuntimeCredentials_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_DescribeDebugRuntimeCredentials_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_RuntimeManager_ModifyRuntimeCredential_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_RuntimeManager_ModifyRuntimeCredential_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_ModifyRuntimeCredential_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_RuntimeManager_DeleteRuntimeCredentials_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_RuntimeManager_DeleteRuntimeCredentials_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_DeleteRuntimeCredentials_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_RuntimeManager_ValidateRuntimeCredential_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_RuntimeManager_ValidateRuntimeCredential_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_ValidateRuntimeCredential_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_RuntimeManager_DescribeRuntimeProviderZones_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_RuntimeManager_DescribeRuntimeProviderZones_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_DescribeRuntimeProviderZones_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_RuntimeManager_GetRuntimeStatistics_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_RuntimeManager_GetRuntimeStatistics_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_GetRuntimeStatistics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterRuntimeManagerHandlerFromEndpoint is same as RegisterRuntimeManagerHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterRuntimeManagerHandlerFromEndpoint(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 RegisterRuntimeManagerHandler(ctx, mux, conn) -} - -// RegisterRuntimeManagerHandler registers the http handlers for service RuntimeManager to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterRuntimeManagerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterRuntimeManagerHandlerClient(ctx, mux, NewRuntimeManagerClient(conn)) -} - -// RegisterRuntimeManagerHandlerClient registers the http handlers for service RuntimeManager -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RuntimeManagerClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RuntimeManagerClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "RuntimeManagerClient" to call the correct interceptors. -func RegisterRuntimeManagerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RuntimeManagerClient) error { - - mux.Handle("POST", pattern_RuntimeManager_CreateRuntime_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_RuntimeManager_CreateRuntime_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_CreateRuntime_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_RuntimeManager_CreateDebugRuntime_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_RuntimeManager_CreateDebugRuntime_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_CreateDebugRuntime_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_RuntimeManager_DescribeRuntimes_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_RuntimeManager_DescribeRuntimes_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_DescribeRuntimes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_RuntimeManager_DescribeDebugRuntimes_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_RuntimeManager_DescribeDebugRuntimes_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_DescribeDebugRuntimes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_RuntimeManager_ModifyRuntime_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_RuntimeManager_ModifyRuntime_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_ModifyRuntime_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_RuntimeManager_DeleteRuntimes_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_RuntimeManager_DeleteRuntimes_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_DeleteRuntimes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_RuntimeManager_CreateRuntimeCredential_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_RuntimeManager_CreateRuntimeCredential_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_CreateRuntimeCredential_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_RuntimeManager_CreateDebugRuntimeCredential_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_RuntimeManager_CreateDebugRuntimeCredential_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_CreateDebugRuntimeCredential_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_RuntimeManager_DescribeRuntimeCredentials_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_RuntimeManager_DescribeRuntimeCredentials_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_DescribeRuntimeCredentials_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_RuntimeManager_DescribeDebugRuntimeCredentials_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_RuntimeManager_DescribeDebugRuntimeCredentials_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_DescribeDebugRuntimeCredentials_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_RuntimeManager_ModifyRuntimeCredential_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_RuntimeManager_ModifyRuntimeCredential_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_ModifyRuntimeCredential_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_RuntimeManager_DeleteRuntimeCredentials_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_RuntimeManager_DeleteRuntimeCredentials_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_DeleteRuntimeCredentials_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_RuntimeManager_ValidateRuntimeCredential_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_RuntimeManager_ValidateRuntimeCredential_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_ValidateRuntimeCredential_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_RuntimeManager_DescribeRuntimeProviderZones_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_RuntimeManager_DescribeRuntimeProviderZones_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_DescribeRuntimeProviderZones_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_RuntimeManager_GetRuntimeStatistics_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_RuntimeManager_GetRuntimeStatistics_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_RuntimeManager_GetRuntimeStatistics_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_RuntimeManager_CreateRuntime_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "runtimes"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RuntimeManager_CreateDebugRuntime_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "debug_runtimes"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RuntimeManager_DescribeRuntimes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "runtimes"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RuntimeManager_DescribeDebugRuntimes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "debug_runtimes"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RuntimeManager_ModifyRuntime_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "runtimes"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RuntimeManager_DeleteRuntimes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "runtimes"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RuntimeManager_CreateRuntimeCredential_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "runtimes", "credentials"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RuntimeManager_CreateDebugRuntimeCredential_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "debug_runtimes", "credentials"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RuntimeManager_DescribeRuntimeCredentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "runtimes", "credentials"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RuntimeManager_DescribeDebugRuntimeCredentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "debug_runtimes", "credentials"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RuntimeManager_ModifyRuntimeCredential_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "runtimes", "credentials"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RuntimeManager_DeleteRuntimeCredentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "runtimes", "credentials"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RuntimeManager_ValidateRuntimeCredential_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "runtimes", "credentials"}, "validate", runtime.AssumeColonVerbOpt(true))) - - pattern_RuntimeManager_DescribeRuntimeProviderZones_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "runtimes", "zones"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_RuntimeManager_GetRuntimeStatistics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "runtimes", "statistics"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_RuntimeManager_CreateRuntime_0 = runtime.ForwardResponseMessage - - forward_RuntimeManager_CreateDebugRuntime_0 = runtime.ForwardResponseMessage - - forward_RuntimeManager_DescribeRuntimes_0 = runtime.ForwardResponseMessage - - forward_RuntimeManager_DescribeDebugRuntimes_0 = runtime.ForwardResponseMessage - - forward_RuntimeManager_ModifyRuntime_0 = runtime.ForwardResponseMessage - - forward_RuntimeManager_DeleteRuntimes_0 = runtime.ForwardResponseMessage - - forward_RuntimeManager_CreateRuntimeCredential_0 = runtime.ForwardResponseMessage - - forward_RuntimeManager_CreateDebugRuntimeCredential_0 = runtime.ForwardResponseMessage - - forward_RuntimeManager_DescribeRuntimeCredentials_0 = runtime.ForwardResponseMessage - - forward_RuntimeManager_DescribeDebugRuntimeCredentials_0 = runtime.ForwardResponseMessage - - forward_RuntimeManager_ModifyRuntimeCredential_0 = runtime.ForwardResponseMessage - - forward_RuntimeManager_DeleteRuntimeCredentials_0 = runtime.ForwardResponseMessage - - forward_RuntimeManager_ValidateRuntimeCredential_0 = runtime.ForwardResponseMessage - - forward_RuntimeManager_DescribeRuntimeProviderZones_0 = runtime.ForwardResponseMessage - - forward_RuntimeManager_GetRuntimeStatistics_0 = runtime.ForwardResponseMessage -) diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/runtime_provider.pb.go b/vendor/openpitrix.io/openpitrix/pkg/pb/runtime_provider.pb.go deleted file mode 100644 index c3e0a7879..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/runtime_provider.pb.go +++ /dev/null @@ -1,1659 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: runtime_provider.proto - -package pb - -import ( - context "context" - fmt "fmt" - math "math" - - proto "github.com/golang/protobuf/proto" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type RegisterRuntimeProviderRequest struct { - // required, runtime provider.eg:[qingcloud|aliyun|aws|kubernetes] - Provider *wrappers.StringValue `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"` - // required, configure of runtime provider - Config *wrappers.StringValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RegisterRuntimeProviderRequest) Reset() { *m = RegisterRuntimeProviderRequest{} } -func (m *RegisterRuntimeProviderRequest) String() string { return proto.CompactTextString(m) } -func (*RegisterRuntimeProviderRequest) ProtoMessage() {} -func (*RegisterRuntimeProviderRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_2998074df425fa49, []int{0} -} - -func (m *RegisterRuntimeProviderRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RegisterRuntimeProviderRequest.Unmarshal(m, b) -} -func (m *RegisterRuntimeProviderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RegisterRuntimeProviderRequest.Marshal(b, m, deterministic) -} -func (m *RegisterRuntimeProviderRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RegisterRuntimeProviderRequest.Merge(m, src) -} -func (m *RegisterRuntimeProviderRequest) XXX_Size() int { - return xxx_messageInfo_RegisterRuntimeProviderRequest.Size(m) -} -func (m *RegisterRuntimeProviderRequest) XXX_DiscardUnknown() { - xxx_messageInfo_RegisterRuntimeProviderRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_RegisterRuntimeProviderRequest proto.InternalMessageInfo - -func (m *RegisterRuntimeProviderRequest) GetProvider() *wrappers.StringValue { - if m != nil { - return m.Provider - } - return nil -} - -func (m *RegisterRuntimeProviderRequest) GetConfig() *wrappers.StringValue { - if m != nil { - return m.Config - } - return nil -} - -type RegisterRuntimeProviderResponse struct { - // register ok or not - Ok *wrappers.BoolValue `protobuf:"bytes,1,opt,name=ok,proto3" json:"ok,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RegisterRuntimeProviderResponse) Reset() { *m = RegisterRuntimeProviderResponse{} } -func (m *RegisterRuntimeProviderResponse) String() string { return proto.CompactTextString(m) } -func (*RegisterRuntimeProviderResponse) ProtoMessage() {} -func (*RegisterRuntimeProviderResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2998074df425fa49, []int{1} -} - -func (m *RegisterRuntimeProviderResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RegisterRuntimeProviderResponse.Unmarshal(m, b) -} -func (m *RegisterRuntimeProviderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RegisterRuntimeProviderResponse.Marshal(b, m, deterministic) -} -func (m *RegisterRuntimeProviderResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RegisterRuntimeProviderResponse.Merge(m, src) -} -func (m *RegisterRuntimeProviderResponse) XXX_Size() int { - return xxx_messageInfo_RegisterRuntimeProviderResponse.Size(m) -} -func (m *RegisterRuntimeProviderResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RegisterRuntimeProviderResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_RegisterRuntimeProviderResponse proto.InternalMessageInfo - -func (m *RegisterRuntimeProviderResponse) GetOk() *wrappers.BoolValue { - if m != nil { - return m.Ok - } - return nil -} - -type ParseClusterConfRequest struct { - // required, runtime id - RuntimeId *wrappers.StringValue `protobuf:"bytes,1,opt,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - // version id - VersionId *wrappers.StringValue `protobuf:"bytes,2,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - // required, configure - Conf *wrappers.StringValue `protobuf:"bytes,3,opt,name=conf,proto3" json:"conf,omitempty"` - // cluster in the runtime - Cluster *Cluster `protobuf:"bytes,4,opt,name=cluster,proto3" json:"cluster,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ParseClusterConfRequest) Reset() { *m = ParseClusterConfRequest{} } -func (m *ParseClusterConfRequest) String() string { return proto.CompactTextString(m) } -func (*ParseClusterConfRequest) ProtoMessage() {} -func (*ParseClusterConfRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_2998074df425fa49, []int{2} -} - -func (m *ParseClusterConfRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ParseClusterConfRequest.Unmarshal(m, b) -} -func (m *ParseClusterConfRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ParseClusterConfRequest.Marshal(b, m, deterministic) -} -func (m *ParseClusterConfRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParseClusterConfRequest.Merge(m, src) -} -func (m *ParseClusterConfRequest) XXX_Size() int { - return xxx_messageInfo_ParseClusterConfRequest.Size(m) -} -func (m *ParseClusterConfRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ParseClusterConfRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ParseClusterConfRequest proto.InternalMessageInfo - -func (m *ParseClusterConfRequest) GetRuntimeId() *wrappers.StringValue { - if m != nil { - return m.RuntimeId - } - return nil -} - -func (m *ParseClusterConfRequest) GetVersionId() *wrappers.StringValue { - if m != nil { - return m.VersionId - } - return nil -} - -func (m *ParseClusterConfRequest) GetConf() *wrappers.StringValue { - if m != nil { - return m.Conf - } - return nil -} - -func (m *ParseClusterConfRequest) GetCluster() *Cluster { - if m != nil { - return m.Cluster - } - return nil -} - -type ParseClusterConfResponse struct { - // cluster - Cluster *Cluster `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ParseClusterConfResponse) Reset() { *m = ParseClusterConfResponse{} } -func (m *ParseClusterConfResponse) String() string { return proto.CompactTextString(m) } -func (*ParseClusterConfResponse) ProtoMessage() {} -func (*ParseClusterConfResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2998074df425fa49, []int{3} -} - -func (m *ParseClusterConfResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ParseClusterConfResponse.Unmarshal(m, b) -} -func (m *ParseClusterConfResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ParseClusterConfResponse.Marshal(b, m, deterministic) -} -func (m *ParseClusterConfResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParseClusterConfResponse.Merge(m, src) -} -func (m *ParseClusterConfResponse) XXX_Size() int { - return xxx_messageInfo_ParseClusterConfResponse.Size(m) -} -func (m *ParseClusterConfResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ParseClusterConfResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ParseClusterConfResponse proto.InternalMessageInfo - -func (m *ParseClusterConfResponse) GetCluster() *Cluster { - if m != nil { - return m.Cluster - } - return nil -} - -type SplitJobIntoTasksRequest struct { - // required, runtime id - RuntimeId *wrappers.StringValue `protobuf:"bytes,1,opt,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - // required, job to split - Job *Job `protobuf:"bytes,2,opt,name=job,proto3" json:"job,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SplitJobIntoTasksRequest) Reset() { *m = SplitJobIntoTasksRequest{} } -func (m *SplitJobIntoTasksRequest) String() string { return proto.CompactTextString(m) } -func (*SplitJobIntoTasksRequest) ProtoMessage() {} -func (*SplitJobIntoTasksRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_2998074df425fa49, []int{4} -} - -func (m *SplitJobIntoTasksRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SplitJobIntoTasksRequest.Unmarshal(m, b) -} -func (m *SplitJobIntoTasksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SplitJobIntoTasksRequest.Marshal(b, m, deterministic) -} -func (m *SplitJobIntoTasksRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SplitJobIntoTasksRequest.Merge(m, src) -} -func (m *SplitJobIntoTasksRequest) XXX_Size() int { - return xxx_messageInfo_SplitJobIntoTasksRequest.Size(m) -} -func (m *SplitJobIntoTasksRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SplitJobIntoTasksRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SplitJobIntoTasksRequest proto.InternalMessageInfo - -func (m *SplitJobIntoTasksRequest) GetRuntimeId() *wrappers.StringValue { - if m != nil { - return m.RuntimeId - } - return nil -} - -func (m *SplitJobIntoTasksRequest) GetJob() *Job { - if m != nil { - return m.Job - } - return nil -} - -type SplitJobIntoTasksResponse struct { - // job will split to TaskLayer - TaskLayer *TaskLayer `protobuf:"bytes,1,opt,name=taskLayer,proto3" json:"taskLayer,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SplitJobIntoTasksResponse) Reset() { *m = SplitJobIntoTasksResponse{} } -func (m *SplitJobIntoTasksResponse) String() string { return proto.CompactTextString(m) } -func (*SplitJobIntoTasksResponse) ProtoMessage() {} -func (*SplitJobIntoTasksResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2998074df425fa49, []int{5} -} - -func (m *SplitJobIntoTasksResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SplitJobIntoTasksResponse.Unmarshal(m, b) -} -func (m *SplitJobIntoTasksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SplitJobIntoTasksResponse.Marshal(b, m, deterministic) -} -func (m *SplitJobIntoTasksResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SplitJobIntoTasksResponse.Merge(m, src) -} -func (m *SplitJobIntoTasksResponse) XXX_Size() int { - return xxx_messageInfo_SplitJobIntoTasksResponse.Size(m) -} -func (m *SplitJobIntoTasksResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SplitJobIntoTasksResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SplitJobIntoTasksResponse proto.InternalMessageInfo - -func (m *SplitJobIntoTasksResponse) GetTaskLayer() *TaskLayer { - if m != nil { - return m.TaskLayer - } - return nil -} - -type HandleSubtaskRequest struct { - // required, runtime id - RuntimeId *wrappers.StringValue `protobuf:"bytes,1,opt,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - // required, task to handle - Task *Task `protobuf:"bytes,2,opt,name=task,proto3" json:"task,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HandleSubtaskRequest) Reset() { *m = HandleSubtaskRequest{} } -func (m *HandleSubtaskRequest) String() string { return proto.CompactTextString(m) } -func (*HandleSubtaskRequest) ProtoMessage() {} -func (*HandleSubtaskRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_2998074df425fa49, []int{6} -} - -func (m *HandleSubtaskRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HandleSubtaskRequest.Unmarshal(m, b) -} -func (m *HandleSubtaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HandleSubtaskRequest.Marshal(b, m, deterministic) -} -func (m *HandleSubtaskRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_HandleSubtaskRequest.Merge(m, src) -} -func (m *HandleSubtaskRequest) XXX_Size() int { - return xxx_messageInfo_HandleSubtaskRequest.Size(m) -} -func (m *HandleSubtaskRequest) XXX_DiscardUnknown() { - xxx_messageInfo_HandleSubtaskRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_HandleSubtaskRequest proto.InternalMessageInfo - -func (m *HandleSubtaskRequest) GetRuntimeId() *wrappers.StringValue { - if m != nil { - return m.RuntimeId - } - return nil -} - -func (m *HandleSubtaskRequest) GetTask() *Task { - if m != nil { - return m.Task - } - return nil -} - -type HandleSubtaskResponse struct { - // task handled - Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *HandleSubtaskResponse) Reset() { *m = HandleSubtaskResponse{} } -func (m *HandleSubtaskResponse) String() string { return proto.CompactTextString(m) } -func (*HandleSubtaskResponse) ProtoMessage() {} -func (*HandleSubtaskResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2998074df425fa49, []int{7} -} - -func (m *HandleSubtaskResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HandleSubtaskResponse.Unmarshal(m, b) -} -func (m *HandleSubtaskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HandleSubtaskResponse.Marshal(b, m, deterministic) -} -func (m *HandleSubtaskResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_HandleSubtaskResponse.Merge(m, src) -} -func (m *HandleSubtaskResponse) XXX_Size() int { - return xxx_messageInfo_HandleSubtaskResponse.Size(m) -} -func (m *HandleSubtaskResponse) XXX_DiscardUnknown() { - xxx_messageInfo_HandleSubtaskResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_HandleSubtaskResponse proto.InternalMessageInfo - -func (m *HandleSubtaskResponse) GetTask() *Task { - if m != nil { - return m.Task - } - return nil -} - -type WaitSubtaskRequest struct { - // required, runtime id - RuntimeId *wrappers.StringValue `protobuf:"bytes,1,opt,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - // required, task to wait - Task *Task `protobuf:"bytes,2,opt,name=task,proto3" json:"task,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *WaitSubtaskRequest) Reset() { *m = WaitSubtaskRequest{} } -func (m *WaitSubtaskRequest) String() string { return proto.CompactTextString(m) } -func (*WaitSubtaskRequest) ProtoMessage() {} -func (*WaitSubtaskRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_2998074df425fa49, []int{8} -} - -func (m *WaitSubtaskRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_WaitSubtaskRequest.Unmarshal(m, b) -} -func (m *WaitSubtaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_WaitSubtaskRequest.Marshal(b, m, deterministic) -} -func (m *WaitSubtaskRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_WaitSubtaskRequest.Merge(m, src) -} -func (m *WaitSubtaskRequest) XXX_Size() int { - return xxx_messageInfo_WaitSubtaskRequest.Size(m) -} -func (m *WaitSubtaskRequest) XXX_DiscardUnknown() { - xxx_messageInfo_WaitSubtaskRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_WaitSubtaskRequest proto.InternalMessageInfo - -func (m *WaitSubtaskRequest) GetRuntimeId() *wrappers.StringValue { - if m != nil { - return m.RuntimeId - } - return nil -} - -func (m *WaitSubtaskRequest) GetTask() *Task { - if m != nil { - return m.Task - } - return nil -} - -type WaitSubtaskResponse struct { - // task waited - Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *WaitSubtaskResponse) Reset() { *m = WaitSubtaskResponse{} } -func (m *WaitSubtaskResponse) String() string { return proto.CompactTextString(m) } -func (*WaitSubtaskResponse) ProtoMessage() {} -func (*WaitSubtaskResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2998074df425fa49, []int{9} -} - -func (m *WaitSubtaskResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_WaitSubtaskResponse.Unmarshal(m, b) -} -func (m *WaitSubtaskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_WaitSubtaskResponse.Marshal(b, m, deterministic) -} -func (m *WaitSubtaskResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_WaitSubtaskResponse.Merge(m, src) -} -func (m *WaitSubtaskResponse) XXX_Size() int { - return xxx_messageInfo_WaitSubtaskResponse.Size(m) -} -func (m *WaitSubtaskResponse) XXX_DiscardUnknown() { - xxx_messageInfo_WaitSubtaskResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_WaitSubtaskResponse proto.InternalMessageInfo - -func (m *WaitSubtaskResponse) GetTask() *Task { - if m != nil { - return m.Task - } - return nil -} - -type CheckResourceRequest struct { - // required, runtime id - RuntimeId *wrappers.StringValue `protobuf:"bytes,1,opt,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - // required, cluster to check - Cluster *Cluster `protobuf:"bytes,2,opt,name=cluster,proto3" json:"cluster,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CheckResourceRequest) Reset() { *m = CheckResourceRequest{} } -func (m *CheckResourceRequest) String() string { return proto.CompactTextString(m) } -func (*CheckResourceRequest) ProtoMessage() {} -func (*CheckResourceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_2998074df425fa49, []int{10} -} - -func (m *CheckResourceRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CheckResourceRequest.Unmarshal(m, b) -} -func (m *CheckResourceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CheckResourceRequest.Marshal(b, m, deterministic) -} -func (m *CheckResourceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CheckResourceRequest.Merge(m, src) -} -func (m *CheckResourceRequest) XXX_Size() int { - return xxx_messageInfo_CheckResourceRequest.Size(m) -} -func (m *CheckResourceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CheckResourceRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CheckResourceRequest proto.InternalMessageInfo - -func (m *CheckResourceRequest) GetRuntimeId() *wrappers.StringValue { - if m != nil { - return m.RuntimeId - } - return nil -} - -func (m *CheckResourceRequest) GetCluster() *Cluster { - if m != nil { - return m.Cluster - } - return nil -} - -type CheckResourceResponse struct { - // check ok or not - Ok *wrappers.BoolValue `protobuf:"bytes,1,opt,name=ok,proto3" json:"ok,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CheckResourceResponse) Reset() { *m = CheckResourceResponse{} } -func (m *CheckResourceResponse) String() string { return proto.CompactTextString(m) } -func (*CheckResourceResponse) ProtoMessage() {} -func (*CheckResourceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2998074df425fa49, []int{11} -} - -func (m *CheckResourceResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CheckResourceResponse.Unmarshal(m, b) -} -func (m *CheckResourceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CheckResourceResponse.Marshal(b, m, deterministic) -} -func (m *CheckResourceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CheckResourceResponse.Merge(m, src) -} -func (m *CheckResourceResponse) XXX_Size() int { - return xxx_messageInfo_CheckResourceResponse.Size(m) -} -func (m *CheckResourceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CheckResourceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CheckResourceResponse proto.InternalMessageInfo - -func (m *CheckResourceResponse) GetOk() *wrappers.BoolValue { - if m != nil { - return m.Ok - } - return nil -} - -type DescribeVpcRequest struct { - // required, get vpc of runtime - RuntimeId *wrappers.StringValue `protobuf:"bytes,1,opt,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - // required, use vpc id to get vpc in runtime - VpcId *wrappers.StringValue `protobuf:"bytes,2,opt,name=vpc_id,json=vpcId,proto3" json:"vpc_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeVpcRequest) Reset() { *m = DescribeVpcRequest{} } -func (m *DescribeVpcRequest) String() string { return proto.CompactTextString(m) } -func (*DescribeVpcRequest) ProtoMessage() {} -func (*DescribeVpcRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_2998074df425fa49, []int{12} -} - -func (m *DescribeVpcRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeVpcRequest.Unmarshal(m, b) -} -func (m *DescribeVpcRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeVpcRequest.Marshal(b, m, deterministic) -} -func (m *DescribeVpcRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeVpcRequest.Merge(m, src) -} -func (m *DescribeVpcRequest) XXX_Size() int { - return xxx_messageInfo_DescribeVpcRequest.Size(m) -} -func (m *DescribeVpcRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeVpcRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeVpcRequest proto.InternalMessageInfo - -func (m *DescribeVpcRequest) GetRuntimeId() *wrappers.StringValue { - if m != nil { - return m.RuntimeId - } - return nil -} - -func (m *DescribeVpcRequest) GetVpcId() *wrappers.StringValue { - if m != nil { - return m.VpcId - } - return nil -} - -type Eip struct { - // elastic ip - EipId *wrappers.StringValue `protobuf:"bytes,1,opt,name=eip_id,json=eipId,proto3" json:"eip_id,omitempty"` - // eip name - Name *wrappers.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // eip address - Addr *wrappers.StringValue `protobuf:"bytes,3,opt,name=addr,proto3" json:"addr,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Eip) Reset() { *m = Eip{} } -func (m *Eip) String() string { return proto.CompactTextString(m) } -func (*Eip) ProtoMessage() {} -func (*Eip) Descriptor() ([]byte, []int) { - return fileDescriptor_2998074df425fa49, []int{13} -} - -func (m *Eip) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Eip.Unmarshal(m, b) -} -func (m *Eip) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Eip.Marshal(b, m, deterministic) -} -func (m *Eip) XXX_Merge(src proto.Message) { - xxx_messageInfo_Eip.Merge(m, src) -} -func (m *Eip) XXX_Size() int { - return xxx_messageInfo_Eip.Size(m) -} -func (m *Eip) XXX_DiscardUnknown() { - xxx_messageInfo_Eip.DiscardUnknown(m) -} - -var xxx_messageInfo_Eip proto.InternalMessageInfo - -func (m *Eip) GetEipId() *wrappers.StringValue { - if m != nil { - return m.EipId - } - return nil -} - -func (m *Eip) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *Eip) GetAddr() *wrappers.StringValue { - if m != nil { - return m.Addr - } - return nil -} - -type Vpc struct { - // vpc id - VpcId *wrappers.StringValue `protobuf:"bytes,1,opt,name=vpc_id,json=vpcId,proto3" json:"vpc_id,omitempty"` - // vpc name - Name *wrappers.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // the time when vpc create - CreateTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // vpc description - Description *wrappers.StringValue `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - // cluster status eg.[pending|running|stopped|suspended|terminated|ceased] - Status *wrappers.StringValue `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` - // cluster transition status eg.[creating|starting|stopping|restarting|suspending|resuming|terminating|recovering|resetting] - TransitionStatus *wrappers.StringValue `protobuf:"bytes,6,opt,name=transition_status,json=transitionStatus,proto3" json:"transition_status,omitempty"` - // list subnet, a vpc contain one more subnet - Subnets []string `protobuf:"bytes,7,rep,name=subnets,proto3" json:"subnets,omitempty"` - // elastic ip, a vpc has a eip - Eip *Eip `protobuf:"bytes,8,opt,name=eip,proto3" json:"eip,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Vpc) Reset() { *m = Vpc{} } -func (m *Vpc) String() string { return proto.CompactTextString(m) } -func (*Vpc) ProtoMessage() {} -func (*Vpc) Descriptor() ([]byte, []int) { - return fileDescriptor_2998074df425fa49, []int{14} -} - -func (m *Vpc) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Vpc.Unmarshal(m, b) -} -func (m *Vpc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Vpc.Marshal(b, m, deterministic) -} -func (m *Vpc) XXX_Merge(src proto.Message) { - xxx_messageInfo_Vpc.Merge(m, src) -} -func (m *Vpc) XXX_Size() int { - return xxx_messageInfo_Vpc.Size(m) -} -func (m *Vpc) XXX_DiscardUnknown() { - xxx_messageInfo_Vpc.DiscardUnknown(m) -} - -var xxx_messageInfo_Vpc proto.InternalMessageInfo - -func (m *Vpc) GetVpcId() *wrappers.StringValue { - if m != nil { - return m.VpcId - } - return nil -} - -func (m *Vpc) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *Vpc) GetCreateTime() *timestamp.Timestamp { - if m != nil { - return m.CreateTime - } - return nil -} - -func (m *Vpc) GetDescription() *wrappers.StringValue { - if m != nil { - return m.Description - } - return nil -} - -func (m *Vpc) GetStatus() *wrappers.StringValue { - if m != nil { - return m.Status - } - return nil -} - -func (m *Vpc) GetTransitionStatus() *wrappers.StringValue { - if m != nil { - return m.TransitionStatus - } - return nil -} - -func (m *Vpc) GetSubnets() []string { - if m != nil { - return m.Subnets - } - return nil -} - -func (m *Vpc) GetEip() *Eip { - if m != nil { - return m.Eip - } - return nil -} - -type DescribeVpcResponse struct { - // vpc - Vpc *Vpc `protobuf:"bytes,1,opt,name=vpc,proto3" json:"vpc,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeVpcResponse) Reset() { *m = DescribeVpcResponse{} } -func (m *DescribeVpcResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeVpcResponse) ProtoMessage() {} -func (*DescribeVpcResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2998074df425fa49, []int{15} -} - -func (m *DescribeVpcResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeVpcResponse.Unmarshal(m, b) -} -func (m *DescribeVpcResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeVpcResponse.Marshal(b, m, deterministic) -} -func (m *DescribeVpcResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeVpcResponse.Merge(m, src) -} -func (m *DescribeVpcResponse) XXX_Size() int { - return xxx_messageInfo_DescribeVpcResponse.Size(m) -} -func (m *DescribeVpcResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeVpcResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeVpcResponse proto.InternalMessageInfo - -func (m *DescribeVpcResponse) GetVpc() *Vpc { - if m != nil { - return m.Vpc - } - return nil -} - -type DescribeClusterDetailsRequest struct { - // required, get detail of cluster in runtime - RuntimeId *wrappers.StringValue `protobuf:"bytes,1,opt,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - // required, cluster in the runtime - Cluster *Cluster `protobuf:"bytes,2,opt,name=cluster,proto3" json:"cluster,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeClusterDetailsRequest) Reset() { *m = DescribeClusterDetailsRequest{} } -func (m *DescribeClusterDetailsRequest) String() string { return proto.CompactTextString(m) } -func (*DescribeClusterDetailsRequest) ProtoMessage() {} -func (*DescribeClusterDetailsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_2998074df425fa49, []int{16} -} - -func (m *DescribeClusterDetailsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeClusterDetailsRequest.Unmarshal(m, b) -} -func (m *DescribeClusterDetailsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeClusterDetailsRequest.Marshal(b, m, deterministic) -} -func (m *DescribeClusterDetailsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeClusterDetailsRequest.Merge(m, src) -} -func (m *DescribeClusterDetailsRequest) XXX_Size() int { - return xxx_messageInfo_DescribeClusterDetailsRequest.Size(m) -} -func (m *DescribeClusterDetailsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeClusterDetailsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeClusterDetailsRequest proto.InternalMessageInfo - -func (m *DescribeClusterDetailsRequest) GetRuntimeId() *wrappers.StringValue { - if m != nil { - return m.RuntimeId - } - return nil -} - -func (m *DescribeClusterDetailsRequest) GetCluster() *Cluster { - if m != nil { - return m.Cluster - } - return nil -} - -type DescribeClusterDetailsResponse struct { - // cluster info - Cluster *Cluster `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeClusterDetailsResponse) Reset() { *m = DescribeClusterDetailsResponse{} } -func (m *DescribeClusterDetailsResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeClusterDetailsResponse) ProtoMessage() {} -func (*DescribeClusterDetailsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2998074df425fa49, []int{17} -} - -func (m *DescribeClusterDetailsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeClusterDetailsResponse.Unmarshal(m, b) -} -func (m *DescribeClusterDetailsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeClusterDetailsResponse.Marshal(b, m, deterministic) -} -func (m *DescribeClusterDetailsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeClusterDetailsResponse.Merge(m, src) -} -func (m *DescribeClusterDetailsResponse) XXX_Size() int { - return xxx_messageInfo_DescribeClusterDetailsResponse.Size(m) -} -func (m *DescribeClusterDetailsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeClusterDetailsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeClusterDetailsResponse proto.InternalMessageInfo - -func (m *DescribeClusterDetailsResponse) GetCluster() *Cluster { - if m != nil { - return m.Cluster - } - return nil -} - -type ValidateRuntimeRequest struct { - // required, id of runtime to validate - RuntimeId *wrappers.StringValue `protobuf:"bytes,1,opt,name=runtime_id,json=runtimeId,proto3" json:"runtime_id,omitempty"` - // required, runtime zone - Zone *wrappers.StringValue `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"` - // required, runtime credential - RuntimeCredential *RuntimeCredential `protobuf:"bytes,3,opt,name=runtime_credential,json=runtimeCredential,proto3" json:"runtime_credential,omitempty"` - // need create or not - NeedCreate *wrappers.BoolValue `protobuf:"bytes,4,opt,name=need_create,json=needCreate,proto3" json:"need_create,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ValidateRuntimeRequest) Reset() { *m = ValidateRuntimeRequest{} } -func (m *ValidateRuntimeRequest) String() string { return proto.CompactTextString(m) } -func (*ValidateRuntimeRequest) ProtoMessage() {} -func (*ValidateRuntimeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_2998074df425fa49, []int{18} -} - -func (m *ValidateRuntimeRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ValidateRuntimeRequest.Unmarshal(m, b) -} -func (m *ValidateRuntimeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ValidateRuntimeRequest.Marshal(b, m, deterministic) -} -func (m *ValidateRuntimeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidateRuntimeRequest.Merge(m, src) -} -func (m *ValidateRuntimeRequest) XXX_Size() int { - return xxx_messageInfo_ValidateRuntimeRequest.Size(m) -} -func (m *ValidateRuntimeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ValidateRuntimeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidateRuntimeRequest proto.InternalMessageInfo - -func (m *ValidateRuntimeRequest) GetRuntimeId() *wrappers.StringValue { - if m != nil { - return m.RuntimeId - } - return nil -} - -func (m *ValidateRuntimeRequest) GetZone() *wrappers.StringValue { - if m != nil { - return m.Zone - } - return nil -} - -func (m *ValidateRuntimeRequest) GetRuntimeCredential() *RuntimeCredential { - if m != nil { - return m.RuntimeCredential - } - return nil -} - -func (m *ValidateRuntimeRequest) GetNeedCreate() *wrappers.BoolValue { - if m != nil { - return m.NeedCreate - } - return nil -} - -type ValidateRuntimeResponse struct { - // validate ok or not - Ok *wrappers.BoolValue `protobuf:"bytes,1,opt,name=ok,proto3" json:"ok,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ValidateRuntimeResponse) Reset() { *m = ValidateRuntimeResponse{} } -func (m *ValidateRuntimeResponse) String() string { return proto.CompactTextString(m) } -func (*ValidateRuntimeResponse) ProtoMessage() {} -func (*ValidateRuntimeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2998074df425fa49, []int{19} -} - -func (m *ValidateRuntimeResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ValidateRuntimeResponse.Unmarshal(m, b) -} -func (m *ValidateRuntimeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ValidateRuntimeResponse.Marshal(b, m, deterministic) -} -func (m *ValidateRuntimeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidateRuntimeResponse.Merge(m, src) -} -func (m *ValidateRuntimeResponse) XXX_Size() int { - return xxx_messageInfo_ValidateRuntimeResponse.Size(m) -} -func (m *ValidateRuntimeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ValidateRuntimeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidateRuntimeResponse proto.InternalMessageInfo - -func (m *ValidateRuntimeResponse) GetOk() *wrappers.BoolValue { - if m != nil { - return m.Ok - } - return nil -} - -type DescribeZonesRequest struct { - // required, get zone of runtime provider - Provider *wrappers.StringValue `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"` - // required, runtime credential - RuntimeCredential *RuntimeCredential `protobuf:"bytes,2,opt,name=runtime_credential,json=runtimeCredential,proto3" json:"runtime_credential,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeZonesRequest) Reset() { *m = DescribeZonesRequest{} } -func (m *DescribeZonesRequest) String() string { return proto.CompactTextString(m) } -func (*DescribeZonesRequest) ProtoMessage() {} -func (*DescribeZonesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_2998074df425fa49, []int{20} -} - -func (m *DescribeZonesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeZonesRequest.Unmarshal(m, b) -} -func (m *DescribeZonesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeZonesRequest.Marshal(b, m, deterministic) -} -func (m *DescribeZonesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeZonesRequest.Merge(m, src) -} -func (m *DescribeZonesRequest) XXX_Size() int { - return xxx_messageInfo_DescribeZonesRequest.Size(m) -} -func (m *DescribeZonesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeZonesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeZonesRequest proto.InternalMessageInfo - -func (m *DescribeZonesRequest) GetProvider() *wrappers.StringValue { - if m != nil { - return m.Provider - } - return nil -} - -func (m *DescribeZonesRequest) GetRuntimeCredential() *RuntimeCredential { - if m != nil { - return m.RuntimeCredential - } - return nil -} - -type DescribeZonesResponse struct { - // list of zones in runtime provider - Zones []string `protobuf:"bytes,1,rep,name=zones,proto3" json:"zones,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeZonesResponse) Reset() { *m = DescribeZonesResponse{} } -func (m *DescribeZonesResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeZonesResponse) ProtoMessage() {} -func (*DescribeZonesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2998074df425fa49, []int{21} -} - -func (m *DescribeZonesResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeZonesResponse.Unmarshal(m, b) -} -func (m *DescribeZonesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeZonesResponse.Marshal(b, m, deterministic) -} -func (m *DescribeZonesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeZonesResponse.Merge(m, src) -} -func (m *DescribeZonesResponse) XXX_Size() int { - return xxx_messageInfo_DescribeZonesResponse.Size(m) -} -func (m *DescribeZonesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeZonesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeZonesResponse proto.InternalMessageInfo - -func (m *DescribeZonesResponse) GetZones() []string { - if m != nil { - return m.Zones - } - return nil -} - -func init() { - proto.RegisterType((*RegisterRuntimeProviderRequest)(nil), "openpitrix.RegisterRuntimeProviderRequest") - proto.RegisterType((*RegisterRuntimeProviderResponse)(nil), "openpitrix.RegisterRuntimeProviderResponse") - proto.RegisterType((*ParseClusterConfRequest)(nil), "openpitrix.ParseClusterConfRequest") - proto.RegisterType((*ParseClusterConfResponse)(nil), "openpitrix.ParseClusterConfResponse") - proto.RegisterType((*SplitJobIntoTasksRequest)(nil), "openpitrix.SplitJobIntoTasksRequest") - proto.RegisterType((*SplitJobIntoTasksResponse)(nil), "openpitrix.SplitJobIntoTasksResponse") - proto.RegisterType((*HandleSubtaskRequest)(nil), "openpitrix.HandleSubtaskRequest") - proto.RegisterType((*HandleSubtaskResponse)(nil), "openpitrix.HandleSubtaskResponse") - proto.RegisterType((*WaitSubtaskRequest)(nil), "openpitrix.WaitSubtaskRequest") - proto.RegisterType((*WaitSubtaskResponse)(nil), "openpitrix.WaitSubtaskResponse") - proto.RegisterType((*CheckResourceRequest)(nil), "openpitrix.CheckResourceRequest") - proto.RegisterType((*CheckResourceResponse)(nil), "openpitrix.CheckResourceResponse") - proto.RegisterType((*DescribeVpcRequest)(nil), "openpitrix.DescribeVpcRequest") - proto.RegisterType((*Eip)(nil), "openpitrix.Eip") - proto.RegisterType((*Vpc)(nil), "openpitrix.Vpc") - proto.RegisterType((*DescribeVpcResponse)(nil), "openpitrix.DescribeVpcResponse") - proto.RegisterType((*DescribeClusterDetailsRequest)(nil), "openpitrix.DescribeClusterDetailsRequest") - proto.RegisterType((*DescribeClusterDetailsResponse)(nil), "openpitrix.DescribeClusterDetailsResponse") - proto.RegisterType((*ValidateRuntimeRequest)(nil), "openpitrix.ValidateRuntimeRequest") - proto.RegisterType((*ValidateRuntimeResponse)(nil), "openpitrix.ValidateRuntimeResponse") - proto.RegisterType((*DescribeZonesRequest)(nil), "openpitrix.DescribeZonesRequest") - proto.RegisterType((*DescribeZonesResponse)(nil), "openpitrix.DescribeZonesResponse") -} - -func init() { proto.RegisterFile("runtime_provider.proto", fileDescriptor_2998074df425fa49) } - -var fileDescriptor_2998074df425fa49 = []byte{ - // 1059 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcf, 0x6f, 0xdb, 0x36, - 0x14, 0x86, 0xec, 0xfc, 0x7c, 0x41, 0xd0, 0x44, 0xf9, 0xa5, 0x09, 0x6d, 0x7e, 0xa8, 0x1d, 0xd0, - 0x65, 0x8b, 0x53, 0x34, 0x3b, 0x14, 0x08, 0xb6, 0x43, 0xdd, 0x00, 0x73, 0xd1, 0x76, 0x81, 0x62, - 0x64, 0x40, 0x80, 0x21, 0xa3, 0x24, 0xc6, 0x63, 0xe3, 0x90, 0x1c, 0x49, 0x3b, 0x6b, 0x8f, 0x3b, - 0xec, 0xb2, 0xcb, 0xb0, 0xd3, 0x4e, 0xbd, 0xee, 0x1f, 0xdc, 0x1f, 0x30, 0x50, 0xa2, 0x62, 0x49, - 0x96, 0x3d, 0xcd, 0x33, 0xb6, 0x53, 0x62, 0xf1, 0xfb, 0x1e, 0xdf, 0xf7, 0xf1, 0xf1, 0xf1, 0xc1, - 0xa6, 0xe8, 0x51, 0x45, 0x6e, 0xf0, 0x25, 0x17, 0xac, 0x4f, 0x22, 0x2c, 0x1a, 0x5c, 0x30, 0xc5, - 0x6c, 0x60, 0x1c, 0x53, 0x4e, 0x94, 0x20, 0x3f, 0xba, 0xdb, 0x1d, 0xc6, 0x3a, 0x5d, 0x7c, 0x18, - 0xaf, 0x04, 0xbd, 0xab, 0xc3, 0x5b, 0x81, 0x38, 0xc7, 0x42, 0x26, 0x58, 0x77, 0xa7, 0xb8, 0xae, - 0x03, 0x4a, 0x85, 0x6e, 0xb8, 0x01, 0xdc, 0x37, 0x00, 0xc4, 0xc9, 0x21, 0xa2, 0x94, 0x29, 0xa4, - 0x08, 0xa3, 0x29, 0xfd, 0xb3, 0xf8, 0x4f, 0x78, 0xd0, 0xc1, 0xf4, 0x40, 0xde, 0xa2, 0x4e, 0x07, - 0x8b, 0x43, 0xc6, 0x63, 0x44, 0x09, 0x7a, 0x39, 0xec, 0xf6, 0xa4, 0x4a, 0xf3, 0x74, 0x97, 0x4d, - 0xfe, 0xe6, 0xe7, 0xe2, 0x5b, 0x16, 0x98, 0x7f, 0x41, 0x21, 0x79, 0x9d, 0xfc, 0xef, 0xfd, 0x6a, - 0xc1, 0xb6, 0x8f, 0x3b, 0x44, 0x13, 0xfd, 0x84, 0x70, 0x6a, 0xf4, 0xfa, 0xf8, 0x87, 0x1e, 0x96, - 0xca, 0x7e, 0x06, 0x0b, 0xa9, 0x05, 0x8e, 0xb5, 0x6b, 0x3d, 0x5e, 0x7a, 0x7a, 0xbf, 0x91, 0xa4, - 0xdd, 0x48, 0x75, 0x35, 0xce, 0x94, 0x20, 0xb4, 0x73, 0x8e, 0xba, 0x3d, 0xec, 0xdf, 0xa1, 0xed, - 0xcf, 0x61, 0x2e, 0x64, 0xf4, 0x8a, 0x74, 0x9c, 0x5a, 0x05, 0x9e, 0xc1, 0x7a, 0xaf, 0x61, 0x67, - 0x64, 0x46, 0x92, 0x33, 0x2a, 0xb1, 0xbd, 0x0f, 0x35, 0x76, 0x6d, 0x92, 0x71, 0x87, 0x82, 0x3e, - 0x67, 0xac, 0x9b, 0x84, 0xac, 0xb1, 0x6b, 0xef, 0x4f, 0x0b, 0xb6, 0x4e, 0x91, 0x90, 0xb8, 0x99, - 0xd8, 0xd3, 0x64, 0xf4, 0x2a, 0x95, 0x76, 0x0c, 0x90, 0x9e, 0x32, 0x89, 0x2a, 0x89, 0x5b, 0x34, - 0xf8, 0x56, 0xa4, 0xc9, 0x7d, 0x2c, 0x24, 0x61, 0x54, 0x93, 0xab, 0x28, 0x5c, 0x34, 0xf8, 0x56, - 0x64, 0x3f, 0x81, 0x19, 0x2d, 0xd7, 0xa9, 0x57, 0xa0, 0xc5, 0x48, 0xfb, 0x00, 0xe6, 0xcd, 0x01, - 0x3b, 0x33, 0x31, 0x69, 0xad, 0x31, 0xa8, 0xc4, 0x86, 0x11, 0xe7, 0xa7, 0x18, 0xaf, 0x05, 0xce, - 0xb0, 0x6a, 0x63, 0x5f, 0x26, 0x94, 0x55, 0x21, 0xd4, 0x7b, 0x70, 0xce, 0x78, 0x97, 0xa8, 0x97, - 0x2c, 0x68, 0x51, 0xc5, 0xda, 0x48, 0x5e, 0xcb, 0xa9, 0x38, 0xb8, 0x07, 0xf5, 0xb7, 0x2c, 0x30, - 0xd6, 0xdd, 0xcb, 0xe6, 0xf0, 0x92, 0x05, 0xbe, 0x5e, 0xf3, 0x4e, 0xe1, 0xa3, 0x92, 0xbd, 0x8d, - 0x8e, 0x23, 0x58, 0xd4, 0xa5, 0xfc, 0x0a, 0xbd, 0xbb, 0x53, 0xb2, 0x91, 0x8d, 0xd2, 0x4e, 0x17, - 0xfd, 0x01, 0xce, 0x7b, 0x07, 0xeb, 0x5f, 0x21, 0x1a, 0x75, 0xf1, 0x59, 0x2f, 0xd0, 0x5f, 0xa7, - 0xa2, 0xe4, 0x11, 0xcc, 0xe8, 0x58, 0x46, 0xca, 0x4a, 0x31, 0x09, 0x3f, 0x5e, 0xf5, 0xbe, 0x80, - 0x8d, 0xc2, 0xd6, 0x46, 0x48, 0x4a, 0xb7, 0xc6, 0xd2, 0x6f, 0xc1, 0xfe, 0x06, 0x11, 0xf5, 0xdf, - 0xe7, 0x7d, 0x0c, 0x6b, 0xb9, 0x8d, 0xff, 0x51, 0xd6, 0x3f, 0x59, 0xb0, 0xde, 0xfc, 0x1e, 0x87, - 0x9a, 0xc7, 0x7a, 0x22, 0xc4, 0x53, 0x49, 0x3c, 0x53, 0xc2, 0xb5, 0x0a, 0x25, 0xdc, 0x84, 0x8d, - 0x42, 0x0e, 0x13, 0x74, 0x92, 0x9f, 0x2d, 0xb0, 0x5f, 0x60, 0x19, 0x0a, 0x12, 0xe0, 0x73, 0x1e, - 0x4e, 0x45, 0xc7, 0x11, 0xcc, 0xf5, 0x79, 0x58, 0xb5, 0x81, 0xcc, 0xf6, 0x79, 0xd8, 0x8a, 0xbc, - 0x0f, 0x16, 0xd4, 0x4f, 0x08, 0xd7, 0x64, 0x4c, 0x78, 0xd5, 0x5d, 0x67, 0x31, 0xe1, 0x49, 0xe7, - 0xa1, 0xe8, 0x06, 0x57, 0xda, 0x2f, 0x46, 0x6a, 0x06, 0x8a, 0x22, 0x51, 0xad, 0x57, 0x69, 0xa4, - 0xf7, 0x47, 0x1d, 0xea, 0xe7, 0x3c, 0xcc, 0xa8, 0xb3, 0x2a, 0xab, 0x9b, 0x20, 0xc1, 0x63, 0x58, - 0x0a, 0x05, 0x46, 0x0a, 0x5f, 0x6a, 0x57, 0x4d, 0x9e, 0xc3, 0xa7, 0xd9, 0x4e, 0x1f, 0x5f, 0x1f, - 0x12, 0xb8, 0xfe, 0x60, 0x7f, 0x09, 0x4b, 0x51, 0x7c, 0xa8, 0xf1, 0xc3, 0x6a, 0x7a, 0xeb, 0xf8, - 0x5d, 0xb3, 0x04, 0xfd, 0xc8, 0x49, 0x85, 0x54, 0x4f, 0x3a, 0xb3, 0x55, 0x1e, 0xb9, 0x04, 0x6b, - 0xb7, 0x60, 0x55, 0x09, 0x44, 0x25, 0xd1, 0x31, 0x2e, 0x4d, 0x80, 0xb9, 0x0a, 0x01, 0x56, 0x06, - 0xb4, 0xb3, 0x24, 0x94, 0x03, 0xf3, 0xb2, 0x17, 0x50, 0xac, 0xa4, 0x33, 0xbf, 0x5b, 0x7f, 0xbc, - 0xe8, 0xa7, 0x3f, 0x75, 0x7f, 0xc5, 0x84, 0x3b, 0x0b, 0xc3, 0xfd, 0xf5, 0x84, 0x70, 0x5f, 0xaf, - 0x79, 0xcf, 0x60, 0x2d, 0x57, 0xd2, 0xe6, 0x5a, 0xec, 0x41, 0xbd, 0xcf, 0x43, 0x73, 0x6a, 0x39, - 0xa6, 0x46, 0xe9, 0x35, 0xef, 0x17, 0x0b, 0x1e, 0xa4, 0x54, 0x73, 0xdf, 0x5e, 0x60, 0x85, 0x48, - 0x57, 0xfe, 0x1f, 0x17, 0xfc, 0x6b, 0xd8, 0x1e, 0x95, 0xcc, 0x64, 0x8f, 0xde, 0x6f, 0x35, 0xd8, - 0x3c, 0x47, 0x5d, 0x12, 0x21, 0x85, 0xcd, 0x18, 0x32, 0x15, 0x5d, 0x4f, 0x60, 0xe6, 0x3d, 0xa3, - 0x15, 0xab, 0x5b, 0x23, 0xed, 0x57, 0x60, 0xa7, 0xdb, 0x85, 0x02, 0x47, 0x98, 0x2a, 0x82, 0xba, - 0xa6, 0xc8, 0x1f, 0x64, 0x35, 0x98, 0x34, 0x9b, 0x77, 0x20, 0x7f, 0x55, 0x14, 0x3f, 0xe9, 0xbb, - 0x42, 0x31, 0x8e, 0x2e, 0x93, 0x1b, 0x60, 0xca, 0x7d, 0x5c, 0xe7, 0x03, 0x0d, 0x6f, 0xc6, 0x68, - 0xef, 0x04, 0xb6, 0x86, 0x3c, 0x99, 0xa0, 0x91, 0x7e, 0xb0, 0x60, 0x3d, 0x3d, 0xad, 0x0b, 0x46, - 0xb1, 0xfc, 0xf7, 0xa3, 0x66, 0xb9, 0x49, 0xb5, 0xc9, 0x4c, 0xf2, 0x0e, 0x60, 0xa3, 0x90, 0x9f, - 0x51, 0xb9, 0x0e, 0xb3, 0xfa, 0x4c, 0xa4, 0x63, 0xc5, 0x37, 0x2d, 0xf9, 0xf1, 0xf4, 0xf7, 0x05, - 0xd8, 0x2c, 0x8c, 0xaa, 0xaf, 0x11, 0x45, 0x1d, 0x2c, 0x6c, 0x01, 0x5b, 0x23, 0x86, 0x59, 0x7b, - 0x3f, 0x97, 0xd6, 0xd8, 0x19, 0xdc, 0xfd, 0xb4, 0x12, 0xd6, 0x24, 0xf9, 0x2d, 0xac, 0x14, 0x47, - 0x3f, 0xfb, 0x61, 0x36, 0xc0, 0x88, 0x71, 0xd8, 0x7d, 0x34, 0x1e, 0x64, 0xc2, 0x7f, 0x07, 0xab, - 0x43, 0x23, 0x99, 0x9d, 0xa3, 0x8e, 0x9a, 0x16, 0xdd, 0x8f, 0xff, 0x06, 0x65, 0x76, 0x68, 0xc3, - 0x72, 0x6e, 0x4e, 0xb2, 0x77, 0xb3, 0xbc, 0xb2, 0xe9, 0xcd, 0xdd, 0x1b, 0x83, 0x30, 0x51, 0xdf, - 0xc0, 0x52, 0x66, 0x8a, 0xb1, 0xb7, 0xb3, 0x8c, 0xe1, 0xb9, 0xca, 0xdd, 0x19, 0xb9, 0x6e, 0xe2, - 0x5d, 0xc0, 0xbd, 0xb4, 0x48, 0xce, 0x4c, 0xc3, 0xf5, 0xb2, 0x9c, 0xc2, 0x62, 0x1a, 0xf7, 0xe1, - 0x58, 0xcc, 0xc0, 0x81, 0xdc, 0xbc, 0x92, 0x77, 0xa0, 0x6c, 0x9c, 0xca, 0x3b, 0x50, 0x3e, 0xec, - 0xbc, 0x81, 0xa5, 0x4c, 0xb3, 0xcf, 0x3b, 0x30, 0x3c, 0xd8, 0xe4, 0x1d, 0x28, 0x7b, 0x25, 0x18, - 0x6c, 0x96, 0x37, 0x5d, 0xfb, 0x93, 0x32, 0x6a, 0xe9, 0x2b, 0xe1, 0xee, 0x57, 0x81, 0x0e, 0x2c, - 0x2f, 0xf4, 0x9f, 0xbc, 0xe5, 0xe5, 0x0d, 0x3b, 0x6f, 0xf9, 0xa8, 0x06, 0xd6, 0x86, 0xe5, 0xdc, - 0x9d, 0xcf, 0x5b, 0x5e, 0xd6, 0xae, 0xf2, 0x96, 0x97, 0x36, 0x8c, 0xe7, 0x33, 0x17, 0x35, 0x1e, - 0x04, 0x73, 0x71, 0xf7, 0x3a, 0xfa, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x66, 0xae, 0xc1, 0x8e, 0x54, - 0x10, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// RuntimeProviderManagerClient is the client API for RuntimeProviderManager service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type RuntimeProviderManagerClient interface { - RegisterRuntimeProvider(ctx context.Context, in *RegisterRuntimeProviderRequest, opts ...grpc.CallOption) (*RegisterRuntimeProviderResponse, error) - // cluster - ParseClusterConf(ctx context.Context, in *ParseClusterConfRequest, opts ...grpc.CallOption) (*ParseClusterConfResponse, error) - SplitJobIntoTasks(ctx context.Context, in *SplitJobIntoTasksRequest, opts ...grpc.CallOption) (*SplitJobIntoTasksResponse, error) - HandleSubtask(ctx context.Context, in *HandleSubtaskRequest, opts ...grpc.CallOption) (*HandleSubtaskResponse, error) - WaitSubtask(ctx context.Context, in *WaitSubtaskRequest, opts ...grpc.CallOption) (*WaitSubtaskResponse, error) - DescribeSubnets(ctx context.Context, in *DescribeSubnetsRequest, opts ...grpc.CallOption) (*DescribeSubnetsResponse, error) - CheckResource(ctx context.Context, in *CheckResourceRequest, opts ...grpc.CallOption) (*CheckResourceResponse, error) - DescribeVpc(ctx context.Context, in *DescribeVpcRequest, opts ...grpc.CallOption) (*DescribeVpcResponse, error) - DescribeClusterDetails(ctx context.Context, in *DescribeClusterDetailsRequest, opts ...grpc.CallOption) (*DescribeClusterDetailsResponse, error) - // runtime - ValidateRuntime(ctx context.Context, in *ValidateRuntimeRequest, opts ...grpc.CallOption) (*ValidateRuntimeResponse, error) - DescribeZones(ctx context.Context, in *DescribeZonesRequest, opts ...grpc.CallOption) (*DescribeZonesResponse, error) -} - -type runtimeProviderManagerClient struct { - cc *grpc.ClientConn -} - -func NewRuntimeProviderManagerClient(cc *grpc.ClientConn) RuntimeProviderManagerClient { - return &runtimeProviderManagerClient{cc} -} - -func (c *runtimeProviderManagerClient) RegisterRuntimeProvider(ctx context.Context, in *RegisterRuntimeProviderRequest, opts ...grpc.CallOption) (*RegisterRuntimeProviderResponse, error) { - out := new(RegisterRuntimeProviderResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RuntimeProviderManager/RegisterRuntimeProvider", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runtimeProviderManagerClient) ParseClusterConf(ctx context.Context, in *ParseClusterConfRequest, opts ...grpc.CallOption) (*ParseClusterConfResponse, error) { - out := new(ParseClusterConfResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RuntimeProviderManager/ParseClusterConf", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runtimeProviderManagerClient) SplitJobIntoTasks(ctx context.Context, in *SplitJobIntoTasksRequest, opts ...grpc.CallOption) (*SplitJobIntoTasksResponse, error) { - out := new(SplitJobIntoTasksResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RuntimeProviderManager/SplitJobIntoTasks", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runtimeProviderManagerClient) HandleSubtask(ctx context.Context, in *HandleSubtaskRequest, opts ...grpc.CallOption) (*HandleSubtaskResponse, error) { - out := new(HandleSubtaskResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RuntimeProviderManager/HandleSubtask", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runtimeProviderManagerClient) WaitSubtask(ctx context.Context, in *WaitSubtaskRequest, opts ...grpc.CallOption) (*WaitSubtaskResponse, error) { - out := new(WaitSubtaskResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RuntimeProviderManager/WaitSubtask", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runtimeProviderManagerClient) DescribeSubnets(ctx context.Context, in *DescribeSubnetsRequest, opts ...grpc.CallOption) (*DescribeSubnetsResponse, error) { - out := new(DescribeSubnetsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RuntimeProviderManager/DescribeSubnets", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runtimeProviderManagerClient) CheckResource(ctx context.Context, in *CheckResourceRequest, opts ...grpc.CallOption) (*CheckResourceResponse, error) { - out := new(CheckResourceResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RuntimeProviderManager/CheckResource", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runtimeProviderManagerClient) DescribeVpc(ctx context.Context, in *DescribeVpcRequest, opts ...grpc.CallOption) (*DescribeVpcResponse, error) { - out := new(DescribeVpcResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RuntimeProviderManager/DescribeVpc", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runtimeProviderManagerClient) DescribeClusterDetails(ctx context.Context, in *DescribeClusterDetailsRequest, opts ...grpc.CallOption) (*DescribeClusterDetailsResponse, error) { - out := new(DescribeClusterDetailsResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RuntimeProviderManager/DescribeClusterDetails", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runtimeProviderManagerClient) ValidateRuntime(ctx context.Context, in *ValidateRuntimeRequest, opts ...grpc.CallOption) (*ValidateRuntimeResponse, error) { - out := new(ValidateRuntimeResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RuntimeProviderManager/ValidateRuntime", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *runtimeProviderManagerClient) DescribeZones(ctx context.Context, in *DescribeZonesRequest, opts ...grpc.CallOption) (*DescribeZonesResponse, error) { - out := new(DescribeZonesResponse) - err := c.cc.Invoke(ctx, "/openpitrix.RuntimeProviderManager/DescribeZones", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// RuntimeProviderManagerServer is the server API for RuntimeProviderManager service. -type RuntimeProviderManagerServer interface { - RegisterRuntimeProvider(context.Context, *RegisterRuntimeProviderRequest) (*RegisterRuntimeProviderResponse, error) - // cluster - ParseClusterConf(context.Context, *ParseClusterConfRequest) (*ParseClusterConfResponse, error) - SplitJobIntoTasks(context.Context, *SplitJobIntoTasksRequest) (*SplitJobIntoTasksResponse, error) - HandleSubtask(context.Context, *HandleSubtaskRequest) (*HandleSubtaskResponse, error) - WaitSubtask(context.Context, *WaitSubtaskRequest) (*WaitSubtaskResponse, error) - DescribeSubnets(context.Context, *DescribeSubnetsRequest) (*DescribeSubnetsResponse, error) - CheckResource(context.Context, *CheckResourceRequest) (*CheckResourceResponse, error) - DescribeVpc(context.Context, *DescribeVpcRequest) (*DescribeVpcResponse, error) - DescribeClusterDetails(context.Context, *DescribeClusterDetailsRequest) (*DescribeClusterDetailsResponse, error) - // runtime - ValidateRuntime(context.Context, *ValidateRuntimeRequest) (*ValidateRuntimeResponse, error) - DescribeZones(context.Context, *DescribeZonesRequest) (*DescribeZonesResponse, error) -} - -// UnimplementedRuntimeProviderManagerServer can be embedded to have forward compatible implementations. -type UnimplementedRuntimeProviderManagerServer struct { -} - -func (*UnimplementedRuntimeProviderManagerServer) RegisterRuntimeProvider(ctx context.Context, req *RegisterRuntimeProviderRequest) (*RegisterRuntimeProviderResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RegisterRuntimeProvider not implemented") -} -func (*UnimplementedRuntimeProviderManagerServer) ParseClusterConf(ctx context.Context, req *ParseClusterConfRequest) (*ParseClusterConfResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ParseClusterConf not implemented") -} -func (*UnimplementedRuntimeProviderManagerServer) SplitJobIntoTasks(ctx context.Context, req *SplitJobIntoTasksRequest) (*SplitJobIntoTasksResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SplitJobIntoTasks not implemented") -} -func (*UnimplementedRuntimeProviderManagerServer) HandleSubtask(ctx context.Context, req *HandleSubtaskRequest) (*HandleSubtaskResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method HandleSubtask not implemented") -} -func (*UnimplementedRuntimeProviderManagerServer) WaitSubtask(ctx context.Context, req *WaitSubtaskRequest) (*WaitSubtaskResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method WaitSubtask not implemented") -} -func (*UnimplementedRuntimeProviderManagerServer) DescribeSubnets(ctx context.Context, req *DescribeSubnetsRequest) (*DescribeSubnetsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeSubnets not implemented") -} -func (*UnimplementedRuntimeProviderManagerServer) CheckResource(ctx context.Context, req *CheckResourceRequest) (*CheckResourceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CheckResource not implemented") -} -func (*UnimplementedRuntimeProviderManagerServer) DescribeVpc(ctx context.Context, req *DescribeVpcRequest) (*DescribeVpcResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeVpc not implemented") -} -func (*UnimplementedRuntimeProviderManagerServer) DescribeClusterDetails(ctx context.Context, req *DescribeClusterDetailsRequest) (*DescribeClusterDetailsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeClusterDetails not implemented") -} -func (*UnimplementedRuntimeProviderManagerServer) ValidateRuntime(ctx context.Context, req *ValidateRuntimeRequest) (*ValidateRuntimeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ValidateRuntime not implemented") -} -func (*UnimplementedRuntimeProviderManagerServer) DescribeZones(ctx context.Context, req *DescribeZonesRequest) (*DescribeZonesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeZones not implemented") -} - -func RegisterRuntimeProviderManagerServer(s *grpc.Server, srv RuntimeProviderManagerServer) { - s.RegisterService(&_RuntimeProviderManager_serviceDesc, srv) -} - -func _RuntimeProviderManager_RegisterRuntimeProvider_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RegisterRuntimeProviderRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeProviderManagerServer).RegisterRuntimeProvider(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RuntimeProviderManager/RegisterRuntimeProvider", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeProviderManagerServer).RegisterRuntimeProvider(ctx, req.(*RegisterRuntimeProviderRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuntimeProviderManager_ParseClusterConf_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ParseClusterConfRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeProviderManagerServer).ParseClusterConf(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RuntimeProviderManager/ParseClusterConf", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeProviderManagerServer).ParseClusterConf(ctx, req.(*ParseClusterConfRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuntimeProviderManager_SplitJobIntoTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SplitJobIntoTasksRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeProviderManagerServer).SplitJobIntoTasks(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RuntimeProviderManager/SplitJobIntoTasks", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeProviderManagerServer).SplitJobIntoTasks(ctx, req.(*SplitJobIntoTasksRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuntimeProviderManager_HandleSubtask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(HandleSubtaskRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeProviderManagerServer).HandleSubtask(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RuntimeProviderManager/HandleSubtask", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeProviderManagerServer).HandleSubtask(ctx, req.(*HandleSubtaskRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuntimeProviderManager_WaitSubtask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(WaitSubtaskRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeProviderManagerServer).WaitSubtask(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RuntimeProviderManager/WaitSubtask", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeProviderManagerServer).WaitSubtask(ctx, req.(*WaitSubtaskRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuntimeProviderManager_DescribeSubnets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeSubnetsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeProviderManagerServer).DescribeSubnets(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RuntimeProviderManager/DescribeSubnets", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeProviderManagerServer).DescribeSubnets(ctx, req.(*DescribeSubnetsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuntimeProviderManager_CheckResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CheckResourceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeProviderManagerServer).CheckResource(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RuntimeProviderManager/CheckResource", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeProviderManagerServer).CheckResource(ctx, req.(*CheckResourceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuntimeProviderManager_DescribeVpc_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeVpcRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeProviderManagerServer).DescribeVpc(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RuntimeProviderManager/DescribeVpc", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeProviderManagerServer).DescribeVpc(ctx, req.(*DescribeVpcRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuntimeProviderManager_DescribeClusterDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeClusterDetailsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeProviderManagerServer).DescribeClusterDetails(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RuntimeProviderManager/DescribeClusterDetails", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeProviderManagerServer).DescribeClusterDetails(ctx, req.(*DescribeClusterDetailsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuntimeProviderManager_ValidateRuntime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ValidateRuntimeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeProviderManagerServer).ValidateRuntime(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RuntimeProviderManager/ValidateRuntime", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeProviderManagerServer).ValidateRuntime(ctx, req.(*ValidateRuntimeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _RuntimeProviderManager_DescribeZones_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeZonesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(RuntimeProviderManagerServer).DescribeZones(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.RuntimeProviderManager/DescribeZones", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(RuntimeProviderManagerServer).DescribeZones(ctx, req.(*DescribeZonesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _RuntimeProviderManager_serviceDesc = grpc.ServiceDesc{ - ServiceName: "openpitrix.RuntimeProviderManager", - HandlerType: (*RuntimeProviderManagerServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "RegisterRuntimeProvider", - Handler: _RuntimeProviderManager_RegisterRuntimeProvider_Handler, - }, - { - MethodName: "ParseClusterConf", - Handler: _RuntimeProviderManager_ParseClusterConf_Handler, - }, - { - MethodName: "SplitJobIntoTasks", - Handler: _RuntimeProviderManager_SplitJobIntoTasks_Handler, - }, - { - MethodName: "HandleSubtask", - Handler: _RuntimeProviderManager_HandleSubtask_Handler, - }, - { - MethodName: "WaitSubtask", - Handler: _RuntimeProviderManager_WaitSubtask_Handler, - }, - { - MethodName: "DescribeSubnets", - Handler: _RuntimeProviderManager_DescribeSubnets_Handler, - }, - { - MethodName: "CheckResource", - Handler: _RuntimeProviderManager_CheckResource_Handler, - }, - { - MethodName: "DescribeVpc", - Handler: _RuntimeProviderManager_DescribeVpc_Handler, - }, - { - MethodName: "DescribeClusterDetails", - Handler: _RuntimeProviderManager_DescribeClusterDetails_Handler, - }, - { - MethodName: "ValidateRuntime", - Handler: _RuntimeProviderManager_ValidateRuntime_Handler, - }, - { - MethodName: "DescribeZones", - Handler: _RuntimeProviderManager_DescribeZones_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "runtime_provider.proto", -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/service_config.pb.go b/vendor/openpitrix.io/openpitrix/pkg/pb/service_config.pb.go deleted file mode 100644 index f6ab35b73..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/service_config.pb.go +++ /dev/null @@ -1,802 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: service_config.proto - -package pb - -import ( - context "context" - fmt "fmt" - math "math" - - proto "github.com/golang/protobuf/proto" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type EmailServiceConfig struct { - // protocol - Protocol *wrappers.StringValue `protobuf:"bytes,1,opt,name=protocol,proto3" json:"protocol,omitempty"` - // email host - EmailHost *wrappers.StringValue `protobuf:"bytes,2,opt,name=email_host,json=emailHost,proto3" json:"email_host,omitempty"` - // port - Port *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=port,proto3" json:"port,omitempty"` - // display sender - DisplaySender *wrappers.StringValue `protobuf:"bytes,4,opt,name=display_sender,json=displaySender,proto3" json:"display_sender,omitempty"` - // email - Email *wrappers.StringValue `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"` - // password - Password *wrappers.StringValue `protobuf:"bytes,6,opt,name=password,proto3" json:"password,omitempty"` - // use ssl or not - SslEnable *wrappers.BoolValue `protobuf:"bytes,7,opt,name=ssl_enable,json=sslEnable,proto3" json:"ssl_enable,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *EmailServiceConfig) Reset() { *m = EmailServiceConfig{} } -func (m *EmailServiceConfig) String() string { return proto.CompactTextString(m) } -func (*EmailServiceConfig) ProtoMessage() {} -func (*EmailServiceConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_452b382cbc0cfd24, []int{0} -} - -func (m *EmailServiceConfig) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EmailServiceConfig.Unmarshal(m, b) -} -func (m *EmailServiceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EmailServiceConfig.Marshal(b, m, deterministic) -} -func (m *EmailServiceConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_EmailServiceConfig.Merge(m, src) -} -func (m *EmailServiceConfig) XXX_Size() int { - return xxx_messageInfo_EmailServiceConfig.Size(m) -} -func (m *EmailServiceConfig) XXX_DiscardUnknown() { - xxx_messageInfo_EmailServiceConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_EmailServiceConfig proto.InternalMessageInfo - -func (m *EmailServiceConfig) GetProtocol() *wrappers.StringValue { - if m != nil { - return m.Protocol - } - return nil -} - -func (m *EmailServiceConfig) GetEmailHost() *wrappers.StringValue { - if m != nil { - return m.EmailHost - } - return nil -} - -func (m *EmailServiceConfig) GetPort() *wrappers.UInt32Value { - if m != nil { - return m.Port - } - return nil -} - -func (m *EmailServiceConfig) GetDisplaySender() *wrappers.StringValue { - if m != nil { - return m.DisplaySender - } - return nil -} - -func (m *EmailServiceConfig) GetEmail() *wrappers.StringValue { - if m != nil { - return m.Email - } - return nil -} - -func (m *EmailServiceConfig) GetPassword() *wrappers.StringValue { - if m != nil { - return m.Password - } - return nil -} - -func (m *EmailServiceConfig) GetSslEnable() *wrappers.BoolValue { - if m != nil { - return m.SslEnable - } - return nil -} - -type NotificationConfig struct { - // email service sonfig - EmailServiceConfig *EmailServiceConfig `protobuf:"bytes,1,opt,name=email_service_config,json=emailServiceConfig,proto3" json:"email_service_config,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *NotificationConfig) Reset() { *m = NotificationConfig{} } -func (m *NotificationConfig) String() string { return proto.CompactTextString(m) } -func (*NotificationConfig) ProtoMessage() {} -func (*NotificationConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_452b382cbc0cfd24, []int{1} -} - -func (m *NotificationConfig) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NotificationConfig.Unmarshal(m, b) -} -func (m *NotificationConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NotificationConfig.Marshal(b, m, deterministic) -} -func (m *NotificationConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_NotificationConfig.Merge(m, src) -} -func (m *NotificationConfig) XXX_Size() int { - return xxx_messageInfo_NotificationConfig.Size(m) -} -func (m *NotificationConfig) XXX_DiscardUnknown() { - xxx_messageInfo_NotificationConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_NotificationConfig proto.InternalMessageInfo - -func (m *NotificationConfig) GetEmailServiceConfig() *EmailServiceConfig { - if m != nil { - return m.EmailServiceConfig - } - return nil -} - -type RuntimeItemConfig struct { - // runtime name eg.[qingcloud|aliyun|aws|kubernetes] - Name *wrappers.StringValue `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // whether runtime is available - Enable *wrappers.BoolValue `protobuf:"bytes,2,opt,name=enable,proto3" json:"enable,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RuntimeItemConfig) Reset() { *m = RuntimeItemConfig{} } -func (m *RuntimeItemConfig) String() string { return proto.CompactTextString(m) } -func (*RuntimeItemConfig) ProtoMessage() {} -func (*RuntimeItemConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_452b382cbc0cfd24, []int{2} -} - -func (m *RuntimeItemConfig) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RuntimeItemConfig.Unmarshal(m, b) -} -func (m *RuntimeItemConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RuntimeItemConfig.Marshal(b, m, deterministic) -} -func (m *RuntimeItemConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_RuntimeItemConfig.Merge(m, src) -} -func (m *RuntimeItemConfig) XXX_Size() int { - return xxx_messageInfo_RuntimeItemConfig.Size(m) -} -func (m *RuntimeItemConfig) XXX_DiscardUnknown() { - xxx_messageInfo_RuntimeItemConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_RuntimeItemConfig proto.InternalMessageInfo - -func (m *RuntimeItemConfig) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *RuntimeItemConfig) GetEnable() *wrappers.BoolValue { - if m != nil { - return m.Enable - } - return nil -} - -type RuntimeConfig struct { - // runtime item config - ConfigSet []*RuntimeItemConfig `protobuf:"bytes,1,rep,name=config_set,json=configSet,proto3" json:"config_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RuntimeConfig) Reset() { *m = RuntimeConfig{} } -func (m *RuntimeConfig) String() string { return proto.CompactTextString(m) } -func (*RuntimeConfig) ProtoMessage() {} -func (*RuntimeConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_452b382cbc0cfd24, []int{3} -} - -func (m *RuntimeConfig) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RuntimeConfig.Unmarshal(m, b) -} -func (m *RuntimeConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RuntimeConfig.Marshal(b, m, deterministic) -} -func (m *RuntimeConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_RuntimeConfig.Merge(m, src) -} -func (m *RuntimeConfig) XXX_Size() int { - return xxx_messageInfo_RuntimeConfig.Size(m) -} -func (m *RuntimeConfig) XXX_DiscardUnknown() { - xxx_messageInfo_RuntimeConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_RuntimeConfig proto.InternalMessageInfo - -func (m *RuntimeConfig) GetConfigSet() []*RuntimeItemConfig { - if m != nil { - return m.ConfigSet - } - return nil -} - -type BasicConfig struct { - // platform name - PlatformName *wrappers.StringValue `protobuf:"bytes,1,opt,name=platform_name,json=platformName,proto3" json:"platform_name,omitempty"` - // platform url - PlatformUrl *wrappers.StringValue `protobuf:"bytes,2,opt,name=platform_url,json=platformUrl,proto3" json:"platform_url,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *BasicConfig) Reset() { *m = BasicConfig{} } -func (m *BasicConfig) String() string { return proto.CompactTextString(m) } -func (*BasicConfig) ProtoMessage() {} -func (*BasicConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_452b382cbc0cfd24, []int{4} -} - -func (m *BasicConfig) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BasicConfig.Unmarshal(m, b) -} -func (m *BasicConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BasicConfig.Marshal(b, m, deterministic) -} -func (m *BasicConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_BasicConfig.Merge(m, src) -} -func (m *BasicConfig) XXX_Size() int { - return xxx_messageInfo_BasicConfig.Size(m) -} -func (m *BasicConfig) XXX_DiscardUnknown() { - xxx_messageInfo_BasicConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_BasicConfig proto.InternalMessageInfo - -func (m *BasicConfig) GetPlatformName() *wrappers.StringValue { - if m != nil { - return m.PlatformName - } - return nil -} - -func (m *BasicConfig) GetPlatformUrl() *wrappers.StringValue { - if m != nil { - return m.PlatformUrl - } - return nil -} - -type SetServiceConfigRequest struct { - // notification config - NotificationConfig *NotificationConfig `protobuf:"bytes,1,opt,name=notification_config,json=notificationConfig,proto3" json:"notification_config,omitempty"` - // runtime config - RuntimeConfig *RuntimeConfig `protobuf:"bytes,2,opt,name=runtime_config,json=runtimeConfig,proto3" json:"runtime_config,omitempty"` - // basic config - BasicConfig *BasicConfig `protobuf:"bytes,3,opt,name=basic_config,json=basicConfig,proto3" json:"basic_config,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SetServiceConfigRequest) Reset() { *m = SetServiceConfigRequest{} } -func (m *SetServiceConfigRequest) String() string { return proto.CompactTextString(m) } -func (*SetServiceConfigRequest) ProtoMessage() {} -func (*SetServiceConfigRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_452b382cbc0cfd24, []int{5} -} - -func (m *SetServiceConfigRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetServiceConfigRequest.Unmarshal(m, b) -} -func (m *SetServiceConfigRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetServiceConfigRequest.Marshal(b, m, deterministic) -} -func (m *SetServiceConfigRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetServiceConfigRequest.Merge(m, src) -} -func (m *SetServiceConfigRequest) XXX_Size() int { - return xxx_messageInfo_SetServiceConfigRequest.Size(m) -} -func (m *SetServiceConfigRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SetServiceConfigRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SetServiceConfigRequest proto.InternalMessageInfo - -func (m *SetServiceConfigRequest) GetNotificationConfig() *NotificationConfig { - if m != nil { - return m.NotificationConfig - } - return nil -} - -func (m *SetServiceConfigRequest) GetRuntimeConfig() *RuntimeConfig { - if m != nil { - return m.RuntimeConfig - } - return nil -} - -func (m *SetServiceConfigRequest) GetBasicConfig() *BasicConfig { - if m != nil { - return m.BasicConfig - } - return nil -} - -type SetServiceConfigResponse struct { - // set service config ok or not - IsSucc *wrappers.BoolValue `protobuf:"bytes,1,opt,name=is_succ,json=isSucc,proto3" json:"is_succ,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SetServiceConfigResponse) Reset() { *m = SetServiceConfigResponse{} } -func (m *SetServiceConfigResponse) String() string { return proto.CompactTextString(m) } -func (*SetServiceConfigResponse) ProtoMessage() {} -func (*SetServiceConfigResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_452b382cbc0cfd24, []int{6} -} - -func (m *SetServiceConfigResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetServiceConfigResponse.Unmarshal(m, b) -} -func (m *SetServiceConfigResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetServiceConfigResponse.Marshal(b, m, deterministic) -} -func (m *SetServiceConfigResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetServiceConfigResponse.Merge(m, src) -} -func (m *SetServiceConfigResponse) XXX_Size() int { - return xxx_messageInfo_SetServiceConfigResponse.Size(m) -} -func (m *SetServiceConfigResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SetServiceConfigResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SetServiceConfigResponse proto.InternalMessageInfo - -func (m *SetServiceConfigResponse) GetIsSucc() *wrappers.BoolValue { - if m != nil { - return m.IsSucc - } - return nil -} - -type GetServiceConfigRequest struct { - // service type eg.[runtime] - ServiceType []string `protobuf:"bytes,1,rep,name=service_type,json=serviceType,proto3" json:"service_type,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetServiceConfigRequest) Reset() { *m = GetServiceConfigRequest{} } -func (m *GetServiceConfigRequest) String() string { return proto.CompactTextString(m) } -func (*GetServiceConfigRequest) ProtoMessage() {} -func (*GetServiceConfigRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_452b382cbc0cfd24, []int{7} -} - -func (m *GetServiceConfigRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetServiceConfigRequest.Unmarshal(m, b) -} -func (m *GetServiceConfigRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetServiceConfigRequest.Marshal(b, m, deterministic) -} -func (m *GetServiceConfigRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetServiceConfigRequest.Merge(m, src) -} -func (m *GetServiceConfigRequest) XXX_Size() int { - return xxx_messageInfo_GetServiceConfigRequest.Size(m) -} -func (m *GetServiceConfigRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetServiceConfigRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetServiceConfigRequest proto.InternalMessageInfo - -func (m *GetServiceConfigRequest) GetServiceType() []string { - if m != nil { - return m.ServiceType - } - return nil -} - -type GetServiceConfigResponse struct { - // notification config - NotificationConfig *NotificationConfig `protobuf:"bytes,1,opt,name=notification_config,json=notificationConfig,proto3" json:"notification_config,omitempty"` - // runtime config - RuntimeConfig *RuntimeConfig `protobuf:"bytes,2,opt,name=runtime_config,json=runtimeConfig,proto3" json:"runtime_config,omitempty"` - // basic config - BasicConfig *BasicConfig `protobuf:"bytes,3,opt,name=basic_config,json=basicConfig,proto3" json:"basic_config,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetServiceConfigResponse) Reset() { *m = GetServiceConfigResponse{} } -func (m *GetServiceConfigResponse) String() string { return proto.CompactTextString(m) } -func (*GetServiceConfigResponse) ProtoMessage() {} -func (*GetServiceConfigResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_452b382cbc0cfd24, []int{8} -} - -func (m *GetServiceConfigResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetServiceConfigResponse.Unmarshal(m, b) -} -func (m *GetServiceConfigResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetServiceConfigResponse.Marshal(b, m, deterministic) -} -func (m *GetServiceConfigResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetServiceConfigResponse.Merge(m, src) -} -func (m *GetServiceConfigResponse) XXX_Size() int { - return xxx_messageInfo_GetServiceConfigResponse.Size(m) -} -func (m *GetServiceConfigResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetServiceConfigResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetServiceConfigResponse proto.InternalMessageInfo - -func (m *GetServiceConfigResponse) GetNotificationConfig() *NotificationConfig { - if m != nil { - return m.NotificationConfig - } - return nil -} - -func (m *GetServiceConfigResponse) GetRuntimeConfig() *RuntimeConfig { - if m != nil { - return m.RuntimeConfig - } - return nil -} - -func (m *GetServiceConfigResponse) GetBasicConfig() *BasicConfig { - if m != nil { - return m.BasicConfig - } - return nil -} - -type ValidateEmailServiceRequest struct { - // email service config - EmailServiceConfig *EmailServiceConfig `protobuf:"bytes,1,opt,name=email_service_config,json=emailServiceConfig,proto3" json:"email_service_config,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ValidateEmailServiceRequest) Reset() { *m = ValidateEmailServiceRequest{} } -func (m *ValidateEmailServiceRequest) String() string { return proto.CompactTextString(m) } -func (*ValidateEmailServiceRequest) ProtoMessage() {} -func (*ValidateEmailServiceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_452b382cbc0cfd24, []int{9} -} - -func (m *ValidateEmailServiceRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ValidateEmailServiceRequest.Unmarshal(m, b) -} -func (m *ValidateEmailServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ValidateEmailServiceRequest.Marshal(b, m, deterministic) -} -func (m *ValidateEmailServiceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidateEmailServiceRequest.Merge(m, src) -} -func (m *ValidateEmailServiceRequest) XXX_Size() int { - return xxx_messageInfo_ValidateEmailServiceRequest.Size(m) -} -func (m *ValidateEmailServiceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ValidateEmailServiceRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidateEmailServiceRequest proto.InternalMessageInfo - -func (m *ValidateEmailServiceRequest) GetEmailServiceConfig() *EmailServiceConfig { - if m != nil { - return m.EmailServiceConfig - } - return nil -} - -type ValidateEmailServiceResponse struct { - // validate email service ok or not - IsSucc *wrappers.BoolValue `protobuf:"bytes,1,opt,name=is_succ,json=isSucc,proto3" json:"is_succ,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ValidateEmailServiceResponse) Reset() { *m = ValidateEmailServiceResponse{} } -func (m *ValidateEmailServiceResponse) String() string { return proto.CompactTextString(m) } -func (*ValidateEmailServiceResponse) ProtoMessage() {} -func (*ValidateEmailServiceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_452b382cbc0cfd24, []int{10} -} - -func (m *ValidateEmailServiceResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ValidateEmailServiceResponse.Unmarshal(m, b) -} -func (m *ValidateEmailServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ValidateEmailServiceResponse.Marshal(b, m, deterministic) -} -func (m *ValidateEmailServiceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidateEmailServiceResponse.Merge(m, src) -} -func (m *ValidateEmailServiceResponse) XXX_Size() int { - return xxx_messageInfo_ValidateEmailServiceResponse.Size(m) -} -func (m *ValidateEmailServiceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ValidateEmailServiceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidateEmailServiceResponse proto.InternalMessageInfo - -func (m *ValidateEmailServiceResponse) GetIsSucc() *wrappers.BoolValue { - if m != nil { - return m.IsSucc - } - return nil -} - -func init() { - proto.RegisterType((*EmailServiceConfig)(nil), "openpitrix.EmailServiceConfig") - proto.RegisterType((*NotificationConfig)(nil), "openpitrix.NotificationConfig") - proto.RegisterType((*RuntimeItemConfig)(nil), "openpitrix.RuntimeItemConfig") - proto.RegisterType((*RuntimeConfig)(nil), "openpitrix.RuntimeConfig") - proto.RegisterType((*BasicConfig)(nil), "openpitrix.BasicConfig") - proto.RegisterType((*SetServiceConfigRequest)(nil), "openpitrix.SetServiceConfigRequest") - proto.RegisterType((*SetServiceConfigResponse)(nil), "openpitrix.SetServiceConfigResponse") - proto.RegisterType((*GetServiceConfigRequest)(nil), "openpitrix.GetServiceConfigRequest") - proto.RegisterType((*GetServiceConfigResponse)(nil), "openpitrix.GetServiceConfigResponse") - proto.RegisterType((*ValidateEmailServiceRequest)(nil), "openpitrix.ValidateEmailServiceRequest") - proto.RegisterType((*ValidateEmailServiceResponse)(nil), "openpitrix.ValidateEmailServiceResponse") -} - -func init() { proto.RegisterFile("service_config.proto", fileDescriptor_452b382cbc0cfd24) } - -var fileDescriptor_452b382cbc0cfd24 = []byte{ - // 750 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x55, 0xd1, 0x4e, 0x13, 0x41, - 0x14, 0xcd, 0x96, 0x02, 0x72, 0x4b, 0x89, 0x8e, 0xc4, 0xae, 0xb5, 0x92, 0xba, 0x9a, 0x48, 0x88, - 0x74, 0xb1, 0xbc, 0x28, 0x92, 0x20, 0x10, 0x52, 0x79, 0x10, 0x48, 0x2b, 0x3c, 0xf8, 0xb2, 0xd9, - 0x6e, 0xa7, 0xeb, 0x24, 0xdb, 0x9d, 0x75, 0x66, 0x0a, 0xf6, 0xd5, 0x1f, 0x30, 0xe2, 0xbb, 0x3f, - 0xe0, 0x27, 0xf8, 0x19, 0xfe, 0x82, 0x0f, 0xfa, 0x17, 0xa6, 0x33, 0xb3, 0xd0, 0xba, 0x6d, 0xd9, - 0xa8, 0x4f, 0x3e, 0x35, 0xb3, 0x7b, 0xce, 0xbd, 0xe7, 0x9e, 0x7b, 0xa6, 0x0b, 0x8b, 0x1c, 0xb3, - 0x53, 0xe2, 0x61, 0xc7, 0xa3, 0x61, 0x9b, 0xf8, 0x95, 0x88, 0x51, 0x41, 0x11, 0xd0, 0x08, 0x87, - 0x11, 0x11, 0x8c, 0xbc, 0x2b, 0x96, 0x7c, 0x4a, 0xfd, 0x00, 0xdb, 0x6e, 0x44, 0x6c, 0x37, 0x0c, - 0xa9, 0x70, 0x05, 0xa1, 0x21, 0x57, 0xc8, 0xe2, 0x92, 0x7e, 0x2b, 0x4f, 0xcd, 0x6e, 0xdb, 0x3e, - 0x63, 0x6e, 0x14, 0x61, 0x16, 0xbf, 0x7f, 0x24, 0x7f, 0xbc, 0x55, 0x1f, 0x87, 0xab, 0xfc, 0xcc, - 0xf5, 0x7d, 0xcc, 0x6c, 0x1a, 0xc9, 0x0a, 0xc9, 0x6a, 0xd6, 0x97, 0x29, 0x40, 0x7b, 0x1d, 0x97, - 0x04, 0x0d, 0xa5, 0x6a, 0x57, 0x8a, 0x42, 0x4f, 0xe0, 0x9a, 0x2a, 0x43, 0x03, 0xd3, 0x28, 0x1b, - 0xcb, 0xb9, 0x6a, 0xa9, 0xa2, 0xfa, 0x56, 0xe2, 0xbe, 0x95, 0x86, 0x60, 0x24, 0xf4, 0x4f, 0xdc, - 0xa0, 0x8b, 0xeb, 0x17, 0x68, 0xf4, 0x0c, 0x00, 0xf7, 0xeb, 0x39, 0x6f, 0x28, 0x17, 0x66, 0x26, - 0x05, 0x77, 0x4e, 0xe2, 0x5f, 0x50, 0x2e, 0xd0, 0x1a, 0x64, 0x23, 0xca, 0x84, 0x39, 0x35, 0x86, - 0x76, 0xbc, 0x1f, 0x8a, 0xf5, 0xaa, 0xa2, 0x49, 0x24, 0xda, 0x85, 0x85, 0x16, 0xe1, 0x51, 0xe0, - 0xf6, 0x1c, 0x8e, 0xc3, 0x16, 0x66, 0x66, 0x36, 0x45, 0xcb, 0xbc, 0xe6, 0x34, 0x24, 0x05, 0x55, - 0x61, 0x5a, 0x6a, 0x30, 0xa7, 0x53, 0x70, 0x15, 0x54, 0x3a, 0xe4, 0x72, 0x7e, 0x46, 0x59, 0xcb, - 0x9c, 0x49, 0xe5, 0x90, 0x46, 0xa3, 0xa7, 0x00, 0x9c, 0x07, 0x0e, 0x0e, 0xdd, 0x66, 0x80, 0xcd, - 0x59, 0xc9, 0x2d, 0x26, 0xb8, 0x3b, 0x94, 0x06, 0xda, 0x1f, 0xce, 0x83, 0x3d, 0x09, 0xb6, 0xda, - 0x80, 0x0e, 0xa8, 0x20, 0x6d, 0xe2, 0xc9, 0x25, 0xea, 0x65, 0x1d, 0xc1, 0xa2, 0xb2, 0x7c, 0x38, - 0x59, 0x7a, 0x71, 0x4b, 0x95, 0xcb, 0x68, 0x55, 0x92, 0xab, 0xae, 0x23, 0x9c, 0x78, 0x66, 0xf5, - 0xe0, 0x46, 0xbd, 0x1b, 0x0a, 0xd2, 0xc1, 0xfb, 0x02, 0x77, 0x74, 0x9b, 0x35, 0xc8, 0x86, 0x6e, - 0x07, 0xa7, 0xca, 0x83, 0x44, 0xa2, 0x2a, 0xcc, 0xe8, 0x29, 0x33, 0x57, 0x4e, 0xa9, 0x91, 0xd6, - 0x4b, 0xc8, 0xeb, 0xd6, 0xba, 0xed, 0x26, 0x80, 0x9a, 0xc7, 0xe1, 0x58, 0x98, 0x46, 0x79, 0x6a, - 0x39, 0x57, 0xbd, 0x3b, 0x38, 0x53, 0x42, 0x69, 0x7d, 0x4e, 0x11, 0x1a, 0x58, 0x58, 0x1f, 0x0d, - 0xc8, 0xed, 0xb8, 0x9c, 0x78, 0xba, 0xda, 0x36, 0xe4, 0xa3, 0xc0, 0x15, 0x6d, 0xca, 0x3a, 0x4e, - 0xea, 0x69, 0xe6, 0x63, 0xca, 0x41, 0x7f, 0xaa, 0x2d, 0xb8, 0x38, 0x3b, 0x5d, 0x16, 0xa4, 0xca, - 0x78, 0x2e, 0x66, 0x1c, 0xb3, 0xc0, 0xfa, 0x61, 0x40, 0xa1, 0x81, 0xc5, 0xf0, 0x1a, 0xf0, 0xdb, - 0x2e, 0xe6, 0x02, 0x1d, 0xc2, 0xcd, 0x70, 0x60, 0xc3, 0x13, 0x56, 0x99, 0x0c, 0x42, 0x1d, 0x85, - 0xc9, 0x70, 0x3c, 0x87, 0x05, 0xa6, 0x0c, 0x8a, 0x6b, 0x29, 0xbd, 0xb7, 0x47, 0x58, 0xa8, 0xcb, - 0xe4, 0xd9, 0xd0, 0x02, 0x36, 0x60, 0xbe, 0xd9, 0x77, 0x30, 0xe6, 0xab, 0xcb, 0x59, 0x18, 0xe4, - 0x0f, 0x38, 0x5c, 0xcf, 0x35, 0x2f, 0x0f, 0xd6, 0x21, 0x98, 0xc9, 0x49, 0x79, 0x44, 0x43, 0x8e, - 0xd1, 0x3a, 0xcc, 0x12, 0xee, 0xf0, 0xae, 0xe7, 0xe9, 0xf1, 0x26, 0xc6, 0x83, 0xf0, 0x46, 0xd7, - 0xf3, 0xac, 0x4d, 0x28, 0xd4, 0xc6, 0x58, 0x77, 0x0f, 0xe6, 0xe3, 0x0b, 0x20, 0x7a, 0x11, 0x96, - 0x51, 0x99, 0xab, 0xe7, 0xf4, 0xb3, 0x57, 0xbd, 0x08, 0x5b, 0x3f, 0x0d, 0x30, 0x6b, 0xe3, 0xf4, - 0xfc, 0x67, 0xd6, 0x53, 0xb8, 0x73, 0xe2, 0x06, 0xa4, 0xe5, 0x0a, 0x3c, 0x78, 0xeb, 0x63, 0xb7, - 0xfe, 0xfd, 0x9f, 0x46, 0x03, 0x4a, 0xa3, 0x1b, 0xfe, 0xc5, 0xbe, 0xab, 0x1f, 0xb2, 0x90, 0x1f, - 0xfe, 0x34, 0x7d, 0x36, 0xe0, 0xfa, 0xef, 0x99, 0x42, 0xf7, 0x07, 0xf5, 0x8e, 0xb9, 0x5b, 0xc5, - 0x07, 0x93, 0x41, 0x4a, 0xa6, 0xb5, 0x75, 0xbe, 0x5d, 0x44, 0xfd, 0xd4, 0x96, 0xb5, 0x33, 0x65, - 0xe5, 0x0c, 0x93, 0xab, 0x7d, 0xff, 0xed, 0xfb, 0xa7, 0x4c, 0xc9, 0x2a, 0xd8, 0xa7, 0x8f, 0xed, - 0x61, 0xe7, 0xb8, 0xcd, 0xb1, 0xd8, 0x30, 0x56, 0xa4, 0xc0, 0xda, 0x44, 0x81, 0xb5, 0x34, 0x02, - 0x6b, 0x93, 0x05, 0xd6, 0xfe, 0x40, 0xa0, 0xaf, 0x04, 0x7e, 0x35, 0x60, 0x71, 0xd4, 0xa6, 0xd0, - 0xc3, 0xc1, 0xfe, 0x13, 0xc2, 0x53, 0x5c, 0xbe, 0x1a, 0xa8, 0xc5, 0x1e, 0x9d, 0x6f, 0x9b, 0xe8, - 0x56, 0x0c, 0x29, 0xcb, 0xd8, 0xc4, 0xba, 0xa5, 0x54, 0xdb, 0x5a, 0x19, 0x25, 0xf5, 0x54, 0x33, - 0x9c, 0xa1, 0x90, 0x6e, 0x18, 0x2b, 0x3b, 0xd9, 0xd7, 0x99, 0xa8, 0xd9, 0x9c, 0x91, 0x99, 0x59, - 0xff, 0x15, 0x00, 0x00, 0xff, 0xff, 0x92, 0x91, 0xe8, 0x28, 0x4e, 0x09, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// ServiceConfigClient is the client API for ServiceConfig service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ServiceConfigClient interface { - // Set service configration - SetServiceConfig(ctx context.Context, in *SetServiceConfigRequest, opts ...grpc.CallOption) (*SetServiceConfigResponse, error) - // Get service configration - GetServiceConfig(ctx context.Context, in *GetServiceConfigRequest, opts ...grpc.CallOption) (*GetServiceConfigResponse, error) - // Validate email service - ValidateEmailService(ctx context.Context, in *ValidateEmailServiceRequest, opts ...grpc.CallOption) (*ValidateEmailServiceResponse, error) -} - -type serviceConfigClient struct { - cc *grpc.ClientConn -} - -func NewServiceConfigClient(cc *grpc.ClientConn) ServiceConfigClient { - return &serviceConfigClient{cc} -} - -func (c *serviceConfigClient) SetServiceConfig(ctx context.Context, in *SetServiceConfigRequest, opts ...grpc.CallOption) (*SetServiceConfigResponse, error) { - out := new(SetServiceConfigResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ServiceConfig/SetServiceConfig", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceConfigClient) GetServiceConfig(ctx context.Context, in *GetServiceConfigRequest, opts ...grpc.CallOption) (*GetServiceConfigResponse, error) { - out := new(GetServiceConfigResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ServiceConfig/GetServiceConfig", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceConfigClient) ValidateEmailService(ctx context.Context, in *ValidateEmailServiceRequest, opts ...grpc.CallOption) (*ValidateEmailServiceResponse, error) { - out := new(ValidateEmailServiceResponse) - err := c.cc.Invoke(ctx, "/openpitrix.ServiceConfig/ValidateEmailService", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ServiceConfigServer is the server API for ServiceConfig service. -type ServiceConfigServer interface { - // Set service configration - SetServiceConfig(context.Context, *SetServiceConfigRequest) (*SetServiceConfigResponse, error) - // Get service configration - GetServiceConfig(context.Context, *GetServiceConfigRequest) (*GetServiceConfigResponse, error) - // Validate email service - ValidateEmailService(context.Context, *ValidateEmailServiceRequest) (*ValidateEmailServiceResponse, error) -} - -// UnimplementedServiceConfigServer can be embedded to have forward compatible implementations. -type UnimplementedServiceConfigServer struct { -} - -func (*UnimplementedServiceConfigServer) SetServiceConfig(ctx context.Context, req *SetServiceConfigRequest) (*SetServiceConfigResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetServiceConfig not implemented") -} -func (*UnimplementedServiceConfigServer) GetServiceConfig(ctx context.Context, req *GetServiceConfigRequest) (*GetServiceConfigResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetServiceConfig not implemented") -} -func (*UnimplementedServiceConfigServer) ValidateEmailService(ctx context.Context, req *ValidateEmailServiceRequest) (*ValidateEmailServiceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ValidateEmailService not implemented") -} - -func RegisterServiceConfigServer(s *grpc.Server, srv ServiceConfigServer) { - s.RegisterService(&_ServiceConfig_serviceDesc, srv) -} - -func _ServiceConfig_SetServiceConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetServiceConfigRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceConfigServer).SetServiceConfig(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ServiceConfig/SetServiceConfig", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceConfigServer).SetServiceConfig(ctx, req.(*SetServiceConfigRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ServiceConfig_GetServiceConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetServiceConfigRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceConfigServer).GetServiceConfig(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ServiceConfig/GetServiceConfig", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceConfigServer).GetServiceConfig(ctx, req.(*GetServiceConfigRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ServiceConfig_ValidateEmailService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ValidateEmailServiceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceConfigServer).ValidateEmailService(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.ServiceConfig/ValidateEmailService", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceConfigServer).ValidateEmailService(ctx, req.(*ValidateEmailServiceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ServiceConfig_serviceDesc = grpc.ServiceDesc{ - ServiceName: "openpitrix.ServiceConfig", - HandlerType: (*ServiceConfigServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SetServiceConfig", - Handler: _ServiceConfig_SetServiceConfig_Handler, - }, - { - MethodName: "GetServiceConfig", - Handler: _ServiceConfig_GetServiceConfig_Handler, - }, - { - MethodName: "ValidateEmailService", - Handler: _ServiceConfig_ValidateEmailService_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "service_config.proto", -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/service_config.pb.gw.go b/vendor/openpitrix.io/openpitrix/pkg/pb/service_config.pb.gw.go deleted file mode 100644 index 0c72cbfa0..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/service_config.pb.gw.go +++ /dev/null @@ -1,319 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: service_config.proto - -/* -Package pb is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package pb - -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/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage - -func request_ServiceConfig_SetServiceConfig_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceConfigClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetServiceConfigRequest - 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.SetServiceConfig(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ServiceConfig_SetServiceConfig_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceConfigServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SetServiceConfigRequest - 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.SetServiceConfig(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ServiceConfig_GetServiceConfig_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceConfigClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetServiceConfigRequest - 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.GetServiceConfig(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ServiceConfig_GetServiceConfig_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceConfigServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetServiceConfigRequest - 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.GetServiceConfig(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ServiceConfig_ValidateEmailService_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceConfigClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ValidateEmailServiceRequest - 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.ValidateEmailService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ServiceConfig_ValidateEmailService_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceConfigServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ValidateEmailServiceRequest - 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.ValidateEmailService(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterServiceConfigHandlerServer registers the http handlers for service ServiceConfig to "mux". -// UnaryRPC :call ServiceConfigServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterServiceConfigHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServiceConfigServer) error { - - mux.Handle("POST", pattern_ServiceConfig_SetServiceConfig_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ServiceConfig_SetServiceConfig_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ServiceConfig_SetServiceConfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ServiceConfig_GetServiceConfig_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ServiceConfig_GetServiceConfig_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ServiceConfig_GetServiceConfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ServiceConfig_ValidateEmailService_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ServiceConfig_ValidateEmailService_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ServiceConfig_ValidateEmailService_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterServiceConfigHandlerFromEndpoint is same as RegisterServiceConfigHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterServiceConfigHandlerFromEndpoint(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 RegisterServiceConfigHandler(ctx, mux, conn) -} - -// RegisterServiceConfigHandler registers the http handlers for service ServiceConfig to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterServiceConfigHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterServiceConfigHandlerClient(ctx, mux, NewServiceConfigClient(conn)) -} - -// RegisterServiceConfigHandlerClient registers the http handlers for service ServiceConfig -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ServiceConfigClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ServiceConfigClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ServiceConfigClient" to call the correct interceptors. -func RegisterServiceConfigHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServiceConfigClient) error { - - mux.Handle("POST", pattern_ServiceConfig_SetServiceConfig_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_ServiceConfig_SetServiceConfig_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ServiceConfig_SetServiceConfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ServiceConfig_GetServiceConfig_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_ServiceConfig_GetServiceConfig_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ServiceConfig_GetServiceConfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ServiceConfig_ValidateEmailService_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_ServiceConfig_ValidateEmailService_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_ServiceConfig_ValidateEmailService_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_ServiceConfig_SetServiceConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "service_configs", "set"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ServiceConfig_GetServiceConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "service_configs", "get"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_ServiceConfig_ValidateEmailService_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "service_configs", "validate_email_service"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_ServiceConfig_SetServiceConfig_0 = runtime.ForwardResponseMessage - - forward_ServiceConfig_GetServiceConfig_0 = runtime.ForwardResponseMessage - - forward_ServiceConfig_ValidateEmailService_0 = runtime.ForwardResponseMessage -) diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/task.pb.go b/vendor/openpitrix.io/openpitrix/pkg/pb/task.pb.go deleted file mode 100644 index dd4b9b6e8..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/task.pb.go +++ /dev/null @@ -1,880 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: task.proto - -package pb - -import ( - context "context" - fmt "fmt" - math "math" - - proto "github.com/golang/protobuf/proto" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type CreateTaskRequest struct { - // id of job(jod will split to one more task) to split - JobId *wrappers.StringValue `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - // node(task run in node) id - NodeId *wrappers.StringValue `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - // describe where the task running eg.[runtime|pilot] - Target *wrappers.StringValue `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` - // directive, a kv string, describe the info of running the action - TaskAction *wrappers.StringValue `protobuf:"bytes,4,opt,name=task_action,json=taskAction,proto3" json:"task_action,omitempty"` - // describe the action of the task eg.[WaitFrontgateAvailable|PingFrontgate|AttachVolumes|StartInstances|...] - Directive *wrappers.StringValue `protobuf:"bytes,5,opt,name=directive,proto3" json:"directive,omitempty"` - // allow failure or not - FailureAllowed *wrappers.BoolValue `protobuf:"bytes,6,opt,name=failure_allowed,json=failureAllowed,proto3" json:"failure_allowed,omitempty"` - // task status eg.[running|success|failed|pending] - Status *wrappers.StringValue `protobuf:"bytes,7,opt,name=status,proto3" json:"status,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateTaskRequest) Reset() { *m = CreateTaskRequest{} } -func (m *CreateTaskRequest) String() string { return proto.CompactTextString(m) } -func (*CreateTaskRequest) ProtoMessage() {} -func (*CreateTaskRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ce5d8dd45b4a91ff, []int{0} -} - -func (m *CreateTaskRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateTaskRequest.Unmarshal(m, b) -} -func (m *CreateTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateTaskRequest.Marshal(b, m, deterministic) -} -func (m *CreateTaskRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateTaskRequest.Merge(m, src) -} -func (m *CreateTaskRequest) XXX_Size() int { - return xxx_messageInfo_CreateTaskRequest.Size(m) -} -func (m *CreateTaskRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateTaskRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateTaskRequest proto.InternalMessageInfo - -func (m *CreateTaskRequest) GetJobId() *wrappers.StringValue { - if m != nil { - return m.JobId - } - return nil -} - -func (m *CreateTaskRequest) GetNodeId() *wrappers.StringValue { - if m != nil { - return m.NodeId - } - return nil -} - -func (m *CreateTaskRequest) GetTarget() *wrappers.StringValue { - if m != nil { - return m.Target - } - return nil -} - -func (m *CreateTaskRequest) GetTaskAction() *wrappers.StringValue { - if m != nil { - return m.TaskAction - } - return nil -} - -func (m *CreateTaskRequest) GetDirective() *wrappers.StringValue { - if m != nil { - return m.Directive - } - return nil -} - -func (m *CreateTaskRequest) GetFailureAllowed() *wrappers.BoolValue { - if m != nil { - return m.FailureAllowed - } - return nil -} - -func (m *CreateTaskRequest) GetStatus() *wrappers.StringValue { - if m != nil { - return m.Status - } - return nil -} - -type CreateTaskResponse struct { - // id of task created - TaskId *wrappers.StringValue `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - // id of job created - JobId *wrappers.StringValue `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *CreateTaskResponse) Reset() { *m = CreateTaskResponse{} } -func (m *CreateTaskResponse) String() string { return proto.CompactTextString(m) } -func (*CreateTaskResponse) ProtoMessage() {} -func (*CreateTaskResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ce5d8dd45b4a91ff, []int{1} -} - -func (m *CreateTaskResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateTaskResponse.Unmarshal(m, b) -} -func (m *CreateTaskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateTaskResponse.Marshal(b, m, deterministic) -} -func (m *CreateTaskResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateTaskResponse.Merge(m, src) -} -func (m *CreateTaskResponse) XXX_Size() int { - return xxx_messageInfo_CreateTaskResponse.Size(m) -} -func (m *CreateTaskResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CreateTaskResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_CreateTaskResponse proto.InternalMessageInfo - -func (m *CreateTaskResponse) GetTaskId() *wrappers.StringValue { - if m != nil { - return m.TaskId - } - return nil -} - -func (m *CreateTaskResponse) GetJobId() *wrappers.StringValue { - if m != nil { - return m.JobId - } - return nil -} - -type RetryTasksRequest struct { - // ids of task to retry - TaskId []string `protobuf:"bytes,1,rep,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RetryTasksRequest) Reset() { *m = RetryTasksRequest{} } -func (m *RetryTasksRequest) String() string { return proto.CompactTextString(m) } -func (*RetryTasksRequest) ProtoMessage() {} -func (*RetryTasksRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ce5d8dd45b4a91ff, []int{2} -} - -func (m *RetryTasksRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RetryTasksRequest.Unmarshal(m, b) -} -func (m *RetryTasksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RetryTasksRequest.Marshal(b, m, deterministic) -} -func (m *RetryTasksRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RetryTasksRequest.Merge(m, src) -} -func (m *RetryTasksRequest) XXX_Size() int { - return xxx_messageInfo_RetryTasksRequest.Size(m) -} -func (m *RetryTasksRequest) XXX_DiscardUnknown() { - xxx_messageInfo_RetryTasksRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_RetryTasksRequest proto.InternalMessageInfo - -func (m *RetryTasksRequest) GetTaskId() []string { - if m != nil { - return m.TaskId - } - return nil -} - -type RetryTasksResponse struct { - // list of task retried - TaskSet []*Task `protobuf:"bytes,1,rep,name=task_set,json=taskSet,proto3" json:"task_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RetryTasksResponse) Reset() { *m = RetryTasksResponse{} } -func (m *RetryTasksResponse) String() string { return proto.CompactTextString(m) } -func (*RetryTasksResponse) ProtoMessage() {} -func (*RetryTasksResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ce5d8dd45b4a91ff, []int{3} -} - -func (m *RetryTasksResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RetryTasksResponse.Unmarshal(m, b) -} -func (m *RetryTasksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RetryTasksResponse.Marshal(b, m, deterministic) -} -func (m *RetryTasksResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RetryTasksResponse.Merge(m, src) -} -func (m *RetryTasksResponse) XXX_Size() int { - return xxx_messageInfo_RetryTasksResponse.Size(m) -} -func (m *RetryTasksResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RetryTasksResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_RetryTasksResponse proto.InternalMessageInfo - -func (m *RetryTasksResponse) GetTaskSet() []*Task { - if m != nil { - return m.TaskSet - } - return nil -} - -type TaskLayer struct { - // task in task layer, a task layer contain one more task - Tasks []*Task `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` - // a task layer point to another task layer - Child *TaskLayer `protobuf:"bytes,2,opt,name=child,proto3" json:"child,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TaskLayer) Reset() { *m = TaskLayer{} } -func (m *TaskLayer) String() string { return proto.CompactTextString(m) } -func (*TaskLayer) ProtoMessage() {} -func (*TaskLayer) Descriptor() ([]byte, []int) { - return fileDescriptor_ce5d8dd45b4a91ff, []int{4} -} - -func (m *TaskLayer) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TaskLayer.Unmarshal(m, b) -} -func (m *TaskLayer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TaskLayer.Marshal(b, m, deterministic) -} -func (m *TaskLayer) XXX_Merge(src proto.Message) { - xxx_messageInfo_TaskLayer.Merge(m, src) -} -func (m *TaskLayer) XXX_Size() int { - return xxx_messageInfo_TaskLayer.Size(m) -} -func (m *TaskLayer) XXX_DiscardUnknown() { - xxx_messageInfo_TaskLayer.DiscardUnknown(m) -} - -var xxx_messageInfo_TaskLayer proto.InternalMessageInfo - -func (m *TaskLayer) GetTasks() []*Task { - if m != nil { - return m.Tasks - } - return nil -} - -func (m *TaskLayer) GetChild() *TaskLayer { - if m != nil { - return m.Child - } - return nil -} - -type Task struct { - // task id - TaskId *wrappers.StringValue `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - // job id,job will be split to one more task - JobId *wrappers.StringValue `protobuf:"bytes,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - // describe the action of the task eg.[WaitFrontgateAvailable|PingFrontgate|AttachVolumes|StartInstances|...] - TaskAction *wrappers.StringValue `protobuf:"bytes,3,opt,name=task_action,json=taskAction,proto3" json:"task_action,omitempty"` - // task status eg.[running|successful|failed|pending] - Status *wrappers.StringValue `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` - // error code - ErrorCode *wrappers.UInt32Value `protobuf:"bytes,5,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` - // directive,a json string, describe the info of running the task action - Directive *wrappers.StringValue `protobuf:"bytes,6,opt,name=directive,proto3" json:"directive,omitempty"` - // host name of server - Executor *wrappers.StringValue `protobuf:"bytes,7,opt,name=executor,proto3" json:"executor,omitempty"` - // owner path, concat string group_path:user_id - OwnerPath *wrappers.StringValue `protobuf:"bytes,8,opt,name=owner_path,json=ownerPath,proto3" json:"owner_path,omitempty"` - // describe where the task running eg.[runtime|pilot] - Target *wrappers.StringValue `protobuf:"bytes,9,opt,name=target,proto3" json:"target,omitempty"` - // the cluster contain one more node - NodeId *wrappers.StringValue `protobuf:"bytes,10,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` - // the time when task create - CreateTime *timestamp.Timestamp `protobuf:"bytes,11,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // record the status changed time - StatusTime *timestamp.Timestamp `protobuf:"bytes,12,opt,name=status_time,json=statusTime,proto3" json:"status_time,omitempty"` - // allow task run failed or not - FailureAllowed *wrappers.BoolValue `protobuf:"bytes,13,opt,name=failure_allowed,json=failureAllowed,proto3" json:"failure_allowed,omitempty"` - // owner - Owner *wrappers.StringValue `protobuf:"bytes,14,opt,name=owner,proto3" json:"owner,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Task) Reset() { *m = Task{} } -func (m *Task) String() string { return proto.CompactTextString(m) } -func (*Task) ProtoMessage() {} -func (*Task) Descriptor() ([]byte, []int) { - return fileDescriptor_ce5d8dd45b4a91ff, []int{5} -} - -func (m *Task) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Task.Unmarshal(m, b) -} -func (m *Task) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Task.Marshal(b, m, deterministic) -} -func (m *Task) XXX_Merge(src proto.Message) { - xxx_messageInfo_Task.Merge(m, src) -} -func (m *Task) XXX_Size() int { - return xxx_messageInfo_Task.Size(m) -} -func (m *Task) XXX_DiscardUnknown() { - xxx_messageInfo_Task.DiscardUnknown(m) -} - -var xxx_messageInfo_Task proto.InternalMessageInfo - -func (m *Task) GetTaskId() *wrappers.StringValue { - if m != nil { - return m.TaskId - } - return nil -} - -func (m *Task) GetJobId() *wrappers.StringValue { - if m != nil { - return m.JobId - } - return nil -} - -func (m *Task) GetTaskAction() *wrappers.StringValue { - if m != nil { - return m.TaskAction - } - return nil -} - -func (m *Task) GetStatus() *wrappers.StringValue { - if m != nil { - return m.Status - } - return nil -} - -func (m *Task) GetErrorCode() *wrappers.UInt32Value { - if m != nil { - return m.ErrorCode - } - return nil -} - -func (m *Task) GetDirective() *wrappers.StringValue { - if m != nil { - return m.Directive - } - return nil -} - -func (m *Task) GetExecutor() *wrappers.StringValue { - if m != nil { - return m.Executor - } - return nil -} - -func (m *Task) GetOwnerPath() *wrappers.StringValue { - if m != nil { - return m.OwnerPath - } - return nil -} - -func (m *Task) GetTarget() *wrappers.StringValue { - if m != nil { - return m.Target - } - return nil -} - -func (m *Task) GetNodeId() *wrappers.StringValue { - if m != nil { - return m.NodeId - } - return nil -} - -func (m *Task) GetCreateTime() *timestamp.Timestamp { - if m != nil { - return m.CreateTime - } - return nil -} - -func (m *Task) GetStatusTime() *timestamp.Timestamp { - if m != nil { - return m.StatusTime - } - return nil -} - -func (m *Task) GetFailureAllowed() *wrappers.BoolValue { - if m != nil { - return m.FailureAllowed - } - return nil -} - -func (m *Task) GetOwner() *wrappers.StringValue { - if m != nil { - return m.Owner - } - return nil -} - -type DescribeTasksRequest struct { - // query key, support these fields(job_id, task_id, executor, status, owner) - SearchWord *wrappers.StringValue `protobuf:"bytes,1,opt,name=search_word,json=searchWord,proto3" json:"search_word,omitempty"` - // sort key, order by sort_key, default create_time - SortKey *wrappers.StringValue `protobuf:"bytes,2,opt,name=sort_key,json=sortKey,proto3" json:"sort_key,omitempty"` - // value = 0 sort ASC, value = 1 sort DESC - Reverse *wrappers.BoolValue `protobuf:"bytes,3,opt,name=reverse,proto3" json:"reverse,omitempty"` - // data limit per page, default value 20, max value 200 - Limit uint32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` - // data offset, default 0 - Offset uint32 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` - // select columns to display - DisplayColumns []string `protobuf:"bytes,6,rep,name=display_columns,json=displayColumns,proto3" json:"display_columns,omitempty"` - // task ids - TaskId []string `protobuf:"bytes,11,rep,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` - // job ids - JobId []string `protobuf:"bytes,12,rep,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` - // host name of server - Executor *wrappers.StringValue `protobuf:"bytes,13,opt,name=executor,proto3" json:"executor,omitempty"` - // target eg.[runtime|pilot] - Target *wrappers.StringValue `protobuf:"bytes,14,opt,name=target,proto3" json:"target,omitempty"` - // task status eg.[running|successful|failed|pending] - Status []string `protobuf:"bytes,15,rep,name=status,proto3" json:"status,omitempty"` - // owner - Owner []string `protobuf:"bytes,16,rep,name=owner,proto3" json:"owner,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeTasksRequest) Reset() { *m = DescribeTasksRequest{} } -func (m *DescribeTasksRequest) String() string { return proto.CompactTextString(m) } -func (*DescribeTasksRequest) ProtoMessage() {} -func (*DescribeTasksRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ce5d8dd45b4a91ff, []int{6} -} - -func (m *DescribeTasksRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeTasksRequest.Unmarshal(m, b) -} -func (m *DescribeTasksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeTasksRequest.Marshal(b, m, deterministic) -} -func (m *DescribeTasksRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeTasksRequest.Merge(m, src) -} -func (m *DescribeTasksRequest) XXX_Size() int { - return xxx_messageInfo_DescribeTasksRequest.Size(m) -} -func (m *DescribeTasksRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeTasksRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeTasksRequest proto.InternalMessageInfo - -func (m *DescribeTasksRequest) GetSearchWord() *wrappers.StringValue { - if m != nil { - return m.SearchWord - } - return nil -} - -func (m *DescribeTasksRequest) GetSortKey() *wrappers.StringValue { - if m != nil { - return m.SortKey - } - return nil -} - -func (m *DescribeTasksRequest) GetReverse() *wrappers.BoolValue { - if m != nil { - return m.Reverse - } - return nil -} - -func (m *DescribeTasksRequest) GetLimit() uint32 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *DescribeTasksRequest) GetOffset() uint32 { - if m != nil { - return m.Offset - } - return 0 -} - -func (m *DescribeTasksRequest) GetDisplayColumns() []string { - if m != nil { - return m.DisplayColumns - } - return nil -} - -func (m *DescribeTasksRequest) GetTaskId() []string { - if m != nil { - return m.TaskId - } - return nil -} - -func (m *DescribeTasksRequest) GetJobId() []string { - if m != nil { - return m.JobId - } - return nil -} - -func (m *DescribeTasksRequest) GetExecutor() *wrappers.StringValue { - if m != nil { - return m.Executor - } - return nil -} - -func (m *DescribeTasksRequest) GetTarget() *wrappers.StringValue { - if m != nil { - return m.Target - } - return nil -} - -func (m *DescribeTasksRequest) GetStatus() []string { - if m != nil { - return m.Status - } - return nil -} - -func (m *DescribeTasksRequest) GetOwner() []string { - if m != nil { - return m.Owner - } - return nil -} - -type DescribeTasksResponse struct { - // total count of task - TotalCount uint32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - // list of task - TaskSet []*Task `protobuf:"bytes,2,rep,name=task_set,json=taskSet,proto3" json:"task_set,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DescribeTasksResponse) Reset() { *m = DescribeTasksResponse{} } -func (m *DescribeTasksResponse) String() string { return proto.CompactTextString(m) } -func (*DescribeTasksResponse) ProtoMessage() {} -func (*DescribeTasksResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ce5d8dd45b4a91ff, []int{7} -} - -func (m *DescribeTasksResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DescribeTasksResponse.Unmarshal(m, b) -} -func (m *DescribeTasksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DescribeTasksResponse.Marshal(b, m, deterministic) -} -func (m *DescribeTasksResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DescribeTasksResponse.Merge(m, src) -} -func (m *DescribeTasksResponse) XXX_Size() int { - return xxx_messageInfo_DescribeTasksResponse.Size(m) -} -func (m *DescribeTasksResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DescribeTasksResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DescribeTasksResponse proto.InternalMessageInfo - -func (m *DescribeTasksResponse) GetTotalCount() uint32 { - if m != nil { - return m.TotalCount - } - return 0 -} - -func (m *DescribeTasksResponse) GetTaskSet() []*Task { - if m != nil { - return m.TaskSet - } - return nil -} - -func init() { - proto.RegisterType((*CreateTaskRequest)(nil), "openpitrix.CreateTaskRequest") - proto.RegisterType((*CreateTaskResponse)(nil), "openpitrix.CreateTaskResponse") - proto.RegisterType((*RetryTasksRequest)(nil), "openpitrix.RetryTasksRequest") - proto.RegisterType((*RetryTasksResponse)(nil), "openpitrix.RetryTasksResponse") - proto.RegisterType((*TaskLayer)(nil), "openpitrix.TaskLayer") - proto.RegisterType((*Task)(nil), "openpitrix.Task") - proto.RegisterType((*DescribeTasksRequest)(nil), "openpitrix.DescribeTasksRequest") - proto.RegisterType((*DescribeTasksResponse)(nil), "openpitrix.DescribeTasksResponse") -} - -func init() { proto.RegisterFile("task.proto", fileDescriptor_ce5d8dd45b4a91ff) } - -var fileDescriptor_ce5d8dd45b4a91ff = []byte{ - // 950 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x41, 0x8f, 0xdb, 0x44, - 0x14, 0x56, 0x92, 0x8d, 0x77, 0xf3, 0xdc, 0xec, 0xb6, 0xa3, 0xdd, 0x62, 0x45, 0xa5, 0x35, 0x3e, - 0xc0, 0xd2, 0xa6, 0x89, 0xc8, 0x16, 0x81, 0x5a, 0xf5, 0x90, 0x06, 0x09, 0xad, 0x0a, 0x12, 0x4a, - 0x0b, 0x48, 0x5c, 0xcc, 0xc4, 0x7e, 0x49, 0xdc, 0x75, 0x3c, 0x66, 0x66, 0xbc, 0x69, 0x6e, 0xc0, - 0x4f, 0x28, 0x3f, 0x03, 0x89, 0x2b, 0x3f, 0x84, 0x0b, 0x3f, 0x80, 0x0b, 0xff, 0x02, 0xcd, 0x8c, - 0xb3, 0x71, 0x36, 0xdd, 0xae, 0x73, 0xe1, 0x14, 0xf9, 0xcd, 0xf7, 0xcd, 0xbc, 0x79, 0xef, 0x7b, - 0xdf, 0x04, 0x40, 0x52, 0x71, 0xd6, 0x49, 0x39, 0x93, 0x8c, 0x00, 0x4b, 0x31, 0x49, 0x23, 0xc9, - 0xa3, 0xd7, 0xad, 0xbb, 0x13, 0xc6, 0x26, 0x31, 0x76, 0xf5, 0xca, 0x28, 0x1b, 0x77, 0xe7, 0x9c, - 0xa6, 0x29, 0x72, 0x61, 0xb0, 0xad, 0x7b, 0x97, 0xd7, 0x65, 0x34, 0x43, 0x21, 0xe9, 0x2c, 0xcd, - 0x01, 0x77, 0x72, 0x00, 0x4d, 0xa3, 0x2e, 0x4d, 0x12, 0x26, 0xa9, 0x8c, 0x58, 0xb2, 0xa4, 0xb7, - 0xf5, 0x4f, 0xf0, 0x70, 0x82, 0xc9, 0x43, 0x31, 0xa7, 0x93, 0x09, 0xf2, 0x2e, 0x4b, 0x35, 0x62, - 0x13, 0xed, 0xfd, 0x5e, 0x83, 0x5b, 0x03, 0x8e, 0x54, 0xe2, 0x4b, 0x2a, 0xce, 0x86, 0xf8, 0x53, - 0x86, 0x42, 0x92, 0x13, 0xb0, 0x5e, 0xb1, 0x91, 0x1f, 0x85, 0x4e, 0xc5, 0xad, 0x1c, 0xdb, 0xbd, - 0x3b, 0x1d, 0x73, 0x64, 0x67, 0x99, 0x53, 0xe7, 0x85, 0xe4, 0x51, 0x32, 0xf9, 0x8e, 0xc6, 0x19, - 0x0e, 0xeb, 0xaf, 0xd8, 0xe8, 0x34, 0x24, 0x9f, 0xc2, 0x6e, 0xc2, 0x42, 0x54, 0xac, 0x6a, 0x09, - 0x96, 0xa5, 0xc0, 0xa7, 0x21, 0x79, 0x04, 0x96, 0xa4, 0x7c, 0x82, 0xd2, 0xa9, 0x95, 0x61, 0x19, - 0x2c, 0x79, 0x0a, 0xb6, 0x2a, 0xaf, 0x4f, 0x03, 0x75, 0x1b, 0x67, 0xa7, 0x04, 0x55, 0xf7, 0xa3, - 0xaf, 0xf1, 0xe4, 0x31, 0x34, 0xc2, 0x88, 0x63, 0x20, 0xa3, 0x73, 0x74, 0xea, 0x25, 0xc8, 0x2b, - 0x38, 0x19, 0xc0, 0xc1, 0x98, 0x46, 0x71, 0xc6, 0xd1, 0xa7, 0x71, 0xcc, 0xe6, 0x18, 0x3a, 0x96, - 0xde, 0xa1, 0xb5, 0xb1, 0xc3, 0x33, 0xc6, 0x62, 0xc3, 0xdf, 0xcf, 0x29, 0x7d, 0xc3, 0x50, 0xb7, - 0x16, 0x92, 0xca, 0x4c, 0x38, 0xbb, 0x65, 0x6e, 0x6d, 0xb0, 0xde, 0xcf, 0x15, 0x20, 0xc5, 0x6e, - 0x89, 0x94, 0x25, 0x02, 0x55, 0xe5, 0x75, 0x31, 0x4a, 0xf6, 0xcb, 0x52, 0xe0, 0xd3, 0xb0, 0xd0, - 0xe5, 0x6a, 0xe9, 0x2e, 0x7b, 0x6d, 0xb8, 0x35, 0x44, 0xc9, 0x17, 0x2a, 0x01, 0xb1, 0xd4, 0xcb, - 0x7b, 0xc5, 0x04, 0x6a, 0xc7, 0x8d, 0xe5, 0x11, 0x5e, 0x1f, 0x48, 0x11, 0x9d, 0xe7, 0xfb, 0x00, - 0xf6, 0x34, 0x5c, 0xa0, 0xd4, 0x78, 0xbb, 0x77, 0xb3, 0xb3, 0x1a, 0x90, 0x8e, 0xbe, 0x9b, 0xde, - 0xf0, 0x05, 0x4a, 0xef, 0x47, 0x68, 0xa8, 0xc0, 0x57, 0x74, 0x81, 0x9c, 0x7c, 0x08, 0x75, 0x15, - 0x17, 0x57, 0xd2, 0xcc, 0x32, 0x79, 0x00, 0xf5, 0x60, 0x1a, 0xc5, 0xcb, 0x9b, 0x1d, 0x5d, 0xc6, - 0xe9, 0xdd, 0x86, 0x06, 0xe3, 0xfd, 0x69, 0xc1, 0x8e, 0x0a, 0xfe, 0x9f, 0x75, 0xbc, 0x2c, 0xe0, - 0xda, 0x96, 0x02, 0x5e, 0xe9, 0x67, 0xa7, 0xbc, 0x7e, 0xc8, 0x13, 0x00, 0xe4, 0x9c, 0x71, 0x3f, - 0x60, 0xe1, 0xd5, 0xba, 0xff, 0xf6, 0x34, 0x91, 0x27, 0xbd, 0x5c, 0xf7, 0x1a, 0x3f, 0x60, 0x21, - 0xae, 0xcf, 0x8c, 0xb5, 0xdd, 0xcc, 0x7c, 0x0e, 0x7b, 0xf8, 0x1a, 0x83, 0x4c, 0x32, 0x5e, 0x4a, - 0xf0, 0x17, 0x68, 0x95, 0x32, 0x9b, 0x27, 0xc8, 0xfd, 0x94, 0xca, 0xa9, 0xb3, 0x57, 0xe6, 0x58, - 0x8d, 0xff, 0x86, 0xca, 0x69, 0xc1, 0x5b, 0x1a, 0x5b, 0x78, 0x4b, 0xc1, 0xc8, 0x60, 0x0b, 0x23, - 0x7b, 0x02, 0x76, 0xa0, 0x67, 0xd3, 0x57, 0x86, 0xed, 0xd8, 0x57, 0x78, 0xc2, 0xcb, 0xa5, 0x9b, - 0x0f, 0xc1, 0xc0, 0x55, 0x40, 0x91, 0x4d, 0x8f, 0x0c, 0xf9, 0xc6, 0xf5, 0x64, 0x03, 0xd7, 0xe4, - 0xb7, 0x38, 0x52, 0x73, 0x6b, 0x47, 0xea, 0x41, 0x5d, 0x17, 0xce, 0xd9, 0x2f, 0x23, 0x62, 0x0d, - 0xf5, 0xfe, 0xad, 0xc1, 0xe1, 0x17, 0x28, 0x02, 0x1e, 0x8d, 0x70, 0xcd, 0x10, 0x9e, 0x82, 0x2d, - 0x90, 0xf2, 0x60, 0xea, 0xcf, 0x19, 0x2f, 0x37, 0x4d, 0x60, 0x08, 0xdf, 0x33, 0x1e, 0x92, 0xcf, - 0x60, 0x4f, 0x30, 0x2e, 0xfd, 0x33, 0x5c, 0x94, 0x9a, 0xa9, 0x5d, 0x85, 0x7e, 0x8e, 0x0b, 0xf2, - 0x08, 0x76, 0x39, 0x9e, 0x23, 0x17, 0x98, 0x4f, 0xd4, 0xbb, 0x2a, 0xb0, 0x84, 0x92, 0x43, 0xa8, - 0xc7, 0xd1, 0x2c, 0x92, 0x7a, 0x96, 0x9a, 0x43, 0xf3, 0x41, 0x6e, 0x83, 0xc5, 0xc6, 0x63, 0xe5, - 0x51, 0x75, 0x1d, 0xce, 0xbf, 0xc8, 0x47, 0x70, 0x10, 0x46, 0x22, 0x8d, 0xe9, 0xc2, 0x0f, 0x58, - 0x9c, 0xcd, 0x12, 0xe1, 0x58, 0xda, 0xf4, 0xf6, 0xf3, 0xf0, 0xc0, 0x44, 0x8b, 0xae, 0x68, 0x17, - 0x5d, 0x91, 0x1c, 0x5d, 0x18, 0xc6, 0x0d, 0x1d, 0xcf, 0x2d, 0xa1, 0x38, 0x24, 0xcd, 0xad, 0x86, - 0x64, 0xa5, 0xf3, 0xfd, 0x2d, 0x74, 0x7e, 0xfb, 0xc2, 0x43, 0x0e, 0x4c, 0x7a, 0xb9, 0x4b, 0x1c, - 0x2e, 0x95, 0x70, 0xd3, 0x64, 0x67, 0x7a, 0x8d, 0x70, 0x74, 0xa9, 0xd5, 0xb9, 0x9b, 0xdf, 0x03, - 0x5b, 0x32, 0x49, 0x63, 0x3f, 0x60, 0x59, 0x22, 0x75, 0xaf, 0x9b, 0x43, 0xd0, 0xa1, 0x81, 0x8a, - 0xac, 0xd9, 0x7d, 0xf5, 0x1a, 0xbb, 0xef, 0xfd, 0x51, 0x03, 0x5b, 0x45, 0xbe, 0xa6, 0x09, 0x9d, - 0x20, 0x27, 0xcf, 0x01, 0x56, 0x2f, 0x1e, 0x79, 0xbf, 0x48, 0xdc, 0xf8, 0xdf, 0xd2, 0xba, 0x7b, - 0xd5, 0x72, 0x9e, 0xea, 0xdf, 0x15, 0x68, 0xae, 0x5d, 0x82, 0xb8, 0x45, 0xc6, 0xdb, 0xa4, 0xdc, - 0xfa, 0xe0, 0x1d, 0x08, 0xb3, 0xad, 0xf7, 0x4b, 0xe5, 0x4d, 0x7f, 0x46, 0xce, 0xbe, 0x44, 0xe9, - 0xea, 0xe7, 0xa7, 0xed, 0x06, 0x34, 0x71, 0xc7, 0x51, 0x2c, 0x91, 0xbb, 0xf3, 0x48, 0x4e, 0x5d, - 0x39, 0x45, 0x81, 0xee, 0x38, 0xc2, 0x38, 0x14, 0xc7, 0xa6, 0xf7, 0x6d, 0x37, 0x17, 0x47, 0xdb, - 0x5d, 0xf6, 0xb1, 0xed, 0x9a, 0x0e, 0xb4, 0x5d, 0x5d, 0xf2, 0x8f, 0xdb, 0x6e, 0x88, 0x63, 0x9a, - 0xc5, 0xd2, 0xe5, 0x28, 0x33, 0x9e, 0xb8, 0x34, 0x8e, 0xcd, 0x09, 0xbf, 0xfe, 0xf5, 0xcf, 0x6f, - 0x55, 0x9b, 0x34, 0xba, 0xe7, 0x9f, 0x74, 0xcd, 0x8b, 0x37, 0x07, 0x58, 0xbd, 0xb4, 0xeb, 0x75, - 0xda, 0x78, 0xaf, 0xd7, 0xeb, 0xb4, 0xf9, 0x40, 0x7b, 0xf7, 0xdf, 0xf4, 0x9b, 0xc4, 0xd6, 0x0b, - 0x85, 0xf3, 0x0e, 0xbd, 0x83, 0x8b, 0xf3, 0xba, 0x5c, 0x2d, 0x3e, 0xae, 0xdc, 0x7f, 0xb6, 0xf3, - 0x43, 0x35, 0x1d, 0x8d, 0x2c, 0xad, 0xb4, 0x93, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x3b, 0x80, - 0x63, 0x5e, 0xf5, 0x0a, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// TaskManagerClient is the client API for TaskManager service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type TaskManagerClient interface { - CreateTask(ctx context.Context, in *CreateTaskRequest, opts ...grpc.CallOption) (*CreateTaskResponse, error) - // Get tasks, can filter with these fields(job_id, task_id, executor, status, owner), default return all tasks - DescribeTasks(ctx context.Context, in *DescribeTasksRequest, opts ...grpc.CallOption) (*DescribeTasksResponse, error) - // Retry tasks - RetryTasks(ctx context.Context, in *RetryTasksRequest, opts ...grpc.CallOption) (*RetryTasksResponse, error) -} - -type taskManagerClient struct { - cc *grpc.ClientConn -} - -func NewTaskManagerClient(cc *grpc.ClientConn) TaskManagerClient { - return &taskManagerClient{cc} -} - -func (c *taskManagerClient) CreateTask(ctx context.Context, in *CreateTaskRequest, opts ...grpc.CallOption) (*CreateTaskResponse, error) { - out := new(CreateTaskResponse) - err := c.cc.Invoke(ctx, "/openpitrix.TaskManager/CreateTask", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *taskManagerClient) DescribeTasks(ctx context.Context, in *DescribeTasksRequest, opts ...grpc.CallOption) (*DescribeTasksResponse, error) { - out := new(DescribeTasksResponse) - err := c.cc.Invoke(ctx, "/openpitrix.TaskManager/DescribeTasks", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *taskManagerClient) RetryTasks(ctx context.Context, in *RetryTasksRequest, opts ...grpc.CallOption) (*RetryTasksResponse, error) { - out := new(RetryTasksResponse) - err := c.cc.Invoke(ctx, "/openpitrix.TaskManager/RetryTasks", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// TaskManagerServer is the server API for TaskManager service. -type TaskManagerServer interface { - CreateTask(context.Context, *CreateTaskRequest) (*CreateTaskResponse, error) - // Get tasks, can filter with these fields(job_id, task_id, executor, status, owner), default return all tasks - DescribeTasks(context.Context, *DescribeTasksRequest) (*DescribeTasksResponse, error) - // Retry tasks - RetryTasks(context.Context, *RetryTasksRequest) (*RetryTasksResponse, error) -} - -// UnimplementedTaskManagerServer can be embedded to have forward compatible implementations. -type UnimplementedTaskManagerServer struct { -} - -func (*UnimplementedTaskManagerServer) CreateTask(ctx context.Context, req *CreateTaskRequest) (*CreateTaskResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateTask not implemented") -} -func (*UnimplementedTaskManagerServer) DescribeTasks(ctx context.Context, req *DescribeTasksRequest) (*DescribeTasksResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeTasks not implemented") -} -func (*UnimplementedTaskManagerServer) RetryTasks(ctx context.Context, req *RetryTasksRequest) (*RetryTasksResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RetryTasks not implemented") -} - -func RegisterTaskManagerServer(s *grpc.Server, srv TaskManagerServer) { - s.RegisterService(&_TaskManager_serviceDesc, srv) -} - -func _TaskManager_CreateTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateTaskRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TaskManagerServer).CreateTask(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.TaskManager/CreateTask", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TaskManagerServer).CreateTask(ctx, req.(*CreateTaskRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TaskManager_DescribeTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeTasksRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TaskManagerServer).DescribeTasks(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.TaskManager/DescribeTasks", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TaskManagerServer).DescribeTasks(ctx, req.(*DescribeTasksRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TaskManager_RetryTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RetryTasksRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TaskManagerServer).RetryTasks(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/openpitrix.TaskManager/RetryTasks", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TaskManagerServer).RetryTasks(ctx, req.(*RetryTasksRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _TaskManager_serviceDesc = grpc.ServiceDesc{ - ServiceName: "openpitrix.TaskManager", - HandlerType: (*TaskManagerServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateTask", - Handler: _TaskManager_CreateTask_Handler, - }, - { - MethodName: "DescribeTasks", - Handler: _TaskManager_DescribeTasks_Handler, - }, - { - MethodName: "RetryTasks", - Handler: _TaskManager_RetryTasks_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "task.proto", -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/task.pb.gw.go b/vendor/openpitrix.io/openpitrix/pkg/pb/task.pb.gw.go deleted file mode 100644 index bd4816d46..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/task.pb.gw.go +++ /dev/null @@ -1,240 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: task.proto - -/* -Package pb is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package pb - -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/status" -) - -// 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 ( - filter_TaskManager_DescribeTasks_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_TaskManager_DescribeTasks_0(ctx context.Context, marshaler runtime.Marshaler, client TaskManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeTasksRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_TaskManager_DescribeTasks_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DescribeTasks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_TaskManager_DescribeTasks_0(ctx context.Context, marshaler runtime.Marshaler, server TaskManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DescribeTasksRequest - var metadata runtime.ServerMetadata - - if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_TaskManager_DescribeTasks_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DescribeTasks(ctx, &protoReq) - return msg, metadata, err - -} - -func request_TaskManager_RetryTasks_0(ctx context.Context, marshaler runtime.Marshaler, client TaskManagerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RetryTasksRequest - 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.RetryTasks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_TaskManager_RetryTasks_0(ctx context.Context, marshaler runtime.Marshaler, server TaskManagerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RetryTasksRequest - 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.RetryTasks(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterTaskManagerHandlerServer registers the http handlers for service TaskManager to "mux". -// UnaryRPC :call TaskManagerServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterTaskManagerHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TaskManagerServer) error { - - mux.Handle("GET", pattern_TaskManager_DescribeTasks_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_TaskManager_DescribeTasks_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_TaskManager_DescribeTasks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_TaskManager_RetryTasks_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.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_TaskManager_RetryTasks_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_TaskManager_RetryTasks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterTaskManagerHandlerFromEndpoint is same as RegisterTaskManagerHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterTaskManagerHandlerFromEndpoint(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 RegisterTaskManagerHandler(ctx, mux, conn) -} - -// RegisterTaskManagerHandler registers the http handlers for service TaskManager to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterTaskManagerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterTaskManagerHandlerClient(ctx, mux, NewTaskManagerClient(conn)) -} - -// RegisterTaskManagerHandlerClient registers the http handlers for service TaskManager -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TaskManagerClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TaskManagerClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "TaskManagerClient" to call the correct interceptors. -func RegisterTaskManagerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TaskManagerClient) error { - - mux.Handle("GET", pattern_TaskManager_DescribeTasks_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_TaskManager_DescribeTasks_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_TaskManager_DescribeTasks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_TaskManager_RetryTasks_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_TaskManager_RetryTasks_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_TaskManager_RetryTasks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_TaskManager_DescribeTasks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "tasks"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_TaskManager_RetryTasks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "tasks", "retry"}, "", runtime.AssumeColonVerbOpt(true))) -) - -var ( - forward_TaskManager_DescribeTasks_0 = runtime.ForwardResponseMessage - - forward_TaskManager_RetryTasks_0 = runtime.ForwardResponseMessage -) diff --git a/vendor/openpitrix.io/openpitrix/pkg/pb/types.pb.go b/vendor/openpitrix.io/openpitrix/pkg/pb/types.pb.go deleted file mode 100644 index 57dc1ab48..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/pb/types.pb.go +++ /dev/null @@ -1,179 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: types.proto - -package pb - -import ( - fmt "fmt" - math "math" - - proto "github.com/golang/protobuf/proto" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - wrappers "github.com/golang/protobuf/ptypes/wrappers" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type ErrorDetail struct { - ErrorName string `protobuf:"bytes,1,opt,name=error_name,json=errorName,proto3" json:"error_name,omitempty"` - Cause string `protobuf:"bytes,2,opt,name=cause,proto3" json:"cause,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ErrorDetail) Reset() { *m = ErrorDetail{} } -func (m *ErrorDetail) String() string { return proto.CompactTextString(m) } -func (*ErrorDetail) ProtoMessage() {} -func (*ErrorDetail) Descriptor() ([]byte, []int) { - return fileDescriptor_d938547f84707355, []int{0} -} - -func (m *ErrorDetail) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ErrorDetail.Unmarshal(m, b) -} -func (m *ErrorDetail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ErrorDetail.Marshal(b, m, deterministic) -} -func (m *ErrorDetail) XXX_Merge(src proto.Message) { - xxx_messageInfo_ErrorDetail.Merge(m, src) -} -func (m *ErrorDetail) XXX_Size() int { - return xxx_messageInfo_ErrorDetail.Size(m) -} -func (m *ErrorDetail) XXX_DiscardUnknown() { - xxx_messageInfo_ErrorDetail.DiscardUnknown(m) -} - -var xxx_messageInfo_ErrorDetail proto.InternalMessageInfo - -func (m *ErrorDetail) GetErrorName() string { - if m != nil { - return m.ErrorName - } - return "" -} - -func (m *ErrorDetail) GetCause() string { - if m != nil { - return m.Cause - } - return "" -} - -type ResourceCategory struct { - CategoryId *wrappers.StringValue `protobuf:"bytes,1,opt,name=category_id,json=categoryId,proto3" json:"category_id,omitempty"` - Name *wrappers.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Locale *wrappers.StringValue `protobuf:"bytes,3,opt,name=locale,proto3" json:"locale,omitempty"` - Status *wrappers.StringValue `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` - CreateTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - StatusTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=status_time,json=statusTime,proto3" json:"status_time,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ResourceCategory) Reset() { *m = ResourceCategory{} } -func (m *ResourceCategory) String() string { return proto.CompactTextString(m) } -func (*ResourceCategory) ProtoMessage() {} -func (*ResourceCategory) Descriptor() ([]byte, []int) { - return fileDescriptor_d938547f84707355, []int{1} -} - -func (m *ResourceCategory) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ResourceCategory.Unmarshal(m, b) -} -func (m *ResourceCategory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ResourceCategory.Marshal(b, m, deterministic) -} -func (m *ResourceCategory) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceCategory.Merge(m, src) -} -func (m *ResourceCategory) XXX_Size() int { - return xxx_messageInfo_ResourceCategory.Size(m) -} -func (m *ResourceCategory) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceCategory.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceCategory proto.InternalMessageInfo - -func (m *ResourceCategory) GetCategoryId() *wrappers.StringValue { - if m != nil { - return m.CategoryId - } - return nil -} - -func (m *ResourceCategory) GetName() *wrappers.StringValue { - if m != nil { - return m.Name - } - return nil -} - -func (m *ResourceCategory) GetLocale() *wrappers.StringValue { - if m != nil { - return m.Locale - } - return nil -} - -func (m *ResourceCategory) GetStatus() *wrappers.StringValue { - if m != nil { - return m.Status - } - return nil -} - -func (m *ResourceCategory) GetCreateTime() *timestamp.Timestamp { - if m != nil { - return m.CreateTime - } - return nil -} - -func (m *ResourceCategory) GetStatusTime() *timestamp.Timestamp { - if m != nil { - return m.StatusTime - } - return nil -} - -func init() { - proto.RegisterType((*ErrorDetail)(nil), "openpitrix.ErrorDetail") - proto.RegisterType((*ResourceCategory)(nil), "openpitrix.ResourceCategory") -} - -func init() { proto.RegisterFile("types.proto", fileDescriptor_d938547f84707355) } - -var fileDescriptor_d938547f84707355 = []byte{ - // 282 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0x3d, 0x4f, 0xc3, 0x30, - 0x10, 0x86, 0xd5, 0xd0, 0x56, 0xea, 0x65, 0x41, 0x16, 0x43, 0x14, 0xf1, 0xa5, 0x4e, 0x4c, 0x29, - 0x02, 0x36, 0xc4, 0x52, 0x60, 0x60, 0x61, 0x08, 0x88, 0x81, 0x25, 0x72, 0xd2, 0x23, 0xb2, 0x94, - 0xc4, 0xd6, 0xf9, 0x22, 0xe8, 0x4f, 0xe6, 0x5f, 0x20, 0xdb, 0xc9, 0x02, 0x03, 0xd9, 0xec, 0x7b, - 0x9f, 0xe7, 0xf4, 0xea, 0x20, 0xe6, 0xbd, 0x41, 0x9b, 0x19, 0xd2, 0xac, 0x05, 0x68, 0x83, 0x9d, - 0x51, 0x4c, 0xea, 0x2b, 0x3d, 0xad, 0xb5, 0xae, 0x1b, 0xdc, 0xf8, 0xa4, 0xec, 0x3f, 0x36, 0x9f, - 0x24, 0x8d, 0x41, 0x1a, 0xd8, 0xf4, 0xec, 0x77, 0xce, 0xaa, 0x45, 0xcb, 0xb2, 0x35, 0x01, 0x58, - 0x6f, 0x21, 0x7e, 0x24, 0xd2, 0xf4, 0x80, 0x2c, 0x55, 0x23, 0x4e, 0x00, 0xd0, 0x7d, 0x8b, 0x4e, - 0xb6, 0x98, 0xcc, 0xce, 0x67, 0x17, 0xab, 0x7c, 0xe5, 0x27, 0xcf, 0xb2, 0x45, 0x71, 0x04, 0x8b, - 0x4a, 0xf6, 0x16, 0x93, 0xc8, 0x27, 0xe1, 0xb3, 0xfe, 0x8e, 0xe0, 0x30, 0x47, 0xab, 0x7b, 0xaa, - 0xf0, 0x5e, 0x32, 0xd6, 0x9a, 0xf6, 0xe2, 0x0e, 0xe2, 0x6a, 0x78, 0x17, 0x6a, 0xe7, 0x57, 0xc5, - 0x57, 0xc7, 0x59, 0xe8, 0x93, 0x8d, 0x7d, 0xb2, 0x17, 0x26, 0xd5, 0xd5, 0x6f, 0xb2, 0xe9, 0x31, - 0x87, 0x51, 0x78, 0xda, 0x89, 0x4b, 0x98, 0xfb, 0x0a, 0xd1, 0x04, 0xcf, 0x93, 0xe2, 0x06, 0x96, - 0x8d, 0xae, 0x64, 0x83, 0xc9, 0xc1, 0x04, 0x67, 0x60, 0x9d, 0x65, 0x59, 0x72, 0x6f, 0x93, 0xf9, - 0x14, 0x2b, 0xb0, 0xe2, 0x16, 0xe2, 0x8a, 0x50, 0x32, 0x16, 0xee, 0x9e, 0xc9, 0xc2, 0xab, 0xe9, - 0x1f, 0xf5, 0x75, 0x3c, 0x76, 0x0e, 0x01, 0x77, 0x03, 0x27, 0x87, 0x35, 0x41, 0x5e, 0xfe, 0x2f, - 0x07, 0xdc, 0x0d, 0xb6, 0xf3, 0xf7, 0xc8, 0x94, 0xe5, 0xd2, 0x53, 0xd7, 0x3f, 0x01, 0x00, 0x00, - 0xff, 0xff, 0xf2, 0xd9, 0xc8, 0xa8, 0x18, 0x02, 0x00, 0x00, -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/sender/owner_path.go b/vendor/openpitrix.io/openpitrix/pkg/sender/owner_path.go deleted file mode 100644 index 4003b00b8..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/sender/owner_path.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2018 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package sender - -import ( - "strings" - - "github.com/golang/protobuf/ptypes/wrappers" -) - -// ${group_path}:${user_id} -type OwnerPath string - -func (o OwnerPath) match(accessPath OwnerPath) bool { - if string(accessPath) == "" { - return true - } - return strings.HasPrefix(string(o), string(accessPath)) -} - -func (o OwnerPath) CheckOwnerPathPermission(ownerPaths ...string) bool { - for _, ownerPath := range ownerPaths { - if !OwnerPath(ownerPath).match(o) { - return false - } - } - return true -} - -func (o OwnerPath) CheckPermission(s *Sender) bool { - return o.match(s.GetAccessPath()) -} - -func (o OwnerPath) Owner() string { - s := strings.Split(string(o), ":") - if len(s) < 2 { - return "" - } - return s[1] -} - -func (o OwnerPath) ToProtoString() *wrappers.StringValue { - return &wrappers.StringValue{Value: string(o)} -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/sender/sender.go b/vendor/openpitrix.io/openpitrix/pkg/sender/sender.go deleted file mode 100644 index 10b90ff44..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/sender/sender.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2018 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package sender - -import ( - "fmt" - - "encoding/json" - - "openpitrix.io/openpitrix/pkg/constants" -) - -type Sender struct { - UserId string `json:"user_id,omitempty"` - OwnerPath OwnerPath `json:"owner_path,omitempty"` - AccessPath OwnerPath `json:"access_path,omitempty"` -} - -func GetSystemSender() *Sender { - return &Sender{ - UserId: constants.UserSystem, - OwnerPath: ":" + constants.UserSystem, - AccessPath: "", - } -} - -func New(userId string, ownerPath, accessPath OwnerPath) *Sender { - return &Sender{ - UserId: userId, - OwnerPath: ownerPath, - AccessPath: accessPath, - } -} - -func (s Sender) GetOwnerPath() OwnerPath { - if len(s.OwnerPath) > 0 { - return s.OwnerPath - } - // group1.group2.group3:user1 - return OwnerPath(fmt.Sprintf(":%s", s.UserId)) -} - -func (s Sender) GetAccessPath() OwnerPath { - // system can access all data - if s.UserId == constants.UserSystem { - return OwnerPath("") - } - - return s.AccessPath -} - -func (s *Sender) ToJson() string { - b, err := json.Marshal(s) - if err != nil { - panic(err) - } - return string(b) -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/util/ctxutil/ctx.go b/vendor/openpitrix.io/openpitrix/pkg/util/ctxutil/ctx.go deleted file mode 100644 index 2de9c1f1b..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/util/ctxutil/ctx.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2018 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package ctxutil - -import ( - "context" - - "google.golang.org/grpc/metadata" -) - -const ( - messageIdKey = "x-message-id" - requestIdKey = "x-request-id" - localeKey = "locale" -) - -type getMetadataFromContext func(ctx context.Context) (md metadata.MD, ok bool) - -var getMetadataFromContextFunc = []getMetadataFromContext{ - metadata.FromOutgoingContext, - metadata.FromIncomingContext, -} - -func GetValueFromContext(ctx context.Context, key string) []string { - if ctx == nil { - return []string{} - } - for _, f := range getMetadataFromContextFunc { - md, ok := f(ctx) - if !ok { - continue - } - m, ok := md[key] - if ok && len(m) > 0 { - return m - } - } - m, ok := ctx.Value(key).([]string) - if ok && len(m) > 0 { - return m - } - s, ok := ctx.Value(key).(string) - if ok && len(s) > 0 { - return []string{s} - } - return []string{} -} - -func Copy(src, dst context.Context) context.Context { - ContextWithSender(dst, GetSender(src)) - SetMessageId(dst, GetMessageId(src)) - SetRequestId(dst, GetRequestId(src)) - return SetLocale(dst, GetLocale(src)) -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/util/ctxutil/locale.go b/vendor/openpitrix.io/openpitrix/pkg/util/ctxutil/locale.go deleted file mode 100644 index 19c2be621..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/util/ctxutil/locale.go +++ /dev/null @@ -1,25 +0,0 @@ -package ctxutil - -import ( - "context" - - "google.golang.org/grpc/metadata" -) - -func GetLocale(ctx context.Context) string { - locale := GetValueFromContext(ctx, localeKey) - if len(locale) == 0 { - return "" - } - return locale[0] -} - -func SetLocale(ctx context.Context, locale string) context.Context { - ctx = context.WithValue(ctx, localeKey, []string{locale}) - md, ok := metadata.FromOutgoingContext(ctx) - if !ok { - md = metadata.MD{} - } - md[localeKey] = []string{locale} - return metadata.NewOutgoingContext(ctx, md) -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/util/ctxutil/message.go b/vendor/openpitrix.io/openpitrix/pkg/util/ctxutil/message.go deleted file mode 100644 index aca8a3238..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/util/ctxutil/message.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2018 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package ctxutil - -import ( - "context" - - "google.golang.org/grpc/metadata" -) - -func GetMessageId(ctx context.Context) []string { - return GetValueFromContext(ctx, messageIdKey) -} - -func SetMessageId(ctx context.Context, messageId []string) context.Context { - ctx = context.WithValue(ctx, messageIdKey, messageId) - md, ok := metadata.FromOutgoingContext(ctx) - if !ok { - md = metadata.MD{} - } - md[messageIdKey] = messageId - return metadata.NewOutgoingContext(ctx, md) -} - -func AddMessageId(ctx context.Context, messageId ...string) context.Context { - m := GetMessageId(ctx) - m = append(m, messageId...) - return SetMessageId(ctx, m) -} - -func ClearMessageId(ctx context.Context) context.Context { - return SetMessageId(ctx, []string{}) -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/util/ctxutil/request.go b/vendor/openpitrix.io/openpitrix/pkg/util/ctxutil/request.go deleted file mode 100644 index 6e8d3107b..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/util/ctxutil/request.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2018 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package ctxutil - -import ( - "context" - - "google.golang.org/grpc/metadata" -) - -func GetRequestId(ctx context.Context) string { - rid := GetValueFromContext(ctx, requestIdKey) - if len(rid) == 0 { - return "" - } - return rid[0] -} - -func SetRequestId(ctx context.Context, requestId string) context.Context { - ctx = context.WithValue(ctx, requestIdKey, []string{requestId}) - md, ok := metadata.FromOutgoingContext(ctx) - if !ok { - md = metadata.MD{} - } - md[requestIdKey] = []string{requestId} - return metadata.NewOutgoingContext(ctx, md) -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/util/ctxutil/sender.go b/vendor/openpitrix.io/openpitrix/pkg/util/ctxutil/sender.go deleted file mode 100644 index c2ab24482..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/util/ctxutil/sender.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2018 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package ctxutil - -import ( - "context" - "encoding/json" - - "google.golang.org/grpc/metadata" - - "openpitrix.io/openpitrix/pkg/sender" -) - -const ( - SenderKey = "sender" - TokenType = "Bearer" -) - -func GetSender(ctx context.Context) *sender.Sender { - values := GetValueFromContext(ctx, SenderKey) - if len(values) == 0 || len(values[0]) == 0 { - return nil - } - s := sender.Sender{} - err := json.Unmarshal([]byte(values[0]), &s) - if err != nil { - panic(err) - } - return &s -} - -func ContextWithSender(ctx context.Context, user *sender.Sender) context.Context { - if user == nil { - return ctx - } - ctx = context.WithValue(ctx, SenderKey, []string{user.ToJson()}) - md, ok := metadata.FromOutgoingContext(ctx) - if !ok { - md = metadata.MD{} - } - md[SenderKey] = []string{user.ToJson()} - return metadata.NewOutgoingContext(ctx, md) -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/util/pbutil/pb.go b/vendor/openpitrix.io/openpitrix/pkg/util/pbutil/pb.go deleted file mode 100644 index bc56a56f8..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/util/pbutil/pb.go +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright 2017 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package pbutil - -import ( - "context" - "time" - - "github.com/golang/protobuf/ptypes" - "github.com/golang/protobuf/ptypes/timestamp" - "github.com/golang/protobuf/ptypes/wrappers" - - "openpitrix.io/openpitrix/pkg/db" - "openpitrix.io/openpitrix/pkg/logger" -) - -type RequestHadOffset interface { - GetOffset() uint32 -} - -type RequestHadLimit interface { - GetLimit() uint32 -} - -const ( - DefaultOffset = uint64(0) - DefaultLimit = uint64(20) -) - -func GetOffsetFromRequest(req RequestHadOffset) uint64 { - n := req.GetOffset() - if n == 0 { - return DefaultOffset - } - return db.GetOffset(uint64(n)) -} - -func GetLimitFromRequest(req RequestHadLimit) uint64 { - n := req.GetLimit() - if n == 0 { - return DefaultLimit - } - return db.GetLimit(uint64(n)) -} - -func GetTime(t *timestamp.Timestamp) (tt time.Time) { - if t == nil { - return time.Now() - } else { - return FromProtoTimestamp(t) - } -} - -func FromProtoTimestamp(t *timestamp.Timestamp) (tt time.Time) { - tt, err := ptypes.Timestamp(t) - if err != nil { - logger.Critical(nil, "Cannot convert timestamp [T] to time.Time [%+v]: %+v", t, err) - panic(err) - } - return -} - -func ToProtoTimestamp(t time.Time) (tt *timestamp.Timestamp) { - if t.IsZero() { - return nil - } - tt, err := ptypes.TimestampProto(t) - if err != nil { - logger.Critical(nil, "Cannot convert time.Time [%+v] to ToProtoTimestamp[T]: %+v", t, err) - panic(err) - } - return -} - -func ToProtoString(str string) *wrappers.StringValue { - return &wrappers.StringValue{Value: str} -} - -func ToProtoUInt32(uint32 uint32) *wrappers.UInt32Value { - return &wrappers.UInt32Value{Value: uint32} -} - -func ToProtoInt32(i int32) *wrappers.Int32Value { - return &wrappers.Int32Value{Value: i} -} - -func ToProtoBool(bool bool) *wrappers.BoolValue { - return &wrappers.BoolValue{Value: bool} -} - -func ToProtoBytes(bytes []byte) *wrappers.BytesValue { - return &wrappers.BytesValue{Value: bytes} -} - -type DescribeResponse interface { - GetTotalCount() uint32 -} - -type DescribeApi interface { - SetRequest(ctx context.Context, req interface{}, limit, offset uint32) error - Describe(ctx context.Context, req interface{}, advancedParams ...string) (DescribeResponse, error) -} - -func DescribeAllResponses(ctx context.Context, describeApi DescribeApi, req interface{}, advancedParams ...string) ([]DescribeResponse, error) { - limit := uint32(db.DefaultSelectLimit) - offset := uint32(0) - var responses []DescribeResponse - - if err := describeApi.SetRequest(ctx, req, limit, offset); err != nil { - return nil, err - } - response, err := describeApi.Describe(ctx, req, advancedParams...) - if err != nil { - return nil, err - } - - totalCount := response.GetTotalCount() - - responses = append(responses, response) - offset = offset + db.DefaultSelectLimit - for { - if totalCount > uint32(offset) { - if err := describeApi.SetRequest(ctx, req, limit, offset); err != nil { - return nil, err - } - response, err = describeApi.Describe(ctx, req) - if err != nil { - return nil, err - } - responses = append(responses, response) - offset = offset + db.DefaultSelectLimit - } else { - break - } - } - return responses, nil -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/util/reflectutil/reflect.go b/vendor/openpitrix.io/openpitrix/pkg/util/reflectutil/reflect.go deleted file mode 100644 index ff90f1d84..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/util/reflectutil/reflect.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2018 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package reflectutil - -import "reflect" - -func In(value interface{}, container interface{}) bool { - containerValue := reflect.ValueOf(container) - switch reflect.TypeOf(container).Kind() { - case reflect.Slice, reflect.Array: - for i := 0; i < containerValue.Len(); i++ { - if containerValue.Index(i).Interface() == value { - return true - } - } - case reflect.Map: - if containerValue.MapIndex(reflect.ValueOf(value)).IsValid() { - return true - } - default: - return false - } - return false -} - -func ValueIsNil(value reflect.Value) bool { - k := value.Kind() - switch k { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.Interface, reflect.Slice: - return value.IsNil() - case reflect.Invalid: - return true - } - // base type had default value, is not nil - return false -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/util/stringutil/base64.go b/vendor/openpitrix.io/openpitrix/pkg/util/stringutil/base64.go deleted file mode 100644 index cb8eef431..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/util/stringutil/base64.go +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2018 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package stringutil - -import ( - "bytes" - "encoding/base64" - "io/ioutil" -) - -func DecodeBase64(i string) ([]byte, error) { - return ioutil.ReadAll(base64.NewDecoder(base64.StdEncoding, bytes.NewBufferString(i))) -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/util/stringutil/string.go b/vendor/openpitrix.io/openpitrix/pkg/util/stringutil/string.go deleted file mode 100644 index e50fa5e75..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/util/stringutil/string.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2018 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package stringutil - -import ( - "unicode/utf8" - - "github.com/asaskevich/govalidator" -) - -// Creates an slice of slice values not included in the other given slice. -func Diff(base, exclude []string) (result []string) { - excludeMap := make(map[string]bool) - for _, s := range exclude { - excludeMap[s] = true - } - for _, s := range base { - if !excludeMap[s] { - result = append(result, s) - } - } - return result -} - -func Unique(ss []string) (result []string) { - smap := make(map[string]bool) - for _, s := range ss { - smap[s] = true - } - for s := range smap { - result = append(result, s) - } - return result -} - -func CamelCaseToUnderscore(str string) string { - return govalidator.CamelCaseToUnderscore(str) -} - -func UnderscoreToCamelCase(str string) string { - return govalidator.UnderscoreToCamelCase(str) -} - -func FindString(array []string, str string) int { - for index, s := range array { - if str == s { - return index - } - } - return -1 -} - -func StringIn(str string, array []string) bool { - return FindString(array, str) > -1 -} - -func Reverse(s string) string { - size := len(s) - buf := make([]byte, size) - for start := 0; start < size; { - r, n := utf8.DecodeRuneInString(s[start:]) - start += n - utf8.EncodeRune(buf[size-start:], r) - } - return string(buf) -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/util/yamlutil/yaml.go b/vendor/openpitrix.io/openpitrix/pkg/util/yamlutil/yaml.go deleted file mode 100644 index e86a40c18..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/util/yamlutil/yaml.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2018 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -package yamlutil - -import ( - "github.com/ghodss/yaml" -) - -// Marshals the object into JSON then converts JSON to YAML and returns the -// YAML. -func Encode(o interface{}) ([]byte, error) { - return yaml.Marshal(o) -} - -// Converts YAML to JSON then uses JSON to unmarshal into an object. -func Decode(y []byte, o interface{}) error { - return yaml.Unmarshal(y, o) -} diff --git a/vendor/openpitrix.io/openpitrix/pkg/version/.gitignore b/vendor/openpitrix.io/openpitrix/pkg/version/.gitignore deleted file mode 100644 index 0c28e42de..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/version/.gitignore +++ /dev/null @@ -1 +0,0 @@ -z_update_version.go diff --git a/vendor/openpitrix.io/openpitrix/pkg/version/Makefile b/vendor/openpitrix.io/openpitrix/pkg/version/Makefile deleted file mode 100644 index eea3389f1..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/version/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright 2017 The OpenPitrix Authors. All rights reserved. -# Use of this source code is governed by a Apache license -# that can be found in the LICENSE file. - -default: - go generate - -clean: - -rm z_update_version.go diff --git a/vendor/openpitrix.io/openpitrix/pkg/version/version.go b/vendor/openpitrix.io/openpitrix/pkg/version/version.go deleted file mode 100644 index d294af078..000000000 --- a/vendor/openpitrix.io/openpitrix/pkg/version/version.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2017 The OpenPitrix Authors. All rights reserved. -// Use of this source code is governed by a Apache license -// that can be found in the LICENSE file. - -//go:generate go run gen_helper.go -//go:generate go fmt - -package version - -import "fmt" - -var ( - ShortVersion = "dev" - GitSha1Version = "git-sha1" - BuildDate = "2017-01-01" -) - -func PrintVersionInfo(printer func(string, ...interface{})) { - printer("Release OpVersion: %s", ShortVersion) - printer("Git Commit Hash: %s", GitSha1Version) - printer("Build Time: %s", BuildDate) -} - -func GetVersionString() string { - return fmt.Sprintf("%s; git: %s; build time: %s", ShortVersion, GitSha1Version, BuildDate) -} diff --git a/vendor/sigs.k8s.io/kustomize/LICENSE b/vendor/sigs.k8s.io/kustomize/LICENSE new file mode 100644 index 000000000..8dada3eda --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/sigs.k8s.io/kustomize/pkg/commands/build/build.go b/vendor/sigs.k8s.io/kustomize/pkg/commands/build/build.go new file mode 100644 index 000000000..e62747e32 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/commands/build/build.go @@ -0,0 +1,129 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package build + +import ( + "io" + + "github.com/pkg/errors" + "github.com/spf13/cobra" + "sigs.k8s.io/kustomize/pkg/constants" + "sigs.k8s.io/kustomize/pkg/fs" + "sigs.k8s.io/kustomize/pkg/ifc/transformer" + "sigs.k8s.io/kustomize/pkg/loader" + "sigs.k8s.io/kustomize/pkg/resmap" + "sigs.k8s.io/kustomize/pkg/target" +) + +// Options contain the options for running a build +type Options struct { + kustomizationPath string + outputPath string +} + +// NewOptions creates a Options object +func NewOptions(p, o string) *Options { + return &Options{ + kustomizationPath: p, + outputPath: o, + } +} + +var examples = ` +Use the file somedir/kustomization.yaml to generate a set of api resources: + build somedir + +Use a url pointing to a remote directory/kustomization.yaml to generate a set of api resources: + build url +The url should follow hashicorp/go-getter URL format described in +https://github.com/hashicorp/go-getter#url-format + +url examples: + sigs.k8s.io/kustomize//examples/multibases?ref=v1.0.6 + github.com/Liujingfang1/mysql + github.com/Liujingfang1/kustomize//examples/helloWorld?ref=repoUrl2 +` + +// NewCmdBuild creates a new build command. +func NewCmdBuild( + out io.Writer, fs fs.FileSystem, + rf *resmap.Factory, + ptf transformer.Factory) *cobra.Command { + var o Options + + cmd := &cobra.Command{ + Use: "build [path]", + Short: "Print current configuration per contents of " + constants.KustomizationFileNames[0], + Example: examples, + SilenceUsage: true, + RunE: func(cmd *cobra.Command, args []string) error { + err := o.Validate(args) + if err != nil { + return err + } + return o.RunBuild(out, fs, rf, ptf) + }, + } + cmd.Flags().StringVarP( + &o.outputPath, + "output", "o", "", + "If specified, write the build output to this path.") + return cmd +} + +// Validate validates build command. +func (o *Options) Validate(args []string) error { + if len(args) > 1 { + return errors.New("specify one path to " + constants.KustomizationFileNames[0]) + } + if len(args) == 0 { + o.kustomizationPath = "./" + } else { + o.kustomizationPath = args[0] + } + + return nil +} + +// RunBuild runs build command. +func (o *Options) RunBuild( + out io.Writer, fSys fs.FileSystem, + rf *resmap.Factory, ptf transformer.Factory) error { + ldr, err := loader.NewLoader(o.kustomizationPath, fSys) + if err != nil { + return err + } + defer ldr.Cleanup() + kt, err := target.NewKustTarget(ldr, rf, ptf) + if err != nil { + return err + } + allResources, err := kt.MakeCustomizedResMap() + if err != nil { + return err + } + // Output the objects. + res, err := allResources.EncodeAsYaml() + if err != nil { + return err + } + if o.outputPath != "" { + return fSys.WriteFile(o.outputPath, res) + } + _, err = out.Write(res) + return err +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/constants/constants.go b/vendor/sigs.k8s.io/kustomize/pkg/constants/constants.go new file mode 100644 index 000000000..dd50230fb --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/constants/constants.go @@ -0,0 +1,28 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package constants holds global constants for the kustomize tool. +package constants + +// KustomizationFileNames is a list of filenames that can be recognized and consumbed +// by Kustomize. +// In each directory, Kustomize searches for file with the name in this list. +// Only one match is allowed. +var KustomizationFileNames = []string{ + "kustomization.yaml", + "kustomization.yml", + "Kustomization", +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/expansion/expand.go b/vendor/sigs.k8s.io/kustomize/pkg/expansion/expand.go new file mode 100644 index 000000000..de55e4614 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/expansion/expand.go @@ -0,0 +1,121 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package expansion provides functions find and replace $(FOO) style variables in strings. +package expansion + +import ( + "bytes" +) + +const ( + operator = '$' + referenceOpener = '(' + referenceCloser = ')' +) + +// syntaxWrap returns the input string wrapped by the expansion syntax. +func syntaxWrap(input string) string { + return string(operator) + string(referenceOpener) + input + string(referenceCloser) +} + +// MappingFuncFor returns a mapping function for use with Expand that +// implements the expansion semantics defined in the expansion spec; it +// returns the input string wrapped in the expansion syntax if no mapping +// for the input is found. +func MappingFuncFor( + counts map[string]int, + context ...map[string]string) func(string) string { + return func(input string) string { + for _, vars := range context { + val, ok := vars[input] + if ok { + counts[input]++ + return val + } + } + return syntaxWrap(input) + } +} + +// Expand replaces variable references in the input string according to +// the expansion spec using the given mapping function to resolve the +// values of variables. +func Expand(input string, mapping func(string) string) string { + var buf bytes.Buffer + checkpoint := 0 + for cursor := 0; cursor < len(input); cursor++ { + if input[cursor] == operator && cursor+1 < len(input) { + // Copy the portion of the input string since the last + // checkpoint into the buffer + buf.WriteString(input[checkpoint:cursor]) + + // Attempt to read the variable name as defined by the + // syntax from the input string + read, isVar, advance := tryReadVariableName(input[cursor+1:]) + + if isVar { + // We were able to read a variable name correctly; + // apply the mapping to the variable name and copy the + // bytes into the buffer + buf.WriteString(mapping(read)) + } else { + // Not a variable name; copy the read bytes into the buffer + buf.WriteString(read) + } + + // Advance the cursor in the input string to account for + // bytes consumed to read the variable name expression + cursor += advance + + // Advance the checkpoint in the input string + checkpoint = cursor + 1 + } + } + + // Return the buffer and any remaining unwritten bytes in the + // input string. + return buf.String() + input[checkpoint:] +} + +// tryReadVariableName attempts to read a variable name from the input +// string and returns the content read from the input, whether that content +// represents a variable name to perform mapping on, and the number of bytes +// consumed in the input string. +// +// The input string is assumed not to contain the initial operator. +func tryReadVariableName(input string) (string, bool, int) { + switch input[0] { + case operator: + // Escaped operator; return it. + return input[0:1], false, 1 + case referenceOpener: + // Scan to expression closer + for i := 1; i < len(input); i++ { + if input[i] == referenceCloser { + return input[1:i], true, i + 1 + } + } + + // Incomplete reference; return it. + return string(operator) + string(referenceOpener), false, 1 + default: + // Not the beginning of an expression, ie, an operator + // that doesn't begin an expression. Return the operator + // and the first rune in the string. + return string(operator) + string(input[0]), false, 1 + } +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/factory/factory.go b/vendor/sigs.k8s.io/kustomize/pkg/factory/factory.go new file mode 100644 index 000000000..e71669a87 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/factory/factory.go @@ -0,0 +1,39 @@ +/* +Copyright 2018 The Kubernetes Authors. + Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Package factory provides factories for kustomize. +package factory + +import ( + "sigs.k8s.io/kustomize/pkg/ifc" + "sigs.k8s.io/kustomize/pkg/ifc/transformer" + "sigs.k8s.io/kustomize/pkg/resmap" + "sigs.k8s.io/kustomize/pkg/resource" +) + +// KustFactory provides different factories for kustomize +type KustFactory struct { + ResmapF *resmap.Factory + TransformerF transformer.Factory + ValidatorF ifc.Validator + UnstructF ifc.KunstructuredFactory +} + +// NewKustFactory creats a KustFactory instance +func NewKustFactory(u ifc.KunstructuredFactory, v ifc.Validator, t transformer.Factory) *KustFactory { + return &KustFactory{ + ResmapF: resmap.NewFactory(resource.NewFactory(u)), + TransformerF: t, + ValidatorF: v, + UnstructF: u, + } +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/fs/confirmeddir.go b/vendor/sigs.k8s.io/kustomize/pkg/fs/confirmeddir.go new file mode 100644 index 000000000..5d12bf077 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/fs/confirmeddir.go @@ -0,0 +1,93 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fs + +import ( + "io/ioutil" + "path/filepath" + "strings" +) + +// ConfirmedDir is a clean, absolute, delinkified path +// that was confirmed to point to an existing directory. +type ConfirmedDir string + +// NewTmpConfirmedDir returns a temporary dir, else error. +// The directory is cleaned, no symlinks, etc. so its +// returned as a ConfirmedDir. +func NewTmpConfirmedDir() (ConfirmedDir, error) { + n, err := ioutil.TempDir("", "kustomize-") + if err != nil { + return "", err + } + + // In MacOs `ioutil.TempDir` creates a directory + // with root in the `/var` folder, which is in turn a symlinked path + // to `/private/var`. + // Function `filepath.EvalSymlinks`is used to + // resolve the real absolute path. + deLinked, err := filepath.EvalSymlinks(n) + return ConfirmedDir(deLinked), err + +} + +// HasPrefix returns true if the directory argument +// is a prefix of self (d) from the point of view of +// a file system. +// +// I.e., it's true if the argument equals or contains +// self (d) in a file path sense. +// +// HasPrefix emulates the semantics of strings.HasPrefix +// such that the following are true: +// +// strings.HasPrefix("foobar", "foobar") +// strings.HasPrefix("foobar", "foo") +// strings.HasPrefix("foobar", "") +// +// d := fSys.ConfirmDir("/foo/bar") +// d.HasPrefix("/foo/bar") +// d.HasPrefix("/foo") +// d.HasPrefix("/") +// +// Not contacting a file system here to check for +// actual path existence. +// +// This is tested on linux, but will have trouble +// on other operating systems. +// TODO(monopole) Refactor when #golang/go/18358 closes. +// See also: +// https://github.com/golang/go/issues/18358 +// https://github.com/golang/dep/issues/296 +// https://github.com/golang/dep/blob/master/internal/fs/fs.go#L33 +// https://codereview.appspot.com/5712045 +func (d ConfirmedDir) HasPrefix(path ConfirmedDir) bool { + if path.String() == string(filepath.Separator) || path == d { + return true + } + return strings.HasPrefix( + string(d), + string(path)+string(filepath.Separator)) +} + +func (d ConfirmedDir) Join(path string) string { + return filepath.Join(string(d), path) +} + +func (d ConfirmedDir) String() string { + return string(d) +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/fs/fakefile.go b/vendor/sigs.k8s.io/kustomize/pkg/fs/fakefile.go new file mode 100644 index 000000000..64bc55685 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/fs/fakefile.go @@ -0,0 +1,69 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fs + +import ( + "bytes" + "os" +) + +var _ File = &FakeFile{} + +// FakeFile implements File in-memory for tests. +type FakeFile struct { + name string + content []byte + dir bool + open bool +} + +// makeDir makes a fake directory. +func makeDir(name string) *FakeFile { + return &FakeFile{name: name, dir: true} +} + +// Close marks the fake file closed. +func (f *FakeFile) Close() error { + f.open = false + return nil +} + +// Read never fails, and doesn't mutate p. +func (f *FakeFile) Read(p []byte) (n int, err error) { + return len(p), nil +} + +// Write saves the contents of the argument to memory. +func (f *FakeFile) Write(p []byte) (n int, err error) { + f.content = p + return len(p), nil +} + +// ContentMatches returns true if v matches fake file's content. +func (f *FakeFile) ContentMatches(v []byte) bool { + return bytes.Equal(v, f.content) +} + +// GetContent the content of a fake file. +func (f *FakeFile) GetContent() []byte { + return f.content +} + +// Stat returns nil. +func (f *FakeFile) Stat() (os.FileInfo, error) { + return nil, nil +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/fs/fakefileinfo.go b/vendor/sigs.k8s.io/kustomize/pkg/fs/fakefileinfo.go new file mode 100644 index 000000000..6ccca9150 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/fs/fakefileinfo.go @@ -0,0 +1,47 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fs + +import ( + "os" + "time" +) + +var _ os.FileInfo = &Fakefileinfo{} + +// Fakefileinfo implements Fakefileinfo using a fake in-memory filesystem. +type Fakefileinfo struct { + *FakeFile +} + +// Name returns the name of the file +func (fi *Fakefileinfo) Name() string { return fi.name } + +// Size returns the size of the file +func (fi *Fakefileinfo) Size() int64 { return int64(len(fi.content)) } + +// Mode returns the file mode +func (fi *Fakefileinfo) Mode() os.FileMode { return 0777 } + +// ModTime returns the modification time +func (fi *Fakefileinfo) ModTime() time.Time { return time.Time{} } + +// IsDir returns if it is a directory +func (fi *Fakefileinfo) IsDir() bool { return fi.dir } + +// Sys should return underlying data source, but it now returns nil +func (fi *Fakefileinfo) Sys() interface{} { return nil } diff --git a/vendor/sigs.k8s.io/kustomize/pkg/fs/fakefs.go b/vendor/sigs.k8s.io/kustomize/pkg/fs/fakefs.go new file mode 100644 index 000000000..59c0966b2 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/fs/fakefs.go @@ -0,0 +1,185 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fs + +import ( + "fmt" + "path/filepath" + "sort" + "strings" + + "sigs.k8s.io/kustomize/pkg/constants" +) + +var _ FileSystem = &fakeFs{} + +// fakeFs implements FileSystem using a fake in-memory filesystem. +type fakeFs struct { + m map[string]*FakeFile +} + +// MakeFakeFS returns an instance of fakeFs with no files in it. +func MakeFakeFS() *fakeFs { + result := &fakeFs{m: map[string]*FakeFile{}} + result.Mkdir("/") + return result +} + +// kustomizationContent is used in tests. +const kustomizationContent = `apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namePrefix: some-prefix +nameSuffix: some-suffix +# Labels to add to all objects and selectors. +# These labels would also be used to form the selector for apply --prune +# Named differently than “labels” to avoid confusion with metadata for this object +commonLabels: + app: helloworld +commonAnnotations: + note: This is an example annotation +resources: [] +#- service.yaml +#- ../some-dir/ +# There could also be configmaps in Base, which would make these overlays +configMapGenerator: [] +# There could be secrets in Base, if just using a fork/rebase workflow +secretGenerator: [] +` + +// Create assures a fake file appears in the in-memory file system. +func (fs *fakeFs) Create(name string) (File, error) { + f := &FakeFile{} + f.open = true + fs.m[name] = f + return fs.m[name], nil +} + +// Mkdir assures a fake directory appears in the in-memory file system. +func (fs *fakeFs) Mkdir(name string) error { + fs.m[name] = makeDir(name) + return nil +} + +// MkdirAll delegates to Mkdir +func (fs *fakeFs) MkdirAll(name string) error { + return fs.Mkdir(name) +} + +// RemoveAll presumably does rm -r on a path. +// There's no error. +func (fs *fakeFs) RemoveAll(name string) error { + var toRemove []string + for k := range fs.m { + if strings.HasPrefix(k, name) { + toRemove = append(toRemove, k) + } + } + for _, k := range toRemove { + delete(fs.m, k) + } + return nil +} + +// Open returns a fake file in the open state. +func (fs *fakeFs) Open(name string) (File, error) { + if _, found := fs.m[name]; !found { + return nil, fmt.Errorf("file %q cannot be opened", name) + } + return fs.m[name], nil +} + +// CleanedAbs cannot fail. +func (fs *fakeFs) CleanedAbs(path string) (ConfirmedDir, string, error) { + if fs.IsDir(path) { + return ConfirmedDir(path), "", nil + } + d := filepath.Dir(path) + if d == path { + return ConfirmedDir(d), "", nil + } + return ConfirmedDir(d), filepath.Base(path), nil +} + +// Exists returns true if file is known. +func (fs *fakeFs) Exists(name string) bool { + _, found := fs.m[name] + return found +} + +// Glob returns the list of matching files +func (fs *fakeFs) Glob(pattern string) ([]string, error) { + var result []string + for p := range fs.m { + if fs.pathMatch(p, pattern) { + result = append(result, p) + } + } + sort.Strings(result) + return result, nil +} + +// IsDir returns true if the file exists and is a directory. +func (fs *fakeFs) IsDir(name string) bool { + f, found := fs.m[name] + if found && f.dir { + return true + } + if !strings.HasSuffix(name, "/") { + name = name + "/" + } + for k := range fs.m { + if strings.HasPrefix(k, name) { + return true + } + } + return false +} + +// ReadFile always returns an empty bytes and error depending on content of m. +func (fs *fakeFs) ReadFile(name string) ([]byte, error) { + if ff, found := fs.m[name]; found { + return ff.content, nil + } + return nil, fmt.Errorf("cannot read file %q", name) +} + +func (fs *fakeFs) ReadTestKustomization() ([]byte, error) { + return fs.ReadFile(constants.KustomizationFileNames[0]) +} + +// WriteFile always succeeds and does nothing. +func (fs *fakeFs) WriteFile(name string, c []byte) error { + ff := &FakeFile{} + ff.Write(c) + fs.m[name] = ff + return nil +} + +// WriteTestKustomization writes a standard test file. +func (fs *fakeFs) WriteTestKustomization() { + fs.WriteTestKustomizationWith([]byte(kustomizationContent)) +} + +// WriteTestKustomizationWith writes a standard test file. +func (fs *fakeFs) WriteTestKustomizationWith(bytes []byte) { + fs.WriteFile(constants.KustomizationFileNames[0], bytes) +} + +func (fs *fakeFs) pathMatch(path, pattern string) bool { + match, _ := filepath.Match(pattern, path) + return match +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/fs/fs.go b/vendor/sigs.k8s.io/kustomize/pkg/fs/fs.go new file mode 100644 index 000000000..4b47dba64 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/fs/fs.go @@ -0,0 +1,44 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package fs provides a file system abstraction layer. +package fs + +import ( + "io" + "os" +) + +// FileSystem groups basic os filesystem methods. +type FileSystem interface { + Create(name string) (File, error) + Mkdir(name string) error + MkdirAll(name string) error + RemoveAll(name string) error + Open(name string) (File, error) + IsDir(name string) bool + CleanedAbs(path string) (ConfirmedDir, string, error) + Exists(name string) bool + Glob(pattern string) ([]string, error) + ReadFile(name string) ([]byte, error) + WriteFile(name string, data []byte) error +} + +// File groups the basic os.File methods. +type File interface { + io.ReadWriteCloser + Stat() (os.FileInfo, error) +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/fs/realfile.go b/vendor/sigs.k8s.io/kustomize/pkg/fs/realfile.go new file mode 100644 index 000000000..5bfec55ab --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/fs/realfile.go @@ -0,0 +1,40 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fs + +import ( + "os" +) + +var _ File = &realFile{} + +// realFile implements File using the local filesystem. +type realFile struct { + file *os.File +} + +// Close closes a file. +func (f *realFile) Close() error { return f.file.Close() } + +// Read reads a file's content. +func (f *realFile) Read(p []byte) (n int, err error) { return f.file.Read(p) } + +// Write writes bytes to a file +func (f *realFile) Write(p []byte) (n int, err error) { return f.file.Write(p) } + +// Stat returns an interface which has all the information regarding the file. +func (f *realFile) Stat() (os.FileInfo, error) { return f.file.Stat() } diff --git a/vendor/sigs.k8s.io/kustomize/pkg/fs/realfs.go b/vendor/sigs.k8s.io/kustomize/pkg/fs/realfs.go new file mode 100644 index 000000000..11e5813b7 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/fs/realfs.go @@ -0,0 +1,122 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fs + +import ( + "fmt" + "io/ioutil" + "log" + "os" + "path/filepath" +) + +var _ FileSystem = realFS{} + +// realFS implements FileSystem using the local filesystem. +type realFS struct{} + +// MakeRealFS makes an instance of realFS. +func MakeRealFS() FileSystem { + return realFS{} +} + +// Create delegates to os.Create. +func (realFS) Create(name string) (File, error) { return os.Create(name) } + +// Mkdir delegates to os.Mkdir. +func (realFS) Mkdir(name string) error { + return os.Mkdir(name, 0777|os.ModeDir) +} + +// MkdirAll delegates to os.MkdirAll. +func (realFS) MkdirAll(name string) error { + return os.MkdirAll(name, 0777|os.ModeDir) +} + +// RemoveAll delegates to os.RemoveAll. +func (realFS) RemoveAll(name string) error { + return os.RemoveAll(name) +} + +// Open delegates to os.Open. +func (realFS) Open(name string) (File, error) { return os.Open(name) } + +// CleanedAbs returns a cleaned, absolute path +// with no symbolic links split into directory +// and file components. If the entire path is +// a directory, the file component is an empty +// string. +func (x realFS) CleanedAbs( + path string) (ConfirmedDir, string, error) { + absRoot, err := filepath.Abs(path) + if err != nil { + return "", "", fmt.Errorf( + "abs path error on '%s' : %v", path, err) + } + deLinked, err := filepath.EvalSymlinks(absRoot) + if err != nil { + return "", "", fmt.Errorf( + "evalsymlink failure on '%s' : %v", path, err) + } + if x.IsDir(deLinked) { + return ConfirmedDir(deLinked), "", nil + } + d := filepath.Dir(deLinked) + if !x.IsDir(d) { + // Programmer/assumption error. + log.Fatalf("first part of '%s' not a directory", deLinked) + } + if d == deLinked { + // Programmer/assumption error. + log.Fatalf("d '%s' should be a subset of deLinked", d) + } + f := filepath.Base(deLinked) + if filepath.Join(d, f) != deLinked { + // Programmer/assumption error. + log.Fatalf("these should be equal: '%s', '%s'", + filepath.Join(d, f), deLinked) + } + return ConfirmedDir(d), f, nil +} + +// Exists returns true if os.Stat succeeds. +func (realFS) Exists(name string) bool { + _, err := os.Stat(name) + return err == nil +} + +// Glob returns the list of matching files +func (realFS) Glob(pattern string) ([]string, error) { + return filepath.Glob(pattern) +} + +// IsDir delegates to os.Stat and FileInfo.IsDir +func (realFS) IsDir(name string) bool { + info, err := os.Stat(name) + if err != nil { + return false + } + return info.IsDir() +} + +// ReadFile delegates to ioutil.ReadFile. +func (realFS) ReadFile(name string) ([]byte, error) { return ioutil.ReadFile(name) } + +// WriteFile delegates to ioutil.WriteFile with read/write permissions. +func (realFS) WriteFile(name string, c []byte) error { + return ioutil.WriteFile(name, c, 0666) +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/git/cloner.go b/vendor/sigs.k8s.io/kustomize/pkg/git/cloner.go new file mode 100644 index 000000000..465fdb1d1 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/git/cloner.go @@ -0,0 +1,75 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package git + +import ( + "bytes" + "os/exec" + + "github.com/pkg/errors" + "sigs.k8s.io/kustomize/pkg/fs" +) + +// Cloner is a function that can clone a git repo. +type Cloner func(repoSpec *RepoSpec) error + +// ClonerUsingGitExec uses a local git install, as opposed +// to say, some remote API, to obtain a local clone of +// a remote repo. +func ClonerUsingGitExec(repoSpec *RepoSpec) error { + gitProgram, err := exec.LookPath("git") + if err != nil { + return errors.Wrap(err, "no 'git' program on path") + } + repoSpec.cloneDir, err = fs.NewTmpConfirmedDir() + if err != nil { + return err + } + cmd := exec.Command( + gitProgram, + "clone", + repoSpec.CloneSpec(), + repoSpec.cloneDir.String()) + var out bytes.Buffer + cmd.Stdout = &out + err = cmd.Run() + if err != nil { + return errors.Wrapf(err, "trouble cloning %s", repoSpec.raw) + } + if repoSpec.ref == "" { + return nil + } + cmd = exec.Command(gitProgram, "checkout", repoSpec.ref) + cmd.Dir = repoSpec.cloneDir.String() + err = cmd.Run() + if err != nil { + return errors.Wrapf( + err, "trouble checking out href %s", repoSpec.ref) + } + return nil +} + +// DoNothingCloner returns a cloner that only sets +// cloneDir field in the repoSpec. It's assumed that +// the cloneDir is associated with some fake filesystem +// used in a test. +func DoNothingCloner(dir fs.ConfirmedDir) Cloner { + return func(rs *RepoSpec) error { + rs.cloneDir = dir + return nil + } +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/git/repospec.go b/vendor/sigs.k8s.io/kustomize/pkg/git/repospec.go new file mode 100644 index 000000000..b3251f653 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/git/repospec.go @@ -0,0 +1,214 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package git + +import ( + "fmt" + "path/filepath" + "strings" + + "sigs.k8s.io/kustomize/pkg/fs" +) + +// Used as a temporary non-empty occupant of the cloneDir +// field, as something distinguishable from the empty string +// in various outputs (especially tests). Not using an +// actual directory name here, as that's a temporary directory +// with a unique name that isn't created until clone time. +const notCloned = fs.ConfirmedDir("/notCloned") + +// RepoSpec specifies a git repository and a branch and path therein. +type RepoSpec struct { + // Raw, original spec, used to look for cycles. + // TODO(monopole): Drop raw, use processed fields instead. + raw string + + // Host, e.g. github.com + host string + + // orgRepo name (organization/repoName), + // e.g. kubernetes-sigs/kustomize + orgRepo string + + // ConfirmedDir where the orgRepo is cloned to. + cloneDir fs.ConfirmedDir + + // Relative path in the repository, and in the cloneDir, + // to a Kustomization. + path string + + // Branch or tag reference. + ref string +} + +// CloneSpec returns a string suitable for "git clone {spec}". +func (x *RepoSpec) CloneSpec() string { + if isAzureHost(x.host) || isAWSHost(x.host) { + return x.host + x.orgRepo + } + return x.host + x.orgRepo + gitSuffix +} + +func (x *RepoSpec) CloneDir() fs.ConfirmedDir { + return x.cloneDir +} + +func (x *RepoSpec) Raw() string { + return x.raw +} + +func (x *RepoSpec) AbsPath() string { + return x.cloneDir.Join(x.path) +} + +func (x *RepoSpec) Cleaner(fSys fs.FileSystem) func() error { + return func() error { return fSys.RemoveAll(x.cloneDir.String()) } +} + +// From strings like git@github.com:someOrg/someRepo.git or +// https://github.com/someOrg/someRepo?ref=someHash, extract +// the parts. +func NewRepoSpecFromUrl(n string) (*RepoSpec, error) { + if filepath.IsAbs(n) { + return nil, fmt.Errorf("uri looks like abs path: %s", n) + } + host, orgRepo, path, gitRef := parseGithubUrl(n) + if orgRepo == "" { + return nil, fmt.Errorf("url lacks orgRepo: %s", n) + } + if host == "" { + return nil, fmt.Errorf("url lacks host: %s", n) + } + return &RepoSpec{ + raw: n, host: host, orgRepo: orgRepo, + cloneDir: notCloned, path: path, ref: gitRef}, nil +} + +const ( + refQuery = "?ref=" + gitSuffix = ".git" +) + +// From strings like git@github.com:someOrg/someRepo.git or +// https://github.com/someOrg/someRepo?ref=someHash, extract +// the parts. +func parseGithubUrl(n string) ( + host string, orgRepo string, path string, gitRef string) { + host, n = parseHostSpec(n) + + if strings.Contains(n, gitSuffix) { + index := strings.Index(n, gitSuffix) + orgRepo = n[0:index] + n = n[index+len(gitSuffix):] + path, gitRef = peelQuery(n) + return + } + + i := strings.Index(n, "/") + if i < 1 { + return "", "", "", "" + } + j := strings.Index(n[i+1:], "/") + if j >= 0 { + j += i + 1 + orgRepo = n[:j] + path, gitRef = peelQuery(n[j+1:]) + } else { + path = "" + orgRepo, gitRef = peelQuery(n) + } + return +} + +func peelQuery(arg string) (string, string) { + j := strings.Index(arg, refQuery) + if j >= 0 { + return arg[:j], arg[j+len(refQuery):] + } + return arg, "" +} + +func parseHostSpec(n string) (string, string) { + var host string + // Start accumulating the host part. + for _, p := range []string{ + // Order matters here. + "git::", "gh:", "ssh://", "https://", "http://", + "git@", "github.com:", "github.com/"} { + if len(p) < len(n) && strings.ToLower(n[:len(p)]) == p { + n = n[len(p):] + host += p + } + } + if host == "git@" { + i := strings.Index(n, "/") + if i > -1 { + host += n[:i+1] + n = n[i+1:] + } else { + i = strings.Index(n, ":") + if i > -1 { + host += n[:i+1] + n = n[i+1:] + } + } + return host, n + } + + // If host is a http(s) or ssh URL, grab the domain part. + for _, p := range []string{ + "ssh://", "https://", "http://"} { + if strings.HasSuffix(host, p) { + i := strings.Index(n, "/") + if i > -1 { + host = host + n[0:i+1] + n = n[i+1:] + } + break + } + } + + return normalizeGitHostSpec(host), n +} + +func normalizeGitHostSpec(host string) string { + s := strings.ToLower(host) + if strings.Contains(s, "github.com") { + if strings.Contains(s, "git@") || strings.Contains(s, "ssh:") { + host = "git@github.com:" + } else { + host = "https://github.com/" + } + } + if strings.HasPrefix(s, "git::") { + host = strings.TrimLeft(s, "git::") + } + return host +} + +// The format of Azure repo URL is documented +// https://docs.microsoft.com/en-us/azure/devops/repos/git/clone?view=vsts&tabs=visual-studio#clone_url +func isAzureHost(host string) bool { + return strings.Contains(host, "dev.azure.com") || + strings.Contains(host, "visualstudio.com") +} + +// The format of AWS repo URL is documented +// https://docs.aws.amazon.com/codecommit/latest/userguide/regions.html +func isAWSHost(host string) bool { + return strings.Contains(host, "amazonaws.com") +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/gvk/gvk.go b/vendor/sigs.k8s.io/kustomize/pkg/gvk/gvk.go new file mode 100644 index 000000000..890c8e8b5 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/gvk/gvk.go @@ -0,0 +1,180 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package gvk + +import ( + "strings" +) + +// Gvk identifies a Kubernetes API type. +// https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md +type Gvk struct { + Group string `json:"group,omitempty" yaml:"group,omitempty"` + Version string `json:"version,omitempty" yaml:"version,omitempty"` + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` +} + +// FromKind makes a Gvk with only the kind specified. +func FromKind(k string) Gvk { + return Gvk{ + Kind: k, + } +} + +// Values that are brief but meaningful in logs. +const ( + noGroup = "~G" + noVersion = "~V" + noKind = "~K" + separator = "_" +) + +// String returns a string representation of the GVK. +func (x Gvk) String() string { + g := x.Group + if g == "" { + g = noGroup + } + v := x.Version + if v == "" { + v = noVersion + } + k := x.Kind + if k == "" { + k = noKind + } + return strings.Join([]string{g, v, k}, separator) +} + +// Equals returns true if the Gvk's have equal fields. +func (x Gvk) Equals(o Gvk) bool { + return x.Group == o.Group && x.Version == o.Version && x.Kind == o.Kind +} + +// An attempt to order things to help k8s, e.g. +// a Service should come before things that refer to it. +// Namespace should be first. +// In some cases order just specified to provide determinism. +var order = []string{ + "Namespace", + "StorageClass", + "CustomResourceDefinition", + "MutatingWebhookConfiguration", + "ValidatingWebhookConfiguration", + "ServiceAccount", + "Role", + "ClusterRole", + "RoleBinding", + "ClusterRoleBinding", + "ConfigMap", + "Secret", + "Service", + "Deployment", + "StatefulSet", + "CronJob", + "PodDisruptionBudget", +} +var typeOrders = func() map[string]int { + m := map[string]int{} + for i, n := range order { + m[n] = i + } + return m +}() + +// IsLessThan returns true if self is less than the argument. +func (x Gvk) IsLessThan(o Gvk) bool { + indexI, foundI := typeOrders[x.Kind] + indexJ, foundJ := typeOrders[o.Kind] + if foundI && foundJ { + if indexI != indexJ { + return indexI < indexJ + } + } + if foundI && !foundJ { + return true + } + if !foundI && foundJ { + return false + } + return x.String() < o.String() +} + +// IsSelected returns true if `selector` selects `x`; otherwise, false. +// If `selector` and `x` are the same, return true. +// If `selector` is nil, it is considered a wildcard match, returning true. +// If selector fields are empty, they are considered wildcards matching +// anything in the corresponding fields, e.g. +// +// this item: +// +// +// is selected by +// +// +// but rejected by +// +// +func (x Gvk) IsSelected(selector *Gvk) bool { + if selector == nil { + return true + } + if len(selector.Group) > 0 { + if x.Group != selector.Group { + return false + } + } + if len(selector.Version) > 0 { + if x.Version != selector.Version { + return false + } + } + if len(selector.Kind) > 0 { + if x.Kind != selector.Kind { + return false + } + } + return true +} + +var clusterLevelKinds = []string{ + "APIService", + "ClusterRoleBinding", + "ClusterRole", + "CustomResourceDefinition", + "Namespace", + "PersistentVolume", +} + +// IsClusterKind returns true if x is a cluster-level Gvk +func (x Gvk) IsClusterKind() bool { + for _, k := range clusterLevelKinds { + if k == x.Kind { + return true + } + } + return false +} + +// ClusterLevelGvks returns a slice of cluster-level Gvks +func ClusterLevelGvks() []Gvk { + var result []Gvk + for _, k := range clusterLevelKinds { + result = append(result, Gvk{Kind: k}) + } + return result +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/ifc/ifc.go b/vendor/sigs.k8s.io/kustomize/pkg/ifc/ifc.go new file mode 100644 index 000000000..e6267cae2 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/ifc/ifc.go @@ -0,0 +1,73 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package ifc holds miscellaneous interfaces used by kustomize. +package ifc + +import ( + "sigs.k8s.io/kustomize/pkg/gvk" + "sigs.k8s.io/kustomize/pkg/types" +) + +// Validator provides functions to validate annotations and labels +type Validator interface { + MakeAnnotationValidator() func(map[string]string) error + MakeLabelValidator() func(map[string]string) error + ValidateNamespace(string) []string +} + +// Loader interface exposes methods to read bytes. +type Loader interface { + // Root returns the root location for this Loader. + Root() string + // New returns Loader located at newRoot. + New(newRoot string) (Loader, error) + // Load returns the bytes read from the location or an error. + Load(location string) ([]byte, error) + // Cleanup cleans the loader + Cleanup() error +} + +// Kunstructured allows manipulation of k8s objects +// that do not have Golang structs. +type Kunstructured interface { + Map() map[string]interface{} + SetMap(map[string]interface{}) + Copy() Kunstructured + GetFieldValue(string) (string, error) + MarshalJSON() ([]byte, error) + UnmarshalJSON([]byte) error + GetGvk() gvk.Gvk + GetKind() string + GetName() string + SetName(string) + GetLabels() map[string]string + SetLabels(map[string]string) + GetAnnotations() map[string]string + SetAnnotations(map[string]string) +} + +// KunstructuredFactory makes instances of Kunstructured. +type KunstructuredFactory interface { + SliceFromBytes([]byte) ([]Kunstructured, error) + FromMap(m map[string]interface{}) Kunstructured + MakeConfigMap(args *types.ConfigMapArgs, options *types.GeneratorOptions) (Kunstructured, error) + MakeSecret(args *types.SecretArgs, options *types.GeneratorOptions) (Kunstructured, error) + Set(ldr Loader) +} + +// See core.v1.SecretTypeOpaque +const SecretTypeOpaque = "Opaque" diff --git a/vendor/sigs.k8s.io/kustomize/pkg/ifc/transformer/factory.go b/vendor/sigs.k8s.io/kustomize/pkg/ifc/transformer/factory.go new file mode 100644 index 000000000..0a74c2809 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/ifc/transformer/factory.go @@ -0,0 +1,29 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package patch holds miscellaneous interfaces used by kustomize. +package transformer + +import ( + "sigs.k8s.io/kustomize/pkg/resource" + "sigs.k8s.io/kustomize/pkg/transformers" +) + +// Factory makes transformers +type Factory interface { + MakePatchTransformer(slice []*resource.Resource, rf *resource.Factory) (transformers.Transformer, error) + MakeHashTransformer() transformers.Transformer +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/image/deprecatedimage.go b/vendor/sigs.k8s.io/kustomize/pkg/image/deprecatedimage.go new file mode 100644 index 000000000..65db4051b --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/image/deprecatedimage.go @@ -0,0 +1,32 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package image + +// DeprecatedImage contains an image and a new tag, +// which will replace the original tag. +// Deprecated, instead use Image. +type DeprecatedImage struct { + // Name is a tag-less image name. + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + // NewTag is the value to use in replacing the original tag. + NewTag string `json:"newTag,omitempty" yaml:"newTag,omitempty"` + + // Digest is the value used to replace the original image tag. + // If digest is present NewTag value is ignored. + Digest string `json:"digest,omitempty" yaml:"digest,omitempty"` +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/image/image.go b/vendor/sigs.k8s.io/kustomize/pkg/image/image.go new file mode 100644 index 000000000..dbe3b8b17 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/image/image.go @@ -0,0 +1,36 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package image provides struct definitions and libraries +// for image overwriting of names, tags and digest. +package image + +// Image contains an image name, a new name, a new tag or digest, +// which will replace the original name and tag. +type Image struct { + // Name is a tag-less image name. + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + // NewName is the value used to replace the original name. + NewName string `json:"newName,omitempty" yaml:"newName,omitempty"` + + // NewTag is the value used to replace the original tag. + NewTag string `json:"newTag,omitempty" yaml:"newTag,omitempty"` + + // Digest is the value used to replace the original image tag. + // If digest is present NewTag value is ignored. + Digest string `json:"digest,omitempty" yaml:"digest,omitempty"` +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/internal/error/configmaperror.go b/vendor/sigs.k8s.io/kustomize/pkg/internal/error/configmaperror.go new file mode 100644 index 000000000..1d60d78a2 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/internal/error/configmaperror.go @@ -0,0 +1,30 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package error has contextual error types. +package error + +import "fmt" + +// ConfigmapError represents error with a configmap. +type ConfigmapError struct { + Path string + ErrorMsg string +} + +func (e ConfigmapError) Error() string { + return fmt.Sprintf("Kustomization file [%s] encounters a configmap error: %s\n", e.Path, e.ErrorMsg) +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/internal/error/kustomizationerror.go b/vendor/sigs.k8s.io/kustomize/pkg/internal/error/kustomizationerror.go new file mode 100644 index 000000000..0d53ca9b8 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/internal/error/kustomizationerror.go @@ -0,0 +1,61 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package error + +import ( + "fmt" +) + +// KustomizationError represents an error with a kustomization. +type KustomizationError struct { + KustomizationPath string + ErrorMsg string +} + +func (ke KustomizationError) Error() string { + return fmt.Sprintf("Kustomization File [%s]: %s\n", ke.KustomizationPath, ke.ErrorMsg) +} + +// KustomizationErrors collects all errors. +type KustomizationErrors struct { + kErrors []error +} + +func (ke *KustomizationErrors) Error() string { + errormsg := "" + for _, e := range ke.kErrors { + errormsg += e.Error() + "\n" + } + return errormsg +} + +// Append adds error to a collection of errors. +func (ke *KustomizationErrors) Append(e error) { + ke.kErrors = append(ke.kErrors, e) +} + +// Get returns all collected errors. +func (ke *KustomizationErrors) Get() []error { + return ke.kErrors +} + +// BatchAppend adds all errors from another KustomizationErrors +func (ke *KustomizationErrors) BatchAppend(e KustomizationErrors) { + for _, err := range e.Get() { + ke.kErrors = append(ke.kErrors, err) + } +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/internal/error/patcherror.go b/vendor/sigs.k8s.io/kustomize/pkg/internal/error/patcherror.go new file mode 100644 index 000000000..60c9f80e5 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/internal/error/patcherror.go @@ -0,0 +1,32 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package error + +import ( + "fmt" +) + +// PatchError represents error during Patch. +type PatchError struct { + KustomizationPath string + PatchFilepath string + ErrorMsg string +} + +func (e PatchError) Error() string { + return fmt.Sprintf("Kustomization file [%s] encounters a patch error for [%s]: %s\n", e.KustomizationPath, e.PatchFilepath, e.ErrorMsg) +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/internal/error/resourceerror.go b/vendor/sigs.k8s.io/kustomize/pkg/internal/error/resourceerror.go new file mode 100644 index 000000000..ef3566dd1 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/internal/error/resourceerror.go @@ -0,0 +1,30 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package error + +import "fmt" + +// ResourceError represents error in a resource. +type ResourceError struct { + KustomizationPath string + ResourceFilepath string + ErrorMsg string +} + +func (e ResourceError) Error() string { + return fmt.Sprintf("Kustomization file [%s] encounters a resource error for [%s]: %s\n", e.KustomizationPath, e.ResourceFilepath, e.ErrorMsg) +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/internal/error/secreterror.go b/vendor/sigs.k8s.io/kustomize/pkg/internal/error/secreterror.go new file mode 100644 index 000000000..cd72759ce --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/internal/error/secreterror.go @@ -0,0 +1,30 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package error + +import "fmt" + +// SecretError represents error with a secret. +type SecretError struct { + KustomizationPath string + // ErrorMsg is an error message + ErrorMsg string +} + +func (e SecretError) Error() string { + return fmt.Sprintf("Kustomization file [%s] encounters a secret error: %s\n", e.KustomizationPath, e.ErrorMsg) +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/internal/error/yamlformaterror.go b/vendor/sigs.k8s.io/kustomize/pkg/internal/error/yamlformaterror.go new file mode 100644 index 000000000..4c27d30d7 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/internal/error/yamlformaterror.go @@ -0,0 +1,48 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package error has contextual error types. +package error + +import ( + "fmt" + "strings" +) + +// YamlFormatError represents error with yaml file name where json/yaml format error happens. +type YamlFormatError struct { + Path string + ErrorMsg string +} + +func (e YamlFormatError) Error() string { + return fmt.Sprintf("YAML file [%s] encounters a format error.\n%s\n", e.Path, e.ErrorMsg) +} + +// Handler handles YamlFormatError +func Handler(e error, path string) error { + if isYAMLSyntaxError(e) { + return YamlFormatError{ + Path: path, + ErrorMsg: e.Error(), + } + } + return e +} + +func isYAMLSyntaxError(e error) bool { + return strings.Contains(e.Error(), "error converting YAML to JSON") || strings.Contains(e.Error(), "error unmarshaling JSON") +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/loader/fileloader.go b/vendor/sigs.k8s.io/kustomize/pkg/loader/fileloader.go new file mode 100644 index 000000000..4fa5dca67 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/loader/fileloader.go @@ -0,0 +1,312 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package loader + +import ( + "fmt" + "log" + "path/filepath" + "strings" + + "sigs.k8s.io/kustomize/pkg/fs" + "sigs.k8s.io/kustomize/pkg/git" + "sigs.k8s.io/kustomize/pkg/ifc" +) + +// fileLoader is a kustomization's interface to files. +// +// The directory in which a kustomization file sits +// is referred to below as the kustomization's root. +// +// An instance of fileLoader has an immutable root, +// and offers a `New` method returning a new loader +// with a new root. +// +// A kustomization file refers to two kinds of files: +// +// * supplemental data paths +// +// `Load` is used to visit these paths. +// +// They must terminate in or below the root. +// +// They hold things like resources, patches, +// data for ConfigMaps, etc. +// +// * bases; other kustomizations +// +// `New` is used to load bases. +// +// A base can be either a remote git repo URL, or +// a directory specified relative to the current +// root. In the former case, the repo is locally +// cloned, and the new loader is rooted on a path +// in that clone. +// +// As loaders create new loaders, a root history +// is established, and used to disallow: +// +// - A base that is a repository that, in turn, +// specifies a base repository seen previously +// in the loading stack (a cycle). +// +// - An overlay depending on a base positioned at +// or above it. I.e. '../foo' is OK, but '.', +// '..', '../..', etc. are disallowed. Allowing +// such a base has no advantages and encourages +// cycles, particularly if some future change +// were to introduce globbing to file +// specifications in the kustomization file. +// +// These restrictions assure that kustomizations +// are self-contained and relocatable, and impose +// some safety when relying on remote kustomizations, +// e.g. a ConfigMap generator specified to read +// from /etc/passwd will fail. +// +type fileLoader struct { + // Loader that spawned this loader. + // Used to avoid cycles. + referrer *fileLoader + // An absolute, cleaned path to a directory. + // The Load function reads from this directory, + // or directories below it. + root fs.ConfirmedDir + // If this is non-nil, the files were + // obtained from the given repository. + repoSpec *git.RepoSpec + // File system utilities. + fSys fs.FileSystem + // Used to clone repositories. + cloner git.Cloner + // Used to clean up, as needed. + cleaner func() error +} + +// NewFileLoaderAtCwd returns a loader that loads from ".". +func NewFileLoaderAtCwd(fSys fs.FileSystem) *fileLoader { + return newLoaderOrDie(fSys, ".") +} + +// NewFileLoaderAtRoot returns a loader that loads from "/". +func NewFileLoaderAtRoot(fSys fs.FileSystem) *fileLoader { + return newLoaderOrDie(fSys, string(filepath.Separator)) +} + +// Root returns the absolute path that is prepended to any +// relative paths used in Load. +func (l *fileLoader) Root() string { + return l.root.String() +} + +func newLoaderOrDie(fSys fs.FileSystem, path string) *fileLoader { + root, err := demandDirectoryRoot(fSys, path) + if err != nil { + log.Fatalf("unable to make loader at '%s'; %v", path, err) + } + return newLoaderAtConfirmedDir( + root, fSys, nil, git.ClonerUsingGitExec) +} + +// newLoaderAtConfirmedDir returns a new fileLoader with given root. +func newLoaderAtConfirmedDir( + root fs.ConfirmedDir, fSys fs.FileSystem, + referrer *fileLoader, cloner git.Cloner) *fileLoader { + return &fileLoader{ + root: root, + referrer: referrer, + fSys: fSys, + cloner: cloner, + cleaner: func() error { return nil }, + } +} + +// Assure that the given path is in fact a directory. +func demandDirectoryRoot( + fSys fs.FileSystem, path string) (fs.ConfirmedDir, error) { + if path == "" { + return "", fmt.Errorf( + "loader root cannot be empty") + } + d, f, err := fSys.CleanedAbs(path) + if err != nil { + return "", fmt.Errorf( + "absolute path error in '%s' : %v", path, err) + } + if f != "" { + return "", fmt.Errorf( + "got file '%s', but '%s' must be a directory to be a root", + f, path) + } + return d, nil +} + +// New returns a new Loader, rooted relative to current loader, +// or rooted in a temp directory holding a git repo clone. +func (l *fileLoader) New(path string) (ifc.Loader, error) { + if path == "" { + return nil, fmt.Errorf("new root cannot be empty") + } + repoSpec, err := git.NewRepoSpecFromUrl(path) + if err == nil { + // Treat this as git repo clone request. + if err := l.errIfRepoCycle(repoSpec); err != nil { + return nil, err + } + return newLoaderAtGitClone(repoSpec, l.fSys, l.referrer, l.cloner) + } + if filepath.IsAbs(path) { + return nil, fmt.Errorf("new root '%s' cannot be absolute", path) + } + root, err := demandDirectoryRoot(l.fSys, l.root.Join(path)) + if err != nil { + return nil, err + } + if err := l.errIfGitContainmentViolation(root); err != nil { + return nil, err + } + if err := l.errIfArgEqualOrHigher(root); err != nil { + return nil, err + } + return newLoaderAtConfirmedDir( + root, l.fSys, l, l.cloner), nil +} + +// newLoaderAtGitClone returns a new Loader pinned to a temporary +// directory holding a cloned git repo. +func newLoaderAtGitClone( + repoSpec *git.RepoSpec, fSys fs.FileSystem, + referrer *fileLoader, cloner git.Cloner) (ifc.Loader, error) { + err := cloner(repoSpec) + if err != nil { + return nil, err + } + root, f, err := fSys.CleanedAbs(repoSpec.AbsPath()) + if err != nil { + return nil, err + } + // We don't know that the path requested in repoSpec + // is a directory until we actually clone it and look + // inside. That just happened, hence the error check + // is here. + if f != "" { + return nil, fmt.Errorf( + "'%s' refers to file '%s'; expecting directory", + repoSpec.AbsPath(), f) + } + return &fileLoader{ + root: root, + referrer: referrer, + repoSpec: repoSpec, + fSys: fSys, + cloner: cloner, + cleaner: repoSpec.Cleaner(fSys), + }, nil +} + +func (l *fileLoader) errIfGitContainmentViolation( + base fs.ConfirmedDir) error { + containingRepo := l.containingRepo() + if containingRepo == nil { + return nil + } + if !base.HasPrefix(containingRepo.CloneDir()) { + return fmt.Errorf( + "security; bases in kustomizations found in "+ + "cloned git repos must be within the repo, "+ + "but base '%s' is outside '%s'", + base, containingRepo.CloneDir()) + } + return nil +} + +// Looks back through referrers for a git repo, returning nil +// if none found. +func (l *fileLoader) containingRepo() *git.RepoSpec { + if l.repoSpec != nil { + return l.repoSpec + } + if l.referrer == nil { + return nil + } + return l.referrer.containingRepo() +} + +// errIfArgEqualOrHigher tests whether the argument, +// is equal to or above the root of any ancestor. +func (l *fileLoader) errIfArgEqualOrHigher( + candidateRoot fs.ConfirmedDir) error { + if l.root.HasPrefix(candidateRoot) { + return fmt.Errorf( + "cycle detected: candidate root '%s' contains visited root '%s'", + candidateRoot, l.root) + } + if l.referrer == nil { + return nil + } + return l.referrer.errIfArgEqualOrHigher(candidateRoot) +} + +// TODO(monopole): Distinguish branches? +// I.e. Allow a distinction between git URI with +// path foo and tag bar and a git URI with the same +// path but a different tag? +func (l *fileLoader) errIfRepoCycle(newRepoSpec *git.RepoSpec) error { + // TODO(monopole): Use parsed data instead of Raw(). + if l.repoSpec != nil && + strings.HasPrefix(l.repoSpec.Raw(), newRepoSpec.Raw()) { + return fmt.Errorf( + "cycle detected: URI '%s' referenced by previous URI '%s'", + newRepoSpec.Raw(), l.repoSpec.Raw()) + } + if l.referrer == nil { + return nil + } + return l.referrer.errIfRepoCycle(newRepoSpec) +} + +// Load returns content of file at the given relative path, +// else an error. The path must refer to a file in or +// below the current root. +func (l *fileLoader) Load(path string) ([]byte, error) { + if filepath.IsAbs(path) { + return nil, l.loadOutOfBounds(path) + } + d, f, err := l.fSys.CleanedAbs(l.root.Join(path)) + if err != nil { + return nil, err + } + if f == "" { + return nil, fmt.Errorf( + "'%s' must be a file (got d='%s')", path, d) + } + if !d.HasPrefix(l.root) { + return nil, l.loadOutOfBounds(path) + } + return l.fSys.ReadFile(d.Join(f)) +} + +func (l *fileLoader) loadOutOfBounds(path string) error { + return fmt.Errorf( + "security; file '%s' is not in or below '%s'", + path, l.root) +} + +// Cleanup runs the cleaner. +func (l *fileLoader) Cleanup() error { + return l.cleaner() +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/loader/loader.go b/vendor/sigs.k8s.io/kustomize/pkg/loader/loader.go new file mode 100644 index 000000000..53de6553a --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/loader/loader.go @@ -0,0 +1,39 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package loader has a data loading interface and various implementations. +package loader + +import ( + "sigs.k8s.io/kustomize/pkg/fs" + "sigs.k8s.io/kustomize/pkg/git" + "sigs.k8s.io/kustomize/pkg/ifc" +) + +// NewLoader returns a Loader. +func NewLoader(path string, fSys fs.FileSystem) (ifc.Loader, error) { + repoSpec, err := git.NewRepoSpecFromUrl(path) + if err == nil { + return newLoaderAtGitClone( + repoSpec, fSys, nil, git.ClonerUsingGitExec) + } + root, err := demandDirectoryRoot(fSys, path) + if err != nil { + return nil, err + } + return newLoaderAtConfirmedDir( + root, fSys, nil, git.ClonerUsingGitExec), nil +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/patch/json6902.go b/vendor/sigs.k8s.io/kustomize/pkg/patch/json6902.go new file mode 100644 index 000000000..9ddb1faa1 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/patch/json6902.go @@ -0,0 +1,40 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package patch + +import "sigs.k8s.io/kustomize/pkg/gvk" + +// Json6902 represents a json patch for an object +// with format documented https://tools.ietf.org/html/rfc6902. +type Json6902 struct { + // Target refers to a Kubernetes object that the json patch will be + // applied to. It must refer to a Kubernetes resource under the + // purview of this kustomization. Target should use the + // raw name of the object (the name specified in its YAML, + // before addition of a namePrefix and a nameSuffix). + Target *Target `json:"target" yaml:"target"` + + // relative file path for a json patch file inside a kustomization + Path string `json:"path,omitempty" yaml:"path,omitempty"` +} + +// Target represents the kubernetes object that the patch is applied to +type Target struct { + gvk.Gvk `json:",inline,omitempty" yaml:",inline,omitempty"` + Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"` + Name string `json:"name" yaml:"name"` +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/patch/strategicmerge.go b/vendor/sigs.k8s.io/kustomize/pkg/patch/strategicmerge.go new file mode 100644 index 000000000..596cc346d --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/patch/strategicmerge.go @@ -0,0 +1,40 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package patch + +// StrategicMerge represents a relative path to a +// stategic merge patch with the format +// https://github.com/kubernetes/community/blob/master/contributors/devel/strategic-merge-patch.md +type StrategicMerge string + +// Append appends a slice of patch paths to a StrategicMerge slice +func Append(patches []StrategicMerge, paths ...string) []StrategicMerge { + for _, p := range paths { + patches = append(patches, StrategicMerge(p)) + } + return patches +} + +// Exist determines if a patch path exists in a slice of StrategicMerge +func Exist(patches []StrategicMerge, path string) bool { + for _, p := range patches { + if p == StrategicMerge(path) { + return true + } + } + return false +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/patch/transformer/factory.go b/vendor/sigs.k8s.io/kustomize/pkg/patch/transformer/factory.go new file mode 100644 index 000000000..b373dfb72 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/patch/transformer/factory.go @@ -0,0 +1,83 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package transformer + +import ( + "fmt" + "sigs.k8s.io/kustomize/pkg/ifc" + "sigs.k8s.io/kustomize/pkg/resid" + + "sigs.k8s.io/kustomize/pkg/gvk" + "sigs.k8s.io/kustomize/pkg/patch" + "sigs.k8s.io/kustomize/pkg/transformers" +) + +// PatchJson6902Factory makes Json6902 transformers +type PatchJson6902Factory struct { + loader ifc.Loader +} + +// NewPatchJson6902Factory returns a new PatchJson6902Factory. +func NewPatchJson6902Factory(l ifc.Loader) PatchJson6902Factory { + return PatchJson6902Factory{loader: l} +} + +// MakePatchJson6902Transformer returns a transformer for applying Json6902 patch +func (f PatchJson6902Factory) MakePatchJson6902Transformer(patches []patch.Json6902) (transformers.Transformer, error) { + var ts []transformers.Transformer + for _, p := range patches { + t, err := f.makeOnePatchJson6902Transformer(p) + if err != nil { + return nil, err + } + if t != nil { + ts = append(ts, t) + } + } + return transformers.NewMultiTransformerWithConflictCheck(ts), nil +} + +func (f PatchJson6902Factory) makeOnePatchJson6902Transformer(p patch.Json6902) (transformers.Transformer, error) { + if p.Target == nil { + return nil, fmt.Errorf("must specify the target field in patchesJson6902") + } + if p.Path == "" { + return nil, fmt.Errorf("must specify the path for a json patch file") + } + + targetId := resid.NewResIdWithPrefixNamespace( + gvk.Gvk{ + Group: p.Target.Group, + Version: p.Target.Version, + Kind: p.Target.Kind, + }, + p.Target.Name, + "", + p.Target.Namespace, + ) + + rawOp, err := f.loader.Load(p.Path) + if err != nil { + return nil, err + } + + return newPatchJson6902JSONTransformer(targetId, rawOp) +} + +func isJsonFormat(data []byte) bool { + return data[0] == '[' +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/patch/transformer/patchjson6902json.go b/vendor/sigs.k8s.io/kustomize/pkg/patch/transformer/patchjson6902json.go new file mode 100644 index 000000000..1f09939d1 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/patch/transformer/patchjson6902json.go @@ -0,0 +1,108 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package transformer + +import ( + "fmt" + + "github.com/evanphx/json-patch" + "github.com/ghodss/yaml" + "github.com/pkg/errors" + "sigs.k8s.io/kustomize/pkg/resid" + "sigs.k8s.io/kustomize/pkg/resmap" + "sigs.k8s.io/kustomize/pkg/resource" + "sigs.k8s.io/kustomize/pkg/transformers" +) + +// patchJson6902JSONTransformer applies patches. +type patchJson6902JSONTransformer struct { + target resid.ResId + patch jsonpatch.Patch + rawOp []byte +} + +var _ transformers.Transformer = &patchJson6902JSONTransformer{} + +// newPatchJson6902JSONTransformer constructs a PatchJson6902 transformer. +func newPatchJson6902JSONTransformer( + id resid.ResId, rawOp []byte) (transformers.Transformer, error) { + op := rawOp + var err error + if !isJsonFormat(op) { + // if it isn't JSON, try to parse it as YAML + op, err = yaml.YAMLToJSON(rawOp) + if err != nil { + return nil, err + } + } + decodedPatch, err := jsonpatch.DecodePatch(op) + if err != nil { + return nil, err + } + if len(decodedPatch) == 0 { + return transformers.NewNoOpTransformer(), nil + } + return &patchJson6902JSONTransformer{target: id, patch: decodedPatch, rawOp: rawOp}, nil +} + +// Transform apply the json patches on top of the base resources. +func (t *patchJson6902JSONTransformer) Transform(m resmap.ResMap) error { + obj, err := t.findTargetObj(m) + if err != nil { + return err + } + rawObj, err := obj.MarshalJSON() + if err != nil { + return err + } + modifiedObj, err := t.patch.Apply(rawObj) + if err != nil { + return errors.Wrapf(err, "failed to apply json patch '%s'", string(t.rawOp)) + } + err = obj.UnmarshalJSON(modifiedObj) + if err != nil { + return err + } + return nil +} + +func (t *patchJson6902JSONTransformer) findTargetObj( + m resmap.ResMap) (*resource.Resource, error) { + var matched []resid.ResId + // TODO(monopole): namespace bug in json patch? + // Since introduction in PR #300 + // (see pkg/patch/transformer/util.go), + // this code has treated an empty namespace like a wildcard + // rather than like an additional restriction to match + // only the empty namespace. No test coverage to confirm. + // Not sure if desired, keeping it for now. + if t.target.Namespace() != "" { + matched = m.GetMatchingIds(t.target.NsGvknEquals) + } else { + matched = m.GetMatchingIds(t.target.GvknEquals) + } + if len(matched) == 0 { + return nil, fmt.Errorf( + "couldn't find target %v for json patch", t.target) + } + if len(matched) > 1 { + return nil, fmt.Errorf( + "found multiple targets %v matching %v for json patch", + matched, t.target) + } + return m[matched[0]], nil +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/resid/resid.go b/vendor/sigs.k8s.io/kustomize/pkg/resid/resid.go new file mode 100644 index 000000000..dbf9a3e92 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/resid/resid.go @@ -0,0 +1,207 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resid + +import ( + "strings" + + "sigs.k8s.io/kustomize/pkg/gvk" +) + +// ResId is an immutable identifier of a k8s resource object. +type ResId struct { + // Gvk of the resource. + gvKind gvk.Gvk + + // name of the resource before transformation. + name string + + // namePrefix of the resource. + // An untransformed resource has no prefix. + // A fully transformed resource has an arbitrary + // number of prefixes concatenated together. + prefix string + + // nameSuffix of the resource. + // An untransformed resource has no suffix. + // A fully transformed resource has an arbitrary + // number of suffixes concatenated together. + suffix string + + // Namespace the resource belongs to. + // An untransformed resource has no namespace. + // A fully transformed resource has the namespace + // from the top most overlay. + namespace string +} + +// NewResIdWithPrefixSuffixNamespace creates new resource identifier with a prefix, suffix and a namespace +func NewResIdWithPrefixSuffixNamespace(k gvk.Gvk, n, p, s, ns string) ResId { + return ResId{gvKind: k, name: n, prefix: p, suffix: s, namespace: ns} +} + +// NewResIdWithPrefixNamespace creates new resource identifier with a prefix and a namespace +func NewResIdWithPrefixNamespace(k gvk.Gvk, n, p, ns string) ResId { + return ResId{gvKind: k, name: n, prefix: p, namespace: ns} +} + +// NewResIdWithSuffixNamespace creates new resource identifier with a suffix and a namespace +func NewResIdWithSuffixNamespace(k gvk.Gvk, n, s, ns string) ResId { + return ResId{gvKind: k, name: n, suffix: s, namespace: ns} +} + +// NewResIdWithPrefixSuffix creates new resource identifier with a prefix and suffix +func NewResIdWithPrefixSuffix(k gvk.Gvk, n, p, s string) ResId { + return ResId{gvKind: k, name: n, prefix: p, suffix: s} +} + +// NewResId creates new resource identifier +func NewResId(k gvk.Gvk, n string) ResId { + return ResId{gvKind: k, name: n} +} + +// NewResIdKindOnly creates new resource identifier +func NewResIdKindOnly(k string, n string) ResId { + return ResId{gvKind: gvk.FromKind(k), name: n} +} + +const ( + noNamespace = "~X" + noPrefix = "~P" + noName = "~N" + noSuffix = "~S" + separator = "|" +) + +// String of ResId based on GVK, name and prefix +func (n ResId) String() string { + ns := n.namespace + if ns == "" { + ns = noNamespace + } + p := n.prefix + if p == "" { + p = noPrefix + } + nm := n.name + if nm == "" { + nm = noName + } + s := n.suffix + if s == "" { + s = noSuffix + } + + return strings.Join( + []string{n.gvKind.String(), ns, p, nm, s}, separator) +} + +// GvknString of ResId based on GVK and name +func (n ResId) GvknString() string { + return n.gvKind.String() + separator + n.name +} + +// GvknEquals returns true if the other id matches +// Group/Version/Kind/name. +func (n ResId) GvknEquals(id ResId) bool { + return n.name == id.name && n.gvKind.Equals(id.gvKind) +} + +// NsGvknEquals returns true if the other id matches +// namespace/Group/Version/Kind/name. +func (n ResId) NsGvknEquals(id ResId) bool { + return n.namespace == id.namespace && n.GvknEquals(id) +} + +// Gvk returns Group/Version/Kind of the resource. +func (n ResId) Gvk() gvk.Gvk { + return n.gvKind +} + +// Name returns resource name. +func (n ResId) Name() string { + return n.name +} + +// Namespace returns resource namespace. +func (n ResId) Namespace() string { + return n.namespace +} + +// CopyWithNewPrefixSuffix make a new copy from current ResId +// and append a new prefix and suffix +func (n ResId) CopyWithNewPrefixSuffix(p, s string) ResId { + result := n + if p != "" { + result.prefix = n.concatPrefix(p) + } + if s != "" { + result.suffix = n.concatSuffix(s) + } + return result +} + +// CopyWithNewNamespace make a new copy from current ResId and set a new namespace +func (n ResId) CopyWithNewNamespace(ns string) ResId { + result := n + result.namespace = ns + return result +} + +// HasSameLeftmostPrefix check if two ResIds have the same +// left most prefix. +func (n ResId) HasSameLeftmostPrefix(id ResId) bool { + prefixes1 := n.prefixList() + prefixes2 := id.prefixList() + return prefixes1[0] == prefixes2[0] +} + +// HasSameRightmostSuffix check if two ResIds have the same +// right most suffix. +func (n ResId) HasSameRightmostSuffix(id ResId) bool { + suffixes1 := n.suffixList() + suffixes2 := id.suffixList() + return suffixes1[len(suffixes1)-1] == suffixes2[len(suffixes2)-1] +} + +func (n ResId) concatPrefix(p string) string { + if p == "" { + return n.prefix + } + if n.prefix == "" { + return p + } + return p + ":" + n.prefix +} + +func (n ResId) concatSuffix(s string) string { + if s == "" { + return n.suffix + } + if n.suffix == "" { + return s + } + return n.suffix + ":" + s +} + +func (n ResId) prefixList() []string { + return strings.Split(n.prefix, ":") +} + +func (n ResId) suffixList() []string { + return strings.Split(n.suffix, ":") +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/resmap/factory.go b/vendor/sigs.k8s.io/kustomize/pkg/resmap/factory.go new file mode 100644 index 000000000..923cde232 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/resmap/factory.go @@ -0,0 +1,123 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resmap + +import ( + "fmt" + + "github.com/pkg/errors" + "sigs.k8s.io/kustomize/pkg/ifc" + internal "sigs.k8s.io/kustomize/pkg/internal/error" + "sigs.k8s.io/kustomize/pkg/resource" + "sigs.k8s.io/kustomize/pkg/types" +) + +// Factory makes instances of ResMap. +type Factory struct { + resF *resource.Factory +} + +// NewFactory returns a new resmap.Factory. +func NewFactory(rf *resource.Factory) *Factory { + return &Factory{resF: rf} +} + +// RF returns a resource.Factory. +func (rmF *Factory) RF() *resource.Factory { + return rmF.resF +} + +// FromFiles returns a ResMap given a resource path slice. +func (rmF *Factory) FromFiles( + loader ifc.Loader, paths []string) (ResMap, error) { + var result []ResMap + for _, path := range paths { + content, err := loader.Load(path) + if err != nil { + return nil, errors.Wrap(err, "Load from path "+path+" failed") + } + res, err := rmF.NewResMapFromBytes(content) + if err != nil { + return nil, internal.Handler(err, path) + } + result = append(result, res) + } + return MergeWithErrorOnIdCollision(result...) +} + +// newResMapFromBytes decodes a list of objects in byte array format. +func (rmF *Factory) NewResMapFromBytes(b []byte) (ResMap, error) { + resources, err := rmF.resF.SliceFromBytes(b) + if err != nil { + return nil, err + } + + result := ResMap{} + for _, res := range resources { + id := res.Id() + if _, found := result[id]; found { + return result, fmt.Errorf("GroupVersionKindName: %#v already exists b the map", id) + } + result[id] = res + } + return result, nil +} + +// NewResMapFromConfigMapArgs returns a Resource slice given +// a configmap metadata slice from kustomization file. +func (rmF *Factory) NewResMapFromConfigMapArgs(argList []types.ConfigMapArgs, options *types.GeneratorOptions) (ResMap, error) { + var resources []*resource.Resource + for _, args := range argList { + res, err := rmF.resF.MakeConfigMap(&args, options) + if err != nil { + return nil, errors.Wrap(err, "NewResMapFromConfigMapArgs") + } + resources = append(resources, res) + } + return newResMapFromResourceSlice(resources) +} + +// NewResMapFromSecretArgs takes a SecretArgs slice, generates +// secrets from each entry, and accumulates them in a ResMap. +func (rmF *Factory) NewResMapFromSecretArgs(argsList []types.SecretArgs, options *types.GeneratorOptions) (ResMap, error) { + var resources []*resource.Resource + for _, args := range argsList { + res, err := rmF.resF.MakeSecret(&args, options) + if err != nil { + return nil, errors.Wrap(err, "NewResMapFromSecretArgs") + } + resources = append(resources, res) + } + return newResMapFromResourceSlice(resources) +} + +// Set sets the loader for the underlying factory +func (rmF *Factory) Set(ldr ifc.Loader) { + rmF.resF.Set(ldr) +} + +func newResMapFromResourceSlice(resources []*resource.Resource) (ResMap, error) { + result := ResMap{} + for _, res := range resources { + id := res.Id() + if _, found := result[id]; found { + return nil, fmt.Errorf("duplicated %#v is not allowed", id) + } + result[id] = res + } + return result, nil +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/resmap/idslice.go b/vendor/sigs.k8s.io/kustomize/pkg/resmap/idslice.go new file mode 100644 index 000000000..cdf759203 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/resmap/idslice.go @@ -0,0 +1,37 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resmap + +import ( + "sort" + + "sigs.k8s.io/kustomize/pkg/resid" +) + +// IdSlice implements the sort interface. +type IdSlice []resid.ResId + +var _ sort.Interface = IdSlice{} + +func (a IdSlice) Len() int { return len(a) } +func (a IdSlice) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a IdSlice) Less(i, j int) bool { + if !a[i].Gvk().Equals(a[j].Gvk()) { + return a[i].Gvk().IsLessThan(a[j].Gvk()) + } + return a[i].String() < a[j].String() +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/resmap/resmap.go b/vendor/sigs.k8s.io/kustomize/pkg/resmap/resmap.go new file mode 100644 index 000000000..ca1e72398 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/resmap/resmap.go @@ -0,0 +1,200 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package resmap implements a map from ResId to Resource that tracks all resources in a kustomization. +package resmap + +import ( + "bytes" + "fmt" + "reflect" + "sort" + + "github.com/ghodss/yaml" + "sigs.k8s.io/kustomize/pkg/resid" + "sigs.k8s.io/kustomize/pkg/resource" + "sigs.k8s.io/kustomize/pkg/types" +) + +// ResMap is a map from ResId to Resource. +type ResMap map[resid.ResId]*resource.Resource + +type IdMatcher func(resid.ResId) bool + +// GetMatchingIds returns a slice of ResId keys from the map +// that all satisfy the given matcher function. +func (m ResMap) GetMatchingIds(matches IdMatcher) []resid.ResId { + var result []resid.ResId + for id := range m { + if matches(id) { + result = append(result, id) + } + } + return result +} + +// EncodeAsYaml encodes a ResMap to YAML; encoded objects separated by `---`. +func (m ResMap) EncodeAsYaml() ([]byte, error) { + var ids []resid.ResId + for id := range m { + ids = append(ids, id) + } + sort.Sort(IdSlice(ids)) + + firstObj := true + var b []byte + buf := bytes.NewBuffer(b) + for _, id := range ids { + obj := m[id] + out, err := yaml.Marshal(obj.Map()) + if err != nil { + return nil, err + } + if firstObj { + firstObj = false + } else { + _, err = buf.WriteString("---\n") + if err != nil { + return nil, err + } + } + _, err = buf.Write(out) + if err != nil { + return nil, err + } + } + return buf.Bytes(), nil +} + +// ErrorIfNotEqual returns error if maps are not equal. +func (m ResMap) ErrorIfNotEqual(m2 ResMap) error { + if len(m) != len(m2) { + var keySet1 []resid.ResId + var keySet2 []resid.ResId + for id := range m { + keySet1 = append(keySet1, id) + } + for id := range m2 { + keySet2 = append(keySet2, id) + } + return fmt.Errorf("maps has different number of entries: %#v doesn't equals %#v", keySet1, keySet2) + } + for id, obj1 := range m { + obj2, found := m2[id] + if !found { + return fmt.Errorf("%#v doesn't exist in %#v", id, m2) + } + if !reflect.DeepEqual(obj1, obj2) { + return fmt.Errorf("%#v doesn't deep equal %#v", obj1, obj2) + } + } + return nil +} + +// DeepCopy clone the resmap into a new one +func (m ResMap) DeepCopy(rf *resource.Factory) ResMap { + mcopy := make(ResMap) + for id, obj := range m { + mcopy[id] = obj.DeepCopy() + } + return mcopy +} + +// FilterBy returns a subset ResMap containing ResIds with +// the same namespace and leftmost name prefix and rightmost name +// as the inputId. If inputId is a cluster level resource, this +// returns the original ResMap. +func (m ResMap) FilterBy(inputId resid.ResId) ResMap { + if inputId.Gvk().IsClusterKind() { + return m + } + result := ResMap{} + for id, res := range m { + if id.Gvk().IsClusterKind() || id.Namespace() == inputId.Namespace() && + id.HasSameLeftmostPrefix(inputId) && + id.HasSameRightmostSuffix(inputId) { + result[id] = res + } + } + return result +} + +// MergeWithErrorOnIdCollision combines multiple ResMap instances, failing on +// key collision and skipping nil maps. +// If all of the maps are nil, an empty ResMap is returned. +func MergeWithErrorOnIdCollision(maps ...ResMap) (ResMap, error) { + result := ResMap{} + for _, m := range maps { + if m == nil { + continue + } + for id, res := range m { + if _, found := result[id]; found { + return nil, fmt.Errorf("id '%q' already used", id) + } + result[id] = res + } + } + return result, nil +} + +// MergeWithOverride combines multiple ResMap instances, allowing and sometimes +// demanding certain collisions and skipping nil maps. +// A collision would be demanded, say, when a generated ConfigMap has the +// "replace" option in its generation instructions, meaning it is supposed +// to replace something from the raw resources list. +// If all of the maps are nil, an empty ResMap is returned. +// When looping over the instances to combine them, if a resource id for +// resource X is found to be already in the combined map, then the behavior +// field for X must be BehaviorMerge or BehaviorReplace. If X is not in the +// map, then it's behavior cannot be merge or replace. +func MergeWithOverride(maps ...ResMap) (ResMap, error) { + result := maps[0] + if result == nil { + result = ResMap{} + } + for _, m := range maps[1:] { + if m == nil { + continue + } + for id, r := range m { + matchedId := result.GetMatchingIds(id.GvknEquals) + if len(matchedId) == 1 { + id = matchedId[0] + switch r.Behavior() { + case types.BehaviorReplace: + r.Replace(result[id]) + result[id] = r + case types.BehaviorMerge: + r.Merge(result[id]) + result[id] = r + default: + return nil, fmt.Errorf("id %#v exists; must merge or replace", id) + } + } else if len(matchedId) == 0 { + switch r.Behavior() { + case types.BehaviorMerge, types.BehaviorReplace: + return nil, fmt.Errorf("id %#v does not exist; cannot merge or replace", id) + default: + result[id] = r + } + } else { + return nil, fmt.Errorf("merge conflict, found multiple objects %v the Resmap %v can merge into", matchedId, id) + } + } + } + return result, nil +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/resource/factory.go b/vendor/sigs.k8s.io/kustomize/pkg/resource/factory.go new file mode 100644 index 000000000..148323dd6 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/resource/factory.go @@ -0,0 +1,148 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resource + +import ( + "encoding/json" + "fmt" + "log" + "strings" + + "sigs.k8s.io/kustomize/pkg/ifc" + internal "sigs.k8s.io/kustomize/pkg/internal/error" + "sigs.k8s.io/kustomize/pkg/patch" + "sigs.k8s.io/kustomize/pkg/types" +) + +// Factory makes instances of Resource. +type Factory struct { + kf ifc.KunstructuredFactory +} + +// NewFactory makes an instance of Factory. +func NewFactory(kf ifc.KunstructuredFactory) *Factory { + return &Factory{kf: kf} +} + +// FromMap returns a new instance of Resource. +func (rf *Factory) FromMap(m map[string]interface{}) *Resource { + return &Resource{ + Kunstructured: rf.kf.FromMap(m), + options: types.NewGenArgs(nil, nil), + } +} + +// FromMapAndOption returns a new instance of Resource with given options. +func (rf *Factory) FromMapAndOption(m map[string]interface{}, args *types.GeneratorArgs, option *types.GeneratorOptions) *Resource { + return &Resource{ + Kunstructured: rf.kf.FromMap(m), + options: types.NewGenArgs(args, option), + } +} + +// FromKunstructured returns a new instance of Resource. +func (rf *Factory) FromKunstructured( + u ifc.Kunstructured) *Resource { + if u == nil { + log.Fatal("unstruct ifc must not be null") + } + return &Resource{ + Kunstructured: u, + options: types.NewGenArgs(nil, nil), + } +} + +// SliceFromPatches returns a slice of resources given a patch path +// slice from a kustomization file. +func (rf *Factory) SliceFromPatches( + ldr ifc.Loader, paths []patch.StrategicMerge) ([]*Resource, error) { + var result []*Resource + for _, path := range paths { + content, err := ldr.Load(string(path)) + if err != nil { + return nil, err + } + res, err := rf.SliceFromBytes(content) + if err != nil { + return nil, internal.Handler(err, string(path)) + } + result = append(result, res...) + } + return result, nil +} + +// SliceFromBytes unmarshalls bytes into a Resource slice. +func (rf *Factory) SliceFromBytes(in []byte) ([]*Resource, error) { + kunStructs, err := rf.kf.SliceFromBytes(in) + if err != nil { + return nil, err + } + var result []*Resource + for len(kunStructs) > 0 { + u := kunStructs[0] + kunStructs = kunStructs[1:] + if strings.HasSuffix(u.GetKind(), "List") { + items := u.Map()["items"] + itemsSlice, ok := items.([]interface{}) + if !ok { + if items == nil { + // an empty list + continue + } + return nil, fmt.Errorf("items in List is type %T, expected array", items) + } + for _, item := range itemsSlice { + itemJSON, err := json.Marshal(item) + if err != nil { + return nil, err + } + innerU, err := rf.kf.SliceFromBytes(itemJSON) + if err != nil { + return nil, err + } + // append innerU to kunStructs so nested Lists can be handled + kunStructs = append(kunStructs, innerU...) + } + } else { + result = append(result, rf.FromKunstructured(u)) + } + } + return result, nil +} + +// Set sets the loader for the underlying factory +func (rf *Factory) Set(ldr ifc.Loader) { + rf.kf.Set(ldr) +} + +// MakeConfigMap makes an instance of Resource for ConfigMap +func (rf *Factory) MakeConfigMap(args *types.ConfigMapArgs, options *types.GeneratorOptions) (*Resource, error) { + u, err := rf.kf.MakeConfigMap(args, options) + if err != nil { + return nil, err + } + return &Resource{Kunstructured: u, options: types.NewGenArgs(&types.GeneratorArgs{Behavior: args.Behavior}, options)}, nil +} + +// MakeSecret makes an instance of Resource for Secret +func (rf *Factory) MakeSecret(args *types.SecretArgs, options *types.GeneratorOptions) (*Resource, error) { + u, err := rf.kf.MakeSecret(args, options) + if err != nil { + return nil, err + } + return &Resource{Kunstructured: u, options: types.NewGenArgs(&types.GeneratorArgs{Behavior: args.Behavior}, options)}, nil +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/resource/resource.go b/vendor/sigs.k8s.io/kustomize/pkg/resource/resource.go new file mode 100644 index 000000000..1e0e3764b --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/resource/resource.go @@ -0,0 +1,107 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package resource implements representations of k8s API resources as "unstructured" objects. +package resource + +import ( + "strings" + + "sigs.k8s.io/kustomize/pkg/ifc" + "sigs.k8s.io/kustomize/pkg/resid" + "sigs.k8s.io/kustomize/pkg/types" +) + +// Resource is map representation of a Kubernetes API resource object +// paired with a GenerationBehavior. +type Resource struct { + ifc.Kunstructured + options *types.GenArgs +} + +// String returns resource as JSON. +func (r *Resource) String() string { + bs, err := r.MarshalJSON() + if err != nil { + return "<" + err.Error() + ">" + } + return strings.TrimSpace(string(bs)) + r.options.String() +} + +// DeepCopy returns a new copy of resource +func (r *Resource) DeepCopy() *Resource { + return &Resource{ + Kunstructured: r.Kunstructured.Copy(), + options: r.options, + } +} + +// Behavior returns the behavior for the resource. +func (r *Resource) Behavior() types.GenerationBehavior { + return r.options.Behavior() +} + +// NeedAppendHash checks if the resource need a hash suffix +func (r *Resource) NeedHashSuffix() bool { + return r.options != nil && r.options.NeedsHashSuffix() +} + +// Id returns the ResId for the resource. +func (r *Resource) Id() resid.ResId { + namespace, _ := r.GetFieldValue("metadata.namespace") + return resid.NewResIdWithPrefixNamespace(r.GetGvk(), r.GetName(), "", namespace) +} + +// Merge performs merge with other resource. +func (r *Resource) Merge(other *Resource) { + r.Replace(other) + mergeConfigmap(r.Map(), other.Map(), r.Map()) +} + +// Replace performs replace with other resource. +func (r *Resource) Replace(other *Resource) { + r.SetLabels(mergeStringMaps(other.GetLabels(), r.GetLabels())) + r.SetAnnotations( + mergeStringMaps(other.GetAnnotations(), r.GetAnnotations())) + r.SetName(other.GetName()) + r.options = other.options +} + +// TODO: Add BinaryData once we sync to new k8s.io/api +func mergeConfigmap( + mergedTo map[string]interface{}, + maps ...map[string]interface{}) { + mergedMap := map[string]interface{}{} + for _, m := range maps { + datamap, ok := m["data"].(map[string]interface{}) + if ok { + for key, value := range datamap { + mergedMap[key] = value + } + } + } + mergedTo["data"] = mergedMap +} + +func mergeStringMaps(maps ...map[string]string) map[string]string { + result := map[string]string{} + for _, m := range maps { + for key, value := range m { + result[key] = value + } + } + return result +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/target/kusttarget.go b/vendor/sigs.k8s.io/kustomize/pkg/target/kusttarget.go new file mode 100644 index 000000000..f136b2683 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/target/kusttarget.go @@ -0,0 +1,315 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package target implements state for the set of all resources to customize. +package target + +import ( + "bytes" + "encoding/json" + "fmt" + "strings" + + "github.com/ghodss/yaml" + "github.com/pkg/errors" + "sigs.k8s.io/kustomize/pkg/constants" + "sigs.k8s.io/kustomize/pkg/ifc" + "sigs.k8s.io/kustomize/pkg/ifc/transformer" + interror "sigs.k8s.io/kustomize/pkg/internal/error" + patchtransformer "sigs.k8s.io/kustomize/pkg/patch/transformer" + "sigs.k8s.io/kustomize/pkg/resmap" + "sigs.k8s.io/kustomize/pkg/resource" + "sigs.k8s.io/kustomize/pkg/transformers" + "sigs.k8s.io/kustomize/pkg/transformers/config" + "sigs.k8s.io/kustomize/pkg/types" +) + +// KustTarget encapsulates the entirety of a kustomization build. +type KustTarget struct { + kustomization *types.Kustomization + ldr ifc.Loader + rFactory *resmap.Factory + tFactory transformer.Factory +} + +// NewKustTarget returns a new instance of KustTarget primed with a Loader. +func NewKustTarget( + ldr ifc.Loader, + rFactory *resmap.Factory, + tFactory transformer.Factory) (*KustTarget, error) { + content, err := loadKustFile(ldr) + if err != nil { + return nil, err + } + content = types.DealWithDeprecatedFields(content) + var k types.Kustomization + err = unmarshal(content, &k) + if err != nil { + return nil, err + } + errs := k.EnforceFields() + if len(errs) > 0 { + return nil, fmt.Errorf("Failed to read kustomization file under %s:\n"+strings.Join(errs, "\n"), ldr.Root()) + } + return &KustTarget{ + kustomization: &k, + ldr: ldr, + rFactory: rFactory, + tFactory: tFactory, + }, nil +} + +func quoted(l []string) []string { + r := make([]string, len(l)) + for i, v := range l { + r[i] = "'" + v + "'" + } + return r +} + +func commaOr(q []string) string { + return strings.Join(q[:len(q)-1], ", ") + " or " + q[len(q)-1] +} + +func loadKustFile(ldr ifc.Loader) ([]byte, error) { + var content []byte + match := 0 + for _, kf := range constants.KustomizationFileNames { + c, err := ldr.Load(kf) + if err == nil { + match += 1 + content = c + } + } + switch match { + case 0: + return nil, fmt.Errorf( + "unable to find one of %v in directory '%s'", + commaOr(quoted(constants.KustomizationFileNames)), ldr.Root()) + case 1: + return content, nil + default: + return nil, fmt.Errorf("Found multiple kustomization files under: %s\n", ldr.Root()) + } +} + +func unmarshal(y []byte, o interface{}) error { + j, err := yaml.YAMLToJSON(y) + if err != nil { + return err + } + dec := json.NewDecoder(bytes.NewReader(j)) + dec.DisallowUnknownFields() + return dec.Decode(o) +} + +// MakeCustomizedResMap creates a ResMap per kustomization instructions. +// The Resources in the returned ResMap are fully customized. +func (kt *KustTarget) MakeCustomizedResMap() (resmap.ResMap, error) { + ra, err := kt.AccumulateTarget() + if err != nil { + return nil, err + } + err = ra.Transform(kt.tFactory.MakeHashTransformer()) + if err != nil { + return nil, err + } + // Given that names have changed (prefixs/suffixes added), + // fix all the back references to those names. + err = ra.FixBackReferences() + if err != nil { + return nil, err + } + // With all the back references fixed, it's OK to resolve Vars. + err = ra.ResolveVars() + return ra.ResMap(), err +} + +func (kt *KustTarget) shouldAddHashSuffixesToGeneratedResources() bool { + return kt.kustomization.GeneratorOptions == nil || + !kt.kustomization.GeneratorOptions.DisableNameSuffixHash +} + +// AccumulateTarget returns a new ResAccumulator, +// holding customized resources and the data/rules used +// to do so. The name back references and vars are +// not yet fixed. +func (kt *KustTarget) AccumulateTarget() ( + ra *ResAccumulator, err error) { + // TODO(monopole): Get rid of the KustomizationErrors accumulator. + // It's not consistently used, and complicates tests. + errs := &interror.KustomizationErrors{} + ra, errs = kt.accumulateBases() + resources, err := kt.rFactory.FromFiles( + kt.ldr, kt.kustomization.Resources) + if err != nil { + errs.Append(errors.Wrap(err, "rawResources failed to read Resources")) + } + if len(errs.Get()) > 0 { + return ra, errs + } + err = ra.MergeResourcesWithErrorOnIdCollision(resources) + if err != nil { + errs.Append(errors.Wrap(err, "MergeResourcesWithErrorOnIdCollision")) + } + tConfig, err := config.MakeTransformerConfig( + kt.ldr, kt.kustomization.Configurations) + if err != nil { + return nil, err + } + err = ra.MergeConfig(tConfig) + if err != nil { + errs.Append(errors.Wrap(err, "MergeConfig")) + } + err = ra.MergeVars(kt.kustomization.Vars) + if err != nil { + errs.Append(errors.Wrap(err, "MergeVars")) + } + crdTc, err := config.LoadConfigFromCRDs(kt.ldr, kt.kustomization.Crds) + if err != nil { + errs.Append(errors.Wrap(err, "LoadCRDs")) + } + err = ra.MergeConfig(crdTc) + if err != nil { + errs.Append(errors.Wrap(err, "merge CRDs")) + } + resMap, err := kt.generateConfigMapsAndSecrets(errs) + if err != nil { + errs.Append(errors.Wrap(err, "generateConfigMapsAndSecrets")) + } + err = ra.MergeResourcesWithOverride(resMap) + if err != nil { + return nil, err + } + patches, err := kt.rFactory.RF().SliceFromPatches( + kt.ldr, kt.kustomization.PatchesStrategicMerge) + if err != nil { + errs.Append(errors.Wrap(err, "SliceFromPatches")) + } + if len(errs.Get()) > 0 { + return nil, errs + } + t, err := kt.newTransformer(patches, ra.tConfig) + if err != nil { + return nil, err + } + err = ra.Transform(t) + if err != nil { + return nil, err + } + return ra, nil +} + +func (kt *KustTarget) generateConfigMapsAndSecrets( + errs *interror.KustomizationErrors) (resmap.ResMap, error) { + kt.rFactory.Set(kt.ldr) + cms, err := kt.rFactory.NewResMapFromConfigMapArgs( + kt.kustomization.ConfigMapGenerator, kt.kustomization.GeneratorOptions) + if err != nil { + errs.Append(errors.Wrap(err, "NewResMapFromConfigMapArgs")) + } + secrets, err := kt.rFactory.NewResMapFromSecretArgs( + kt.kustomization.SecretGenerator, kt.kustomization.GeneratorOptions) + if err != nil { + errs.Append(errors.Wrap(err, "NewResMapFromSecretArgs")) + } + return resmap.MergeWithErrorOnIdCollision(cms, secrets) +} + +// accumulateBases returns a new ResAccumulator +// holding customized resources and the data/rules +// used to customized them from only the _bases_ +// of this KustTarget. +func (kt *KustTarget) accumulateBases() ( + ra *ResAccumulator, errs *interror.KustomizationErrors) { + errs = &interror.KustomizationErrors{} + ra = MakeEmptyAccumulator() + + for _, path := range kt.kustomization.Bases { + ldr, err := kt.ldr.New(path) + if err != nil { + errs.Append(errors.Wrap(err, "couldn't make loader for "+path)) + continue + } + subKt, err := NewKustTarget( + ldr, kt.rFactory, kt.tFactory) + if err != nil { + errs.Append(errors.Wrap(err, "couldn't make target for "+path)) + ldr.Cleanup() + continue + } + subRa, err := subKt.AccumulateTarget() + if err != nil { + errs.Append(errors.Wrap(err, "AccumulateTarget")) + ldr.Cleanup() + continue + } + err = ra.MergeAccumulator(subRa) + if err != nil { + errs.Append(errors.Wrap(err, path)) + } + ldr.Cleanup() + } + return ra, errs +} + +// newTransformer makes a Transformer that does a collection +// of object transformations. +func (kt *KustTarget) newTransformer( + patches []*resource.Resource, tConfig *config.TransformerConfig) ( + transformers.Transformer, error) { + var r []transformers.Transformer + t, err := kt.tFactory.MakePatchTransformer(patches, kt.rFactory.RF()) + if err != nil { + return nil, err + } + r = append(r, t) + r = append(r, transformers.NewNamespaceTransformer( + string(kt.kustomization.Namespace), tConfig.NameSpace)) + t, err = transformers.NewNamePrefixSuffixTransformer( + string(kt.kustomization.NamePrefix), + string(kt.kustomization.NameSuffix), + tConfig.NamePrefix, + ) + if err != nil { + return nil, err + } + r = append(r, t) + t, err = transformers.NewLabelsMapTransformer( + kt.kustomization.CommonLabels, tConfig.CommonLabels) + if err != nil { + return nil, err + } + r = append(r, t) + t, err = transformers.NewAnnotationsMapTransformer( + kt.kustomization.CommonAnnotations, tConfig.CommonAnnotations) + if err != nil { + return nil, err + } + r = append(r, t) + t, err = patchtransformer.NewPatchJson6902Factory(kt.ldr). + MakePatchJson6902Transformer(kt.kustomization.PatchesJson6902) + if err != nil { + return nil, err + } + r = append(r, t) + t, err = transformers.NewImageTransformer(kt.kustomization.Images) + if err != nil { + return nil, err + } + r = append(r, t) + return transformers.NewMultiTransformer(r), nil +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/target/resaccumulator.go b/vendor/sigs.k8s.io/kustomize/pkg/target/resaccumulator.go new file mode 100644 index 000000000..b8c45015a --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/target/resaccumulator.go @@ -0,0 +1,161 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package target + +import ( + "fmt" + "log" + "strings" + + "sigs.k8s.io/kustomize/pkg/resid" + "sigs.k8s.io/kustomize/pkg/resmap" + "sigs.k8s.io/kustomize/pkg/transformers" + "sigs.k8s.io/kustomize/pkg/transformers/config" + "sigs.k8s.io/kustomize/pkg/types" +) + +// ResAccumulator accumulates resources and the rules +// used to customize those resources. +// TODO(monopole): Move to "accumulator" package and make members private. +// This will make a better separation between KustTarget, which should +// be mainly concerned with data loading, and this class, which could +// become the home of all transformation data and logic. +type ResAccumulator struct { + resMap resmap.ResMap + tConfig *config.TransformerConfig + varSet types.VarSet +} + +func MakeEmptyAccumulator() *ResAccumulator { + ra := &ResAccumulator{} + ra.resMap = make(resmap.ResMap) + ra.tConfig = &config.TransformerConfig{} + ra.varSet = types.VarSet{} + return ra +} + +// ResMap returns a copy of the internal resMap. +func (ra *ResAccumulator) ResMap() resmap.ResMap { + result := make(resmap.ResMap) + for k, v := range ra.resMap { + result[k] = v + } + return result +} + +// Vars returns a copy of underlying vars. +func (ra *ResAccumulator) Vars() []types.Var { + return ra.varSet.Set() +} + +func (ra *ResAccumulator) MergeResourcesWithErrorOnIdCollision( + resources resmap.ResMap) (err error) { + ra.resMap, err = resmap.MergeWithErrorOnIdCollision( + resources, ra.resMap) + return err +} + +func (ra *ResAccumulator) MergeResourcesWithOverride( + resources resmap.ResMap) (err error) { + ra.resMap, err = resmap.MergeWithOverride( + ra.resMap, resources) + return err +} + +func (ra *ResAccumulator) MergeConfig( + tConfig *config.TransformerConfig) (err error) { + ra.tConfig, err = ra.tConfig.Merge(tConfig) + return err +} + +func (ra *ResAccumulator) MergeVars(incoming []types.Var) error { + return ra.varSet.MergeSlice(incoming) +} + +func (ra *ResAccumulator) MergeAccumulator(other *ResAccumulator) (err error) { + err = ra.MergeResourcesWithErrorOnIdCollision(other.resMap) + if err != nil { + return err + } + err = ra.MergeConfig(other.tConfig) + if err != nil { + return err + } + return ra.varSet.MergeSet(&other.varSet) +} + +// makeVarReplacementMap returns a map of Var names to +// their final values. The values are strings intended +// for substitution wherever the $(var.Name) occurs. +func (ra *ResAccumulator) makeVarReplacementMap() (map[string]string, error) { + result := map[string]string{} + for _, v := range ra.Vars() { + matched := ra.resMap.GetMatchingIds( + resid.NewResId(v.ObjRef.GVK(), v.ObjRef.Name).GvknEquals) + if len(matched) > 1 { + return nil, fmt.Errorf( + "found %d resId matches for var %s "+ + "(unable to disambiguate)", + len(matched), v) + } + if len(matched) == 1 { + s, err := ra.resMap[matched[0]].GetFieldValue(v.FieldRef.FieldPath) + if err != nil { + return nil, fmt.Errorf( + "field specified in var '%v' "+ + "not found in corresponding resource", v) + } + result[v.Name] = s + } else { + return nil, fmt.Errorf( + "var '%v' cannot be mapped to a field "+ + "in the set of known resources", v) + } + } + return result, nil +} + +func (ra *ResAccumulator) Transform(t transformers.Transformer) error { + return t.Transform(ra.resMap) +} + +func (ra *ResAccumulator) ResolveVars() error { + replacementMap, err := ra.makeVarReplacementMap() + if err != nil { + return err + } + if len(replacementMap) == 0 { + return nil + } + t := transformers.NewRefVarTransformer( + replacementMap, ra.tConfig.VarReference) + err = ra.Transform(t) + if len(t.UnusedVars()) > 0 { + log.Printf( + "well-defined vars that were never replaced: %s\n", + strings.Join(t.UnusedVars(), ",")) + } + return err +} + +func (ra *ResAccumulator) FixBackReferences() (err error) { + if ra.tConfig.NameReference == nil { + return nil + } + return ra.Transform(transformers.NewNameReferenceTransformer( + ra.tConfig.NameReference)) +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/defaultconfig/commonannotations.go b/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/defaultconfig/commonannotations.go new file mode 100644 index 000000000..275455904 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/defaultconfig/commonannotations.go @@ -0,0 +1,60 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package defaultconfig + +const commonAnnotationFieldSpecs = ` +commonAnnotations: +- path: metadata/annotations + create: true + +- path: spec/template/metadata/annotations + create: true + version: v1 + kind: ReplicationController + +- path: spec/template/metadata/annotations + create: true + kind: Deployment + +- path: spec/template/metadata/annotations + create: true + kind: ReplicaSet + +- path: spec/template/metadata/annotations + create: true + kind: DaemonSet + +- path: spec/template/metadata/annotations + create: true + kind: StatefulSet + +- path: spec/template/metadata/annotations + create: true + group: batch + kind: Job + +- path: spec/jobTemplate/metadata/annotations + create: true + group: batch + kind: CronJob + +- path: spec/jobTemplate/spec/template/metadata/annotations + create: true + group: batch + kind: CronJob + +` diff --git a/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/defaultconfig/commonlabels.go b/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/defaultconfig/commonlabels.go new file mode 100644 index 000000000..66943c1ed --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/defaultconfig/commonlabels.go @@ -0,0 +1,162 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package defaultconfig + +const commonLabelFieldSpecs = ` +commonLabels: +- path: metadata/labels + create: true + +- path: spec/selector + create: true + version: v1 + kind: Service + +- path: spec/selector + create: true + version: v1 + kind: ReplicationController + +- path: spec/template/metadata/labels + create: true + version: v1 + kind: ReplicationController + +- path: spec/selector/matchLabels + create: true + kind: Deployment + +- path: spec/template/metadata/labels + create: true + kind: Deployment + +- path: spec/template/spec/affinity/podAffinity/preferredDuringSchedulingIgnoredDuringExecution/podAffinityTerm/labelSelector/matchLabels + create: false + group: apps + kind: Deployment + +- path: spec/template/spec/affinity/podAffinity/requiredDuringSchedulingIgnoredDuringExecution/labelSelector/matchLabels + create: false + group: apps + kind: Deployment + +- path: spec/template/spec/affinity/podAntiAffinity/preferredDuringSchedulingIgnoredDuringExecution/podAffinityTerm/labelSelector/matchLabels + create: false + group: apps + kind: Deployment + +- path: spec/template/spec/affinity/podAntiAffinity/requiredDuringSchedulingIgnoredDuringExecution/labelSelector/matchLabels + create: false + group: apps + kind: Deployment + +- path: spec/selector/matchLabels + create: true + kind: ReplicaSet + +- path: spec/template/metadata/labels + create: true + kind: ReplicaSet + +- path: spec/selector/matchLabels + create: true + kind: DaemonSet + +- path: spec/template/metadata/labels + create: true + kind: DaemonSet + +- path: spec/selector/matchLabels + create: true + group: apps + kind: StatefulSet + +- path: spec/template/metadata/labels + create: true + group: apps + kind: StatefulSet + +- path: spec/template/spec/affinity/podAffinity/preferredDuringSchedulingIgnoredDuringExecution/podAffinityTerm/labelSelector/matchLabels + create: false + group: apps + kind: StatefulSet + +- path: spec/template/spec/affinity/podAffinity/requiredDuringSchedulingIgnoredDuringExecution/labelSelector/matchLabels + create: false + group: apps + kind: StatefulSet + +- path: spec/template/spec/affinity/podAntiAffinity/preferredDuringSchedulingIgnoredDuringExecution/podAffinityTerm/labelSelector/matchLabels + create: false + group: apps + kind: StatefulSet + +- path: spec/template/spec/affinity/podAntiAffinity/requiredDuringSchedulingIgnoredDuringExecution/labelSelector/matchLabels + create: false + group: apps + kind: StatefulSet + +- path: spec/volumeClaimTemplates/metadata/labels + create: true + group: apps + kind: StatefulSet + +- path: spec/selector/matchLabels + create: false + group: batch + kind: Job + +- path: spec/template/metadata/labels + create: true + group: batch + kind: Job + +- path: spec/jobTemplate/spec/selector/matchLabels + create: false + group: batch + kind: CronJob + +- path: spec/jobTemplate/metadata/labels + create: true + group: batch + kind: CronJob + +- path: spec/jobTemplate/spec/template/metadata/labels + create: true + group: batch + kind: CronJob + +- path: spec/selector/matchLabels + create: false + group: policy + kind: PodDisruptionBudget + +- path: spec/podSelector/matchLabels + create: false + group: networking.k8s.io + kind: NetworkPolicy + +- path: spec/ingress/from/podSelector/matchLabels + create: false + group: networking.k8s.io + kind: NetworkPolicy + +- path: spec/egress/to/podSelector/matchLabels + create: false + group: networking.k8s.io + kind: NetworkPolicy +` diff --git a/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/defaultconfig/defaultconfig.go b/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/defaultconfig/defaultconfig.go new file mode 100644 index 000000000..d96639a8a --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/defaultconfig/defaultconfig.go @@ -0,0 +1,49 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package defaultconfig provides the default +// transformer configurations +package defaultconfig + +import ( + "bytes" +) + +// GetDefaultFieldSpecs returns default fieldSpecs. +func GetDefaultFieldSpecs() []byte { + configData := [][]byte{ + []byte(namePrefixFieldSpecs), + []byte(commonLabelFieldSpecs), + []byte(commonAnnotationFieldSpecs), + []byte(namespaceFieldSpecs), + []byte(varReferenceFieldSpecs), + []byte(nameReferenceFieldSpecs), + } + return bytes.Join(configData, []byte("\n")) +} + +// GetDefaultFieldSpecsAsMap returns default fieldSpecs +// as a string->string map. +func GetDefaultFieldSpecsAsMap() map[string]string { + result := make(map[string]string) + result["nameprefix"] = namePrefixFieldSpecs + result["commonlabels"] = commonLabelFieldSpecs + result["commonannotations"] = commonAnnotationFieldSpecs + result["namespace"] = namespaceFieldSpecs + result["varreference"] = varReferenceFieldSpecs + result["namereference"] = nameReferenceFieldSpecs + return result +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/defaultconfig/nameprefix.go b/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/defaultconfig/nameprefix.go new file mode 100644 index 000000000..94fe07a48 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/defaultconfig/nameprefix.go @@ -0,0 +1,24 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package defaultconfig + +const ( + namePrefixFieldSpecs = ` +namePrefix: +- path: metadata/name +` +) diff --git a/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/defaultconfig/namereference.go b/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/defaultconfig/namereference.go new file mode 100644 index 000000000..35d4b7de0 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/defaultconfig/namereference.go @@ -0,0 +1,317 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package defaultconfig + +const ( + nameReferenceFieldSpecs = ` +nameReference: +- kind: Deployment + fieldSpecs: + - path: spec/scaleTargetRef/name + kind: HorizontalPodAutoscaler + +- kind: ReplicationController + fieldSpecs: + - path: spec/scaleTargetRef/name + kind: HorizontalPodAutoscaler + +- kind: ReplicaSet + fieldSpecs: + - path: spec/scaleTargetRef/name + kind: HorizontalPodAutoscaler + +- kind: ConfigMap + version: v1 + fieldSpecs: + - path: spec/volumes/configMap/name + version: v1 + kind: Pod + - path: spec/containers/env/valueFrom/configMapKeyRef/name + version: v1 + kind: Pod + - path: spec/initContainers/env/valueFrom/configMapKeyRef/name + version: v1 + kind: Pod + - path: spec/containers/envFrom/configMapRef/name + version: v1 + kind: Pod + - path: spec/initContainers/envFrom/configMapRef/name + version: v1 + kind: Pod + - path: spec/template/spec/volumes/configMap/name + kind: Deployment + - path: spec/template/spec/containers/env/valueFrom/configMapKeyRef/name + kind: Deployment + - path: spec/template/spec/initContainers/env/valueFrom/configMapKeyRef/name + kind: Deployment + - path: spec/template/spec/containers/envFrom/configMapRef/name + kind: Deployment + - path: spec/template/spec/initContainers/envFrom/configMapRef/name + kind: Deployment + - path: spec/template/spec/volumes/projected/sources/configMap/name + kind: Deployment + - path: spec/template/spec/volumes/configMap/name + kind: ReplicaSet + - path: spec/template/spec/containers/env/valueFrom/configMapKeyRef/name + kind: ReplicaSet + - path: spec/template/spec/initContainers/env/valueFrom/configMapKeyRef/name + kind: ReplicaSet + - path: spec/template/spec/containers/envFrom/configMapRef/name + kind: ReplicaSet + - path: spec/template/spec/initContainers/envFrom/configMapRef/name + kind: ReplicaSet + - path: spec/template/spec/volumes/configMap/name + kind: DaemonSet + - path: spec/template/spec/containers/env/valueFrom/configMapKeyRef/name + kind: DaemonSet + - path: spec/template/spec/initContainers/env/valueFrom/configMapKeyRef/name + kind: DaemonSet + - path: spec/template/spec/containers/envFrom/configMapRef/name + kind: DaemonSet + - path: spec/template/spec/initContainers/envFrom/configMapRef/name + kind: DaemonSet + - path: spec/template/spec/volumes/configMap/name + kind: StatefulSet + - path: spec/template/spec/containers/env/valueFrom/configMapKeyRef/name + kind: StatefulSet + - path: spec/template/spec/initContainers/env/valueFrom/configMapKeyRef/name + kind: StatefulSet + - path: spec/template/spec/containers/envFrom/configMapRef/name + kind: StatefulSet + - path: spec/template/spec/initContainers/envFrom/configMapRef/name + kind: StatefulSet + - path: spec/template/spec/volumes/projected/sources/configMap/name + kind: StatefulSet + - path: spec/template/spec/volumes/configMap/name + kind: Job + - path: spec/template/spec/containers/env/valueFrom/configMapKeyRef/name + kind: Job + - path: spec/template/spec/initContainers/env/valueFrom/configMapKeyRef/name + kind: Job + - path: spec/template/spec/containers/envFrom/configMapRef/name + kind: Job + - path: spec/template/spec/initContainers/envFrom/configMapRef/name + kind: Job + - path: spec/jobTemplate/spec/template/spec/volumes/configMap/name + kind: CronJob + - path: spec/jobTemplate/spec/template/spec/containers/env/valueFrom/configMapKeyRef/name + kind: CronJob + - path: spec/jobTemplate/spec/template/spec/initContainers/env/valueFrom/configMapKeyRef/name + kind: CronJob + - path: spec/jobTemplate/spec/template/spec/containers/envFrom/configMapRef/name + kind: CronJob + - path: spec/jobTemplate/spec/template/spec/initContainers/envFrom/configmapRef/name + kind: CronJob + +- kind: Secret + version: v1 + fieldSpecs: + - path: spec/volumes/secret/secretName + version: v1 + kind: Pod + - path: spec/containers/env/valueFrom/secretKeyRef/name + version: v1 + kind: Pod + - path: spec/initContainers/env/valueFrom/secretKeyRef/name + version: v1 + kind: Pod + - path: spec/containers/envFrom/secretRef/name + version: v1 + kind: Pod + - path: spec/initContainers/envFrom/secretRef/name + version: v1 + kind: Pod + - path: spec/imagePullSecrets/name + version: v1 + kind: Pod + - path: spec/template/spec/volumes/secret/secretName + kind: Deployment + - path: spec/template/spec/containers/env/valueFrom/secretKeyRef/name + kind: Deployment + - path: spec/template/spec/initContainers/env/valueFrom/secretKeyRef/name + kind: Deployment + - path: spec/template/spec/containers/envFrom/secretRef/name + kind: Deployment + - path: spec/template/spec/initContainers/envFrom/secretRef/name + kind: Deployment + - path: spec/template/spec/imagePullSecrets/name + kind: Deployment + - path: spec/template/spec/volumes/projected/sources/secret/name + kind: Deployment + - path: spec/template/spec/volumes/secret/secretName + kind: ReplicaSet + - path: spec/template/spec/containers/env/valueFrom/secretKeyRef/name + kind: ReplicaSet + - path: spec/template/spec/initContainers/env/valueFrom/secretKeyRef/name + kind: ReplicaSet + - path: spec/template/spec/containers/envFrom/secretRef/name + kind: ReplicaSet + - path: spec/template/spec/initContainers/envFrom/secretRef/name + kind: ReplicaSet + - path: spec/template/spec/imagePullSecrets/name + kind: ReplicaSet + - path: spec/template/spec/volumes/secret/secretName + kind: DaemonSet + - path: spec/template/spec/containers/env/valueFrom/secretKeyRef/name + kind: DaemonSet + - path: spec/template/spec/initContainers/env/valueFrom/secretKeyRef/name + kind: DaemonSet + - path: spec/template/spec/containers/envFrom/secretRef/name + kind: DaemonSet + - path: spec/template/spec/initContainers/envFrom/secretRef/name + kind: DaemonSet + - path: spec/template/spec/imagePullSecrets/name + kind: DaemonSet + - path: spec/template/spec/volumes/secret/secretName + kind: StatefulSet + - path: spec/template/spec/containers/env/valueFrom/secretKeyRef/name + kind: StatefulSet + - path: spec/template/spec/initContainers/env/valueFrom/secretKeyRef/name + kind: StatefulSet + - path: spec/template/spec/containers/envFrom/secretRef/name + kind: StatefulSet + - path: spec/template/spec/initContainers/envFrom/secretRef/name + kind: StatefulSet + - path: spec/template/spec/imagePullSecrets/name + kind: StatefulSet + - path: spec/template/spec/volumes/projected/sources/secret/name + kind: StatefulSet + - path: spec/template/spec/volumes/secret/secretName + kind: Job + - path: spec/template/spec/containers/env/valueFrom/secretKeyRef/name + kind: Job + - path: spec/template/spec/initContainers/env/valueFrom/secretKeyRef/name + kind: Job + - path: spec/template/spec/containers/envFrom/secretRef/name + kind: Job + - path: spec/template/spec/initContainers/envFrom/secretRef/name + kind: Job + - path: spec/template/spec/imagePullSecrets/name + kind: Job + - path: spec/jobTemplate/spec/template/spec/volumes/secret/secretName + kind: CronJob + - path: spec/jobTemplate/spec/template/spec/containers/env/valueFrom/secretKeyRef/name + kind: CronJob + - path: spec/jobTemplate/spec/template/spec/initContainers/env/valueFrom/secretKeyRef/name + kind: CronJob + - path: spec/jobTemplate/spec/template/spec/containers/envFrom/secretRef/name + kind: CronJob + - path: spec/jobTemplate/spec/template/spec/initContainers/envFrom/secretRef/name + kind: CronJob + - path: spec/jobTemplate/spec/template/spec/imagePullSecrets/name + kind: CronJob + - path: spec/tls/secretName + kind: Ingress + - path: metadata/annotations/ingress.kubernetes.io\/auth-secret + kind: Ingress + - path: metadata/annotations/nginx.ingress.kubernetes.io\/auth-secret + kind: Ingress + - path: imagePullSecrets/name + kind: ServiceAccount + - path: parameters/secretName + kind: StorageClass + - path: parameters/adminSecretName + kind: StorageClass + - path: parameters/userSecretName + kind: StorageClass + - path: parameters/secretRef + kind: StorageClass + - path: rules/resourceNames + kind: Role + - path: rules/resourceNames + kind: ClusterRole + +- kind: Service + version: v1 + fieldSpecs: + - path: spec/serviceName + kind: StatefulSet + group: apps + - path: spec/rules/http/paths/backend/serviceName + kind: Ingress + - path: spec/backend/serviceName + kind: Ingress + - path: spec/service/name + kind: APIService + group: apiregistration.k8s.io + +- kind: Role + group: rbac.authorization.k8s.io + fieldSpecs: + - path: roleRef/name + kind: RoleBinding + group: rbac.authorization.k8s.io + +- kind: ClusterRole + group: rbac.authorization.k8s.io + fieldSpecs: + - path: roleRef/name + kind: RoleBinding + group: rbac.authorization.k8s.io + - path: roleRef/name + kind: ClusterRoleBinding + group: rbac.authorization.k8s.io + +- kind: ServiceAccount + version: v1 + fieldSpecs: + - path: subjects/name + kind: RoleBinding + group: rbac.authorization.k8s.io + - path: subjects/name + kind: ClusterRoleBinding + group: rbac.authorization.k8s.io + - path: spec/serviceAccountName + kind: Pod + - path: spec/template/spec/serviceAccountName + kind: StatefulSet + - path: spec/template/spec/serviceAccountName + kind: Deployment + - path: spec/template/spec/serviceAccountName + kind: ReplicationController + - path: spec/jobTemplate/spec/template/spec/serviceAccountName + kind: CronJob + - path: spec/template/spec/serviceAccountName + kind: job + - path: spec/template/spec/serviceAccountName + kind: DaemonSet + +- kind: PersistentVolumeClaim + version: v1 + fieldSpecs: + - path: spec/volumes/persistentVolumeClaim/claimName + kind: Pod + - path: spec/template/spec/volumes/persistentVolumeClaim/claimName + kind: StatefulSet + - path: spec/template/spec/volumes/persistentVolumeClaim/claimName + kind: Deployment + - path: spec/template/spec/volumes/persistentVolumeClaim/claimName + kind: ReplicationController + - path: spec/jobTemplate/spec/template/spec/volumes/persistentVolumeClaim/claimName + kind: CronJob + - path: spec/template/spec/volumes/persistentVolumeClaim/claimName + kind: Job + - path: spec/template/spec/volumes/persistentVolumeClaim/claimName + kind: DaemonSet + +- kind: PersistentVolume + version: v1 + fieldSpecs: + - path: spec/volumeName + kind: PersistentVolumeClaim +` +) diff --git a/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/defaultconfig/namespace.go b/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/defaultconfig/namespace.go new file mode 100644 index 000000000..431eb0769 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/defaultconfig/namespace.go @@ -0,0 +1,25 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package defaultconfig + +const ( + namespaceFieldSpecs = ` +namespace: +- path: metadata/namespace + create: true +` +) diff --git a/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/defaultconfig/varreference.go b/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/defaultconfig/varreference.go new file mode 100644 index 000000000..71953f576 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/defaultconfig/varreference.go @@ -0,0 +1,162 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package defaultconfig + +const ( + varReferenceFieldSpecs = ` +varReference: +- path: spec/template/spec/initContainers/command + kind: StatefulSet + +- path: spec/template/spec/containers/command + kind: StatefulSet + +- path: spec/template/spec/initContainers/command + kind: Deployment + +- path: spec/template/spec/containers/command + kind: Deployment + +- path: spec/template/spec/initContainers/command + kind: DaemonSet + +- path: spec/template/spec/containers/command + kind: DaemonSet + +- path: spec/template/spec/containers/command + kind: Job + +- path: spec/jobTemplate/spec/template/spec/containers/command + kind: CronJob + +- path: spec/template/spec/initContainers/args + kind: StatefulSet + +- path: spec/template/spec/containers/args + kind: StatefulSet + +- path: spec/template/spec/initContainers/args + kind: Deployment + +- path: spec/template/spec/containers/args + kind: Deployment + +- path: spec/template/spec/initContainers/args + kind: DaemonSet + +- path: spec/template/spec/containers/args + kind: DaemonSet + +- path: spec/template/spec/containers/args + kind: Job + +- path: spec/jobTemplate/spec/template/spec/containers/args + kind: CronJob + +- path: spec/template/spec/initContainers/env/value + kind: StatefulSet + +- path: spec/template/spec/containers/env/value + kind: StatefulSet + +- path: spec/template/spec/initContainers/env/value + kind: Deployment + +- path: spec/template/spec/containers/env/value + kind: Deployment + +- path: spec/template/spec/initContainers/env/value + kind: DaemonSet + +- path: spec/template/spec/containers/env/value + kind: DaemonSet + +- path: spec/template/spec/containers/env/value + kind: Job + +- path: spec/jobTemplate/spec/template/spec/containers/env/value + kind: CronJob + +- path: spec/containers/command + kind: Pod + +- path: spec/containers/args + kind: Pod + +- path: spec/containers/env/value + kind: Pod + +- path: spec/initContainers/command + kind: Pod + +- path: spec/initContainers/args + kind: Pod + +- path: spec/initContainers/env/value + kind: Pod + +- path: spec/rules/host + kind: Ingress + +- path: spec/tls/hosts + kind: Ingress + +- path: spec/template/spec/containers/volumeMounts/mountPath + kind: StatefulSet + +- path: spec/template/spec/initContainers/volumeMounts/mountPath + kind: StatefulSet + +- path: spec/containers/volumeMounts/mountPath + kind: Pod + +- path: spec/initContainers/volumeMounts/mountPath + kind: Pod + +- path: spec/template/spec/containers/volumeMounts/mountPath + kind: ReplicaSet + +- path: spec/template/spec/initContainers/volumeMounts/mountPath + kind: ReplicaSet + +- path: spec/template/spec/containers/volumeMounts/mountPath + kind: Job + +- path: spec/template/spec/initContainers/volumeMounts/mountPath + kind: Job + +- path: spec/template/spec/containers/volumeMounts/mountPath + kind: CronJob + +- path: spec/template/spec/initContainers/volumeMounts/mountPath + kind: CronJob + +- path: spec/template/spec/containers/volumeMounts/mountPath + kind: DaemonSet + +- path: spec/template/spec/initContainers/volumeMounts/mountPath + kind: DaemonSet + +- path: spec/template/spec/containers/volumeMounts/mountPath + kind: Deployment + +- path: spec/template/spec/initContainers/volumeMounts/mountPath + kind: Deployment + +- path: metadata/labels +` +) diff --git a/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/factory.go b/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/factory.go new file mode 100644 index 000000000..d0ea0d1dd --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/factory.go @@ -0,0 +1,87 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package config + +import ( + "log" + + "github.com/ghodss/yaml" + "sigs.k8s.io/kustomize/pkg/ifc" +) + +// Factory makes instances of TransformerConfig. +type Factory struct { + ldr ifc.Loader +} + +// MakeTransformerConfig returns a merger of custom config, +// if any, with default config. +func MakeTransformerConfig( + ldr ifc.Loader, paths []string) (*TransformerConfig, error) { + t1 := MakeDefaultConfig() + if len(paths) == 0 { + return t1, nil + } + t2, err := NewFactory(ldr).FromFiles(paths) + if err != nil { + return nil, err + } + return t1.Merge(t2) +} + +func NewFactory(l ifc.Loader) *Factory { + return &Factory{ldr: l} +} + +func (tf *Factory) loader() ifc.Loader { + if tf.ldr.(ifc.Loader) == nil { + log.Fatal("no loader") + } + return tf.ldr +} + +// FromFiles returns a TranformerConfig object from a list of files +func (tf *Factory) FromFiles( + paths []string) (*TransformerConfig, error) { + result := &TransformerConfig{} + for _, path := range paths { + data, err := tf.loader().Load(path) + if err != nil { + return nil, err + } + t, err := makeTransformerConfigFromBytes(data) + if err != nil { + return nil, err + } + result, err = result.Merge(t) + if err != nil { + return nil, err + } + } + return result, nil +} + +// makeTransformerConfigFromBytes returns a TransformerConfig object from bytes +func makeTransformerConfigFromBytes(data []byte) (*TransformerConfig, error) { + var t TransformerConfig + err := yaml.Unmarshal(data, &t) + if err != nil { + return nil, err + } + t.sortFields() + return &t, nil +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/factorycrd.go b/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/factorycrd.go new file mode 100644 index 000000000..66a24dc86 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/factorycrd.go @@ -0,0 +1,201 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package config + +import ( + "encoding/json" + "strings" + + "github.com/ghodss/yaml" + "github.com/go-openapi/spec" + "github.com/pkg/errors" + "k8s.io/kube-openapi/pkg/common" + "sigs.k8s.io/kustomize/pkg/gvk" + "sigs.k8s.io/kustomize/pkg/ifc" +) + +type myProperties map[string]spec.Schema +type nameToApiMap map[string]common.OpenAPIDefinition + +// LoadConfigFromCRDs parse CRD schemas from paths into a TransformerConfig +func LoadConfigFromCRDs( + ldr ifc.Loader, paths []string) (*TransformerConfig, error) { + tc := MakeEmptyConfig() + for _, path := range paths { + content, err := ldr.Load(path) + if err != nil { + return nil, err + } + m, err := makeNameToApiMap(content) + if err != nil { + return nil, errors.Wrapf(err, "unable to parse open API definition from '%s'", path) + } + otherTc, err := makeConfigFromApiMap(m) + if err != nil { + return nil, err + } + tc, err = tc.Merge(otherTc) + if err != nil { + return nil, err + } + } + return tc, nil +} + +func makeNameToApiMap(content []byte) (result nameToApiMap, err error) { + if content[0] == '{' { + err = json.Unmarshal(content, &result) + } else { + err = yaml.Unmarshal(content, &result) + } + return +} + +func makeConfigFromApiMap(m nameToApiMap) (*TransformerConfig, error) { + result := MakeEmptyConfig() + for name, api := range m { + if !looksLikeAk8sType(api.Schema.SchemaProps.Properties) { + continue + } + tc := MakeEmptyConfig() + err := loadCrdIntoConfig( + tc, makeGvkFromTypeName(name), m, name, []string{}) + if err != nil { + return result, err + } + result, err = result.Merge(tc) + if err != nil { + return result, err + } + } + return result, nil +} + +// TODO: Get Group and Version for CRD from the +// openAPI definition once +// "x-kubernetes-group-version-kind" is available in CRD +func makeGvkFromTypeName(n string) gvk.Gvk { + names := strings.Split(n, ".") + kind := names[len(names)-1] + return gvk.Gvk{Kind: kind} +} + +func looksLikeAk8sType(properties myProperties) bool { + _, ok := properties["kind"] + if !ok { + return false + } + _, ok = properties["apiVersion"] + if !ok { + return false + } + _, ok = properties["metadata"] + if !ok { + return false + } + return true +} + +const ( + // "x-kubernetes-annotation": "" + xAnnotation = "x-kubernetes-annotation" + + // "x-kubernetes-label-selector": "" + xLabelSelector = "x-kubernetes-label-selector" + + // "x-kubernetes-identity": "" + xIdentity = "x-kubernetes-identity" + + // "x-kubernetes-object-ref-api-version": + xVersion = "x-kubernetes-object-ref-api-version" + + // "x-kubernetes-object-ref-kind": + xKind = "x-kubernetes-object-ref-kind" + + // "x-kubernetes-object-ref-name-key": "name" + // default is "name" + xNameKey = "x-kubernetes-object-ref-name-key" +) + +// loadCrdIntoConfig loads a CRD spec into a TransformerConfig +func loadCrdIntoConfig( + theConfig *TransformerConfig, theGvk gvk.Gvk, theMap nameToApiMap, + typeName string, path []string) (err error) { + api, ok := theMap[typeName] + if !ok { + return nil + } + for propName, property := range api.Schema.SchemaProps.Properties { + _, annotate := property.Extensions.GetString(xAnnotation) + if annotate { + err = theConfig.AddAnnotationFieldSpec( + makeFs(theGvk, append(path, propName))) + if err != nil { + return + } + } + _, label := property.Extensions.GetString(xLabelSelector) + if label { + err = theConfig.AddLabelFieldSpec( + makeFs(theGvk, append(path, propName))) + if err != nil { + return + } + } + _, identity := property.Extensions.GetString(xIdentity) + if identity { + err = theConfig.AddPrefixFieldSpec( + makeFs(theGvk, append(path, propName))) + if err != nil { + return + } + } + version, ok := property.Extensions.GetString(xVersion) + if ok { + kind, ok := property.Extensions.GetString(xKind) + if ok { + nameKey, ok := property.Extensions.GetString(xNameKey) + if !ok { + nameKey = "name" + } + err = theConfig.AddNamereferenceFieldSpec( + NameBackReferences{ + Gvk: gvk.Gvk{Kind: kind, Version: version}, + FieldSpecs: []FieldSpec{ + makeFs(theGvk, append(path, propName, nameKey))}, + }) + if err != nil { + return + } + } + } + if property.Ref.GetURL() != nil { + loadCrdIntoConfig( + theConfig, theGvk, theMap, + property.Ref.String(), append(path, propName)) + } + } + return nil +} + +func makeFs(in gvk.Gvk, path []string) FieldSpec { + return FieldSpec{ + CreateIfNotPresent: false, + Gvk: in, + Path: strings.Join(path, "/"), + } +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/fieldspec.go b/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/fieldspec.go new file mode 100644 index 000000000..5b0f6ee33 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/fieldspec.go @@ -0,0 +1,139 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package config + +import ( + "fmt" + "strings" + + "sigs.k8s.io/kustomize/pkg/gvk" +) + +// FieldSpec completely specifies a kustomizable field in +// an unstructured representation of a k8s API object. +// It helps define the operands of transformations. +// +// For example, a directive to add a common label to objects +// will need to know that a 'Deployment' object (in API group +// 'apps', any version) can have labels at field path +// 'spec/template/metadata/labels', and further that it is OK +// (or not OK) to add that field path to the object if the +// field path doesn't exist already. +// +// This would look like +// { +// group: apps +// kind: Deployment +// path: spec/template/metadata/labels +// create: true +// } +type FieldSpec struct { + gvk.Gvk `json:",inline,omitempty" yaml:",inline,omitempty"` + Path string `json:"path,omitempty" yaml:"path,omitempty"` + CreateIfNotPresent bool `json:"create,omitempty" yaml:"create,omitempty"` +} + +const ( + escapedForwardSlash = "\\/" + tempSlashReplacement = "???" +) + +func (fs FieldSpec) String() string { + return fmt.Sprintf( + "%s:%v:%s", fs.Gvk.String(), fs.CreateIfNotPresent, fs.Path) +} + +// If true, the primary key is the same, but other fields might not be. +func (fs FieldSpec) effectivelyEquals(other FieldSpec) bool { + return fs.IsSelected(&other.Gvk) && fs.Path == other.Path +} + +// PathSlice converts the path string to a slice of strings, +// separated by a '/'. Forward slash can be contained in a +// fieldname. such as ingress.kubernetes.io/auth-secret in +// Ingress annotations. To deal with this special case, the +// path to this field should be formatted as +// +// metadata/annotations/ingress.kubernetes.io\/auth-secret +// +// Then PathSlice will return +// +// []string{ +// "metadata", +// "annotations", +// "ingress.auth-secretkubernetes.io/auth-secret" +// } +func (fs FieldSpec) PathSlice() []string { + if !strings.Contains(fs.Path, escapedForwardSlash) { + return strings.Split(fs.Path, "/") + } + s := strings.Replace(fs.Path, escapedForwardSlash, tempSlashReplacement, -1) + paths := strings.Split(s, "/") + var result []string + for _, path := range paths { + result = append(result, strings.Replace(path, tempSlashReplacement, "/", -1)) + } + return result +} + +type fsSlice []FieldSpec + +func (s fsSlice) Len() int { return len(s) } +func (s fsSlice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } +func (s fsSlice) Less(i, j int) bool { + return s[i].Gvk.IsLessThan(s[j].Gvk) +} + +// mergeAll merges the argument into this, returning the result. +// Items already present are ignored. +// Items that conflict (primary key matches, but remain data differs) +// result in an error. +func (s fsSlice) mergeAll(incoming fsSlice) (result fsSlice, err error) { + result = s + for _, x := range incoming { + result, err = result.mergeOne(x) + if err != nil { + return nil, err + } + } + return result, nil +} + +// mergeOne merges the argument into this, returning the result. +// If the item's primary key is already present, and there are no +// conflicts, it is ignored (we don't want duplicates). +// If there is a conflict, the merge fails. +func (s fsSlice) mergeOne(x FieldSpec) (fsSlice, error) { + i := s.index(x) + if i > -1 { + // It's already there. + if s[i].CreateIfNotPresent != x.CreateIfNotPresent { + return nil, fmt.Errorf("conflicting fieldspecs") + } + return s, nil + } + return append(s, x), nil +} + +func (s fsSlice) index(fs FieldSpec) int { + for i, x := range s { + if x.effectivelyEquals(fs) { + return i + } + } + return -1 +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/namebackreferences.go b/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/namebackreferences.go new file mode 100644 index 000000000..172e4b3ca --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/namebackreferences.go @@ -0,0 +1,105 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package config + +import ( + "strings" + + "sigs.k8s.io/kustomize/pkg/gvk" +) + +// NameBackReferences is an association between a gvk.GVK and a list +// of FieldSpec instances that could refer to it. +// +// It is used to handle name changes, and can be thought of as a +// a contact list. If you change your own contact info (name, +// phone number, etc.), you must tell your contacts or they won't +// know about the change. +// +// For example, ConfigMaps can be used by Pods and everything that +// contains a Pod; Deployment, Job, StatefulSet, etc. To change +// the name of a ConfigMap instance from 'alice' to 'bob', one +// must visit all objects that could refer to the ConfigMap, see if +// they mention 'alice', and if so, change the reference to 'bob'. +// +// The NameBackReferences instance to aid in this could look like +// { +// kind: ConfigMap +// version: v1 +// FieldSpecs: +// - kind: Pod +// version: v1 +// path: spec/volumes/configMap/name +// - kind: Deployment +// path: spec/template/spec/volumes/configMap/name +// - kind: Job +// path: spec/template/spec/volumes/configMap/name +// (etc.) +// } +type NameBackReferences struct { + gvk.Gvk `json:",inline,omitempty" yaml:",inline,omitempty"` + FieldSpecs fsSlice `json:"FieldSpecs,omitempty" yaml:"FieldSpecs,omitempty"` +} + +func (n NameBackReferences) String() string { + var r []string + for _, f := range n.FieldSpecs { + r = append(r, f.String()) + } + return n.Gvk.String() + ": (\n" + + strings.Join(r, "\n") + "\n)" +} + +type nbrSlice []NameBackReferences + +func (s nbrSlice) Len() int { return len(s) } +func (s nbrSlice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } +func (s nbrSlice) Less(i, j int) bool { + return s[i].Gvk.IsLessThan(s[j].Gvk) +} + +func (s nbrSlice) mergeAll(o nbrSlice) (result nbrSlice, err error) { + result = s + for _, r := range o { + result, err = result.mergeOne(r) + if err != nil { + return nil, err + } + } + return result, nil +} + +func (s nbrSlice) mergeOne(other NameBackReferences) (nbrSlice, error) { + var result nbrSlice + var err error + found := false + for _, c := range s { + if c.Gvk.Equals(other.Gvk) { + c.FieldSpecs, err = c.FieldSpecs.mergeAll(other.FieldSpecs) + if err != nil { + return nil, err + } + found = true + } + result = append(result, c) + } + + if !found { + result = append(result, other) + } + return result, nil +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/transformerconfig.go b/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/transformerconfig.go new file mode 100644 index 000000000..556f0b814 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/transformers/config/transformerconfig.go @@ -0,0 +1,134 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package config provides the functions to load default or user provided configurations +// for different transformers +package config + +import ( + "log" + "sort" + + "sigs.k8s.io/kustomize/pkg/transformers/config/defaultconfig" +) + +// TransformerConfig holds the data needed to perform transformations. +type TransformerConfig struct { + NamePrefix fsSlice `json:"namePrefix,omitempty" yaml:"namePrefix,omitempty"` + NameSuffix fsSlice `json:"nameSuffix,omitempty" yaml:"nameSuffix,omitempty"` + NameSpace fsSlice `json:"namespace,omitempty" yaml:"namespace,omitempty"` + CommonLabels fsSlice `json:"commonLabels,omitempty" yaml:"commonLabels,omitempty"` + CommonAnnotations fsSlice `json:"commonAnnotations,omitempty" yaml:"commonAnnotations,omitempty"` + NameReference nbrSlice `json:"nameReference,omitempty" yaml:"nameReference,omitempty"` + VarReference fsSlice `json:"varReference,omitempty" yaml:"varReference,omitempty"` +} + +// MakeEmptyConfig returns an empty TransformerConfig object +func MakeEmptyConfig() *TransformerConfig { + return &TransformerConfig{} +} + +// MakeDefaultConfig returns a default TransformerConfig. +func MakeDefaultConfig() *TransformerConfig { + c, err := makeTransformerConfigFromBytes( + defaultconfig.GetDefaultFieldSpecs()) + if err != nil { + log.Fatalf("Unable to make default transformconfig: %v", err) + } + return c +} + +// sortFields provides determinism in logging, tests, etc. +func (t *TransformerConfig) sortFields() { + sort.Sort(t.NamePrefix) + sort.Sort(t.NameSpace) + sort.Sort(t.CommonLabels) + sort.Sort(t.CommonAnnotations) + sort.Sort(t.NameReference) + sort.Sort(t.VarReference) +} + +// AddPrefixFieldSpec adds a FieldSpec to NamePrefix +func (t *TransformerConfig) AddPrefixFieldSpec(fs FieldSpec) (err error) { + t.NamePrefix, err = t.NamePrefix.mergeOne(fs) + return err +} + +// AddSuffixFieldSpec adds a FieldSpec to NameSuffix +func (t *TransformerConfig) AddSuffixFieldSpec(fs FieldSpec) (err error) { + t.NameSuffix, err = t.NameSuffix.mergeOne(fs) + return err +} + +// AddLabelFieldSpec adds a FieldSpec to CommonLabels +func (t *TransformerConfig) AddLabelFieldSpec(fs FieldSpec) (err error) { + t.CommonLabels, err = t.CommonLabels.mergeOne(fs) + return err +} + +// AddAnnotationFieldSpec adds a FieldSpec to CommonAnnotations +func (t *TransformerConfig) AddAnnotationFieldSpec(fs FieldSpec) (err error) { + t.CommonAnnotations, err = t.CommonAnnotations.mergeOne(fs) + return err +} + +// AddNamereferenceFieldSpec adds a NameBackReferences to NameReference +func (t *TransformerConfig) AddNamereferenceFieldSpec( + nbrs NameBackReferences) (err error) { + t.NameReference, err = t.NameReference.mergeOne(nbrs) + return err +} + +// Merge merges two TransformerConfigs objects into +// a new TransformerConfig object +func (t *TransformerConfig) Merge(input *TransformerConfig) ( + merged *TransformerConfig, err error) { + if input == nil { + return t, nil + } + merged = &TransformerConfig{} + merged.NamePrefix, err = t.NamePrefix.mergeAll(input.NamePrefix) + if err != nil { + return nil, err + } + merged.NameSuffix, err = t.NameSuffix.mergeAll(input.NameSuffix) + if err != nil { + return nil, err + } + merged.NameSpace, err = t.NameSpace.mergeAll(input.NameSpace) + if err != nil { + return nil, err + } + merged.CommonAnnotations, err = t.CommonAnnotations.mergeAll( + input.CommonAnnotations) + if err != nil { + return nil, err + } + merged.CommonLabels, err = t.CommonLabels.mergeAll(input.CommonLabels) + if err != nil { + return nil, err + } + merged.VarReference, err = t.VarReference.mergeAll(input.VarReference) + if err != nil { + return nil, err + } + merged.NameReference, err = t.NameReference.mergeAll(input.NameReference) + if err != nil { + return nil, err + } + merged.sortFields() + return merged, nil +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/transformers/image.go b/vendor/sigs.k8s.io/kustomize/pkg/transformers/image.go new file mode 100644 index 000000000..2e0797694 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/transformers/image.go @@ -0,0 +1,171 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package transformers + +import ( + "fmt" + "regexp" + "strings" + + "sigs.k8s.io/kustomize/pkg/image" + "sigs.k8s.io/kustomize/pkg/resmap" +) + +// imageTransformer replace image names and tags +type imageTransformer struct { + images []image.Image +} + +var _ Transformer = &imageTransformer{} + +// NewImageTransformer constructs an imageTransformer. +func NewImageTransformer(slice []image.Image) (Transformer, error) { + return &imageTransformer{slice}, nil +} + +// Transform finds the matching images and replaces name, tag and/or digest +func (pt *imageTransformer) Transform(resources resmap.ResMap) error { + if len(pt.images) == 0 { + return nil + } + for _, res := range resources { + err := pt.findAndReplaceImage(res.Map()) + if err != nil { + return err + } + } + return nil +} + +/* + findAndReplaceImage replaces the image name and tags inside one object + It searches the object for container session + then loops though all images inside containers session, + finds matched ones and update the image name and tag name +*/ +func (pt *imageTransformer) findAndReplaceImage(obj map[string]interface{}) error { + paths := []string{"containers", "initContainers"} + found := false + for _, path := range paths { + _, found = obj[path] + if found { + err := pt.updateContainers(obj, path) + if err != nil { + return err + } + } + } + if !found { + return pt.findContainers(obj) + } + return nil +} + +func (pt *imageTransformer) updateContainers(obj map[string]interface{}, path string) error { + containers, ok := obj[path].([]interface{}) + if !ok { + return fmt.Errorf("containers path is not of type []interface{} but %T", obj[path]) + } + for i := range containers { + container := containers[i].(map[string]interface{}) + containerImage, found := container["image"] + if !found { + continue + } + + imageName := containerImage.(string) + for _, img := range pt.images { + if !isImageMatched(imageName, img.Name) { + continue + } + name, tag := split(imageName) + if img.NewName != "" { + name = img.NewName + } + if img.NewTag != "" { + tag = ":" + img.NewTag + } + if img.Digest != "" { + tag = "@" + img.Digest + } + container["image"] = name + tag + break + } + } + return nil +} + +func (pt *imageTransformer) findContainers(obj map[string]interface{}) error { + for key := range obj { + switch typedV := obj[key].(type) { + case map[string]interface{}: + err := pt.findAndReplaceImage(typedV) + if err != nil { + return err + } + case []interface{}: + for i := range typedV { + item := typedV[i] + typedItem, ok := item.(map[string]interface{}) + if ok { + err := pt.findAndReplaceImage(typedItem) + if err != nil { + return err + } + } + } + } + } + return nil +} + +func isImageMatched(s, t string) bool { + // Tag values are limited to [a-zA-Z0-9_.-]. + pattern, _ := regexp.Compile("^" + t + "(:[a-zA-Z0-9_.-]*)?$") + return pattern.MatchString(s) +} + +// split separates and returns the name and tag parts +// from the image string using either colon `:` or at `@` separators. +// Note that the returned tag keeps its separator. +func split(imageName string) (name string, tag string) { + // check if image name contains a domain + // if domain is present, ignore domain and check for `:` + ic := -1 + if slashIndex := strings.Index(imageName, "/"); slashIndex < 0 { + ic = strings.LastIndex(imageName, ":") + } else { + lastIc := strings.LastIndex(imageName[slashIndex:], ":") + // set ic only if `:` is present + if lastIc > 0 { + ic = slashIndex + lastIc + } + } + ia := strings.LastIndex(imageName, "@") + if ic < 0 && ia < 0 { + return imageName, "" + } + + i := ic + if ic < 0 { + i = ia + } + + name = imageName[:i] + tag = imageName[i:] + return +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/transformers/labelsandannotations.go b/vendor/sigs.k8s.io/kustomize/pkg/transformers/labelsandannotations.go new file mode 100644 index 000000000..836abcaa4 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/transformers/labelsandannotations.go @@ -0,0 +1,86 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package transformers + +import ( + "errors" + "fmt" + + "sigs.k8s.io/kustomize/pkg/resmap" + "sigs.k8s.io/kustomize/pkg/transformers/config" +) + +// mapTransformer applies a string->string map to fieldSpecs. +type mapTransformer struct { + m map[string]string + fieldSpecs []config.FieldSpec +} + +var _ Transformer = &mapTransformer{} + +// NewLabelsMapTransformer constructs a mapTransformer. +func NewLabelsMapTransformer( + m map[string]string, fs []config.FieldSpec) (Transformer, error) { + return NewMapTransformer(fs, m) +} + +// NewAnnotationsMapTransformer construct a mapTransformer. +func NewAnnotationsMapTransformer( + m map[string]string, fs []config.FieldSpec) (Transformer, error) { + return NewMapTransformer(fs, m) +} + +// NewMapTransformer construct a mapTransformer. +func NewMapTransformer( + pc []config.FieldSpec, m map[string]string) (Transformer, error) { + if m == nil { + return NewNoOpTransformer(), nil + } + if pc == nil { + return nil, errors.New("fieldSpecs is not expected to be nil") + } + return &mapTransformer{fieldSpecs: pc, m: m}, nil +} + +// Transform apply each pair in the mapTransformer to the +// fields specified in mapTransformer. +func (o *mapTransformer) Transform(m resmap.ResMap) error { + for id := range m { + objMap := m[id].Map() + for _, path := range o.fieldSpecs { + if !id.Gvk().IsSelected(&path.Gvk) { + continue + } + err := mutateField(objMap, path.PathSlice(), path.CreateIfNotPresent, o.addMap) + if err != nil { + return err + } + } + } + return nil +} + +func (o *mapTransformer) addMap(in interface{}) (interface{}, error) { + m, ok := in.(map[string]interface{}) + if !ok { + return nil, fmt.Errorf("%#v is expected to be %T", in, m) + } + for k, v := range o.m { + m[k] = v + } + return m, nil +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/transformers/multitransformer.go b/vendor/sigs.k8s.io/kustomize/pkg/transformers/multitransformer.go new file mode 100644 index 000000000..d5921d1a9 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/transformers/multitransformer.go @@ -0,0 +1,95 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package transformers + +import ( + "fmt" + "sigs.k8s.io/kustomize/pkg/resource" + + "sigs.k8s.io/kustomize/pkg/resmap" +) + +// multiTransformer contains a list of transformers. +type multiTransformer struct { + transformers []Transformer + checkConflictEnabled bool + rf *resource.Factory +} + +var _ Transformer = &multiTransformer{} + +// NewMultiTransformer constructs a multiTransformer. +func NewMultiTransformer(t []Transformer) Transformer { + r := &multiTransformer{ + transformers: make([]Transformer, len(t)), + checkConflictEnabled: false} + copy(r.transformers, t) + return r +} + +// NewMultiTransformerWithConflictCheck constructs a multiTransformer with checking of conflicts. +func NewMultiTransformerWithConflictCheck(t []Transformer) Transformer { + r := &multiTransformer{ + transformers: make([]Transformer, len(t)), + checkConflictEnabled: true} + copy(r.transformers, t) + return r +} + +// Transform prepends the name prefix. +func (o *multiTransformer) Transform(m resmap.ResMap) error { + if o.checkConflictEnabled { + return o.transformWithCheckConflict(m) + } + return o.transform(m) +} +func (o *multiTransformer) transform(m resmap.ResMap) error { + for _, t := range o.transformers { + err := t.Transform(m) + if err != nil { + return err + } + } + return nil +} + +// Of the len(o.transformers)! possible transformer orderings, compare to a reversed order. +// A spot check to perform when the transformations are supposed to be commutative. +// Fail if there's a difference in the result. +func (o *multiTransformer) transformWithCheckConflict(m resmap.ResMap) error { + mcopy := m.DeepCopy(o.rf) + err := o.transform(m) + if err != nil { + return err + } + o.reverseTransformers() + err = o.transform(mcopy) + if err != nil { + return err + } + err = m.ErrorIfNotEqual(mcopy) + if err != nil { + return fmt.Errorf("found conflict between different patches\n%v", err) + } + return nil +} + +func (o *multiTransformer) reverseTransformers() { + for i, j := 0, len(o.transformers)-1; i < j; i, j = i+1, j-1 { + o.transformers[i], o.transformers[j] = o.transformers[j], o.transformers[i] + } +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/transformers/mutatefield.go b/vendor/sigs.k8s.io/kustomize/pkg/transformers/mutatefield.go new file mode 100644 index 000000000..eddfeee20 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/transformers/mutatefield.go @@ -0,0 +1,81 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package transformers + +import ( + "fmt" + "log" + "strings" +) + +type mutateFunc func(interface{}) (interface{}, error) + +func mutateField( + m map[string]interface{}, + pathToField []string, + createIfNotPresent bool, + fns ...mutateFunc) error { + if len(pathToField) == 0 { + return nil + } + + _, found := m[pathToField[0]] + if !found { + if !createIfNotPresent { + return nil + } + m[pathToField[0]] = map[string]interface{}{} + } + + if len(pathToField) == 1 { + var err error + for _, fn := range fns { + m[pathToField[0]], err = fn(m[pathToField[0]]) + if err != nil { + return err + } + } + return nil + } + + v := m[pathToField[0]] + newPathToField := pathToField[1:] + switch typedV := v.(type) { + case nil: + log.Printf( + "nil value at `%s` ignored in mutation attempt", + strings.Join(pathToField, ".")) + return nil + case map[string]interface{}: + return mutateField(typedV, newPathToField, createIfNotPresent, fns...) + case []interface{}: + for i := range typedV { + item := typedV[i] + typedItem, ok := item.(map[string]interface{}) + if !ok { + return fmt.Errorf("%#v is expected to be %T", item, typedItem) + } + err := mutateField(typedItem, newPathToField, createIfNotPresent, fns...) + if err != nil { + return err + } + } + return nil + default: + return fmt.Errorf("%#v is not expected to be a primitive type", typedV) + } +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/transformers/namereference.go b/vendor/sigs.k8s.io/kustomize/pkg/transformers/namereference.go new file mode 100644 index 000000000..a4e8a7f8e --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/transformers/namereference.go @@ -0,0 +1,144 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package transformers + +import ( + "fmt" + "log" + + "sigs.k8s.io/kustomize/pkg/gvk" + "sigs.k8s.io/kustomize/pkg/resmap" + "sigs.k8s.io/kustomize/pkg/transformers/config" +) + +type nameReferenceTransformer struct { + backRefs []config.NameBackReferences +} + +var _ Transformer = &nameReferenceTransformer{} + +// NewNameReferenceTransformer constructs a nameReferenceTransformer +// with a given slice of NameBackReferences. +func NewNameReferenceTransformer(br []config.NameBackReferences) Transformer { + if br == nil { + log.Fatal("backrefs not expected to be nil") + } + return &nameReferenceTransformer{backRefs: br} +} + +// Transform updates name references in resource A that refer to resource B, +// given that B's name may have changed. +// +// For example, a HorizontalPodAutoscaler (HPA) necessarily refers to a +// Deployment (the thing that the HPA scales). The Deployment name might change +// (e.g. prefix added), and the reference in the HPA has to be fixed. +// +// In the outer loop below, we encounter an HPA. In scanning backrefs, we +// find that HPA refers to a Deployment. So we find all resources in the same +// namespace as the HPA (and with the same prefix and suffix), and look through +// them to find all the Deployments with a resId that has a Name matching the +// field in HPA. For each match, we overwrite the HPA name field with the value +// found in the Deployment's name field (the name in the raw object - the +// modified name - not the unmodified name in the resId). +// +// This assumes that the name stored in a ResId (the ResMap key) isn't modified +// by name transformers. Name transformers should only modify the name in the +// body of the resource object (the value in the ResMap). +func (o *nameReferenceTransformer) Transform(m resmap.ResMap) error { + // TODO: Too much looping. + // Even more hidden loops in FilterBy, + // updateNameReference and FindByGVKN. + for id := range m { + for _, backRef := range o.backRefs { + for _, fSpec := range backRef.FieldSpecs { + if id.Gvk().IsSelected(&fSpec.Gvk) { + err := mutateField( + m[id].Map(), fSpec.PathSlice(), + fSpec.CreateIfNotPresent, + o.updateNameReference( + backRef.Gvk, m.FilterBy(id))) + if err != nil { + return err + } + } + } + } + } + return nil +} + +func (o *nameReferenceTransformer) updateNameReference( + backRef gvk.Gvk, m resmap.ResMap) func(in interface{}) (interface{}, error) { + return func(in interface{}) (interface{}, error) { + switch in.(type) { + case string: + s, _ := in.(string) + for id, res := range m { + if id.Gvk().IsSelected(&backRef) && id.Name() == s { + matchedIds := m.GetMatchingIds(id.GvknEquals) + // If there's more than one match, there's no way + // to know which one to pick, so emit error. + if len(matchedIds) > 1 { + return nil, fmt.Errorf( + "Multiple matches for name %s:\n %v", id, matchedIds) + } + // Return transformed name of the object, + // complete with prefixes, hashes, etc. + return res.GetName(), nil + } + } + return in, nil + case []interface{}: + l, _ := in.([]interface{}) + var names []string + for _, item := range l { + name, ok := item.(string) + if !ok { + return nil, fmt.Errorf("%#v is expected to be %T", item, name) + } + names = append(names, name) + } + for id, res := range m { + indexes := indexOf(id.Name(), names) + if id.Gvk().IsSelected(&backRef) && len(indexes) > 0 { + matchedIds := m.GetMatchingIds(id.GvknEquals) + if len(matchedIds) > 1 { + return nil, fmt.Errorf( + "Multiple matches for name %s:\n %v", id, matchedIds) + } + for _, index := range indexes { + l[index] = res.GetName() + } + return l, nil + } + } + return in, nil + default: + return nil, fmt.Errorf("%#v is expected to be either a string or a []interface{}", in) + } + } +} + +func indexOf(s string, slice []string) []int { + var index []int + for i, item := range slice { + if item == s { + index = append(index, i) + } + } + return index +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/transformers/namespace.go b/vendor/sigs.k8s.io/kustomize/pkg/transformers/namespace.go new file mode 100644 index 000000000..5f0c06482 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/transformers/namespace.go @@ -0,0 +1,121 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package transformers + +import ( + "sigs.k8s.io/kustomize/pkg/gvk" + "sigs.k8s.io/kustomize/pkg/resmap" + "sigs.k8s.io/kustomize/pkg/transformers/config" +) + +type namespaceTransformer struct { + namespace string + fieldSpecsToUse []config.FieldSpec + fieldSpecsToSkip []config.FieldSpec +} + +var _ Transformer = &namespaceTransformer{} + +// NewNamespaceTransformer construct a namespaceTransformer. +func NewNamespaceTransformer(ns string, cf []config.FieldSpec) Transformer { + if len(ns) == 0 { + return NewNoOpTransformer() + } + var skip []config.FieldSpec + for _, g := range gvk.ClusterLevelGvks() { + skip = append(skip, config.FieldSpec{Gvk: g}) + } + return &namespaceTransformer{ + namespace: ns, + fieldSpecsToUse: cf, + fieldSpecsToSkip: skip, + } +} + +// Transform adds the namespace. +func (o *namespaceTransformer) Transform(m resmap.ResMap) error { + mf := resmap.ResMap{} + + for id := range m { + found := false + for _, path := range o.fieldSpecsToSkip { + if id.Gvk().IsSelected(&path.Gvk) { + found = true + break + } + } + if !found { + mf[id] = m[id] + delete(m, id) + } + } + + for id := range mf { + objMap := mf[id].Map() + for _, path := range o.fieldSpecsToUse { + if !id.Gvk().IsSelected(&path.Gvk) { + continue + } + + err := mutateField(objMap, path.PathSlice(), path.CreateIfNotPresent, func(_ interface{}) (interface{}, error) { + return o.namespace, nil + }) + if err != nil { + return err + } + newid := id.CopyWithNewNamespace(o.namespace) + m[newid] = mf[id] + } + + } + o.updateClusterRoleBinding(m) + return nil +} + +func (o *namespaceTransformer) updateClusterRoleBinding(m resmap.ResMap) { + saMap := map[string]bool{} + for id := range m { + if id.Gvk().Equals(gvk.Gvk{Version: "v1", Kind: "ServiceAccount"}) { + saMap[id.Name()] = true + } + } + + for id := range m { + if id.Gvk().Kind != "ClusterRoleBinding" && id.Gvk().Kind != "RoleBinding" { + continue + } + objMap := m[id].Map() + subjects := objMap["subjects"].([]interface{}) + for i := range subjects { + subject := subjects[i].(map[string]interface{}) + kind, foundk := subject["kind"] + name, foundn := subject["name"] + if !foundk || !foundn || kind.(string) != "ServiceAccount" { + continue + } + // a ServiceAccount named “default” exists in every active namespace + if name.(string) == "default" || saMap[name.(string)] { + subject := subjects[i].(map[string]interface{}) + mutateField(subject, []string{"namespace"}, true, func(_ interface{}) (interface{}, error) { + return o.namespace, nil + }) + subjects[i] = subject + } + } + objMap["subjects"] = subjects + } +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/transformers/nooptransformer.go b/vendor/sigs.k8s.io/kustomize/pkg/transformers/nooptransformer.go new file mode 100644 index 000000000..c07389b31 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/transformers/nooptransformer.go @@ -0,0 +1,34 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package transformers + +import "sigs.k8s.io/kustomize/pkg/resmap" + +// noOpTransformer contains a no-op transformer. +type noOpTransformer struct{} + +var _ Transformer = &noOpTransformer{} + +// NewNoOpTransformer constructs a noOpTransformer. +func NewNoOpTransformer() Transformer { + return &noOpTransformer{} +} + +// Transform does nothing. +func (o *noOpTransformer) Transform(_ resmap.ResMap) error { + return nil +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/transformers/prefixsuffixname.go b/vendor/sigs.k8s.io/kustomize/pkg/transformers/prefixsuffixname.go new file mode 100644 index 000000000..c4ca85f53 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/transformers/prefixsuffixname.go @@ -0,0 +1,109 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package transformers + +import ( + "errors" + "fmt" + + "sigs.k8s.io/kustomize/pkg/gvk" + "sigs.k8s.io/kustomize/pkg/resmap" + "sigs.k8s.io/kustomize/pkg/transformers/config" +) + +// namePrefixSuffixTransformer contains the prefix, suffix, and the FieldSpecs +// for each field needing a name prefix and suffix. +type namePrefixSuffixTransformer struct { + prefix string + suffix string + fieldSpecsToUse []config.FieldSpec + fieldSpecsToSkip []config.FieldSpec +} + +var _ Transformer = &namePrefixSuffixTransformer{} + +var prefixSuffixFieldSpecsToSkip = []config.FieldSpec{ + { + Gvk: gvk.Gvk{Kind: "CustomResourceDefinition"}, + }, +} + +// NewNamePrefixSuffixTransformer makes a namePrefixSuffixTransformer. +func NewNamePrefixSuffixTransformer( + np, ns string, fieldSpecs []config.FieldSpec) (Transformer, error) { + if len(np) == 0 && len(ns) == 0 { + return NewNoOpTransformer(), nil + } + if fieldSpecs == nil { + return nil, errors.New("fieldSpecs is not expected to be nil") + } + return &namePrefixSuffixTransformer{ + prefix: np, + suffix: ns, + fieldSpecsToUse: fieldSpecs, + fieldSpecsToSkip: prefixSuffixFieldSpecsToSkip}, nil +} + +// Transform prepends the name prefix and appends the name suffix. +func (o *namePrefixSuffixTransformer) Transform(m resmap.ResMap) error { + // Fill map "mf" with entries subject to name modification, and + // delete these entries from "m", so that for now m retains only + // the entries whose names will not be modified. + mf := resmap.ResMap{} + for id := range m { + found := false + for _, path := range o.fieldSpecsToSkip { + if id.Gvk().IsSelected(&path.Gvk) { + found = true + break + } + } + if !found { + mf[id] = m[id] + delete(m, id) + } + } + + for id := range mf { + objMap := mf[id].Map() + for _, path := range o.fieldSpecsToUse { + if !id.Gvk().IsSelected(&path.Gvk) { + continue + } + err := mutateField( + objMap, + path.PathSlice(), + path.CreateIfNotPresent, + o.addPrefixSuffix) + if err != nil { + return err + } + newId := id.CopyWithNewPrefixSuffix(o.prefix, o.suffix) + m[newId] = mf[id] + } + } + return nil +} + +func (o *namePrefixSuffixTransformer) addPrefixSuffix( + in interface{}) (interface{}, error) { + s, ok := in.(string) + if !ok { + return nil, fmt.Errorf("%#v is expected to be %T", in, s) + } + return fmt.Sprintf("%s%s%s", o.prefix, s, o.suffix), nil +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/transformers/refvars.go b/vendor/sigs.k8s.io/kustomize/pkg/transformers/refvars.go new file mode 100644 index 000000000..b31ec6e7a --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/transformers/refvars.go @@ -0,0 +1,94 @@ +package transformers + +import ( + "fmt" + "sigs.k8s.io/kustomize/pkg/expansion" + "sigs.k8s.io/kustomize/pkg/resmap" + "sigs.k8s.io/kustomize/pkg/transformers/config" +) + +type RefVarTransformer struct { + varMap map[string]string + replacementCounts map[string]int + fieldSpecs []config.FieldSpec + mappingFunc func(string) string +} + +// NewRefVarTransformer returns a new RefVarTransformer +// that replaces $(VAR) style variables with values. +// The fieldSpecs are the places to look for occurrences of $(VAR). +func NewRefVarTransformer( + varMap map[string]string, fs []config.FieldSpec) *RefVarTransformer { + return &RefVarTransformer{ + varMap: varMap, + fieldSpecs: fs, + } +} + +// replaceVars accepts as 'in' a string, or string array, which can have +// embedded instances of $VAR style variables, e.g. a container command string. +// The function returns the string with the variables expanded to their final +// values. +func (rv *RefVarTransformer) replaceVars(in interface{}) (interface{}, error) { + switch vt := in.(type) { + case []interface{}: + var xs []string + for _, a := range in.([]interface{}) { + xs = append(xs, expansion.Expand(a.(string), rv.mappingFunc)) + } + return xs, nil + case map[string]interface{}: + inMap := in.(map[string]interface{}) + xs := make(map[string]interface{}, len(inMap)) + for k, v := range inMap { + s, ok := v.(string) + if !ok { + return nil, fmt.Errorf("%#v is expected to be %T", v, s) + } + xs[k] = expansion.Expand(s, rv.mappingFunc) + } + return xs, nil + case interface{}: + s, ok := in.(string) + if !ok { + return nil, fmt.Errorf("%#v is expected to be %T", in, s) + } + return expansion.Expand(s, rv.mappingFunc), nil + case nil: + return nil, nil + default: + return "", fmt.Errorf("invalid type encountered %T", vt) + } +} + +// UnusedVars returns slice of Var names that were unused +// after a Transform run. +func (rv *RefVarTransformer) UnusedVars() []string { + var unused []string + for k := range rv.varMap { + _, ok := rv.replacementCounts[k] + if !ok { + unused = append(unused, k) + } + } + return unused +} + +// Transform replaces $(VAR) style variables with values. +func (rv *RefVarTransformer) Transform(m resmap.ResMap) error { + rv.replacementCounts = make(map[string]int) + rv.mappingFunc = expansion.MappingFuncFor( + rv.replacementCounts, rv.varMap) + for id, res := range m { + for _, fieldSpec := range rv.fieldSpecs { + if id.Gvk().IsSelected(&fieldSpec.Gvk) { + if err := mutateField( + res.Map(), fieldSpec.PathSlice(), + false, rv.replaceVars); err != nil { + return err + } + } + } + } + return nil +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/transformers/transformer.go b/vendor/sigs.k8s.io/kustomize/pkg/transformers/transformer.go new file mode 100644 index 000000000..dc6f8807c --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/transformers/transformer.go @@ -0,0 +1,26 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package transformers has implementations of resmap.ResMap transformers. +package transformers + +import "sigs.k8s.io/kustomize/pkg/resmap" + +// A Transformer modifies an instance of resmap.ResMap. +type Transformer interface { + // Transform modifies data in the argument, e.g. adding labels to resources that can be labelled. + Transform(m resmap.ResMap) error +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/types/genargs.go b/vendor/sigs.k8s.io/kustomize/pkg/types/genargs.go new file mode 100644 index 000000000..bef093d35 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/types/genargs.go @@ -0,0 +1,64 @@ +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package types + +import ( + "strconv" + "strings" +) + +// GenArgs contains both generator args and options +type GenArgs struct { + args *GeneratorArgs + opts *GeneratorOptions +} + +// NewGenArgs returns a new object of GenArgs +func NewGenArgs(args *GeneratorArgs, opts *GeneratorOptions) *GenArgs { + return &GenArgs{ + args: args, + opts: opts, + } +} + +func (g *GenArgs) String() string { + if g == nil { + return "{nilGenArgs}" + } + return "{" + + strings.Join([]string{ + "nsfx:" + strconv.FormatBool(g.NeedsHashSuffix()), + "beh:" + g.Behavior().String()}, + ",") + + "}" +} + +// NeedHashSuffix returns true if the hash suffix is needed. +// It is needed when the two conditions are both met +// 1) GenArgs is not nil +// 2) DisableNameSuffixHash in GeneratorOptions is not set to true +func (g *GenArgs) NeedsHashSuffix() bool { + return g.args != nil && (g.opts == nil || g.opts.DisableNameSuffixHash == false) +} + +// Behavior returns Behavior field of GeneratorArgs +func (g *GenArgs) Behavior() GenerationBehavior { + if g.args == nil { + return BehaviorUnspecified + } + return NewGenerationBehavior(g.args.Behavior) +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/types/generationbehavior.go b/vendor/sigs.k8s.io/kustomize/pkg/types/generationbehavior.go new file mode 100644 index 000000000..67ba8a0b5 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/types/generationbehavior.go @@ -0,0 +1,59 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package types + +// GenerationBehavior specifies generation behavior of configmaps, secrets and maybe other resources. +type GenerationBehavior int + +const ( + // BehaviorUnspecified is an Unspecified behavior; typically treated as a Create. + BehaviorUnspecified GenerationBehavior = iota + // BehaviorCreate makes a new resource. + BehaviorCreate + // BehaviorReplace replaces a resource. + BehaviorReplace + // BehaviorMerge attempts to merge a new resource with an existing resource. + BehaviorMerge +) + +// String converts a GenerationBehavior to a string. +func (b GenerationBehavior) String() string { + switch b { + case BehaviorReplace: + return "replace" + case BehaviorMerge: + return "merge" + case BehaviorCreate: + return "create" + default: + return "unspecified" + } +} + +// NewGenerationBehavior converts a string to a GenerationBehavior. +func NewGenerationBehavior(s string) GenerationBehavior { + switch s { + case "replace": + return BehaviorReplace + case "merge": + return BehaviorMerge + case "create": + return BehaviorCreate + default: + return BehaviorUnspecified + } +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/types/kustomization.go b/vendor/sigs.k8s.io/kustomize/pkg/types/kustomization.go new file mode 100644 index 000000000..12d09820f --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/types/kustomization.go @@ -0,0 +1,250 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package types holds struct definitions that should find a better home. +package types + +import ( + "regexp" + + "sigs.k8s.io/kustomize/pkg/image" + "sigs.k8s.io/kustomize/pkg/patch" +) + +const ( + KustomizationVersion = "kustomize.config.k8s.io/v1beta1" + KustomizationKind = "Kustomization" +) + +// TypeMeta copies apimachinery/pkg/apis/meta/v1.TypeMeta +type TypeMeta struct { + // Kind copies apimachinery/pkg/apis/meta/v1.Typemeta.Kind + Kind string `json:"kind,omitempty" protobuf:"bytes,1,opt,name=kind"` + + // APIVersion copies apimachinery/pkg/apis/meta/v1.Typemeta.APIVersion + APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,2,opt,name=apiVersion"` +} + +// Kustomization holds the information needed to generate customized k8s api resources. +type Kustomization struct { + TypeMeta `json:",inline" yaml:",inline"` + + // + // Operators - what kustomize can do. + // + + // NamePrefix will prefix the names of all resources mentioned in the kustomization + // file including generated configmaps and secrets. + NamePrefix string `json:"namePrefix,omitempty" yaml:"namePrefix,omitempty"` + + // NameSuffix will suffix the names of all resources mentioned in the kustomization + // file including generated configmaps and secrets. + NameSuffix string `json:"nameSuffix,omitempty" yaml:"nameSuffix,omitempty"` + + // Namespace to add to all objects. + Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"` + + // CommonLabels to add to all objects and selectors. + CommonLabels map[string]string `json:"commonLabels,omitempty" yaml:"commonLabels,omitempty"` + + // CommonAnnotations to add to all objects. + CommonAnnotations map[string]string `json:"commonAnnotations,omitempty" yaml:"commonAnnotations,omitempty"` + + // PatchesStrategicMerge specifies the relative path to a file + // containing a strategic merge patch. Format documented at + // https://github.com/kubernetes/community/blob/master/contributors/devel/strategic-merge-patch.md + // URLs and globs are not supported. + PatchesStrategicMerge []patch.StrategicMerge `json:"patchesStrategicMerge,omitempty" yaml:"patchesStrategicMerge,omitempty"` + + // JSONPatches is a list of JSONPatch for applying JSON patch. + // Format documented at https://tools.ietf.org/html/rfc6902 + // and http://jsonpatch.com + PatchesJson6902 []patch.Json6902 `json:"patchesJson6902,omitempty" yaml:"patchesJson6902,omitempty"` + + // Images is a list of (image name, new name, new tag or digest) + // for changing image names, tags or digests. This can also be achieved with a + // patch, but this operator is simpler to specify. + Images []image.Image `json:"images,omitempty" yaml:"images,omitempty"` + + // Vars allow things modified by kustomize to be injected into a + // container specification. A var is a name (e.g. FOO) associated + // with a field in a specific resource instance. The field must + // contain a value of type string, and defaults to the name field + // of the instance. Any appearance of "$(FOO)" in the container + // spec will be replaced at kustomize build time, after the final + // value of the specified field has been determined. + Vars []Var `json:"vars,omitempty" yaml:"vars,omitempty"` + + // + // Operands - what kustomize operates on. + // + + // Resources specifies relative paths to files holding YAML representations + // of kubernetes API objects. URLs and globs not supported. + Resources []string `json:"resources,omitempty" yaml:"resources,omitempty"` + + // Crds specifies relative paths to Custom Resource Definition files. + // This allows custom resources to be recognized as operands, making + // it possible to add them to the Resources list. + // CRDs themselves are not modified. + Crds []string `json:"crds,omitempty" yaml:"crds,omitempty"` + + // Bases are relative paths or github repository URLs specifying a + // directory containing a kustomization.yaml file. + // URL format: https://github.com/hashicorp/go-getter#url-format + Bases []string `json:"bases,omitempty" yaml:"bases,omitempty"` + + // + // Generators (operators that create operands) + // + + // ConfigMapGenerator is a list of configmaps to generate from + // local data (one configMap per list item). + // The resulting resource is a normal operand, subject to + // name prefixing, patching, etc. By default, the name of + // the map will have a suffix hash generated from its contents. + ConfigMapGenerator []ConfigMapArgs `json:"configMapGenerator,omitempty" yaml:"configMapGenerator,omitempty"` + + // SecretGenerator is a list of secrets to generate from + // local data (one secret per list item). + // The resulting resource is a normal operand, subject to + // name prefixing, patching, etc. By default, the name of + // the map will have a suffix hash generated from its contents. + SecretGenerator []SecretArgs `json:"secretGenerator,omitempty" yaml:"secretGenerator,omitempty"` + + // GeneratorOptions modify behavior of all ConfigMap and Secret generators. + GeneratorOptions *GeneratorOptions `json:"generatorOptions,omitempty" yaml:"generatorOptions,omitempty"` + + // Configurations is a list of transformer configuration files + Configurations []string `json:"configurations,omitempty" yaml:"configurations,omitempty"` +} + +// DealWithMissingFields fills the missing fields +func (k *Kustomization) DealWithMissingFields() []string { + var msgs []string + if k.APIVersion == "" { + k.APIVersion = KustomizationVersion + msgs = append(msgs, "Fixed the missing field by adding apiVersion: "+KustomizationVersion) + } + if k.Kind == "" { + k.Kind = KustomizationKind + msgs = append(msgs, "Fixed the missing field by adding kind: "+KustomizationKind) + } + return msgs +} + +func (k *Kustomization) EnforceFields() []string { + var errs []string + if k.APIVersion != "" && k.APIVersion != KustomizationVersion { + errs = append(errs, "apiVersion should be "+KustomizationVersion) + } + if k.Kind != "" && k.Kind != KustomizationKind { + errs = append(errs, "kind should be "+KustomizationKind) + } + return errs +} + +// DealWithDeprecatedFields should be called immediately after +// loading from storage. +func DealWithDeprecatedFields(data []byte) []byte { + deprecateFieldsMap := map[string]string{ + "patches:": "patchesStrategicMerge:", + "imageTags:": "images:", + } + for oldname, newname := range deprecateFieldsMap { + pattern := regexp.MustCompile(oldname) + data = pattern.ReplaceAll(data, []byte(newname)) + } + return data +} + +// GeneratorArgs contains arguments common to generators. +type GeneratorArgs struct { + // Namespace for the configmap, optional + Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"` + + // Name - actually the partial name - of the generated resource. + // The full name ends up being something like + // NamePrefix + this.Name + hash(content of generated resource). + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + // Behavior of generated resource, must be one of: + // 'create': create a new one + // 'replace': replace the existing one + // 'merge': merge with the existing one + Behavior string `json:"behavior,omitempty" yaml:"behavior,omitempty"` + + // DataSources for the generator. + DataSources `json:",inline,omitempty" yaml:",inline,omitempty"` +} + +// ConfigMapArgs contains the metadata of how to generate a configmap. +type ConfigMapArgs struct { + // GeneratorArgs for the configmap. + GeneratorArgs `json:",inline,omitempty" yaml:",inline,omitempty"` +} + +// SecretArgs contains the metadata of how to generate a secret. +type SecretArgs struct { + // GeneratorArgs for the secret. + GeneratorArgs `json:",inline,omitempty" yaml:",inline,omitempty"` + + // Type of the secret. + // + // This is the same field as the secret type field in v1/Secret: + // It can be "Opaque" (default), or "kubernetes.io/tls". + // + // If type is "kubernetes.io/tls", then "literals" or "files" must have exactly two + // keys: "tls.key" and "tls.crt" + Type string `json:"type,omitempty" yaml:"type,omitempty"` +} + +// DataSources contains some generic sources for configmaps. +type DataSources struct { + // LiteralSources is a list of literal sources. + // Each literal source should be a key and literal value, + // e.g. `somekey=somevalue` + // It will be similar to kubectl create configmap|secret --from-literal + LiteralSources []string `json:"literals,omitempty" yaml:"literals,omitempty"` + + // FileSources is a list of file sources. + // Each file source can be specified using its file path, in which case file + // basename will be used as configmap key, or optionally with a key and file + // path, in which case the given key will be used. + // Specifying a directory will iterate each named file in the directory + // whose basename is a valid configmap key. + // It will be similar to kubectl create configmap|secret --from-file + FileSources []string `json:"files,omitempty" yaml:"files,omitempty"` + + // EnvSource format should be a path to a file to read lines of key=val + // pairs to create a configmap. + // i.e. a Docker .env file or a .ini file. + EnvSource string `json:"env,omitempty" yaml:"env,omitempty"` +} + +// GeneratorOptions modify behavior of all ConfigMap and Secret generators. +type GeneratorOptions struct { + // Labels to add to all generated resources. + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + + // Annotations to add to all generated resources. + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + + // DisableNameSuffixHash if true disables the default behavior of adding a + // suffix to the names of generated resources that is a hash of the + // resource contents. + DisableNameSuffixHash bool `json:"disableNameSuffixHash,omitempty" yaml:"disableNameSuffixHash,omitempty"` +} diff --git a/vendor/sigs.k8s.io/kustomize/pkg/types/var.go b/vendor/sigs.k8s.io/kustomize/pkg/types/var.go new file mode 100644 index 000000000..6a48032a0 --- /dev/null +++ b/vendor/sigs.k8s.io/kustomize/pkg/types/var.go @@ -0,0 +1,145 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package types + +import ( + "fmt" + "sort" + "strings" + + "sigs.k8s.io/kustomize/pkg/gvk" +) + +const defaultFieldPath = "metadata.name" + +// Var represents a variable whose value will be sourced +// from a field in a Kubernetes object. +type Var struct { + // Value of identifier name e.g. FOO used in container args, annotations + // Appears in pod template as $(FOO) + Name string `json:"name" yaml:"name"` + + // ObjRef must refer to a Kubernetes resource under the + // purview of this kustomization. ObjRef should use the + // raw name of the object (the name specified in its YAML, + // before addition of a namePrefix and a nameSuffix). + ObjRef Target `json:"objref" yaml:"objref"` + + // FieldRef refers to the field of the object referred to by + // ObjRef whose value will be extracted for use in + // replacing $(FOO). + // If unspecified, this defaults to fieldPath: $defaultFieldPath + FieldRef FieldSelector `json:"fieldref,omitempty" yaml:"fieldref,omitempty"` +} + +// Target refers to a kubernetes object by Group, Version, Kind and Name +// gvk.Gvk contains Group, Version and Kind +// APIVersion is added to keep the backward compatibility of using ObjectReference +// for Var.ObjRef +type Target struct { + APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty"` + gvk.Gvk `json:",inline,omitempty" yaml:",inline,omitempty"` + Name string `json:"name" yaml:"name"` +} + +// FieldSelector contains the fieldPath to an object field. +// This struct is added to keep the backward compatibility of using ObjectFieldSelector +// for Var.FieldRef +type FieldSelector struct { + FieldPath string `json:"fieldPath,omitempty" yaml:"fieldPath,omitempty"` +} + +// defaulting sets reference to field used by default. +func (v *Var) defaulting() { + if v.FieldRef.FieldPath == "" { + v.FieldRef.FieldPath = defaultFieldPath + } +} + +// VarSet is a slice of Vars where no var.Name is repeated. +type VarSet struct { + set []Var +} + +// Set returns a copy of the var set. +func (vs *VarSet) Set() []Var { + s := make([]Var, len(vs.set)) + copy(s, vs.set) + return s +} + +// MergeSet absorbs other vars with error on name collision. +func (vs *VarSet) MergeSet(incoming *VarSet) error { + return vs.MergeSlice(incoming.set) +} + +// MergeSlice absorbs other vars with error on name collision. +// Empty fields in incoming vars are defaulted. +func (vs *VarSet) MergeSlice(incoming []Var) error { + for _, v := range incoming { + if vs.Contains(v) { + return fmt.Errorf( + "var %s already encountered", v.Name) + } + v.defaulting() + vs.insert(v) + } + return nil +} + +func (vs *VarSet) insert(v Var) { + index := sort.Search( + len(vs.set), + func(i int) bool { return vs.set[i].Name > v.Name }) + // make room + vs.set = append(vs.set, Var{}) + // shift right at index. + // copy will not increase size of destination. + copy(vs.set[index+1:], vs.set[index:]) + vs.set[index] = v +} + +// Contains is true if the set has the other var. +func (vs *VarSet) Contains(other Var) bool { + return vs.Get(other.Name) != nil +} + +// Get returns the var with the given name, else nil. +func (vs *VarSet) Get(name string) *Var { + for _, v := range vs.set { + if v.Name == name { + return &v + } + } + return nil +} + +// GVK returns the Gvk object in Target +func (t *Target) GVK() gvk.Gvk { + if t.APIVersion == "" { + return t.Gvk + } + versions := strings.Split(t.APIVersion, "/") + if len(versions) == 2 { + t.Group = versions[0] + t.Version = versions[1] + } + if len(versions) == 1 { + t.Version = versions[0] + } + return t.Gvk +}